PDA

View Full Version : HTML, TXT, JAVA Integrator 2.0 Automatically display any HTML, TXT or JAVA file in vB


Erwin
09-25-2002, 10:00 PM
vB HTML, TXT, JAVA Integrator 2.0 - Automatically display any HTML, TXT or JAVA file integrated into vB - by Erwin

Upgraded for vB3:
https://vborg.vbsupport.ru/showthread.php?t=66084

Hack updated - made it even easier to install - upload 1 file, and you're done! Just change the URL parameters as needed. No need to add templates or edit files.

As the name suggests, this hack allows you to display any HTML file as integrated into your forums. 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

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. :)

Installation

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!

If you like this and want to receive updates, do press the "Install" link at the bottom of the thread.

Enjoy! :)

This version here is lets ALL users see the integrated HTML page. To let members only see the page, make the modifications listed in the next post.

Updates:

Version 1.1 - Added ability to add a custom page title to the integrated HTML forum page! :)

Version 2.0 - Removed the need to add a template. Just upload the file, and you're done.


Download:

Erwin
09-26-2002, 05:20 AM
If you only want to give registered members and staff to have access to the HTML integrated page, then:

In html.php find:


require("global.php");


Add BELOW:


if (!in_array($bbuserinfo['usergroupid'], array(2,5,6,7))) show_nopermission();


Unregistered guests, banned members and email confirmation members will get the no permission page.

Erwin
09-26-2002, 05:24 AM
And, if you do install this hack, and like it, please post your feedback and comments here. :D

Erwin
09-26-2002, 05:27 AM
Another tip:

You can add more file extensions to be integrated using this hack.

Open html.php:

Find:


$exts = "html, htm, txt, shtml";


You can add "asp, cgi" etc. to the list in that line - there's no reason why it wouldn't work. Mind you, I haven't tried it, but it should work. :)

Brad
09-26-2002, 05:40 AM
so basicly this is like the webtemplates hack only it dosent store things in the DB and inserts your header and footer templates around a html page?

Erwin
09-26-2002, 05:42 AM
I've never used the webtemplates hack, so I don't know how that works.

With this hack, the HTML files are not stored in the db. You upload them to your forums directory, then use the file to integrate them into your forums, with the header and footer around it. Once this hack is installed, all you need to do is "point and shoot" at the HTML file, and it will show up as integrated into your forums.

Brad
09-26-2002, 05:47 AM
ah i see, it works kinda like it then, calling files via a .php file. nice hack, wont be using it myself tho, well mabey.

Brad
09-26-2002, 05:55 AM
Tip:

if you want to add a custom header or footer to this hack, for say building a whole website around it do this.

add two new templates, webheader, and webfooter. put whatever you want to show up as the header and footer in the respected templates.

open global.php

find:

// parse other global templates

below it add


eval("\$webheader = \"".gettemplate('webheader')."\";");
eval("\$webfooter = \"".gettemplate('webfooter')."\";");

open the html template (created in hack install)

change the template to:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>$bbtitle - $file</title>
$headinclude </head>
<body>
$webheader
<!-- breadcrumb -->
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="100%"><br>
<normalfont><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a>
&gt; $file</b></normalfont></td>
</tr>
</table>
<!-- /breadcrumb -->
<br>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#000000" width="95%" align="center">
<tr>
<td> <table cellpadding="4" cellspacing="1" border="0" width="100%">
<tr>
<td bgcolor="#F1F1F1" align="left" valign="top" background="https://vborg.vbsupport.ru/greentek/back.gif"><normalfont>
<br>
</div>
<center>
$content
</center>
</td>
</tr>
</table></td>
</tr>
</table>
$webfooter
</body>
</html>

Erwin
09-26-2002, 06:04 AM
Thanks for the tip, Anime-Loo. My hack works with the standard header and footer of your forum, but if you want a different set of headers and footers, then your tip would help with that. :)

blackice912
09-26-2002, 09:28 AM
I still want to see a preview dangit :p

