The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Insert HTML or (pre-processed!) PHP file above specific forum Details »» | ||||||||||||||||||||||
Insert HTML or (pre-processed!) PHP file above specific forum
Developer Last Online: Oct 2023
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
|
Comments |
#12
|
|||
|
|||
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. |
#13
|
||||
|
||||
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. |
#14
|
|||
|
|||
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! |
#15
|
|||
|
|||
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. |
#16
|
|||
|
|||
|
#17
|
|||
|
|||
Quote:
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/? |
#18
|
||||
|
||||
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. |
#19
|
||||
|
||||
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! |
#20
|
||||
|
||||
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. |
#21
|
|||
|
|||
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 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|