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
Extra page driven by forum templates Details »»
Extra page driven by forum templates
Version: 1.00, by c-pr0mpt c-pr0mpt is offline
Developer Last Online: Apr 2004 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-26-2002 Last Update: Never Installs: 42
 
No support by the author.

This is a really simple hack. This is for adding other pages to your site all driven by the forums templates. This also has instructions for adding it to whos online!


Example:
http://www.yaxay.com/yack/privacy.php?s=

This page is driven via the normal forum templates.
Sshot of admin area for this page:


Sshot of whos online if the person is on the page:



The instructions are for installing a page for a privacy statement. But just replace all instances of privacy, and privacy.php with the page you are creating. Very easy.

Instructions attached. :classic:

Show Your Support

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

Comments
  #32  
Old 08-22-2002, 05:29 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by stuuu
[B]I think the code is a bit too much to put into the php include template, as that is loaded with each page right?
Yes, its loaded with each page, so make sure that its only in the phpinclude template if it is used on each page.

Quote:
I have put it in the main file that calls the templates, but how do I get the template to place my code between the vB header and footer? It just appears below the footer at the moment
Not knowing what the code is, or what it outputs its hard for me to say.

The easiest was is to assign the output to a variable and place that variable in the template where your content goes.
Reply With Quote
  #33  
Old 08-22-2002, 05:33 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Rose
I'm interested in using this, but I'm using WebTemplates. Is there a difference in the two? :$
It all depends what you are trying to achive, this hack is meant just to eval and display the content of a template that you have in your CP.

Webtemplates is similar to this but allows you to add queries via the AdminCP, and has a kind of permissions system built into it.

vBindex also allows you to create extra pages by adding templates that also fit your sites design.

It really depends what features you need and what works best with your setup
Reply With Quote
  #34  
Old 08-22-2002, 05:38 PM
stuuu stuuu is offline
 
Join Date: Jan 2002
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by NTLDR


Yes, its loaded with each page, so make sure that its only in the phpinclude template if it is used on each page.



Not knowing what the code is, or what it outputs its hard for me to say.

The easiest was is to assign the output to a variable and place that variable in the template where your content goes.
Yeah, its too much for phpincludes.

I have attached the output from when I was using PHPBB2, its basically a top 10 played audio clips, and the archive itself. They are output in a table format.

Any ideas? How do I put the whole file inside a variable that will use the style sheets of vB?
Reply With Quote
  #35  
Old 08-22-2002, 05:44 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If the output is just a sperate section of HTML just with PHP variables in and not any PHP code itself then just place that into the template instead.
Reply With Quote
  #36  
Old 08-22-2002, 06:10 PM
stuuu stuuu is offline
 
Join Date: Jan 2002
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by NTLDR
If the output is just a sperate section of HTML just with PHP variables in and not any PHP code itself then just place that into the template instead.
Even though the code output is HTML, you cant put PHP inside the templates can you.

I am still stuck :/
Reply With Quote
  #37  
Old 10-11-2002, 10:36 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[high]* GamerForums wonders if this will make any sense...
[/high]

I'd known how to do this, but didn't realise I knew, until I read this thread. LOL, cheers mate, working well on 2.2.7.
Reply With Quote
  #38  
Old 10-26-2002, 11:09 PM
obiwan8472 obiwan8472 is offline
 
Join Date: Sep 2002
Location: UK
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, great hack.
But I want to put this in

<? include ("vbforums/newstransfer.php"); ?>

It calls a news script I am using, however when I put it in the Templates it ignores it. Any ideas?
Tar.
Reply With Quote
  #39  
Old 10-27-2002, 02:17 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Interesting... similar to my "HTML/ JAVA integrator hack" - didn't know that this one existed when I wrote mine.
Reply With Quote
  #40  
Old 10-27-2002, 04:35 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by obiwan8472
Hi, great hack.
But I want to put this in

<? include ("vbforums/newstransfer.php"); ?>

It calls a news script I am using, however when I put it in the Templates it ignores it. Any ideas?
Tar.
The only template you can put PHP code in is the phpinclude template, it will not parse PHP in any other one. Add the include statment to the PHP file after it requires global.php.
Reply With Quote
  #41  
Old 10-31-2002, 12:16 PM
pdaGuy pdaGuy is offline
 
Join Date: Dec 2001
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by NTLDR


The only template you can put PHP code in is the phpinclude template, it will not parse PHP in any other one. Add the include statment to the PHP file after it requires global.php.
This works, BUT if you place the include statment in the PHP file under the require global.php the file that you want to include will appear in the very top of the page!

To be more specific, if you want a page with your site's header (on the top) and footer (on the bottom) and you want to include another (external) page right in the middle then your solution doesn't work. At least not for me! :|

Same happens if you place the include statment in the phpinclude template. The only differense is that the included page gets displayed to EVERY VB file.

What would really be helpful in this is to define something like $newpage = include("http://the_included_page");
And then everywhere (in the templates) you place $newpage the included page should appear. Is this possible?

Any ideas??
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 12:42 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.11786 seconds
  • Memory Usage 2,309KB
  • 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
  • (7)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