Erwin
09-26-2002, 09:55 AM
Imagine any HTML file, then imagine it inside your forums, with your forum header and footer...

How can I give a screenshot? I could show you anything, since the HTML file can be anything you want it to be.

Erwin
09-26-2002, 10:30 AM
Minor update - version 1.1

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. :)

To upgrade from previous versions, just download the new ZIP, and upload the new html.php - there is no change to the template.

Brad
09-26-2002, 10:34 AM
example:

heres the html as it would be if called directly:

http://www.kousetsu.net/down/down.htm

and called via the hack:

http://www.kousetsu.net/kan/html.php?file=down.htm

ps: i know the images are broken, i dont have the time to edit the html right now, this is not a bug in the hack ;)

Erwin
09-26-2002, 10:38 AM
Anime-loo - download the new html.php file, and you can have a custom title, instead of the filename as the title.

The URL would be:

http://www.kousetsu.net/kan/html.php?file=down.htm&title=We are down

Note: You must download and upload the new html.php (version 1.1)

Also - make sure the image paths are relative to where the html.php file is, or use full paths - otherwise you get broken image links.

Brad
09-26-2002, 10:41 AM
Originally posted by Erwin
Anime-loo - download the new html.php file, and you can have a custom title, instead of the filename as the title.

The URL would be:

http://www.kousetsu.net/kan/html.php?file=down.htm&title=We are down

Note: You must download and upload the new html.php (version 1.1)


i know ;), its the file i have on the server ATM, i only posted the link to show a example, i dont really have a use for the hack ATM :)

Erwin
09-26-2002, 10:44 AM
Thanks for helping. :) If you make it a good demo, I will link to it in my first post. ;)

Brad
09-26-2002, 10:48 AM
<a href="http://www.kousetsu.net/kan/html.php?file=down.htm&title=We%20are%20down" target="_blank">click me</a>

fixed the images and added the title

Erwin
09-26-2002, 10:50 AM
Great! Demo added to the first post!

Erwin
09-26-2002, 11:02 AM
DEMO

Thanks to Anime-Loo for volunteering his site! :)

This is the normal HTML file that you normally have for a website without automatic integration:
http://www.kousetsu.net/kan/down.htm

This is the SAME HTML file integrated with this hack just by using the command line URL with NO custom title (the title automatically is the file name):
http://www.kousetsu.net/kan/html.php?file=down.htm

This is the SAME HTML file integrated with this hack WITH A CUSTOM TITLE:
http://www.kousetsu.net/kan/html.php?file=down.htm&title=We are down

kmfdm_kid2000
09-26-2002, 12:55 PM
Wow, yet another amazingly useful, yet simple hack by Erwin...Thank you very much for this...

/me Installs

Erwin
09-26-2002, 03:35 PM
Thanks for the kind words. :) Hope it is truly useful for you! :)

Goldknight
09-26-2002, 04:36 PM
Unique hack :)

* Goldknight install since this hack is support

8ball
09-26-2002, 04:46 PM
thanks Erwin ;) very good and useful hack :D

Erwin
09-26-2002, 04:56 PM
Thanks for the comments and feedback! :) If you like it and use it, don't forget to click the install link at the bottom of the thread! ;)

Velocd
09-27-2002, 02:51 AM
Pro hack, I'm actually not going to use it for my forums..but in another site of mine I'm working on :-D

/me kicks install

TECK
09-27-2002, 03:35 AM
not to be picky erwin... but isnt alot easier to add a file like that:
<?php
error_reporting(7);

$templatesused = 'error_nopermission, your_template';
require('./global.php');

$permissions = getpermissions();
if (!$permissions['canview']) {
show_nopermission();
}

eval("dooutput(\"".gettemplate('your_template')."\");");

?>??

Erwin
09-27-2002, 04:11 AM
TECK, using your way, you need to add every single HTML file you have on your site as a new template, and then have a different PHP file to call each of this template.

My way, the html.php file automatically takes any HTML file on your file server and inserts it into the site. There is no need to add the HTML file into a vB template.

Using my hack, adding HTML files into your forums is as easy as changing the URL filename. :)

