Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
HTML, TXT, JAVA Integrator 2.0 Automatically display any HTML, TXT or JAVA file in vB Details »»
HTML, TXT, JAVA Integrator 2.0 Automatically display any HTML, TXT or JAVA file in vB
Version: 1.00, by Erwin Erwin is offline
Developer Last Online: May 2013 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 09-25-2002 Last Update: Never Installs: 47
 
No support by the author.

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.p...ctory/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.p...tml&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:

Show Your Support

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

Comments
  #22  
Old 09-26-2002, 03:35 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the kind words. Hope it is truly useful for you!
Reply With Quote
  #23  
Old 09-26-2002, 04:36 PM
Goldknight's Avatar
Goldknight Goldknight is offline
 
Join Date: Aug 2002
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unique hack

[high]* Goldknight install since this hack is support[/high]
Reply With Quote
  #24  
Old 09-26-2002, 04:46 PM
8ball's Avatar
8ball 8ball is offline
 
Join Date: Sep 2002
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks Erwin very good and useful hack
Reply With Quote
  #25  
Old 09-26-2002, 04:56 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #26  
Old 09-27-2002, 02:51 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #27  
Old 09-27-2002, 03:35 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

not to be picky erwin... but isnt alot easier to add a file like that:
Code:
<?php
error_reporting(7);

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

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

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

?>
??
Reply With Quote
  #28  
Old 09-27-2002, 04:11 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #29  
Old 09-27-2002, 04:17 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by TECK
not to be picky erwin... but isnt alot easier to add a file like that:
Code:
<?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.
Reply With Quote
  #30  
Old 09-27-2002, 04:50 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #31  
Old 09-27-2002, 05:09 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Quote:

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.
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 05:44 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05326 seconds
  • Memory Usage 2,321KB
  • 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
  • (2)bbcode_code
  • (3)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
  • (4)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