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)

Lynne 03-28-2009 04:10 PM

Quote:

Originally Posted by edytwinky (Post 1779047)
So when I create my own page, can I have the main portion of it all in html coding?

Yep. I have my donations page all html.

Alefux 03-30-2009 06:22 PM

Hi, how can I use php? I need to create some pages with php but the templates don't support it.

Lynne 03-30-2009 06:31 PM

Quote:

Originally Posted by Alefux (Post 1780511)
Hi, how can I use php? I need to create some pages with php but the templates don't support it.

Did you read the article? The php goes in the php page your create - the html goes in the template you create. It's explained in the first post.

Alefux 03-30-2009 06:40 PM

Yes, yes... I can read and i know what is php and what is html.

I need to use php in the custom page's content. I can't do it.

Pvtiste 03-30-2009 07:07 PM

Quote:

Originally Posted by Alefux (Post 1780529)
Yes, yes... I can read and i know what is php and what is html.

I need to use php in the custom page's content. I can't do it.

I have the same problem, If I want to put an "echo" what do I have to do ?

I tried to put into my test.php (at the end) and it doesn't work...

ragtek 03-30-2009 07:11 PM

You'll have to store the output into a variable and place the variable into the template!

PHP Code:

$myoutput 'This is my dynamic created content'

Then just place $myoutput into your template

Pvtiste 03-30-2009 07:15 PM

Quote:

Originally Posted by ragtek (Post 1780556)
You'll have to store the output into a variable and place the variable into the template!

PHP Code:

$myoutput 'This is my dynamic created content'

Then just place $myoutput into your template


$myoutput = 'echo "hello the world";';

Then in my template I have to call my var $myoutput ??

Hmm strange :D

ragtek 03-30-2009 07:20 PM

no, without echo!

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

i got a pm but i'm answering here because maybe other users also want to know it...
If you want to use loops you could make it this way:

PHP Code:

$output =''// here i'm defining a empty $output variable, just to be clear its empty^^

foreach ($a as $b)
{
    
$output .= $b;  //add something to $output


so, now you have everything i your $output variable


Here's a example from a page i created:
PHP Code:

        foreach ($contacts as $email=>$name)
        {
            
$counter++;
            
exec_switch_bg();
                
            if (
$plugType == 'email')
            {
                
$contactdetails $name $email;
            }
            else
            {
                
$contactdetails $name;
            }
            eval(
'$contactbits .= "' fetch_template('contactbit') . '";');
        } 

here i have a $contactbits variable where i put the content in every foreach step

Shaheen 04-09-2009 09:32 PM

hi ,
i have done all but in who online
i cant find this

Code:

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

i m using 3.8.0 , is it changed in 3.8.0 ?

Lynne 04-09-2009 09:50 PM

Quote:

Originally Posted by Shaheen (Post 1787724)
hi ,
i have done all but in who online
i cant find this

Code:

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

i m using 3.8.0 , is it changed in 3.8.0 ?

Yes, it has changed. See this article on how to make your page show up in WOL for 3.5 and above - [HowTo] Add Custom Pages to WOL


All times are GMT. The time now is 01:28 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.02828 seconds
  • Memory Usage 1,753KB
  • 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
  • (4)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)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