Your PHP code doesn't work for automatically including HTML files into vB. Trust me. There is not even a $file variable to get the HTML filename. :)

Erwin
09-27-2002, 04:17 AM
Originally posted by TECK
not to be picky erwin... but isnt alot easier to add a file like that:
<?php
error_reporting(7);

$templatesused = 'error_nopermission, your_template';
require('./global.php');

$permissions = getpermissions();
if (!$permissions['canview']) {
show_nopermission();
}

eval("dooutput(\"".gettemplate('your_template')."\");");

?>??

Also, a friendly tip.

There's no point including 2 templates into $templateused if each template is mutually exclusive. The templateused uses 1 query. Without it, when you either call error_nopermission OR the other template, it's 1 query each - it's never 2 queries. So you don't save any queries using $templateused if the templates are mutually exclusive and never run together. :)

And looking at your code, you completely misunderstand this hack. This hack doesn't require anyone to save their HTML file into the template database, and have multiple PHP files.

All you need is the html.php file. Then, just change the filename in front of it like this : html.php?file=index.html or html.php?file=anything.html, and the HTML will automatically be integrated as though it is in the template, but it's not.

It actually is harder to do than it looks. It's not a simple include() function. It's not even a simple eval() function. I had to look up PHP manuals and do a tricky array type code to make the HTML file parsed into the forum. :)

Try it and have a look at my code. Your code will never work for what I intend this hack to do.

TECK
09-27-2002, 04:50 AM
Thanks for explaining Erwin. at a glance i thought you are trying to include a custom file onto vbulletin.
about the error_nopermission, is just a habit... :)
i add it to all my files as a reflex... since most of them cache multible templates. so i kind of got used to write it automatically, as well as the IF permission...

Erwin
09-27-2002, 05:09 AM
Originally posted by TECK
Thanks for explaining Erwin. at a glance i thought you are trying to include a custom file onto vbulletin.

No problems. With this hack, you can include ANY custom HTML file "on the fly" without need for any template or php file mods. :)


about the error_nopermission, is just a habit... :)
i add it to all my files as a reflex... since most of them cache multible templates. so i kind of got used to write it automatically, as well as the IF permission...

No point caching 2 templates, if the file only would use 1 of them at a time. :) Each method uses only 1 query, but cacheing just slows down the page and wastes memory, albeit only by a tiny fraction, and does not save a query at all.

Thanks for the input though, TECK. :)

Mone'
09-27-2002, 05:31 AM
This is great and so easy :)
well done i'm going to test it later tonight.

Mone'

MarkB
09-27-2002, 09:58 AM
Great hack!! :) Installed :)

Dean C
09-27-2002, 06:02 PM
what a fantastic idea Erwin !

- miSt

Erwin
09-28-2002, 12:43 AM
Originally posted by Mist
what a fantastic idea Erwin !

- miSt

Thanks! Useful for those HTML files that are lying around, or to integrate java applets into your forums, with only a URL. :)

Dean C
09-28-2002, 07:01 PM
exactly ^! ;)

- miSt

MalaK_3araby
09-28-2002, 10:59 PM
Great job Dr. :)

... this should heal wonds and i can really use it.

Thanks

* MalaK_3araby clicks install

jbear6
09-29-2002, 03:10 AM
Very Nice :)
Thanks for sharing your work.

Jbear6

Erwin
09-29-2002, 08:13 AM
Thanks for all the kind words.

As a tip:

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!

So for quick and easy java chat applet integration, or any java applet or other code that can be put into HTML, use this hack.

:)

Chris M
09-29-2002, 12:05 PM
Thanks:) I will try it:D

Satan

ALbuquerque27
09-30-2002, 11:30 PM
Would this hack work on my vB 2.2.6?

Thanks
-AL

Erwin
10-01-2002, 01:33 AM
Originally posted by ALbuquerque27
Would this hack work on my vB 2.2.6?

Thanks
-AL

100%. It will work for ALL versions of vB, since it works externally, and only integrates the HTML/ Java code into the template. :)

