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
  #32  
Old 12-16-2009, 02:18 PM
betty02 betty02 is offline
 
Join Date: May 2005
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.


Exactly what are you trying to do? You don't want to include the whole misc.php page in another script. Where are you adding the php code to include the misc.php page? If you have other php pages already, you probably would do better following this - [HOW TO - vB4] Create a own vBulletin page
Had a play around with that mate and nothing has worked - say my page is called shoutbox i have tried putting that in aswell and instead of misc etc and still nothing. Thanks for help so far though but any other will be really appreciated!
Reply With Quote
  #33  
Old 12-16-2009, 02:55 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nubian View Post
Hi Lynne.

My apologies, I'm understanding what you told me but I'm not understanding why you told me and how this would get rid of the aboutus text?

I've create a template called, "custom_aboutus".

....
I thought maybe getting rid of this...
Code:
{vb:raw navbar}
would do it but that removes my entire menu.

Thanks
You would have to actually edit the navbar itself. That part is called the breadcrumbs. If you remove it in the navbar, it will be removed everywhere that you use that style (like in the forums and threads also).

Quote:
Originally Posted by I.am View Post
I can't see the text when i write on this template what stylevar color i have to edit?
Please see this article on how to find stylevars - HOW TO Find what Stylevar you need to edit
Quote:
Originally Posted by betty02 View Post
Had a play around with that mate and nothing has worked - say my page is called shoutbox i have tried putting that in aswell and instead of misc etc and still nothing. Thanks for help so far though but any other will be really appreciated!
You'll have to look at your shoutbox page and find out what THIS_SCRIPT is defined as. I have no idea and can't help with that since I don't have the mod.
Reply With Quote
  #34  
Old 12-16-2009, 08:45 PM
Ted Clore Ted Clore is offline
 
Join Date: Apr 2007
Location: Michigan
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
You can see that the links are different, right? In the standalone code above, the link for the first article is:
Code:
http://www.light-after-darkness.org/forums/articles/WCF1.php#I
- notice the url for that page and then the anchor at the end.

On the CMS page, the link for the first article is:
Code:
http://www.light-after-darkness.org/forums/#I
- notice that url is incorrect for the page, it should be something like:
Code:
http://www.light-after-darkness.org/forums/content.php?59-The-Westminster-Confession-of-Faith#I
It needs the page name and section name in there.
Thank you Lynne, your help was truly appreciated. Got it under control and working like a charm now.
Reply With Quote
  #35  
Old 12-17-2009, 05:27 AM
nubian nubian is offline
 
Join Date: Nov 2004
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would it be possible to get "aboutus" to display "About Us"?

Reply With Quote
  #36  
Old 12-17-2009, 06:32 AM
betty02 betty02 is offline
 
Join Date: May 2005
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
You would have to actually edit the navbar itself. That part is called the breadcrumbs. If you remove it in the navbar, it will be removed everywhere that you use that style (like in the forums and threads also).


Please see this article on how to find stylevars - HOW TO Find what Stylevar you need to edit

You'll have to look at your shoutbox page and find out what THIS_SCRIPT is defined as. I have no idea and can't help with that since I don't have the mod.
Heres my current code if this helps mate?

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} Shoutbox</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>

<!--SHOUTBOX-->

    {vb:raw footer}
  </body>
</html>
Reply With Quote
  #37  
Old 12-17-2009, 11:52 AM
dtommy79 dtommy79 is offline
 
Join Date: Jul 2007
Location: Hungary
Posts: 148
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It doesn't work for me on RC4.
I get an object not found 404 error.

I named the template custom_banners and i use this url: http://localhost/vb4scifiw/forum/mis...mplate=banners
Reply With Quote
  #38  
Old 12-17-2009, 01:14 PM
betty02 betty02 is offline
 
Join Date: May 2005
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That URl wont work, as it's not a web link the http://localhost bit should be your website e.g my website is www.twingooc.com localhost wont work as a URL iirc?
Reply With Quote
  #39  
Old 12-17-2009, 02:05 PM
dtommy79 dtommy79 is offline
 
Join Date: Jul 2007
Location: Hungary
Posts: 148
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by betty02 View Post
That URl wont work, as it's not a web link the http://localhost bit should be your website e.g my website is www.twingooc.com localhost wont work as a URL iirc?
It doesn't really matter that it is on localhost. Just figured I didn't need to use the forum dir.
Reply With Quote
  #40  
Old 12-17-2009, 03:10 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dtommy79 View Post
It doesn't work for me on RC4.
I get an object not found 404 error.

I named the template custom_banners and i use this url: http://localhost/vb4scifiw/forum/mis...mplate=banners
Did you put the template in that particular style?

Quote:
Originally Posted by betty02 View Post
Heres my current code if this helps mate?
That's just the template. THIS_SCRIPT is defined in the php page.
Reply With Quote
  #41  
Old 12-17-2009, 03:22 PM
nubian nubian is offline
 
Join Date: Nov 2004
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by betty02 View Post
Heres my current code if this helps mate?

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} Shoutbox</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>

<!--SHOUTBOX-->

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

Thanks for your reply.
You code removes the blockhead, I want to retain it.
Actually what I'm looking to do is change the text from this...



to this...



Any idea on how to accomplish this?
I plan on creating a massive amount of customized pages, like 50+ pages, so I'm debating on whether I should go this route or go with Lynne's method of using actual php files.
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 03:41 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.05809 seconds
  • Memory Usage 2,362KB
  • 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
  • (6)bbcode_code
  • (3)bbcode_php
  • (10)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
  • (4)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