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
  #22  
Old 12-15-2009, 03:41 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 Ted Clore View Post
I've read and reread this article and completely do not understand it. Could someone give a step by step and explain things for a neophyte like myself. I am trying to wrap my site pages with vB headers, footers and widgets, and I think this is what this is supposed to do.

Any help is appreciated. Thank you.
What exactly have you done? The article is pretty straightforward. Did you create any templates? Did you make sure to name them custom_whatever ? Exactly what have you done so far?

Quote:
Originally Posted by nubian View Post
Any way to make these URL friendly?
Like mydomain.com/aboutus ?
Google "htaccess mod_rewrite"
Reply With Quote
  #23  
Old 12-15-2009, 03:53 PM
nubian nubian is offline
 
Join Date: Nov 2004
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Google "htaccess mod_rewrite"
Oh cool, all's that needed it a mod rewrite.
I'm currently using Mattyasia's.

Thanks for replying
Reply With Quote
  #24  
Old 12-15-2009, 10:08 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
What exactly have you done? The article is pretty straightforward. Did you create any templates? Did you make sure to name them custom_whatever ? Exactly what have you done so far?
Well..., I have moved on in a different direction, which seems to be working for me. Sorta.

What I am doing now is making a widget with HTML code in a Static HTML widget. Then I make a new layout with the Layout manager and place the widget into the center of the layout, just below the Primary Content. Then I go to to the Section Manager and make a new section naming it accordingly. And with the Layout window in the Layout editor, I select the layout I created earlier. This puts the content of the widget on the center of a page all by itself, if I want.

The only problem that I am having is that not all of the HTML codes work in the widgets. Headers and Navigational commands within the widget either don't work at all or take you to the Home page in CMS.

For instance, I have a very long article that is in a widget and navigation code that will take you to a section heading so that you don't have to scroll through a lot of text to get to that section. And after you have read that section you can click a TOP button that should take you back to the top of the page where the Contents are listed. Either link takes you to the Home page in CMS.

Here it is:

http://www.light-after-darkness.org/...ssion-of-Faith

Clicking on a title in the Contents section should take you to that section, it doesn't it takes you Home.

Clicking on "TOP" at the end of a section should take you back to the Contents portion of the article, it doesn't.

Any ideas, after this long post?
Reply With Quote
  #25  
Old 12-15-2009, 10:31 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 Ted Clore View Post
Clicking on a title in the Contents section should take you to that section, it doesn't it takes you Home.

Clicking on "TOP" at the end of a section should take you back to the Contents portion of the article, it doesn't.

Any ideas, after this long post?
Google "anchor html". You have your anchor links incorrect which is why they aren't going to the correct place. I've gotta run right now, but you should be able to google it and see what is wrong (hover over your links in the page to see where they are currently going).
Reply With Quote
  #26  
Old 12-15-2009, 11:35 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
Google "anchor html". You have your anchor links incorrect which is why they aren't going to the correct place. I've gotta run right now, but you should be able to google it and see what is wrong (hover over your links in the page to see where they are currently going).
The code works OK if it isn't in a widget:

SEE ME

So I don't think it is something wrong with the code.
Reply With Quote
  #27  
Old 12-16-2009, 03:18 AM
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 Ted Clore View Post
The code works OK if it isn't in a widget:

SEE ME

So I don't think it is something wrong with the code.
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.
Reply With Quote
  #28  
Old 12-16-2009, 03:37 AM
nubian nubian is offline
 
Join Date: Nov 2004
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would it be possible to get rid of what I have attached here in yellow?



I'm finding it to be quite redundant and also I'm unable to separate the words about and us like I can in the blockhead.
Reply With Quote
  #29  
Old 12-16-2009, 04:33 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I suppose you could, but you'll have to edit your template. To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code.
Reply With Quote
  #30  
Old 12-16-2009, 04:48 AM
nubian nubian is offline
 
Join Date: Nov 2004
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
I suppose you could, but you'll have to edit your template. To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code.
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".
If I were viewing this in firebug, I could see that the line for the aboutus text is this:
Code:
<span>aboutus</span>
This is what the code looks like.
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">About Us</h2>
    <div class="blockbody">
      <div class="blockrow">
        Test here
      </div>
    </div>
    
    {vb:raw footer}
  </body>
</html>
I thought maybe getting rid of this...
Code:
{vb:raw navbar}
would do it but that removes my entire menu.

Thanks
Reply With Quote
  #31  
Old 12-16-2009, 10:27 AM
I.am I.am is offline
 
Join Date: Mar 2009
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't see the text when i write on this template what stylevar color i have to edit?
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 09:57 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.08352 seconds
  • Memory Usage 2,354KB
  • 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
  • (1)bbcode_php
  • (8)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