FASherman
10-03-2002, 01:28 AM
How difficult would it be to modify this to support a cgi perl script as a source file?

Erwin
10-03-2002, 02:36 AM
Originally posted by FASherman
How difficult would it be to modify this to support a cgi perl script as a source file?

It should work. Open up "html.php" and add the extension ".cgi" or ".pl" to the list of extensions you want this to work with.

FASherman
10-03-2002, 02:37 AM
I tried that. Didn't work.

Erwin
10-03-2002, 02:46 AM
Well, in that case, it probably doesn't. Sorry, I just assumed it would, but I never tested it. The aim of this hack is primarily to integrate HTML, TXT or JAVA applets. :)

MacKenzie
10-31-2002, 05:02 PM
Excellent hack, my good doctor!

Of all the hacks and add-ons I've views so far here, I would say this one offers the most value to my forums :-D Thank you for your efforts.

MacKenzie
The Asylum:Gathering Of Souls Team.

Julio
11-13-2002, 12:28 AM
Erwin: Excellent hack. In fact I would request it, if it wasn't done.
I tested it with some Java script and text and works great. Though... today I created a very nice games gallery, since I don't like the look of the Flash Gallery Add-on.

When I point to: "http://mydomain.com/html.php?file=games/Gamess.html"

the page will show up the text but the graphics will not show up.
Notice on the URL that I have located the html file and the graphics into a folder called games under the forum folder.

If I click a graphic on the browser (showing the X) I notice it points to http://mydomain.com/filename.ext instead of http://mydomain.com/games/filename.ext However, when I look at the html code, it points to the correct folder.

Any suggestion(s)?

Erwin
11-13-2002, 12:33 AM
To play Flash, why not just use my Flash Player hack? :) Click on the link in my sig.

If you want to use subdirectories with the HTML integrator, then in your html file, all links to images and Flash files must be ABSOLUTE paths (htttp://www.yourforums.com/images/test.gif) NOT RELATIVE paths (images/test.gif). Othewise it won't work.

Julio
11-13-2002, 12:38 AM
Still doesn't work. :(

the absolute path is: http://mydomain/forums/games.filename.gif

when I "call" as stated in the instructions "http://www.your-forums/forums/html.php?file=directory/xxx.html"

the missing files properties shows: "http://mydomain/forums/filename.gif instead

Erwin: Just tested it locally... it works with full absolute path, but it doesn't work on-line. I just noticed that there seems to be a DNS problem with my domain, however I can access it via IP, and it still doesn't work.

Erwin
11-13-2002, 04:45 AM
The problem is probably because you are using a subdirectory in the ?file=*** section - can you put the HTML file in the same directory as the html.php file, and just change all the paths in the HTML file to absolute paths to point to the right places. It will work if both the html.php and the HTML file are in the same directory.

Julio
11-13-2002, 04:48 AM
Yes, it works that way. Thanks! ;)

So much work around that don't know why didn't thouhgt about it! duh.

Talisman
12-27-2002, 05:17 AM
What a wonderful hack! Thanks, Erwan.

Big Daddy Chemo
02-02-2003, 01:06 PM
A great hack indeed but how do I enable the remote file integration? Here is my application:

A central database is shared between several forums for the purpose of tracking scammers. Instead of giving each an authorized host and login account it would be much easier for them to integrate the search page into their forum (and give the appearance to their members that they never left the sanctity of their home).

Thanks in advance for the help!

Chemo

Erwin
02-02-2003, 10:07 PM
Originally posted by Big Daddy Chemo
A great hack indeed but how do I enable the remote file integration? Here is my application:

A central database is shared between several forums for the purpose of tracking scammers. Instead of giving each an authorized host and login account it would be much easier for them to integrate the search page into their forum (and give the appearance to their members that they never left the sanctity of their home).

Thanks in advance for the help!

Chemo

I made this hack to specifically NOT work for remote servers to prevent malicious people from making other pages look as though it is coming from your site, that's all. :) So think about that carefully first - do you want someone posting a URL that makes it look as though your site is serving up porn? :)

