vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   How to create your own vBulletin-powered page! (uses vB templates) (https://vborg.vbsupport.ru/showthread.php?t=62164)

m2006 01-12-2013 01:39 AM

hi I am asking for advice.

by code I want to have a link with

PHP Code:

<?php 

chdir
(public_html/forums); 
require_once(
'./global.php'); 

$threads $db->query_read(
SELECT title FROM " 
TABLE_PREFIX "thread 
ORDER by dateline DESC 
LIMIT 0,5 
"
); 
while (
$thread $db->fetch_array($threads)) 

echo 
$thread['title'] . "<br />"

?>



thanks you

Lynne 01-12-2013 01:51 AM

That can't be your full page code. If this isn't about writing a page, then you are in the wrong thread.

ar15dcm 05-01-2013 08:31 PM

I searched includes/function_online.php for this

PHP Code:

    case 'bugs.php':
        
$userinfo['activity'] = 'bugs';
        break; 

And it did not exist in my file. I am running 4.2.0 PL3

Lynne 05-01-2013 08:36 PM

Quote:

Originally Posted by ar15dcm (Post 2419494)
I searched includes/function_online.php for this

PHP Code:

    case 'bugs.php':
        
$userinfo['activity'] = 'bugs';
        break; 

And it did not exist in my file. I am running 4.2.0 PL3

This thread is for vB3, not vB4.

ar15dcm 05-01-2013 08:49 PM

DOH.. Do you have a link for the vb4 version of this?

Lynne 05-01-2013 11:04 PM

Quote:

Originally Posted by ar15dcm (Post 2419498)
DOH.. Do you have a link for the vb4 version of this?

https://vborg.vbsupport.ru/showthread.php?t=228112

koke 08-24-2013 05:56 PM

i have this mss!

Code:

Unable to add cookies, header already sent.
File: /home/gamerol/public_html/leaguelegends.com.ar/foro/Livestream.php
Line: 1

when I'm not logged in

jtorral 12-16-2013 04:23 AM

Well, I am looking for a way of just adding the navbarto my own stand alone page. This seems to do the trick but I don't get a navbarwhich uses the template or looks formatted nicely.
have a look here where I am testing

http://www.snoozingonthejob.com/test.php

by the way, i omit the other part of the code because I just want the navbar see below.

Any help would be appreciated.

Code:

<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'test'); // 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(
    'TEST',
);

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

);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

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

$navbits = array();
$navbits[$parent] = 'Test Page';

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


Digital Jedi 12-16-2013 04:25 AM

You can't omit anything from the PHP file. You customize how you want the page to look in the template.

jtorral 12-16-2013 04:33 AM

Well I copied the files just like they are in the original post but just get a blank page

i created test2.php and the file TEST. Hate to beat a dead horse but I am clueless at this point :(


All times are GMT. The time now is 10:43 AM.

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.02046 seconds
  • Memory Usage 1,751KB
  • 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
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete