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
Header/Footer For Each Forum and Threads in that Forum Details »»
Header/Footer For Each Forum and Threads in that Forum
Version: 1.00, by ChurchMedia ChurchMedia is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 06-05-2004 Last Update: Never Installs: 188
 
No support by the author.

This hack will allow you to add an extra, unique header and footer for each forum. The header and footer will show up on the forum home page and on each thread within that forum. You can use HTML, so you can put in rotating banner code or anything you like.

2 Queries
2 Modifications to admincp/forum.php
2 Template modifications

Enjoy!

Be sure to click INSTALL!

Show Your Support

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

Comments
  #42  
Old 07-29-2004, 08:00 AM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, the php in the CODE does not work - the PHP bit is not run.
The image I showed you is an example of what it SHOULD look like if the PHP worked.
I suspect what I need to do is alter the hack itself to process the header and footer so that php script is run.
I'm confidant with PHP but hacking vBulletin is something entirely different.
Reply With Quote
  #43  
Old 07-29-2004, 09:44 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Spinball
No, the php in the CODE does not work - the PHP bit is not run.
The image I showed you is an example of what it SHOULD look like if the PHP worked.
I suspect what I need to do is alter the hack itself to process the header and footer so that php script is run.
I'm confidant with PHP but hacking vBulletin is something entirely different.
OK, so you have an HTML file you want to include in your Forum Home page?

Here is what I tried (and IT WORKED!!!)

Edit your index.php file and find:

PHP Code:
require_once('./includes/functions_forumlist.php'); 
Below that, add:

PHP Code:
// effort to help

globalize($_REQUEST, array(
'file' => STR,
'title' => STR
));

$file="announcement.htm";

$exts "html, htm, txt, shtml";
$formats explode(",",str_replace(" """strtolower($exts)));
function 
checkfile($file$formats) {
  
$ext strtolower(substr($file,-strpos(strrev($file),'.')));
  if(!
in_array($ext$formats)) return FALSE;
  if(!
file_exists($file)) return FALSE;
  if( 
substr($file,0,5) != "./../" && substr($file,0,7) != "http://" ) return TRUE
  return 
FALSE;
}

if (
checkfile($file$formats)) {
$fd fopen ($file,"r");
$buffer fread($fd,filesize($file));
fclose ($fd);
$buffer str_replace('"',"'",$buffer);
} else {
$errormessage "There is an error with this link: $file";
}
// $navbits[""] = $pagetitle;
// $navbits = construct_navbits($navbits);

eval("\$HTML = \"$buffer\";");

// end of effort to help 
Remember to change $file="announcement.htm" in the code above, to whatever your file name is.

Then, go into your FORUMHOME template and find :

HTML Code:
$navbar
Below that, add:

HTML Code:
$HTML
It worked on my forum, but you might have to play a bit with it, I am not sure if errors are handled etc.

Rgds
Reply With Quote
  #44  
Old 07-29-2004, 11:30 AM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's a nice, bit of code, but no, I want to include an HTML file at the top of one specific forum.
Reply With Quote
  #45  
Old 07-30-2004, 04:32 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Spinball
That's a nice, bit of code, but no, I want to include an HTML file at the top of one specific forum.
OK, then instead of FORUMHOME, go to FORUMDISPLAY and right below the navbar enter the following code:

[html]
<if condition="$forumid=XYZ">
$HTML
</if>

Remember to change XYZ with the forum id of the forum you want the external HTML file to show. Let me know if it works.

Rgds
Reply With Quote
  #46  
Old 07-31-2004, 07:42 AM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Again, that's great but it's a whole chunk of code for the header for ONE forum. That's a lot of code to include if you have 30 forums.
Might it not be easier to allow the hack to work on a bit of PHP code?
Reply With Quote
  #47  
Old 07-31-2004, 01:22 PM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Spinball
Again, that's great but it's a whole chunk of code for the header for ONE forum. That's a lot of code to include if you have 30 forums.
Might it not be easier to allow the hack to work on a bit of PHP code?
Sorry, that's all I can do. Maybe the hack author can help you more.

Rgds
Reply With Quote
  #48  
Old 07-31-2004, 01:34 PM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your help is appreciated.
Reply With Quote
  #49  
Old 08-30-2004, 06:21 AM
roundhost roundhost is offline
 
Join Date: Jul 2004
Location: UK
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fantastic! Installed!
Reply With Quote
  #50  
Old 09-02-2004, 02:25 AM
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Location: Las Cruces, NM
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mrlb.com
ChurchMedia - working well for forum homepages but not forum threads in that forum...
Make sure you follow this instruction:

PHP Code:
-----------------------STEP 4-----------------------------
This will put the header/footer on every thread in the forum

In Template SHOWTHREAD FIND
:
<------------------------------------------->
$navbar
<------------------------------------------->
BELOW ADD:
<------------------------------------------->
$foruminfo[forumheader]
<------------------------------------------->

FIND:
<------------------------------------------->
$footer
<------------------------------------------->
ABOVE ADD:
<------------------------------------------->
$foruminfo[forumfooter
Reply With Quote
  #51  
Old 09-02-2004, 02:30 AM
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Location: Las Cruces, NM
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sv1cec
Sorry, that's all I can do. Maybe the hack author can help you more.

Rgds

Thanks to sv1cec for trying to get this to work for Spinball. Unfortunately, vBulletin won't parse PHP in ANY template. I think what you are looking for is a completely different hack. I'm not sure how it would work. Sorry


(P.S. New hip is healing nicely. Thanks for the nice notes ).
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:00 AM.


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.05382 seconds
  • Memory Usage 2,333KB
  • 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
  • (2)bbcode_html
  • (3)bbcode_php
  • (5)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
  • (4)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