Big Daddy Chemo
02-03-2003, 12:12 AM
Originally posted by Erwin
I made this hack to specifically NOT work for remote servers to prevent malicious people from making other pages look as though it is coming from your site, that's all. :) So think about that carefully first - do you want someone posting a URL that makes it look as though your site is serving up porn? :)

Very understandable ;)

In this case, however, I believe the mature nature of our membership will keep the number of incidents to a minimum. I would much appreciate your input as to how to allow remote file integration.

Thanks in advance!

Chemo

Erwin
02-03-2003, 12:28 AM
It's simple - remove this line from the html.php file:


if( substr($file,0,5) != "./../" && substr($file,0,7) != "http://" ) return TRUE;


Do this at your own risk - I will not be responsible for any misuse of this by malicious visitors to your site! :)

Big Daddy Chemo
02-03-2003, 02:17 AM
Thank you very much!

Last question...what is the syntax for the file name if I want to point it to a specific file? I have tried listing the file name as http:// and without with an error on both. Any ideas?

Chemo

Erwin
02-03-2003, 08:59 PM
Actually, I'm not going to support a version that would allow the integration of remote files, as this was never the intention of this hack. It's not hard to work out, but I won't do it, as it is too easily abused. Sorry. :)

GuruXL
02-03-2003, 11:09 PM
I am trying to remember how I can strip the extention from the file.

so the URL looks like:

http://www.server.com/html.php?page=filename

rather than:

http://www.server.com/html.php?page=filename.extention

umm...i think you use...erg_replace...i am confused though, so any help would be greately appreciated! :bunny:

Intex
02-09-2003, 08:21 AM
V. nice hack Erwin.

sptechzone
02-14-2003, 06:04 PM
easy install, works with inside and outside page calls, I even have it running an .asp page that's running a access data base search. I had installed webtemplate hack but it was not doing the authentication for me as the site is a company forum with manuals and service bulletins in pdf, some confidential.

Thanks again for the work you put in.

Erwin
02-15-2003, 04:24 AM
Glad you like it. :)

Wayne2k1.com
02-17-2003, 10:29 AM
Demo-Screenshot? :paranoid:

The above URLs dont' work :bored:

Erwin
02-17-2003, 05:53 PM
Imagine your HTML page.

Imagine your forum header and footer.

Imagine then, your HTML page, in betweem your forum header and footer automatically.

;)

The demo page was put up by Anime-Loo, who must have taken it down - it's been a while.

msimplay
03-16-2003, 09:17 PM
Another question on will this hack be released for Vb3
:D
i;'m worried about moving up but as long as the hacks are going to be there i will upgrade with no hesitation

Nikhil Nayak
03-26-2003, 05:33 AM
Erwin, nice hack!

BTW I commented out the <center> tags in the "html" template. This ofcourse depends on the file you're including so no big deal ... just a note.

** Clicked Install **

Erwin
03-29-2003, 03:14 AM
Hack Update = Version 2.0 - Just upload and run!

I've made this hack even easier to install.

Just upload html.php, and you can instantly integrate any HTML, TXT file or JAVA into your forums.

Now, you don't even need to add a template or edit any files.

If you are already using this, no need to upgrade. I just made it easier for new installers. :)

There will be no screenshots - just imagine a HTML page, embedded inside your forums. This hack can integrate ANY HTML page.

GuruXL
04-03-2003, 12:27 AM
how can I strip the extentions so that the .html .htm .php doesn't show? I am trying to do it but, am so far unsuccessful.

Mr L
04-05-2003, 11:37 PM
Erwin,

Great hack! Thank you... <<<CLICKS INSTALL>>>

...how would it be possible to make this open using "_self" as a target rather then opening a new frame?

Cheers.

Harvey.

Erwin
04-05-2003, 11:46 PM
Today at 11:37 AM HLodder said this in Post #69 (https://vborg.vbsupport.ru/showthread.php?postid=378074#post378074)
Erwin,

Great hack! Thank you... <<<CLICKS INSTALL>>>

