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)

jayhawk785 02-24-2009 05:00 PM

What would I need to go about to create a template called "header2" (so i can modify the other and not pull everything in) and call it via $header2 in the test template. I created a duplicate header (same code), but it doesn't want to pull and im not sure where it needs to be added to make it work.

thanks :)

Lynne 02-24-2009 05:32 PM

You need to make sure to eval the template. And include it at the top of the file as one of the globaltemplates.

jayhawk785 02-24-2009 05:44 PM

i made another globals file and renamed header and called that through the script... im sure thats the long way, but given im changing the footer template too and im not huge on php, that seemed easy. I'm not sure what you mean by eval the template.

Lynne 02-24-2009 06:33 PM

Quote:

Originally Posted by jayhawk785 (Post 1753525)
i made another globals file and renamed header and called that through the script... im sure thats the long way, but given im changing the footer template too and im not huge on php, that seemed easy. I'm not sure what you mean by eval the template.

I meant to do just like in the first post, only use navbar2 instead:
PHP Code:

eval('$header2 = "' fetch_template('header2') . '";'); 

I've enver tried replacing the header, but I do not you would need to eval it.

RrCoX22 02-24-2009 07:17 PM

Quote:

Originally Posted by Lynne (Post 1753382)
I am guessing this line is the problem:
PHP Code:

eval('print_output("' fetch_template('Norcal 4x4 Forum Dark Side') . '");'); 

Do you have a template with that name?

And per the article, the stuff under the ?> is supposed to go into the template you create called "'Norcal 4x4 Forum Dark Side'" (usually we don't use spaces, but use _ instead.)

ya that's the template name... which basically is the default one but just changed the name.

im really confused? your saying this...

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>

goes in my template? like in the additional CSS box? it seems like that stuff would be in the file? or are you saying the first code in the instructions goes in the CSS template box? although the instructions said to put that in the notepad file? so I'm really lost haha. thanks for any help :up:

ragtek 02-24-2009 07:28 PM

Here's a tutorial how to create a template:
http://www.vbulletin.com/docs/html/s...edit_templates

Lynne 02-24-2009 08:04 PM

I don't understand why you are bringing up some CSS box. I don't know where that is coming from.

ZomgStuff 02-24-2009 08:41 PM

Great tutorial, highly useful.

figu120 02-24-2009 09:46 PM

I like that people are not registered or not logueadas can not access

Simply put permissions to different groups ..

RrCoX22 02-25-2009 06:40 PM

i don't understand why I would need to make another template? I though I was simple placing a file in the forums root?


All times are GMT. The time now is 01:25 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.02482 seconds
  • Memory Usage 1,745KB
  • 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
  • (2)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