View Full Version : Instant Txt/ Html/ Java File Forum Integration
Erwin
06-11-2004, 10:00 PM
INSTANT TXT/ HTML/ JAVA FILE FORUM INTEGRATION
Version 1.3 for vBulletin 3.x.x by Dr Erwin Loh
As the name suggests, this hack allows you to display any HTML file integrated into your forums automatically.
No file hacking! No template modifying! Just upload 1 file!
There is no need to make a new template or PHP file. Easy way to incorporate rules, messages, web pages etc. into your forums.
All you need to do is to run this URL:
http://www.your-forums/forums/html.php?file=xxx.html
Where xxx.html is the HTML file you want to integrate into your forums. The file extension can be HTML, HTM, SHTML or even TXT (text files). You can add more file extensions by modifying html.php - NOTE: the file name is case-sensitive.
This is also a quick way to integrate java applets into your forum (for example, java chat applets). Just copy and paste the java applet code into a HTML file, and then put the HTML file name into the URL above. Instant java integration!
For HTML files in subdirectories, use this URL:
http://www.your-forums/forums/html.php?file=directory/xxx.html
By default, the title is the filename. To make a custom title in your forum page, use this URL:
http://www.your-forums/forums/html.php?file=xxx.html&title=Your Title
You can have spaces in your custom title. :)
I have disabled remote file integration - this way other people cannot use this link to integrate offensive pages into your site. :)
To let only certain usergroups see the page, instructions are in the PHP file on how to do it.
Installation- upload 1 file!
1) Upload html.php into your forum directory.
2) Done!
3) Upload any HTML file or TEXT file into your forums directory, or sub-directory, and run the command line URL as listed above, and you'll see the file integrated into your forums automatically!
Update
Version 1.1 - Made the the title of the forums show up in the page and the heading of the table if no title is set in the URL - if the title is set, the title is now also shown in the table heading.
Version 1.2 - added automatic navbar support. :)
Version 1.3 - reduce 1 query by caching template.
Enjoy! :)
MrZeropage
06-12-2004, 07:16 AM
This sounds FANTASTIC and gives so many options to integrate in the forum ...
THANKS !
Logik
06-12-2004, 08:07 AM
niceeeeeeee..
NuclioN
06-12-2004, 09:25 AM
Very good :) Tnx Erwin.
Boofo
06-13-2004, 06:24 AM
It works great! Can we change where it says vBulletin Message to the page title somehow?
Erwin
06-13-2004, 01:44 PM
It works great! Can we change where it says vBulletin Message to the page title somehow?
Mmm... I'm using the generic vBulletin STANDARD_ERROR template to make this hack easy to use - if you want you can add a new template and put its name into the html.php and you can name it whatever you want! :)
Boofo
06-13-2004, 03:26 PM
Mmm... I'm using the generic vBulletin STANDARD_ERROR template to make this hack easy to use - if you want you can add a new template and put its name into the html.php and you can name it whatever you want! :)
I can do that. I'll just copy the whole STANDARD_ERROR template and pass the title to it where the vBulletin message is now and voila! ;) Thank you, sir. ;)
ChurchMedia
06-16-2004, 07:45 AM
GREAT idea! I'll make good use of this!
Synicide
06-16-2004, 05:01 PM
This is just awesome, great way to integrate tournament signups into my fourm, I was thinking of doing something like this myself, but Erwin always does a much better job. :D Thanks dude.
* Synicide frantically hits the install button.
gmarik
06-17-2004, 12:18 PM
I give you my thanks, pal. Only one request. Could you remake
http://www.your-forums/forums/html.php?file=xxx.html to work with
http://www.your-forums/forums/html/xxx.htm ?
Erwin
06-19-2004, 04:57 AM
Version 1.1 update
Made the the title of the forums show up in the page and the heading of the table if no title is set in the URL - if the title is set, the title is now also shown in the table heading.
All you need to do is download and upload the new html.php - nothing else to do. :)
dadymac
06-24-2004, 01:01 AM
anyway to get the navlinks in there?
also, if the shtml file (or any for that matter) does anykind of ssi, they wont show up, ive been trying to find some way around this without having to use an iframe, this is as close as i have gotten.
Erwin
06-24-2004, 01:43 AM
The navbar? That can be easily added actually... I'll do that for the next version.
SnowBot
06-24-2004, 05:20 AM
This is a great idea and great hack :)
1 question :)
Anyway to make it show up ascii ?
It would be great if i can show off some of my ascii art this way.
genmud
06-28-2004, 08:56 AM
Yea... I installed this php file and renamed it to page.php.... everything includes fine, and i can do everything correctly, I also added a style named htmlinc for the wrapper of the page... what I tried to do was include the navbar, with all the links to the forums and everything... but I couldn't do it :( it wont even show up... here is the template:
I put the $navbar code in... so shouldn't it show up???
I am a noob @ hacking so :P
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$pagetitle</title>
$headinclude
$headinsert
</head>
<body>
$header
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="36" align="left" valign="top" nowrap background="images/hardwired/misc/vborgmiddle_01.gif"><img src="images/hardwired/misc/vborgmiddle_01.gif" width="36" height="57" alt=""></td>
<td width="100%" valign="top">
$navbar
</center></td>
<td width="37" align="right" valign="top" nowrap background="images/hardwired/misc/vborgmiddle_03.gif"><img src="images/hardwired/misc/vborgmiddle_03.gif" width="37" height="57" alt=""></td>
</tr>
</table>
<table width="100%" height="378" border="0" align="center" valign="middle" cellpadding="0" cellspacing="0">
<tr>
<td width="36" height="100%" align="left" valign="top" nowrap background="images/hardwired/misc/vborgmiddle_01.gif"><img src="images/hardwired/misc/vborgmiddle_01.gif" width="36" height="57" alt=""></td>
<td width="100%" height="100%" valign="top">
<br />
<br />
<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="70%" align="center" valign="middle">
<tr>
<td class="tcat">$vbphrase[vbulletin_message]</td>
</tr>
<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div align="$stylevar[left]">
<if condition="$show['permission_error']">
<script type="text/javascript" src="clientscript/vbulletin_md5.js"></script>
<form action="login.php" method="post" onsubmit="md5hash(vb_login_password,vb_login_md5password)">
<input type="hidden" name="do" value="login" />
<input type="hidden" name="forceredirect" value="1" />
<input type="hidden" name="url" value="$scriptpath" />
<input type="hidden" name="vb_login_md5password" />
$postvars
<input type="hidden" name="s" value="$session[sessionhash]" />
<!-- permission error message - user not logged in -->
<div class="smallfont">$vbphrase[not_logged_no_permission]</div>
<ol>
<li class="smallfont">$vbphrase[not_logged_in_fill_in_form]</li>
<li class="smallfont">$vbphrase[may_not_have_sufficient_privileges]</li>
<li class="smallfont">$vbphrase[administrator_may_disabled_account]</li>
</ol>
<fieldset class="fieldset">
<legend>$vbphrase[log_in]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" align="center">
<tr>
<td>$vbphrase[username]:<br /><input type="text" class="bginput" name="vb_login_username" size="50" accesskey="u" tabindex="1" /></td>
</tr>
<tr>
<td>$vbphrase[password]:<br /><input type="password" class="bginput" name="vb_login_password" size="50" accesskey="p" tabindex="1" /></td>
</tr>
<tr>
<td>
<span style="float:$stylevar[right]"><a href="login.php?$session[sessionurl]do=lostpw">$vbphrase[forgotten_your_password]</a></span>
<label for="cb_cookieuser"><input type="checkbox" name="cookieuser" value="1" id="cb_cookieuser" checked="checked" tabindex="1" />$vbphrase[remember_me]</label>
</td>
</tr>
<tr>
<td align="$stylevar[right]">
<input type="submit" class="button" value="$vbphrase[log_in]" accesskey="s" tabindex="1" />
<input type="reset" class="button" value="$vbphrase[reset_fields]" accesskey="r" tabindex="1" />
</td>
</tr>
</table>
</fieldset>
<div class="smallfont"><phrase 1="register.php?$session[sessionurl]do=signup">$vbphrase[admin_required_register]</phrase></div>
</form>
<!-- / permission error message - user not logged in -->
<else />
<!-- main error message -->
<blockquote><p>$errormessage</p></blockquote>
<!-- / main error message -->
</if>
</div>
</div>
<!--
<div style="margin-top:$stylevar[cellpadding]px">
<input type="submit" class="button" value="$vbphrase[go_back]" accesskey="s" onclick="history.back(1); return false" />
</div>
-->
</td>
</tr>
</table>
<br />
<!-- forum jump -->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td>$forumjump</td>
</tr>
</table>
<!-- / forum jump -->
<br />
<br />
</center></td>
<td width="37" height="100%" align="right" valign="top" nowrap background="images/hardwired/misc/vborgmiddle_03.gif"><img src="images/hardwired/misc/vborgmiddle_03.gif" width="37" height="57" alt=""></td>
</tr>
</table>
$footer
</body>
</html>
SnowBot
07-02-2004, 06:03 AM
Any news on adding the navbar Erwin ? :)
Erwin
07-02-2004, 06:25 AM
I've been busy with my own site. :) This weekend hopefully.
sv1cec
07-02-2004, 08:46 AM
You may call me idiot, but I have no great experience in vB, php etc.
What I am looking for, is a way to call an external .html file, to show a sponsors banner in every page of my forums. I know I can edit the templates to do it, but then every time I change something in my sponsors panel, I would have to edit the HTML code in several places. At the moment, I have the html code below my navbar, but not all forum pages use the navbar.
I am not sure if I can do it with your hack. If you could help me out, I would sincerely appreciate it.
My site is http://forum.m1911.org and what I am trying to put on the external html file is the table called "Sponsors Panel".
Many thanks and kind regards
SnowBot
07-02-2004, 01:27 PM
I've been busy with my own site. :) This weekend hopefully.No rush Erwin :) Thanks for the update on time scale for the navbar version. Our own sites come first so no rush :)
KingAdora
07-06-2004, 11:20 AM
Fantastic! Just what I've been looking for all morning :D
Would really like to see the nav bar in there to finish it off..
#######
edit: nevermind I managed that bit myself :)
#####
So yeah, if you can get the navbar to work with this, I'd be very happy :)
Great hack, thanks again,
KA
SIINSI
07-12-2004, 04:36 AM
This is the best thing since sliced bread. I loved it for vb2 and love it for vb3 :)
Thanks!
Miguel
KingAdora
07-12-2004, 10:15 AM
Any news on the navbar front? If you don't have time to do it yourself, can you point us in the right direction to do it ourselves?
Thanks!
Erwin
07-13-2004, 12:16 PM
Update
----------
Version 1.2 - added automatic navbar support. :)
To upgrade, just download the new html.php, upload and done! No need to edit anything.
SnowBot
07-14-2004, 10:46 AM
Great job Erwin and thanks its appreciated very much sir. :)
Erwin
07-18-2004, 04:02 AM
<u>Minor update:</u>
Version 1.3 - reduce 1 query by caching template.
Just upload the new html.php.
Renagade
07-25-2004, 10:51 PM
Nice Hack. Wold it be possible to use this hack to show Java Script in a post. For example I want to show a rss stream in a sticky post . I dont want a clickable link. Any help would be appreaciated.
The script is
<script language="JavaScript" src="http://jade.mcli.dist.maricopa.edu/feed/feed2js.php?src=http%3A%2F%2Fwww.wired.com%2Fnews% 2Ffeeds%2Frss2%2F0%2C2610%2C40%2C00.xml&chan=n&num=4&desc=1&date=n&targ=n" type="text/javascript"></script>
KingAdora
08-06-2004, 10:43 AM
Did you upload the wrong file or something?
The 1.3 version is the same as 1.2..
pmay68
09-06-2004, 10:04 PM
help please...
How do i get this to work
http://adventurersunited.com/forums/lotrd/index.php
what do i need to type the browser for it to find this with the hack.. I already added the php extention inside the hack file... can someone tell me please..
Host Directory
09-09-2004, 02:44 AM
Maybe i am stupid but i really don't understand what this hack does.
Does anyone have any demos of it or screen shots?
Spinball
09-10-2004, 07:57 PM
It displays normal HTML pages so they look like they are within your forums.
So, for example, if you wanted to have a page showing the history of your forums, then create it in HTML, remove the <BODY> tag and everything above it. Then remove the </BODY> tag and everything after it.
Then save it to your forums as history.html and link to it using http://www.yourforums.com/directory-to-your-forums/html.php?file=history.html&title=Forum History
Spinball
09-10-2004, 08:05 PM
Great hack, Erwin and very useful.
However I want to use it to display the results of a dynamic php script. Is this possible?
For example, I have set up a php script called hcc_reviews.php at
http://www.avforums.com/forums/hcc_reviews.php
which works fine.
It's contents are simply:
<?php
include("http://www.homecinemachoice.com/cgi-bin/reviews_for_avforums.php");
?>
But if I call html.php with file=hcc_reviews.php, I get our forum template round nothing.
http://www.avforums.com/forums/html.php?file=hcc_reviews.php
Do you know why and how to make it work?
Please help!!!!
Thanks :)
Blam Forumz
09-12-2004, 07:16 PM
Have you got a nice little small java chat applet? I cant seem to find one anywhere
Great hack ^^
Erwin
09-12-2004, 10:58 PM
Great hack, Erwin and very useful.
However I want to use it to display the results of a dynamic php script. Is this possible?
For example, I have set up a php script called hcc_reviews.php at
http://www.avforums.com/forums/hcc_reviews.php
which works fine.
It's contents are simply:
<?php
include("http://www.homecinemachoice.com/cgi-bin/reviews_for_avforums.php");
?>
But if I call html.php with file=hcc_reviews.php, I get our forum template round nothing.
http://www.avforums.com/forums/html.php?file=hcc_reviews.php
Do you know why and how to make it work?
Please help!!!!
Thanks :)
This hack is to integrate static files like HTML or TXT, not other dynamic PHP files.
fuse3k
09-28-2004, 02:20 PM
Another great contribution to the community. Thank you Erwin.
memobug
11-07-2004, 07:28 AM
Hi Erwin,
I know you noted that you have disabled remote file integration, but is there a way that the html file to be included could be remote so long as it's still on the same server? I have many html cached files I would like to include but they don't reside in subdirectories. In fact they are in different subdomains. (forum is in http://forum.mydomain.com (http://forum.mydomain.com/), other good stuff is in http://news.mydomain.com; (http://news.mydomain.com;/) http://etc.mydomain.com
If no, what does it take to re-enable remote file integration?
Regards,
Matt
BamaTech
11-19-2004, 01:25 PM
Oustanding Hack
works great with my vbulletin/vba cmps setup
thanks
Spinball
12-19-2004, 10:54 AM
Dr Erwin, Sir, is how would I include use of the pages using this hack in the who's online information?
I.e. by using the page title?
T3MEDIA
12-23-2004, 05:47 PM
ok No one asked this so I will.
Can you set Variables in this hack? know you said static.
Ie <if $user ect.... or $home_smallfooter
thanks.
yoyoyoyo
12-24-2004, 06:51 AM
I am having some problems getting some javascript to work with this hack. I created a html page with a javascript game on it, and when I go to the html page alone it works fine, but when I try to call it up by using the html.php and embed it in my site the javascript is disabled. Java applets work fine, and some javascripts work fine, but not all of the javascripts that I have tried are working with this hack. Any help or ideas would be appreciated.
redlabour
03-08-2005, 07:49 PM
Sorry Guys - it doesn?t work for me :
http://www.www.redlabour.de/forum/html.php?file=http://www.redlabour.de/impressum.html
as Example. :(
Erwin
03-10-2005, 08:13 PM
Sorry Guys - it doesn?t work for me :
http://www.www.redlabour.de/forum/html.php?file=http://www.redlabour.de/impressum.html
as Example. :(
You need to put the HTML file in the same or higher directory (not below), and you cannot link to http:// remote addresses.
seiken2099
03-26-2005, 12:53 AM
Excellent hack!
ChrisBaktis
03-26-2005, 01:52 AM
How do I use subforms with this hack? I would like to keep the HTML files organized in a sub directory off the main forums directory.
Erwin
03-28-2005, 03:50 AM
How do I use subforms with this hack? I would like to keep the HTML files organized in a sub directory off the main forums directory.
Read the first post.
ekopapers
03-30-2005, 02:59 PM
*clicks installs
very nice had to use an inline frame however to get my script to work with it. either way I am very happy with it. integrated my store into my site nicely :)
yinyang
05-09-2005, 05:07 PM
is there a way to use PHP files with this? if so, how?
Rob Locke
06-02-2005, 02:08 PM
This is fantastic!!! May I ask a few little questions?
1) Can I include vb code in the html file and will it be parsed? For example, can I set the parameters of a table to: cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" and so on?
Another example, can I include a signature using:
<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>
I think you get the picture.
2) Specifically I would like to use css styles that match my vb style. Is it simply a question of linking the html file to the vb stylesheet?
3) Can you add a little variable that allows specific users as well usergroups to integrate files?
If the parsing does not work at this time, please may I request you add it to the next version? To be able to utilize all the benefits of html, combined with vb functionality and style settings will be superlative.
-------------------------------------------------
One last thing...would it be possible to create a version of this hack which allows you to integrate html into a specific post? The use of html in the message editor is very limited. For example, using tables and div or span tags throws the layout way off (I guess this is because the message editor recognizes a hard return as a line break). To have specific users and/or usergroups (overriding the forum html posting defaults) able to include a separate html file (with full vb parsing enabled) would make you the KING in my opinion. It would be one of the most useful additions I can think of. If you can do this, may I ask you bear in mind the thread previews, which show non-parsed html when you mouseover them? Perhaps in the message editor, you can include a bbcode that wraps around text, which is just for the thread preview and is automatically hidden in the post. Perhaps another bbcode links to the html file and is automatically hidden from the thread preview? I know thousands of vb users would worship the ground you walk on for this!
Thanks again for all your amazing work,
Rob.
oceanart
06-02-2005, 03:50 PM
Would this be the best way of adding "About Us" page. I haven't found an add-on for only "about us" so I am considering to use this addition. I would like the same solution as "contact us" however I need to add a picture, some text and address, instead of form with all the header, footer content.
I thought to create it in Html and just integrate using the add-on. Is this the best approach?
I also considered the following
How to create your own vBulletin-powered page!
https://vborg.vbsupport.ru/showthread.php?t=62164
Fast access to forum rules from anywhere
https://vborg.vbsupport.ru/showthread.php?s=&threadid=34861
Instant Txt/ Html/ Java File Forum Integration
https://vborg.vbsupport.ru/showthread.php?t=66084
WebTemplates 3.x: VB Integrated Content Management System
https://vborg.vbsupport.ru/showthread.php?t=76422
Erwin
06-02-2005, 11:28 PM
Would this be the best way of adding "About Us" page. I haven't found an add-on for only "about us" so I am considering to use this addition. I would like the same solution as "contact us" however I need to add a picture, some text and address, instead of form with all the header, footer content.
I thought to create it in Html and just integrate using the add-on. Is this the best approach?
I also considered the following
How to create your own vBulletin-powered page!
https://vborg.vbsupport.ru/showthread.php?t=62164
Fast access to forum rules from anywhere
https://vborg.vbsupport.ru/showthread.php?s=&threadid=34861
Instant Txt/ Html/ Java File Forum Integration
https://vborg.vbsupport.ru/showthread.php?t=66084
WebTemplates 3.x: VB Integrated Content Management System
https://vborg.vbsupport.ru/showthread.php?t=76422
You can use any of those methods. :)
Marcus Lau
06-29-2005, 04:31 PM
Hi all,
I check already and everything seems to be ok in the html.php using dreamweaver php editor:
however i still encounter this error:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /yourforums.com/public_html/forums/html.php(65) : eval()'d code on line 10
Alright, that is for .txt
thanks in advance
Marcus Lau
06-29-2005, 04:37 PM
i found another one with regards to .html
Warning: fopen(index.html): failed to open stream: Permission denied in /html.php on line 48
Warning: fread(): supplied argument is not a valid stream resource in /html.php on line 49
Warning: fclose(): supplied argument is not a valid stream resource in /html.php on line 50
thanks
Marco van Herwaarden
06-30-2005, 07:12 AM
Hi all,
I check already and everything seems to be ok in the html.php using dreamweaver php editor:
however i still encounter this error:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /yourforums.com/public_html/forums/html.php(65) : eval()'d code on line 10
Alright, that is for .txt
thanks in advanceDon't use Dreamweaver to edit your files. DW is trying to 'help' you by adding things that will kill your page.
Marcus Lau
06-30-2005, 01:06 PM
But brother ... for the html.php i did not edit any single file i just follow instruction from erwin and then just upload and those are the errors i encounters when trying to locate a .txt and .html file.
Please advice ... thanks!
fiber1
07-03-2005, 02:34 AM
Is there anyway this can be modified to pulll my other websites html pages?
Rastus
10-11-2005, 03:14 PM
Getting this error on 3.5
Fatal error: Call to undefined function: gettemplate() in /newhome/******/public_html/html.php on line 48
Colejo
10-17-2005, 08:43 AM
Is there a way to get this to work on 3.5 Gold?
SnowBot
10-19-2005, 10:58 AM
This is the only hack i am missing now for 3.5 GOLD
Any updates Erwin ?
Thanks
mavherzog
12-05-2005, 03:58 PM
This is the only hack i am missing now for 3.5 GOLD
Any updates Erwin ?
Thanks
Ditto for me. I'd love to have this functioning on my newly-installed 3.5.1 site.
Another request for 3.5.3.........
please!
Not officially from Erwin,
but if you download his basic file from above and are unable to get it to work on you vBulletin 3.5.X Version you have to make a small fix. A function used by this Modification was replaced with another one for the 3.5.X series.
I have it currently working on 3.5.3, but it should work with the 3.5.X series.
So the fix to get it working on 3.5.X. (Special thanks to Paul M for this coding help)
Step 1: Download file above.
Step 2: Search for:
globalize($_REQUEST, array(
'file' => STR,
'title' => STR
));
Step 3: Replace With
$vbulletin->input->clean_array_gpc('r', array(
'file' => TYPE_STR,
'title' => TYPE_STR,
));
$file = $vbulletin->GPC['file'];
$title = $vbulletin->GPC['title'];
It should start working after doing this. I'll be glad to help anyone who needs additional help since no Erwin since June. (Hope you don?t mind Erwin =) )
nevermind!
fixed my own stupid error!
Thank you so much!
oberheimer
01-21-2006, 12:52 AM
Ok saw the abow post, this should fix the problem, thanks
rex_b
05-15-2006, 02:16 PM
Thanks for the fix ;)
yoyoyoyo
12-03-2006, 07:29 PM
Not officially from Erwin,
but if you download his basic file from above and are unable to get it to work on you vBulletin 3.5.X Version you have to make a small fix. A function used by this Modification was replaced with another one for the 3.5.X series.
I have it currently working on 3.5.3, but it should work with the 3.5.X series.
So the fix to get it working on 3.5.X. (Special thanks to Paul M for this coding help)
Step 1: Download file above.
Step 2: Search for:
globalize($_REQUEST, array(
'file' => STR,
'title' => STR
));
Step 3: Replace With
$vbulletin->input->clean_array_gpc('r', array(
'file' => TYPE_STR,
'title' => TYPE_STR,
));
$file = $vbulletin->GPC['file'];
$title = $vbulletin->GPC['title'];
It should start working after doing this. I'll be glad to help anyone who needs additional help since no Erwin since June. (Hope you don’t mind Erwin =) )
I did the changes and no content being pulled in from the text file I am pointing to. any help is appreciated.
frenzi
03-24-2008, 09:31 PM
....................
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.