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)

11133 01-02-2012 08:48 AM

how to check on database, on what table to look

Lynne 01-02-2012 10:41 PM

You'd look at your template table.

Did you look at your error_logs?

11133 01-03-2012 10:30 AM

i empty the error_logs and then create new template, error_log its still empty
i looked on table template and i see it the new created template, and those i create before, so if i want to edit them i must edit via phpmyadmin, couse i dont see them on vbulletin admincp :(

Lynne 01-03-2012 03:46 PM

Something is wrong on your site if it will not give you the full list of templates. Do you have any modifications? Try disabling them.

11133 01-03-2012 05:18 PM

Quote:

Originally Posted by Lynne (Post 2283425)
Something is wrong on your site if it will not give you the full list of templates. Do you have any modifications? Try disabling them.

i put define('DISABLE_HOOKS', true); in config.php to disable all plugins
and take a look on the template i still didnt see the custom templates :( ahhh

Lynne 01-03-2012 05:51 PM

If you have ticket support, I would suggest putting in a ticket.

11133 01-03-2012 08:14 PM

Quote:

Originally Posted by Lynne (Post 2283456)
If you have ticket support, I would suggest putting in a ticket.

no i dont have :(

11133 01-20-2012 08:42 PM

bump, still no sollytion if i wanna to edit the template i need to edit via database directly

ClErK1991 01-22-2012 01:19 AM

thanks for this, this is what i want to :D

--------------- Added [DATE]1327200411[/DATE] at [TIME]1327200411[/TIME] ---------------

ok now i have a question. i your attachment look like this

https://vborg.vbsupport.ru/external/2012/01/33.png

but what i gonna do this.. it looks like this

https://vborg.vbsupport.ru/external/2012/01/34.png

how can i fixed?

cellarius 01-22-2012 04:25 PM

Read and implement the article for the vB version you are running. This is for vB3, you're clearly running vB4.

ClErK1991 01-22-2012 04:56 PM

Quote:

Originally Posted by cellarius (Post 2291003)
Read and implement the article for the vB version you are running. This is for vB3, you're clearly running vB4.

ahhh yea is true, but there is no way to put on vb 4?

HMBeaty 01-22-2012 05:07 PM

Quote:

Originally Posted by ClErK1991 (Post 2291019)
ahhh yea is true, but there is no way to put on vb 4?

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

ClErK1991 01-22-2012 05:56 PM

thanks bro, that what i need :D

brishi 03-18-2012 03:52 AM

OK, so being new to vB, I just tried this out and received the following error message and am not sure what I need to do? Probably very simple but...

Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: navbar in [path]/includes/functions.php on line 4330

Parse error: syntax error, unexpected T_STRING in /home/brishi69/public_html/vb/test.php(42) : eval()'d code on line 1

Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: TEST in [path]/includes/functions.php on line 4330

Cheers,
BriShi

cellarius 03-18-2012 11:01 AM

Please note that this tutorial is for vB3.x. You are obviously running vB4.x, so you need to look out for the vB4-article on this topic (in the vB4-articles subforum).

brishi 03-18-2012 06:27 PM

Thanks you for responding cellarius, I noticed and found the one for vB4 late last night and was too tired to change it then. I just tried that one and now I just get a white page. So am looking through the replies on that page too see if anyone had a similar problem before I post in there....

Cheers,
BriShi

Chase 04-23-2012 03:11 AM

When I am browsing my forum on my phone I am unable to view my custom page ... All I get is a white blank page. But when I view the forum on the desktop skin I can view the custom page just fine.

How can I get my custom page to show up when I am using my mobile theme?

BirdOPrey5 04-23-2012 10:33 AM

You probably need to add the template you created to your mobile style.

You probably added it initially only to your default style, so your mobile style is missing the template.

I don't know if it talks about it in this article but you should really enable debug mode in the admin cp (https://vborg.vbsupport.ru/showthread.php?t=165623)

In debug mode you can add a net template to the usually hidden "MASTER Style" which will automatically allow it to be used in ALL styles simultaneously instead of having to add it individually to each style.

Chase 04-24-2012 10:36 PM

Thank you... that was the issue.

Sworm 11-24-2012 03:33 PM

Hi all, i have created a privacy page using this code, but if i try to see that page logged out, the browser report:

Code:

Unable to add cookies, header already sent.
File: /home/download/public_html/vb/tos.php
Line: 1

the php page is:
Code:

<?php

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

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

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

);

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

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

$navbits = array();
$navbits[$parent] = 'Privacy e Tos';

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

?>

There's a solution? i'm using vb 3.8.7 and php 5.3.16

Thanks

@@@@@@@@@@@@@@@@@@@@@@@@@@

Solved, there'was a white space before <?php

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 :(

Digital Jedi 12-16-2013 04:44 AM

I just now looked a little more closely at your PHP page and I see what the problem is. This custom page needs to use your custom template. Not your navbar template or any other template. Just the new template you created.

You haven't followed the tutorial exactly. Go back, do exactly as Gary details. Then when you want to edit the look of your page the only thing you change is the template code. This custom page will ALWAYS use your custom template, regardless of what you're trying to put on that page.

jtorral 12-17-2013 11:51 PM

ok. i must be dumb or am missing something. Even if I create the exact files as described in the original post, makes the modes for the newer version of vb, i still get nothing that is formatted.

Digital Jedi 12-17-2013 11:56 PM

Have you successfully made just the default page in the tutorial first? Before trying to make any changes?

jtorral 12-18-2013 12:40 AM

Thats just it. I try to mimic the exact code in the example on the tutorial. Two files a test.php and a TEST template file. Using those I get nothing back :(

Digital Jedi 12-18-2013 02:00 AM

Remember that the template needs to exist in the style you're using, and every style you plan on using it with. Otherwise, all you'll get is a blank page when that skin has no template for it.

jtorral 12-18-2013 03:26 AM

Ah, there lies my problem. So I changed the name TEST to be FAQ which is a template in te software and it finally showed something. Well, I appreciate the help but unfortunately this does not address my problem or should I say my need.

I will just highlight what I need and maybe you can point me to an existing post because I can't find one that works for me.

I wrote some gallery software whih you can see on sites like LeicaImages.com or Nikonimages.com

It is stand alone nd does not use templates.

I am testing on http://www.snoozingonthejob.com/ an integration of vb with my software. I have account info working. The only thing I need is to include the vb navbar at the top of this page http://www.snoozingonthejob.com/ag2sigallery/index.php so that when people are in my part of the sftware they can stil navigate through the forum softwre.

Thanks for any feedback you could provide.

vishwarajpoot 01-30-2014 01:25 PM

not working for me on vbulletin 5 can anybody help me out
the page is coming but l am unable to include header and footer

ozzy47 01-30-2014 01:51 PM

Of course this won't work in vB5 this article is for vB3

Dr.Wave 06-29-2014 06:32 PM

vB3 is not work !, content code error.

Simon Lloyd 06-30-2014 04:02 AM

Works perfect for vb3.x


All times are GMT. The time now is 10:45 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.02735 seconds
  • Memory Usage 1,831KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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