Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Require a post icon on new thread creation (or on every post) Details »»
Require a post icon on new thread creation (or on every post)
Version: 1.00, by sblum sblum is offline
Developer Last Online: Jul 2005 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 09-20-2004 Last Update: Never Installs: 9
 
No support by the author.

Create a new phrase in the category "Front-End Error Messages" titled "noicon", with the text "You must choose a post icon before posting a new thread."

Open includes/functions_newpost.php

Find:
Code:
	// check for subject/message
	if (($post['message'] == '' AND $vboptions['postminchars'] > 0) OR ($type == 'thread' AND empty($post['title'])))
	{
		eval('$errors[] = "' . fetch_phrase('nosubject', PHRASETYPEID_ERROR) . '";');
	}
Add Below:
Code:
	// check for post icon
	if ($type == 'thread' AND $post['iconid'] == 0)
	{
		eval('$errors[] = "' . fetch_phrase('noicon', PHRASETYPEID_ERROR) . '";');
	}
That's it. If you want to make it required on all posts instead of just new thread creation, change the phrase accordingly and add the following code instead:

Code:
	// check for post icon
	if ($post['iconid'] == 0)
	{
		eval('$errors[] = "' . fetch_phrase('noicon', PHRASETYPEID_ERROR) . '";');
	}

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 09-20-2004, 10:43 PM
sblum sblum is offline
 
Join Date: Jul 2004
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can see a demo at http://www.postfarm.net/ and, as always, please click install
Reply With Quote
  #3  
Old 09-21-2004, 01:15 AM
marcel-ea marcel-ea is offline
 
Join Date: Oct 2002
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thx very much
Reply With Quote
  #4  
Old 09-25-2004, 11:12 PM
Zoints Zoints is offline
 
Join Date: Feb 2004
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack. It does however break the "report post" hack where the report is posted as a new thread in a forum of your choice. I fixed it by changing it to this:

Code:
// check for post icon
	if (THIS_SCRIPT != 'report') { 
		if ($type == 'thread' AND $post['iconid'] == 0)
		{
			eval('$errors[] = "' . fetch_phrase('noicon', PHRASETYPEID_ERROR) . '";');
		}
	}
Reply With Quote
  #5  
Old 09-26-2004, 12:07 AM
turbidblue's Avatar
turbidblue turbidblue is offline
 
Join Date: Apr 2004
Location: Indiana
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

awesome!

this is cool, because I get so tired of seeing just the default icon used, esp when I have a ton just sitting there

[high]* turbidblue click install happily [/high]
Reply With Quote
  #6  
Old 02-13-2005, 12:06 AM
Snifter Snifter is offline
 
Join Date: Feb 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there anyway to set this up so that it won't require an icon for forums with icons turned off?
Reply With Quote
  #7  
Old 02-13-2005, 12:56 AM
Snifter Snifter is offline
 
Join Date: Feb 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Figured it out, this should work


PHP Code:
        // check for post icon
        
if ($foruminfo['allowicons']) { 
                if (
$type == 'thread' AND $post['iconid'] == 0)
                {
                        eval(
'$errors[] = "' fetch_phrase('noicon'PHRASETYPEID_ERROR) . '";');
                }
        } 
Reply With Quote
  #8  
Old 10-04-2005, 04:30 AM
ZGeek ZGeek is offline
 
Join Date: Jan 2003
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone updating this for vb 3.5?
Reply With Quote
  #9  
Old 01-29-2006, 09:58 PM
Hawk7173 Hawk7173 is offline
 
Join Date: Dec 2004
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How would I get rid of the no icon option? Have this installed, but it's confusing as the message when not having a icon checked is

Could not find phrase 'noicon'.

would that require a phraze change?
Reply With Quote
  #10  
Old 09-09-2008, 03:32 PM
3DPiMp 3DPiMp is offline
 
Join Date: Jul 2008
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

will this mod work in Version 3.7.2?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:42 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04671 seconds
  • Memory Usage 2,287KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete