Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 4 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[HOW TO - vB4] Create a own vBulletin page (without plugin and php file)
Allan's Avatar
Allan
Join Date: Jun 2003
Posts: 1,513

 

France
Show Printable Version Email this Page Subscription
Allan Allan is offline 11-29-2009, 10:00 PM

Here is a trick that allows you to create vBulletin pages without plugin or php files.
  • Create one template named "custom_wazaaaa", add in:
PHP Code:
{vb:stylevar htmldoctype}
<
html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
  <
head>
    <
title>{vb:raw vboptions.bbtitle}</title>
    {
vb:raw headinclude}
  </
head>
  <
body>
    
    {
vb:raw header}
    
    {
vb:raw navbar}
    
    <
div id="pagetitle">
      <
h1>{vb:raw pagetitle}</h1>
    </
div>
    
    <
h2 class="blockhead">Titre de la page (title page)</h2>
    <
div class="blockbody">
      <
div class="blockrow">
        
Le texte que vous souhaitez mettre (the text)
      </
div>
    </
div>
    
    {
vb:raw footer}
  </
body>
</
html
  • It'll just create a link to this url: /forum/misc.php?do=page&template=wazaaa
  • The template MUST be named custom_xxxxxx - change xxxxxx to whatever you want.
  • When call the page, you enter template=xxxxxx where xxxxxx is the part of the template name after custom_
PS: You are free to customize the text in the template
Attached Images
File Type: jpg template vB4.jpg (43.7 KB, 0 views)
Reply With Quote
  #52  
Old 12-30-2009, 10:14 AM
4ums 4ums is offline
 
Join Date: Oct 2009
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please can some one help ive been trying to long im using ragteks addon create a tab in navbar and Allans addon HERE im trying to link the two so here are the codes what do i need to change.
Heres the plug in code
if (THIS_SCRIPT == 'arcade') // also defined('ragtekarcade') possible
{
//set selected tab
$vbulletin->options['selectednavtab'] = 'ragtekarcade';
}
// add the "subtemplate" to the navbartemplate
$template_hook['navtab_middle'] .= vB_Template::create('ragtek_arcade_navbar')->render();

Heres the template...ragtek_arcade_navbar
<vb:if condition="$vboptions['selectednavtab'] == 'ragtekarcade'">
<li class="selected">
<a class="navtab" href="arcade.php{vb:raw session.sessionurl_q}">{vb:rawphrase ragtek_arcade}</a>
<ul class="floatcontainer">
<li><a href="http://www.4ums.com">misc.php?do=page&template=arcades</a></li>
</ul>
</li>
<vb:else />
<li><a class="navtab" href="arcade.php{vb:raw session.sessionurl_q}">{vb:rawphrase ragtek_arcade}</a></li>
</vb:if>

Heres the addon from this thread...custom_arcades
{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
<head>
<title>{vb:raw vboptions.bbtitle} arcades</title>
{vb:raw headinclude}
{vb:raw template_hook.headinclude}

</head>
<body>

{vb:raw header}

{vb:raw navbar}

<div id="pagetitle">
<h1>{vb:raw pagetitle}</h1>
</div>

<!--arcades-->

{vb:raw footer}
</body>
</html>

Please if any one can shed any light on how i get this to work in HARMONY i would be so gratefull been trying nearly 20hrs so must sleep now!! Thanks Bren.:up:
Reply With Quote
  #53  
Old 12-30-2009, 12:51 PM
Magz's Avatar
Magz Magz is offline
 
Join Date: Nov 2006
Location: UK
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 4ums View Post
Please if any one can shed any light on how i get this to work in HARMONY i would be so gratefull been trying nearly 20hrs so must sleep now!! Thanks Bren.:up:
Problem sorted,

was nice chatting to you, take care and have a good night at the movies
Reply With Quote
  #54  
Old 01-01-2010, 10:00 AM
simon157 simon157 is offline
 
Join Date: Jul 2009
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, this is great tutorial. Could someone tell me please how I would incorporate code with php in. I have some dynamic php driven pages which I'd like to include as additional pages in the forum. How do I call the php code? I'm struggling to be honest so some help would be great.
Reply With Quote
  #55  
Old 01-01-2010, 01:23 PM
SuperGLS SuperGLS is offline
 
Join Date: Nov 2004
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very easy to get working, thanks Allan! Working great in vB4 gold.

Quote:
Originally Posted by betty02 View Post
I created a new nav link to my custom page, how do i make that link selected/highlighted as if its on that page? Currently keeps my Forum tab highlighted/selected?
Quote:
Originally Posted by Lynne View Post
For the condition used for the tab, did you try this?
PHP Code:
if (THIS_SCRIPT == 'misc'
or, you may have to do:
PHP Code:
if (THIS_SCRIPT == 'misc' AND $_REQUEST['template'] == 'whatever'
Something like that should work. Play with it.
So if I have this setup to go to my custom temple (custom_cotm) and it goes to this page here http://www.elantraxd.com/forums/misc...&template=cotm

That's great, but how and where exactly should the code you put up go Lynne? I want the top tab in the Navbar called "COTM" to be the one that is highlighted (and obviously I need to make the COTM tab/button go to the correct URL, when it's ready). There is no .php file associated with the template. And the variables I'd need to replace are only THIS_SCRIPT right? Or do I have to do something with the 'misc' as well?
Reply With Quote
  #56  
Old 01-03-2010, 01:14 PM
SuperGLS SuperGLS is offline
 
Join Date: Nov 2004
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nevermind on this one. I'm using the other HOW TO now. Thanks anyway guys.
Reply With Quote
  #57  
Old 01-06-2010, 05:16 AM
TheSupportForum TheSupportForum is offline
 
Join Date: Jan 2007
Posts: 1,158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this does not work for me

i created a custom template call
wm_index

when i type in
misc.php?do=page&template=wm_index

i get a blank page can anyoneelp on this
however the php file i created for it shows up the template



why does the template need to be names custom_
please explain
Reply With Quote
  #58  
Old 01-10-2010, 01:14 AM
Longjohn Longjohn is offline
 
Join Date: Mar 2009
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am trying to create a new page for google search, I have created a new template named custom_gsearch and I have posted my google search code into it and can open the link manually with no problems, however when I enter in a search term it opens a page with a list of smileys.

How can I fix this?

Thanks
Reply With Quote
  #59  
Old 09-04-2010, 04:27 PM
Turbine Turbine is offline
 
Join Date: Mar 2008
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any ideas how to remove the navbar highlighting of "forum"?
Reply With Quote
  #60  
Old 09-10-2010, 01:49 PM
Turbine Turbine is offline
 
Join Date: Mar 2008
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Noone?
Reply With Quote
  #61  
Old 09-10-2010, 02:20 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Remove it when? If you don't want it highlighted when this page is displayed, then what navtab do you want highlighted when you are on this page? Whatever tab that is, add in a condition for that tab to make it highlighted when you are on this page. The default, when no other tab is highlighted, is to highlight the forum tab. So, if you don't want that, you need to make sure another tab meets the conditions to be highlighted.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:58 PM.


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.05214 seconds
  • Memory Usage 2,345KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (3)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete