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
Insert HTML or (pre-processed!) PHP file above specific forum Details »»
Insert HTML or (pre-processed!) PHP file above specific forum
Version: 1.00, by Spinball Spinball is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 08-02-2004 Last Update: Never Installs: 24
Supported
 

This is a very simple but very powerful hack for VB 3 which I've not been able to find elsewhere so decided to write.

It inserts a named external file (or files) above a specific forum (or forums). I use it to insert some HTML from HTML AND PHP (!) files above specific forums.
It works perfectly on my forums with over 28,000 members.

It requires editing one file and one template.

The amazing thing I discovered is that if the php function used (file_get_contents) is used on a php file, the php is processed BEFORE the file contents are read into the string.

The first attached image shows this hack 'including' a php file which dynamically builds a list from a database on a different server into a drop-down list box.

The second image shows the inclusion of a banner and beneath it a HTML file showing latest news (which is created automatically).

* Updated August 7 2004. Altered the text file to include instructions on how to insert the file at the top of your forum list *.
Please note that the forum list instructions are untested. If someone uses it, please let me know if it works ok.
One question, though. This hack is so simple but so powerful, howcome nobody has done it before? Or have they already?

Show Your Support

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

Comments
  #12  
Old 08-29-2004, 12:38 AM
YLP1 YLP1 is offline
 
Join Date: Aug 2004
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you use this mod to pull in the Latest Topics mod used in the portal? Or is there a way to pull in the latest topics/posts without using the portal mod?

I'm very new to VB and PHP so any help is greatly appreicated.

I am trying to put the most recent topics/posts at the top of the forum and get it scroll when moused over...I'm having a devil of a time figuring this out.
Reply With Quote
  #13  
Old 08-29-2004, 07:13 AM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not familiar with the Latest Topics mod and don't have time right now to investigate.
I would imagine that nearly anything is possible with a little coding.
Reply With Quote
  #14  
Old 10-28-2004, 01:16 AM
dr.science dr.science is offline
 
Join Date: Nov 2002
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've added this, and it looks very good. I just have a couple questions. How do I center the image on top of my forum list? It is far left right now. Also, I can't seem to get the images links to work. I have been playing with it for a while and can't seem to figure out how to get the perl scripts working, or even functional.

thanks for your help!
Reply With Quote
  #15  
Old 10-28-2004, 08:38 PM
gfd gfd is offline
 
Join Date: Aug 2004
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you can wrap your banner/link in a div:

<div style="text-align:center;">
<a href......>banner</a>
</div>

.... i don't know about the links. It would help if you can post a link to your page.
Reply With Quote
  #16  
Old 10-29-2004, 02:36 AM
dr.science dr.science is offline
 
Join Date: Nov 2002
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, it's here:

http://www.d-series.org/forums/?

Thanks!
Reply With Quote
  #17  
Old 11-24-2004, 07:47 PM
dr.science dr.science is offline
 
Join Date: Nov 2002
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dr.science
Sorry, it's here:

http://www.d-series.org/forums/?

Thanks!
Can someone help me please? I am trying to do a couple oth things and I can't seem to get them done right.

My banner images do not link correctly to the sites they are for. I am not familiar ith how to make a perl script.

Also, where do I input the code to center the banners on the forum home page? Do I just use this code: <div style="text-align:center;">
<a href......>banner</a>
</div> ???

Thanks for all of your help. I would really appreciate it if someone would help me so I can get this fixed.

Thanks again!
http://www.d-series.org/forums/?
Reply With Quote
  #18  
Old 11-24-2004, 08:38 PM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What code are you using to display the banner?
You just need to put a centre that. Ill help if you post the HTML which is displaying the banner.

With regard to the perl script to make the link work, if you want to count the number of clicks of the banner then you need to use a perl script as the target of the banner. This is so you can count the number of times the perl script has been opened using a normal log file analysis program like Webtrends.
The perl script should be located in your cgi-bin folder and you will need to make your banner link <A HREF= 'link to your perl script' target='_blank'>
The link itself can be relative e.g.: '../cgi-bin/yourperlscript.pl'
or direct 'htp://www.yoursite.com/cgi-bin/yourperscript.pl'.
The first one is preferable.
It looks like you haven't got the link location correct.
The perl script will work if you put it in your cgi-bin folder and in telnet or with an appropriate ftp program chmod 755 yourperlscript.pl
Presumably you have copied my example to create the correct perl script?

Note : it's possible to have an alternative to using a perl script if you instead have the link fire up your own php application which counts the clicks for you.
But you will need some programming and database experience to do this.
Reply With Quote
  #19  
Old 12-06-2004, 09:47 PM
Mamochka's Avatar
Mamochka Mamochka is offline
 
Join Date: Aug 2003
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,Spinball

you typed for Ex:
#!/usr/bin/perl
print "Location: http://www.targetdomain.com/";

Can you make Ex with next info -> www.mylink.com alttext=MyLink

and Ex for Forumhome,because I want to put the Banner above a navlink.

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

You'll have to use one of the other hacks for banners above the navbar.
The perl script you quoted above is simply for couning the hits as explained in the description accompanying this thread.
Reply With Quote
  #21  
Old 12-28-2004, 04:05 AM
turkforum turkforum is offline
 
Join Date: Oct 2004
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it will be a very nice hack but!
It only shows at forumdisplay.php when someone reads the thread showtread.php does not show the banner
i have more than 100 forums and some categories is not possible to make this hack available for categories?
or lets say how can i enable multiple forums
like
if ($forumid==76) {
$mycustomheader = file_get_contents("http://domain.net/hosting.htm");
}
// get external data
do i have to copy and paste te code for multiple fourms or is there comma like code for multiple forums
like
if ($forumid==76,x,y,z) { i tried comma but doesnot work
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 11:26 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06563 seconds
  • Memory Usage 2,306KB
  • 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
  • (1)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