vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Custom Pages (https://vborg.vbsupport.ru/showthread.php?t=141422)

ep13 03-07-2007 07:57 PM

Custom Pages
 
how do i add make custom pages?

yes i've searched but theres that much on search for the keywords i cant find it ..

harmor19 03-07-2007 08:00 PM

This is the easiest https://vborg.vbsupport.ru/showthread.php?t=124749
Here's a tutorial https://vborg.vbsupport.ru/showthread.php?t=98009

cashpath 04-07-2007 08:41 PM

Will plugins be enabled when making a page that way?

ragtek 04-07-2007 09:10 PM

no
both things have nothing to do with the pluginsystem
just this part needs it:
Adding Custom Online Locations in https://vborg.vbsupport.ru/showthread.php?t=98009

cashpath 04-07-2007 09:23 PM

So.. How would I call a plugin (already in place) to work on a custom page?

ragtek 04-07-2007 09:48 PM

i think you mean something different that i understand*g*

so you have a plugin witch you want to have on your custom site too?
what plugin is it?

cashpath 04-07-2007 10:09 PM

vbmicrostats

Logikos 04-07-2007 11:09 PM

vbmicrostats will more then likely be inherited into your new page, as long as your page is calling the global.php file.

cashpath 04-07-2007 11:14 PM

Well my page calls global and doesn't show microstats, but it is a stand alone php page wrapped in the header and footer of VB, I didn't use the template way of adding the page. Will that change it?

Logikos 04-07-2007 11:28 PM

vBMircostates uses the footer template AFAIK to display the stats. So if your not calling the $footer variable in your code, then vBM won't be displayed.

cashpath 04-07-2007 11:37 PM

I am calling the footer template...

Microstats shows up in the source code like this

<!-- {microstats} -->

Logikos 04-07-2007 11:43 PM

If your using the vBulletin templates system, then it should show. I know vBM using code along these lines:

PHP Code:

$output str_replace('<!-- {microstats} -->'$microstats$output); 



Which should be replacing <!-- {microstats} --> with the stats. I would suggest asking TECK in his hack thread?

cashpath 04-07-2007 11:47 PM

It shows up right on all pages except my custom ones...

I'm lost.. I guess I just wait for TECK

ragtek 04-08-2007 06:41 AM

how does your templatecode look like?

cashpath 04-08-2007 01:21 PM

I'm not using a template I'm just using a php page and including the VB stuff into it..

I'm going to test converting one of my pages to this way of doing it and see if the microstats work then.

ragtek 04-08-2007 03:05 PM

what?
now i don't understand^^

cashpath 04-08-2007 03:25 PM

I have a php page..

With this at the top

Code:

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'league_main'); // change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(

);

// get special data templates from the datastore
$specialtemplates = array(
   
);

// pre-cache templates used by all actions
$globaltemplates = array(
    'LEAGUE',
);

// pre-cache templates used by specific actions
$actiontemplates = array(

);

// ######################### REQUIRE BACK-END ############################
require_once($_SERVER["DOCUMENT_ROOT"].'/forum/global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits = array();
$navbits[$parent] = 'League';


$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');

And this at the bottom

Code:

<?=$footer?>
I do not have custom templates for the page the page contains all the html out put in it.. all I did was wrap my php files I already had in VB code to make the forum header navbar and footer display aroudn the page.

ragtek 04-08-2007 03:50 PM

wtf

have you a template called 'LEAGUE' ?
if not why you made this:
PHP Code:

$globaltemplates = array(
    
'LEAGUE',
); 

and what is between head and footer?

and use the shell_blank for your output!

$html.="bla blasdasd";
for (......................)
{
$html.=$bladad.'<br />';
}
or whatever
so it will be in the template and you will have no probs with the footer

cashpath 04-08-2007 04:02 PM

Quote:

Originally Posted by ragtek (Post 1222715)
wtf

have you a template called 'LEAGUE' ?
if not why you made this:
PHP Code:

$globaltemplates = array(
    
'LEAGUE',
); 


No I don't... I guess because I'm still learning and I was using a tutorial from here to integrate my pages to my board.

Quote:

and what is between head and footer?
a LOT of php code on most of the pages.

Quote:

and use the shell_blank for your output!

$html.="bla blasdasd";
for (......................)
{
$html.=$bladad.'<br />';
}
or whatever
so it will be in the template and you will have no probs with the footer
Sorry I'm lost (my fault, not yours.. I just really have no clue.. (new to this))

Logikos 04-08-2007 05:12 PM

shell_blank is a template in vBulletin and serves as a shell for a full page template if you need to create one.

ragtek 04-08-2007 05:25 PM

new to php too or just to vbulletin?*g*

PHP Code:

<?

define('THIS_SCRIPT', 'imp'); 

$phrasegroups = array(); 
$specialtemplates = array(); 
$globaltemplates = array( 
    'GENERIC_SHELL',
    'impressum' 
); 
$actiontemplates = array(); 
$pagetitle="Impressum";
require_once('./global.php'); 

eval('$navbar = "' . fetch_template('navbar') . '";'); 
eval('$HTML = "' . fetch_template('impressum') . '";');


eval('print_output("' . fetch_template('GENERIC_SHELL') . '");'); 
?>

helps this more?

so everything you want to show on your site you put into the $HTML variable

cashpath 04-08-2007 05:57 PM

I am new to PHP too... STill have a long way to go..

I uploaded one of my scripts here...

https://vborg.vbsupport.ru/showthrea...ts#post1222720

Could you show me what I would need to do with that to make it work? (including instructions for making any templates I need to make)

I think once I go through how to do it once in detail I will be able to convert any of my scripts.

ragtek 04-09-2007 07:14 AM

https://vborg.vbsupport.ru/forumdisplay.php?f=187 ^^

1. no more
PHP Code:

define('NO_REGISTER_GLOBALS'1); 

needed said andreas
2. have no time to make your script
look at the first link
there are many tuts

cashpath 04-09-2007 04:38 PM

Thanks for the help..

Finally got it working.


All times are GMT. The time now is 05:50 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01206 seconds
  • Memory Usage 1,769KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (5)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (24)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete