The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Okay, I know I had this problem, and then fixed it, so I'm passing it along, just in case you might want it.
![]() Here is a script that allows you to call any .html or .txt files INTO your forums, or any files that are not .shtml so for all your SSI you can use this code to call it into your forum pages. This is also great for people you want to use banner rotators. Code:
#!/usr/bin/perl ########################################################################### ## ## ## The Includer ## ## ------------ ## ## by Jimmy (wordx@hotmail.com) ## ## http://www.smartCGIs.com ## ## ## ## This is a free script, if anyone sold it to you please contact me. ## ## Please DO NOT remove any of the copyrights or links to our site, ## ## they keep this CGI free for everyone. Thanks! ## ## ## ## (c) copyright 2000 The Mp3eCom Network ## ########################################################################### # # Instructions: # ============ # Grab the content of any file and display it using a Javascript tag in the following format: # # <script src="/cgi-bin/includer.cgi?../point/to/file.txt"></script> # # with file.txt being the file you are grabbing. # If it's in a different directory, include the full unix path. $file = $ENV{'QUERY_STRING'}; print "Content-type: text/html\n\n"; if($file eq "/home2/form-kaos/www/insert/menu.html") { print "document.writeln('<center><font color=red>Includer Error: No File Specified.</font> ');\n"; print "document.writeln('<small>Script by <a href=\"http://www.smartcgis.com\" target=\"_blank\">SmartCGIs.com</a></small></center>');\n"; exit; } open(DATA,"$file") || print "document.writeln('<center><font color=red>Includer Error: Could not open $file ($!).</font> <small>Script by <a href=\"http://www.smartcgis.com\" target=\"_blank\">SmartCGIs.com</a></small></center>');"; @filecontent = <DATA>; close(DATA); foreach $line(@filecontent) { chomp($line); $line =~ s/\'/\\\'/g; print "document.writeln('$line');\n"; } Now copy that into a .txt file, and rename it includer.cgi, set your perl location at the top #/usr/bin/perl (this may be different for some free/pay hosts), upload it, CHMOD 755 (set permissions to 755) and that's it. There is no need to edit this script, calling is done from the code below Now in any page with ANY file extension (html, htm, shtml, shtm, php, php3, cgi, pl, etc..) you include this code: Code:
<script src="/cgi-bin/includer.cgi?../point/to/file.txt"></script> Credit to: Jimmy (wordx@hotmail.com) for the creaton of this script. snyx |
#2
|
|||
|
|||
![]()
this could be quite useful for a few things i want to do, thanks.
|
#3
|
|||
|
|||
![]()
i was searching for something like that for age thanks
i have add your script to my forum and i have edit my bb code so i have done it like this Code:
[inc] is replaced with <script src="/cgi-bin/includer.cgi?../ [/inc] is replaced with "></script> ![]() |
#4
|
|||
|
|||
![]()
Try this is all else fails:
Code:
<script src="http://www.yourname.com/cgi-bin/includer.cgi?../point/to/file.txt"></script> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|