Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
custom page wrapper Details »»
custom page wrapper
Version: 0.1, by Dream Dream is offline
Developer Last Online: Sep 2010 Show Printable Version Email this Page

Version: 3.5.0 Rating:
Released: 07-13-2005 Last Update: Never Installs: 74
Uses Plugins
Re-useable Code  
No support by the author.

This lets you create a vBulletin page by just creating a template.

Installation
- Upload "custom page wrapper 0.1.xml" plugin and activate it
- Create a "page_test" template with anything in it
- Test it out with "index.php?page=test"

To create pages, add a template that begins with "page_" in the title. You can change that prefix editing the plugin.

Enjoy


PHP Code:
if ( !empty($_REQUEST['page']) ) {
    
$template_prefix 'page_';
    
$page_template $template_prefix $_REQUEST['page'];
    
$page_title ucwordsstr_replace("_"" "$_REQUEST['page']) );
    
$navbits = array();
    
$navbits[] = $page_title;
    
$navbits construct_navbits($navbits);
    eval(
'$navbar = "' fetch_template('navbar') . '";');
    eval(
'$HTML = "' fetch_template($page_template) . '";');
    if (empty(
$HTML)) {
        eval(
standard_error("No such page."));
    }
    eval(
'print_output("' fetch_template('GENERIC_SHELL') . '");');

Show Your Support

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

Comments
  #2  
Old 07-14-2005, 09:42 PM
evenmonkeys's Avatar
evenmonkeys evenmonkeys is offline
 
Join Date: Aug 2004
Location: Iowa
Posts: 896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

W00t! Thank you so much!!!
Reply With Quote
  #3  
Old 07-14-2005, 11:04 PM
bigcurt's Avatar
bigcurt bigcurt is offline
 
Join Date: Nov 2004
Location: KierDarby.php
Posts: 1,009
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I need to make some custom pages with 3.0.X
Reply With Quote
  #4  
Old 07-14-2005, 11:14 PM
Barakat's Avatar
Barakat Barakat is offline
 
Join Date: Nov 2004
Location: Jerusalem
Posts: 571
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wowowowow u r Great i wonder how i was going to make something nice like that .

just want know how can i called a data from database not from a templete in 3.5.0 ?

this file i make it on 3.0.7 and it works when i call it from the browser

Code:
<?php
require_once('./global.php');
if ($id) {
function getcontent($contentid) {
$contents=mysql_query("SELECT content FROM bbs WHERE id='$contentid'");
$content = mysql_fetch_array($contents);
$contentid=$content[content];
$html=str_replace("\"","\\\"",$contentid);
return $html;
}
$que = "SELECT * FROM bbs WHERE id='$id'";
$result = mysql_query ($que)
  or die ("error on file");
$page = mysql_fetch_array($result);
$navbits = construct_navbits(array('' => $page[name]));
eval('$navbar = "' . fetch_template('navbar') . '";');
eval("print(\"".getcontent("$id")."\");");
}
Reply With Quote
  #5  
Old 07-14-2005, 11:41 PM
Dream's Avatar
Dream Dream is offline
 
Join Date: Oct 2001
Posts: 2,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bigcurt
I need to make some custom pages with 3.0.X
https://vborg.vbsupport.ru/showthread.php?t=62164

Quote:
Originally Posted by Barakat
wowowowow u r Great i wonder how i was going to make something nice like that .

just want know how can i called a data from database not from a templete in 3.5.0 ?

this file i make it on 3.0.7 and it works when i call it from the browser
not sure how to do that, post it in the modification questions forum so more people can see it. I think you would need a php file to do that, dunno how to do one

you could edit the plugin, but im not sure what you are trying to do

edit 2: check this post too might help
https://vborg.vbsupport.ru/showthread.php?t=92066
Reply With Quote
  #6  
Old 07-15-2005, 12:57 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice idea

However I'm going to alter this and use an Extension version, by placing the code in a pages.php file

But still, nice idea

Satan
Reply With Quote
  #7  
Old 07-15-2005, 01:06 AM
Dream's Avatar
Dream Dream is offline
 
Join Date: Oct 2001
Posts: 2,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

go for it, modify, reuse, rerelease, whatever

edit: would be nice if you released a "blank page" extension, some people seem to need it. i dont know what id need to include etc to make that or else id make one.
Reply With Quote
  #8  
Old 07-15-2005, 01:15 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do you mean blank page?

And also - I've been toying with the idea of including a template-caching for the page generated...

The code I've been trying to use isn't working - I think it's a case of staring too long at vBulletin source code all day and I'm missing something

PHP Code:
    $globaltemplates array_merge($globaltemplates, array(' . $template_prefix . $_REQUEST[page] . ')); 


Satan
Reply With Quote
  #9  
Old 07-15-2005, 01:24 AM
Dream's Avatar
Dream Dream is offline
 
Join Date: Oct 2001
Posts: 2,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

dunno about cache, I think they are cached when you include global.php, so youd have to merge into the cache array before the script imports it... dont think there are hooks before a global.php include
Reply With Quote
  #10  
Old 07-15-2005, 01:26 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Of course - It has to be done via cache_templates

Satan
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 12:10 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.26361 seconds
  • Memory Usage 2,305KB
  • Queries Executed 23 (?)
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
  • (1)bbcode_code
  • (2)bbcode_php
  • (2)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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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