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

Reply
 
Thread Tools
Forum Headers Hack Details »»
Forum Headers Hack
Version: 1.00, by FASherman FASherman is offline
Developer Last Online: May 2011 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 08-24-2002 Last Update: Never Installs: 53
 
No support by the author.

The idea for this hack came from the desire to increase forum traffic. What I wanted to do was subscribe individual forums into webrings. The problem was each forum would have to have the webring code within that forum page.

So I began writing this with the idea of just enabling webrings for a forum, but saw that it would just as easily be useful for adding custom HTML headers to individual forums.

What this hack does is allow you to specify an HTML code as a header for a specific forum. From the Admin CP, you specify whether a forum should have a forum header, if it should be guest only or not (I didn't want to bother registeres users with the webring banner), and then a text box for entering in the HTML

You can view a sample forum header at my site:
http://www.fasherman.com/forums/foru...php?forumid=27

I've also included a screen shot of AdminCP

Show Your Support

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

Comments
  #12  
Old 08-26-2002, 03:26 PM
thedvs thedvs is offline
 
Join Date: May 2002
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

followed it to the letter (including the sanity bit heh)
got this error... from the admin panel...

Invalid SQL: UPDATE forum
SET
styleid='1', title='Chit Chat', description='General Discussion, board news, news, discuss anything you want in here.',
active='1', displayorder='3', iconimg='', parentid='6', parentlist='8,6,-1',
allowposting='1', cancontainthreads='1', daysprune='30',
newpostemail='', newthreademail='',
moderatenew='0', allowhtml='1', allowbbcode='1',
allowimages='1', allowsmilies='0', allowicons='0',
styleoverride='1', allowratings='1', countposts='1',
moderateattach='0',forumnewsid='',
enableheader='1',guestonlyheader='0',forumheader=' THIS IS A TEST HEADER'

WHERE forumid='8'
mysql error: Unknown column 'iconimg' in 'field list'

mysql error number: 1054
Reply With Quote
  #13  
Old 08-26-2002, 04:20 PM
FASherman's Avatar
FASherman FASherman is offline
 
Join Date: Aug 2002
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you don't have the forum icons hack, you won't have the iconimg field in your forums table.

Thats why I mentioned that line would need som sanity checking to make sure it was consistant with your site.
Reply With Quote
  #14  
Old 08-26-2002, 04:31 PM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

step 9 says: In forumdisplay.php
FIND:
-----------
updateuserforum($forumid);
-----------
Then your code. Does it go before or after?
Reply With Quote
  #15  
Old 08-26-2002, 05:20 PM
FASherman's Avatar
FASherman FASherman is offline
 
Join Date: Aug 2002
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Smoothie
step 9 says: In forumdisplay.php
FIND:
-----------
updateuserforum($forumid);
-----------
Then your code. Does it go before or after?
Add after. I fixed the install file. Thanks for the feedback!
Reply With Quote
  #16  
Old 08-26-2002, 08:33 PM
thedvs thedvs is offline
 
Join Date: May 2002
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed perfectly!
ive been waiting for a hack like this all damn year
Reply With Quote
  #17  
Old 08-26-2002, 09:02 PM
Vinney Vinney is offline
 
Join Date: Nov 2001
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

amazing ! cant wait too install it !
Reply With Quote
  #18  
Old 08-27-2002, 01:10 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

look at this

https://vborg.vbsupport.ru/showthrea...threadid=36093


Quote:
Originally posted by FASherman
I don't think so. Remember, this isn't designed for banner ads. You can use it that way, but the HTML code will have to handle aging, rotating, etc.

All this hack does is add a customer header and footer to each forum. I just updated the install file to include adding footers too.

It gives anyone the ability to do what http://www.sitepointforums.com/ has done without having to do it as a template hack that makes each forum the same.
Reply With Quote
  #19  
Old 08-27-2002, 07:49 PM
FASherman's Avatar
FASherman FASherman is offline
 
Join Date: Aug 2002
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not even close to being the same. Why would you create a template per forum when you can just enter HTML directly into a text box via the ACP, keep the data in the database and have it protecting with backups?

Also nothing about footer or restricting the headers and footers individually to just guests.

Would you suggest two additional templates per forum to have both a header and a footer? Not to mention the headache of having to check forumid's before modifying a template if you have several forums. Or having to remember to delete templates if a forum gets deleted.

This is a much more managable, elegant solution. You want to edit the header/footer of a particular forum, you edit the forum. You want to limit either the header or footer to just guests, select that option as you edit the forum. You delete the forum, the header/footer info goes away at the same time. Whats the cost? One SQL querie, same as adding a new thread.

What exactly are you objecting to?
Reply With Quote
  #20  
Old 08-27-2002, 08:12 PM
FASherman's Avatar
FASherman FASherman is offline
 
Join Date: Aug 2002
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is one that is actually quite similar in approach but more limited in functionality. I came up in the list as I was checking this thread.

https://vborg.vbsupport.ru/showthrea...threadid=26818

I'm going to link to is because if all you want is banners and the ability to set time limits, this is a better approach. You display a picture, not actual HTML.

If you want HTML headers and footers and would rather have control based on user level, this is the better approach.
Reply With Quote
  #21  
Old 08-27-2002, 08:46 PM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Question. Step 5:
Quote:
The following FIND/REPLACE will require some sanity checking,
depending if you have installed hacks that have added fields.
Still in admin/forums.php
Here:
Quote:
FIND:
-----------
$DB_site->query("INSERT INTO forum
This: iconimg, and this: forumnewsid are not in my code. I know they are in your's because of hacks you have installed that I don't. Do I eliminate them from the code that I replace? Wouldn't it have been better to supply the clean code to find and replace? It's a bit confusing.
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:18 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.07931 seconds
  • Memory Usage 2,305KB
  • Queries Executed 25 (?)
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_quote
  • (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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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