...how would it be possible to make this open using "_self" as a target rather then opening a new frame?

Cheers.

Harvey.

??? What do you mean?

If you mean open into self, just edit the <a href="URL" target="_self"> bits.

If you mean make other links open into the forum, then keep using the URL command line to do it.

Mr L
04-06-2003, 01:02 AM
Ah ok, didn't explain myself fully, sorry!

I am generally happy with other links opening in new windows, however this hack is great to have stuff appear to be an intergrated part of the board. To pull this illusion off fully, it'd need to open in the same target windows as the URL that the user clicks on rather then a launch a new window.

Would this be possible?

Either way, thanks for the quick response! :D

Erwin
04-06-2003, 01:05 AM
To make the illusion full, you need to make all links go through the Command URL with target="_top".

eg.

all links have this format:

<a href="http://www.yoursite.com/forums/html.php?file=new.html" target="_top">

or something like that...

esfron
04-08-2003, 02:29 AM
Test it on 2.3.0 final.

The file test.html is integrated into my forum with the header and footer around it but it's integrated in the vbulletin message box. Is it correct ?

Erwin
04-08-2003, 02:48 AM
That's correct. That happens because we are not using any of our own custom templates - version 2 of this hack which is the quick "1 PHP file upload and work" version. (version 1 of this hack had a custom template).

You can always insert your own custom template. Make up a new template (easiest way is to copy the template "standarderror" and modify it). Place $errormessage anywhere you like where you want the contents of the HTML page to show up.

Then in html.php, find and change standarderror to the name of your new template.

esfron
04-08-2003, 04:56 AM
I used your version 2 with your version 1: $content into the custom html template and eval("\$content = \"$buffer\";"); into html.php. It's working.

It will use only one template. Exact ? I have to format (font, size, css, etc) each external html file. Exact ?

thanks

(Install)

Erwin
04-08-2003, 05:28 AM
Correct. :)

esfron
05-16-2003, 05:46 AM
Hi,

I set up the hack so that unregistered guests, banned members and email confirmation members will get the no permission page but the the html file can be called directly from another websites i.e. to be linked from another websites : http://www.domainname/page.html

Any idea ?

alesis404
05-23-2003, 07:11 PM
Great hack Erwin! just wondering now if it is possible if I have a directory with 100's of pages is there some way to search for just those pages instead of coming up with the normal .html file without the VB graphics wrapped around it?

For instance I would like to search and possibly index all pages like

http://mysite.com/forums/html.php?file=data/whatever.html

and not get

http://mysite.com/forums/data/whatever.html

So that users could see all pages in the default directory perhaps in an index page instead of pulling up the normal .html pages?

*Thanks again for something that might solve my problem....100's of pages I would like to have the VBB look and be searchable somehow

Erwin
05-24-2003, 04:46 AM
Today at 06:11 AM alesis404 said this in Post #78 (https://vborg.vbsupport.ru/showthread.php?postid=399062#post399062)
Great hack Erwin! just wondering now if it is possible if I have a directory with 100's of pages is there some way to search for just those pages instead of coming up with the normal .html file without the VB graphics wrapped around it?

For instance I would like to search and possibly index all pages like

http://mysite.com/forums/html.php?file=data/whatever.html

and not get

http://mysite.com/forums/data/whatever.html

So that users could see all pages in the default directory perhaps in an index page instead of pulling up the normal .html pages?

*Thanks again for something that might solve my problem....100's of pages I would like to have the VBB look and be searchable somehow




I see what you mean.

Make up a .htaccess file, with the contents:


RewriteEngine on
RewriteRule ^data/([^$]*).html$ html.php?file=data/$1.html
RewriteRule ^[ft]([0-9]+)/s([^/]*)/(.+)$ /$3 [L]


Upload it to your forum directory. This only works if you are running an Apache server. See if that works.

Calling http://mysite.com/forums/data/whatever.html will automatically make you get integrated pages.

alesis404
05-24-2003, 08:03 AM
Thank you for the quick reply Erwin...will try this in the a.m after some sleep...appreciated :)

