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)

Gary King 03-09-2004 06:55 PM

Quote:

Originally Posted by HarryButt
I was trying to add this to the php file and show up in the "TEST" template.

Can anyone could give me a hand on how to make it VB3 friendly. :cross-eyed:

PHP Code:

<?

$contribreport=mysql_query("SELECT userid,username,contrib FROM user WHERE contrib='1' ORDER BY userid");
while(list($userid,$username,$contrib)=mysql_fetch_row($contribreport)){

?>

<table border='0' cellspacing='1' cellpadding='0' align='center'>
  <tr>
  <td align='center' width='100%'><a target='_blank' href='../forums/member.php?u=<? echo"$userid"; ?>'><font size='1' face='Verdana'><? echo" $username"; ?></font></a></td>
 </tr>

<?
}
?>
</tr></td>
</td>
  </tr>

</table>


PHP code goes in the file before outputting the TEST template, and HTML goes into the temlpate :)

Alien 03-09-2004 07:07 PM

Very nice job on this, I finally got around to adding all the miscellaneous forum policies and a few subpages and this was just what the doctor ordered to accomplish it!

Thanks a lot!

b6gm6n 03-09-2004 08:59 PM

Gary, looks like a great mod... i have a question though

Would it be possible to call an external html page to be included within instead of using templates?

glo 03-09-2004 09:03 PM

Is there anything like this for vB2.3.X?

Gary King 03-09-2004 09:03 PM

Quote:

Originally Posted by b6gm6n
Gary, looks like a great mod... i have a question though

Would it be possible to call an external html page to be included within instead of using templates?

Well then there wouldn't be a header or footer, so no point in using this mod then :) I'd suggest copying the HTML and placing into the body of my template :)

glo 03-11-2004 03:22 AM

Quote:

Originally Posted by glo
Is there anything like this for vB2.3.X?

Is this like Logicians Template hack?

TCSoul 03-12-2004 08:09 PM

Alright... vB newbie here, and this question is so basic, it almost makes me feel dirty...

Quote:

Originally Posted by Gary W
Be sure to change 'TEST' to the actual template name, and change 'test' to the filename. Also, change 'Test Page' to whatever you want to show in the navbar, such as 'Viewing Member Profile' (just an example).

Now create the template, called TEST with the following content:
HTML Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="tcat">Title</td>
</tr>
<tr>
        <td class="alt1">Text</td>
</tr>
</table>

$footer
</body>
</html>

All done :D
Now check it out by going to test.php ;)

Here's my (oh so humble :o ) question... I'm looking everywhere, and I'm very confused about templates, and the Template Manager. First of all, is the Template Manager the same thing as the Style Manager? And regardless of that, the above code doesn't look like somethign that would be dealt with in the Style Manager anyway... at least not anywhere I can find. Do I need to save this as a template file in my code source (can't find a place it would make sense for it to go), and if not, where would I drop it in in the Style Manager?

Gary King 03-12-2004 09:11 PM

Quote:

Originally Posted by TCSoul
Alright... vB newbie here, and this question is so basic, it almost makes me feel dirty...



Here's my (oh so humble :o ) question... I'm looking everywhere, and I'm very confused about templates, and the Template Manager. First of all, is the Template Manager the same thing as the Style Manager? And regardless of that, the above code doesn't look like somethign that would be dealt with in the Style Manager anyway... at least not anywhere I can find. Do I need to save this as a template file in my code source (can't find a place it would make sense for it to go), and if not, where would I drop it in in the Style Manager?

Style Manager manages several styles. Each style contains hundreds of templates :) Let me know if that doesn't help, but should at least set you off on the right foot!

Ravenheart 03-12-2004 09:24 PM

Style Manager > Click the drop down box > Edit templates :)

glo 03-13-2004 02:14 AM

Quote:

Originally Posted by glo
Is this like Logicians Template hack?


umm Gary, would you prefer me to PM these questions to you?


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

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02705 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
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (6)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