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)

Digital Jedi 12-28-2008 11:38 PM

Quote:

Originally Posted by paperboy741258 (Post 1695835)
for the Who's Online modification

Code:

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

doesnt seem to exist in my functions_online.php

Did you try just searching for the first line without any spaces before or after in the Find options?

paperboy741258 12-28-2008 11:58 PM

yes, i even searched for the work bugs and there is nothing

Digital Jedi 12-29-2008 12:09 AM

Should be in there. What version are you using?

Lynne 12-29-2008 02:30 AM

I just looked an there is no bugs.php in 3.8 (not sure about 3.7). This method, using plugins, may work out better for you:

Create two plugins using the following hooks. Replace mypage and similar with your information.

hook online_location_process:
Code:

PHP Code:

switch ($filename)
{
    case 
'mypage.php':
        
$userinfo['activity'] = 'mypage';
        break;
// add more cases here if you have more than one custom page. no need for multiple plugins. one plugin can handle all.



hook online_location_unknown
Code:

PHP Code:

switch ($userinfo['activity'])
{
    case 
'mypage':
        
$userinfo['where'] = '<a href="mypage.php?'.$vbulletin->session->vars[sessionurl].'">My Page</a>';
        
$userinfo['action'] = "Viewing My Page";
        
$handled true;
        break;
// add more cases here if you have more than one custom page. no need for multiple plugins. one plugin can handle all.



Winterworks 12-29-2008 11:14 PM

can someone help me out here?

I don't seem to understand what to do... I want the page to appear on stylepreview.php, and the other codes be on stylepreview-codes.php.

I really don't understand what to edit though... Could someone help me?

Digital Jedi 12-29-2008 11:17 PM

Quote:

Originally Posted by Winterworks (Post 1696833)
can someone help me out here?

I don't seem to understand what to do... I want the page to appear on stylepreview.php, and the other codes be on stylepreview-codes.php.

I really don't understand what to edit though... Could someone help me?

Need a little more info on what your trying to accomplish. Have you successfully created a test page yet? You should really do that first to make sure you understand how to create the pages before you try to do any customization.

Winterworks 12-29-2008 11:21 PM

Have MSN mate?

I could use some assistance.

edit: I think I get it! Just a second.

gtrts 01-11-2009 01:17 PM

Can someone help me please?I did all the things: create test.php file,paste codes,create template,and when I navigate to test.php,the browser thows me a total blank page.It seems some setting is preventing the custom page using vbb resources.

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

ok now I get the point:the script hangs on "eval('print_output("' . fetch_template('TEST') . '");'); ",when I replace it with other (like "echo xxyy;"),the output is ok. any idea?

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

I test "eval('print_output("' . fetch_template('TEST') . '");'); " in index.php, it works... So it seems I cant use custom php file with vbb system. how can I solve this?

stevectaylor 01-11-2009 01:46 PM

Quote:

Originally Posted by gtrts (Post 1708518)
Can someone help me please?I did all the things: create test.php file,paste codes,create template,and when I navigate to test.php,the browser thows me a total blank page.It seems some setting is preventing the custom page using vbb resources.

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

ok now I get the point:the script hangs on "eval('print_output("' . fetch_template('TEST') . '");'); ",when I replace it with other (like "echo xxyy;"),the output is ok. any idea?

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

I test "eval('print_output("' . fetch_template('TEST') . '");'); " in index.php, it works... So it seems I cant use custom php file with vbb system. how can I solve this?

It sound like you possibly have not match the upper or lower case with the text file or not created the style template correctly. Check all the test names.

Lynne 01-11-2009 03:55 PM

You may want to make a thread in the Programming Discussions group and post your php code and template code and then we can help you figure out what is wrong.


All times are GMT. The time now is 05:17 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.02251 seconds
  • Memory Usage 1,752KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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