alesis404
05-24-2003, 06:47 PM
Hello again Erwin, just thought to mention I have Apache/1.3.24 and made a .htaccess with the code below and uploaded to

http://www.mysite.com/forums/.htaccess

*When i tried to access any page including my index I get "Internal server error"


**Thanks anyway for taking the time, if i can't get this to work will look for alternate method but was just looking for some way to integrate the VBB search engine and way to index all my extra file's in /data even if not possible with the VBB search engine

Thanks Erwin

Erwin
05-25-2003, 03:54 AM
Weird - your server may not have .htaccess enabled or something like that.

Sorry, not much I can do to get around this without using redirection like that...

alesis404
05-25-2003, 12:59 PM
Nah .htaccess is enabled...I have on other directorys...cool enough erwin I'll get it figured and appreciate your help :)

Erwin
05-26-2003, 12:35 AM
Try my .htaccess file again, but remove the last line. See if that works. :)

alesis404
05-26-2003, 12:52 AM
Tried again last line removed but get internal error again, just to be sure and this may be stupid question...The contents of the .htaccess file should just be the code correct? and not the standard .htaccess contents like

AuthUserFile /home/whatever/info/.htpasswd
AuthGroupFile /dev/null
AuthName "Hello"
AuthType Basic

<Limit GET POST>
require valid-user
</Limit>

*I have simply made a file named .htaccess and inserted just your code and none of the usual .htaccess code like above...is this correct?

RewriteEngine on
RewriteRule ^data/([^$]*).html$ html.php?file=data/$1.html
RewriteRule ^[ft]([0-9]+)/s([^/]*)/(.+)$ /$3 [L]

**And then tried the second time with the contents of .htaccess being

RewriteEngine on
RewriteRule ^data/([^$]*).html$ html.php?file=data/$1.html

skorzguy
06-05-2003, 03:10 AM
I used the hack and it worked but I don't understand how to make the VB DB work with it? Any info how to make this work? Here's what it looks like so far.

http://www.allstarchat.com/forums/html.php?file=index.html

Erwin
06-05-2003, 03:12 AM
What do you mean make the vB Db work with it? Please explain, or use some examples.

skorzguy
06-05-2003, 11:59 PM
The only instructions are:

RealChat can be easily integrated with any user profile ( membership ) system. There is a set of parameters which allow you to pass additional information from an user profile database to client applet. You pass these parameters by using dynamically generated HTML code. You can use any server-parsed HTML tools such as ASP, PHP, Perl, or whatever you like.

Tip: The easiest way is to do this is to use any of your existing site login scripts as a template, and modify it so after a successful login the script dynamically generates the applet page.

In the example below parameters have been added to pass the user's nickname, real name, age, and favorite drink. The user is also prohibited from changing his/her profile once logged in.

There is detaied explanation for what each parameter does in the Configuration directives reference section.

--------------------------------------------------------------------------------

<applet
codebase = "."
archive = "RealChat.jar"
code = "rcs.client.RealChatClient.class"
name = "ChatClient"
width = "300"
height = "100"
MAYSCRIPT>

<param name="nick" value="BadJohn">

<param name="pValue1" value="John Doe">
<param name="pValue2" value="35">

<param name="pLabel3" value="Favorite drink:">
<param name="pValue3" value="beer">

<param name="canChangeProfile" value="no">

</applet>

I don't know how to get these tags to use the information from VB. I tried putting "$bbuserinfo[joindate], [joindate],and "post$[joindate] in the value field as an example and it was blank when I opened the page. What should I put in the value field, I don't have a clue.

dontpanic
06-06-2003, 08:16 PM
This is a great hack, but how can I have the "vBulletin Message" which seems to be some sort of default actually be the title of the document.

An example of what I am refering to:
http://www.spamsession.com/1/vb1/html.php?file=library/wxp.htm&title=WXP

Thanks!
:)

dontpanic
06-06-2003, 08:28 PM
Never mind, I figured it out after scratching my head a bit more.

