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
Posticons exlusive to forums. NO STYLE editing!!! Details »»
Posticons exlusive to forums. NO STYLE editing!!!
Version: 0.1, by tehcake tehcake is offline
Developer Last Online: Jul 2005 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 05-18-2005 Last Update: Never Installs: 3
DB Changes
Code Changes Additional Files Is in Beta Stage  
No support by the author.

This has been done before, but I've yet to see it released here. I was desperate to have this for my forums which has a lot of posticons.

This hack allows you to make posticons useable in only forums you specify. I'm no PHP expert, and I find it amazing how I pulled this off (Had a little help from someone to get it working correctly.), so you won't be able to set the settings through admincp yet. Instead, you have to manually do some changse in your MySQL database for each posticon.

Step 1 MySQL
First, you'll have to go to the icon table in your MySQL database. Create a field called iconforums in the table. Then edit each posticon (phpMyAdmin you'll have to click on the BROWSE tab in the table to edit the fields.), add the forumids to the iconforums field, seperating each forumid with only a comma.

Step 2
Now you'll have to edit your includes/functions_newpost.php.
FIND
Code:
		SELECT iconid, iconpath, title
REPLACE WITH
Code:
		SELECT iconid, iconpath, title, iconforums

FIND
Code:
	while ($icon = $DB_site->fetch_array($icons))

	{
ADD BELOW
Code:
	$forumid = $foruminfo[forumid];
		$forums = explode(',',$icon[iconforums]);
		if (in_array($forumid,$forums))
		{
FIND
Code:
			eval('$posticonbits .= "' . fetch_template('posticonbit') . '";');
ADD BELOW
Code:
}
FINISH! Enjoy you're cleaner forums.

Show Your Support

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

Comments
  #12  
Old 05-20-2005, 04:35 AM
tehcake tehcake is offline
 
Join Date: Mar 2005
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I didn't use varchar. I used mediumtext, but I should've used smalltext. I don't know if that will help.
Reply With Quote
  #13  
Old 05-23-2005, 06:42 PM
Renee's Avatar
Renee Renee is offline
 
Join Date: May 2004
Location: Hungary
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, if I add the forumid to iconforums the icon which is added on iconforums don't displayed on all forum not just the added forumid :ermm:
Reply With Quote
  #14  
Old 06-06-2005, 12:57 PM
Clayton Clayton is offline
 
Join Date: Nov 2004
Posts: 216
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is a really good idea

is anyone able to add more clarity to it, please?

Is this working correctly? How many of you have got it working? Is it possible to have a txt file for all in one instruction?

would be appreciated

thank you
Reply With Quote
  #15  
Old 06-06-2005, 01:03 PM
nexialys
Guest
 
Posts: n/a
Default

this is only a semi-hack... usually, the protocol would need to give you a complete hack, where per example, each posticon is set in the admincp with a new field where admins add the forumids, so you don't have to edit your tables...
Reply With Quote
  #16  
Old 06-06-2005, 01:15 PM
Clayton Clayton is offline
 
Join Date: Nov 2004
Posts: 216
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks nexialys

this is a nifty idea, it would be great if someone could finalise it

will wait in anticipation

Thanks

G
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 03:06 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.04431 seconds
  • Memory Usage 2,247KB
  • Queries Executed 20 (?)
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
  • (6)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (6)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete