Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Template Modifications

Reply
 
Thread Tools
[Release] [Beta 2] Simple vB powered web page version 2.0 Details »»
[Release] [Beta 2] Simple vB powered web page version 2.0
Version: 1.00, by Brad Brad is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.x Rating:
Released: 08-18-2003 Last Update: Never Installs: 2
Re-useable Code Translations  
No support by the author.

Modification: Simple vB powered web page (svBpwp).
By: Brad.loo

This is a external script that will allow you to add extra pages to your vBulletin that intergrate with your style settings. It allows you to use all of vBulletin's built in style vars in your html code so you never have to worry about updating flat html files to match you new board's style every again.

The script supports multiple pages via one file and one template using <if> condition tags unlike its vB 2 counter part. Also you may use all global variables and templates in your code.

Updates:

2.0 beta 2 released - beta 2 solves all reported bugs in beta 1 but adds no new funconality. If you are running beta 1 it is recomended that you upgrade. To do so download the zip file attached in this thread and upload the new pages.php

How to use this script:

Heres a quick list of variables allowed to be used with this script, they are off the top of my head so I might have missed a few.

$bbuserinfo[] - Show's current users info if any
$stylevar[] - vBulletin's build in style var's
$vboptions[] - vBulletins options
$showdate - Current date
$showwelcome - Could be useful for welcome panels or the like, use this variable in conditions when you want to show certain info to a guest or regged member. Reports false if user is guest and ture is user is member.
$navbar - Shows navbar
$header - Shows contents of the HEADER template
$footer - Shows contents of the FOOTER template
$headinclude - Shows contents of the headerinclude template
$gobutton - Displays go button (go button template)
$timezone - Shows content of timezone template.
$_REQUEST['getpage'] and $page - Use to determain code to display per page.

Show Your Support

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

Comments
  #12  
Old 09-18-2003, 02:26 AM
Bad Bunny's Avatar
Bad Bunny Bad Bunny is offline
 
Join Date: Apr 2002
Posts: 555
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't seem to get it to work if in a folder above the vb folder.

Specifically....
Warning: chdir(): No such file or directory (errno 2) in /home/neeto/public_html/pages.php on line 56

Warning: main(./global.php): failed to open stream: No such file or directory in /home/neeto/public_html/pages.php on line 58

Fatal error: main(): Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/neeto/public_html/pages.php on line 58
Reply With Quote
  #13  
Old 09-18-2003, 02:48 AM
Bad Bunny's Avatar
Bad Bunny Bad Bunny is offline
 
Join Date: Apr 2002
Posts: 555
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, I got it to work fine by replacing the variable in chdir('$directorypath'); with the actual path.
Then I found I had all broken images...so I went and made the images folder an absolute path. Now it seems to work groovy! Gonna experiment with this.

Ok, I'm digging this...but I do have a question. How can I include my own custom templates? Will make the job of making pages far less tedious, as I want parts of the header slightly different than the forum header.
Reply With Quote
  #14  
Old 09-18-2003, 03:17 AM
Bad Bunny's Avatar
Bad Bunny Bad Bunny is offline
 
Join Date: Apr 2002
Posts: 555
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry to be posting so much...but I am not very good at php, but this seems to be what you would need to do to use your own custom templates.

find
Code:
eval('$navbar = "' . fetch_template('navbar') . '";');
Right after it include
Code:
eval('$XXXXXX = "' . fetch_template('XXXXXX') . '";');
Change the XXXXXX to the name of template you are going to be adding.

Then find
Code:
$globaltemplates = array(
					'simplepage',
Right after that add
Code:
'XXXXXX',
where XXXXXX is yet again the name of the template you will be including.

So...this works for me, but what I wanna know is...is there a better way to do this? or is this pretty much it?
Reply With Quote
  #15  
Old 09-18-2003, 08:08 PM
Breaker's Avatar
Breaker Breaker is offline
 
Join Date: Jan 2002
Location: Derby, UK
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

for some reason my pages.php is blank :\ i have checked all the variables and have added the template
Reply With Quote
  #16  
Old 09-18-2003, 08:42 PM
Bad Bunny's Avatar
Bad Bunny Bad Bunny is offline
 
Join Date: Apr 2002
Posts: 555
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to add ?getpage=XXX that correlates with your template variables.
Reply With Quote
  #17  
Old 09-18-2003, 09:20 PM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bad Bunny
Sorry to be posting so much...but I am not very good at php, but this seems to be what you would need to do to use your own custom templates.

find
Code:
eval('$navbar = "' . fetch_template('navbar') . '";');
Right after it include
Code:
eval('$XXXXXX = "' . fetch_template('XXXXXX') . '";');
Change the XXXXXX to the name of template you are going to be adding.

Then find
Code:
$globaltemplates = array(
					'simplepage',
Right after that add
Code:
'XXXXXX',
where XXXXXX is yet again the name of the template you will be including.

So...this works for me, but what I wanna know is...is there a better way to do this? or is this pretty much it?
Ill add somthing to make it easyer in the next build.
Reply With Quote
  #18  
Old 09-19-2003, 01:13 PM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice

This is something. Can you make a subcategory add-on, so I can categorize all the web pages and navigate them?
Reply With Quote
  #19  
Old 09-19-2003, 04:30 PM
Bad Bunny's Avatar
Bad Bunny Bad Bunny is offline
 
Join Date: Apr 2002
Posts: 555
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Also, I toyed with code I found elsewhere and got it to display a navbit title for the page name...but having something like that by default would rule.
Reply With Quote
  #20  
Old 09-19-2003, 06:43 PM
Buczilla Buczilla is offline
 
Join Date: Jun 2003
Location: St. Petersburg, FL
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to add php (that I have on my main site, but I'd like to add here) onto this page? Thanks!
Reply With Quote
  #21  
Old 09-21-2003, 12:49 AM
Rebel2k2 Rebel2k2 is offline
 
Join Date: Mar 2002
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you, worked like a gem. Here's a example here fellas:

http://www.clangrounds.com/pages.php?getpage=files
Reply With Quote
Reply

Thread Tools

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 01:19 PM.


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.10001 seconds
  • Memory Usage 2,303KB
  • 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
  • (8)bbcode_code
  • (1)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
  • (3)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