Open your "standarderror" template and search for this code:
<b>vBulletin Message</b></normalfont></td>

Just replate with this:
<b>$title</b></normalfont></td>

And save the file with a new name.

In the html.php file, search for this code:
eval("dooutput(\"".gettemplate('standarderror')."\");");

And replace "standarderror" with the name of your new template.

Make sure you upload the html.php file after you finished.

You can see the final results here (for now at least):
http://www.spamsession.com/1/vb1/html.php?file=library/wxp.htm&title=An%20Introduction%20to%20EFS%20in%20Widnows% 202000/Windows%20XP

:banana:

Erwin
06-07-2003, 12:35 AM
Well done! :) Looks great. Yes, instead of using the standarderror template (which I use to make this hack extremely easy to use) you can use your own template, as long as you make the appropriate changes in the PHP file. :)

alesis404
06-11-2003, 08:02 PM
I understand how this could be used for one page to get rid of "Vbulletin message" and replace with lets says "WinXP help"...but is it possible to have hundreds of pages with custom titles where it says "Vbulletin message"

Thanks again

**Not a custom title but what I mean is replacing "Vbulletin message" with something different lots of pages

For instance if you have 3 page's

WinXP help.htm
WinXP tuning.htm
Winxp tweak.htm

**Eg; replace "Vbulletin mesage" with

"WinXP help"
"WinXP tuning"
"Winxp tweak"

**Would it be possible all these pages could have there own message or title where the "Vbulletin message" text usually appears?

**I do not want them all the same, I would like them to all be different if this is at all possible, thanks for the help yet again :)

Erwin
06-12-2003, 03:44 AM
Make a new template called "html". Copy and paste the contents of "standarderror" into it.

Replace "vBulletin message" in the template "html" with $title.

Then, use this format for your URLs:

http://www.your-forums/forums/html.php?file=xxx.html&title=Your Title

It should work. :)

alesis404
06-12-2003, 04:01 AM
Thank you again Erwin for the quick reply, will try this later tonight when I have some free hours...appreciated :)

Intex
06-14-2003, 04:42 PM
Erwin - the board I run is on an Intranet. There are various other servers that have html pages on them. Can you let me know how to include using the remote capability. I know you've mentioned you specifically created this hack without that functionality, but I'm not personally concerned about abuse as all board members are known / trusted.

If you're against posting here for general consumption, I'd really appreciate it if you could send me a private message.

Thx :).

childfun
06-20-2003, 12:34 PM
This is a great idea, and it wa sjust what I was looking for, but I don't think it works with vb 3.0. I get this error :

Fatal error: Call to undefined function: gettemplate() in /home2/mychildf/public_html/html.php on line 48

Erwin
06-23-2003, 05:06 AM
Obviously it wouldn't work with vB3 - if you note the title, it says vB 2.3.0 - :) - vB 2 hacks will not work for vb 3 because of the totally different code.

Intex
06-23-2003, 04:47 PM
Erwin - I'm using your hack heavily now for a lot of my external pages. Can you tell me how to include a who's online location for an individual page. I'm using Firefly's Who's Online hack, but I'm pretty sure this goes by the filename, in your case html.php and therefore would show the same location for each different html file.

I'm happy to do this manually in who's online, but just wanted some of your expertise / guidance beforehand and how I might go about it.

Thx.

ImportPassion
06-30-2003, 06:09 PM
this is awesome, i just stumbled upon this from this thread
https://vborg.vbsupport.ru/showthread.php?s=&threadid=54875

I hope I can include cfm files. Gonna try.

D

ImportPassion
06-30-2003, 06:19 PM
ahh....only works with static pages... :(

DarkSavior
01-25-2004, 03:21 PM
Is there a way to make it call different template by the file extension? As like if I open a HTML file, it calls the html template, and for txt files it calls the txt template.

Erwin
06-12-2004, 12:27 AM
Upgraded for vB3:
https://vborg.vbsupport.ru/showthread.php?t=66084

Rastus
10-11-2005, 02:55 PM
Will this work with 3.5.0 ?