vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Create a own vBulletin page (without plugin and php file) (https://vborg.vbsupport.ru/showthread.php?t=229194)

betty02 12-18-2009 06:45 AM

Quote:

Originally Posted by Lynne (Post 1932286)
Did you put the template in that particular style?


That's just the template. THIS_SCRIPT is defined in the php page.

Ohh sorry, were would i find that? if i post that would it help?

--------------- Added [DATE]1261126003[/DATE] at [TIME]1261126003[/TIME] ---------------

Quote:

Originally Posted by nubian (Post 1932298)
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...

https://vborg.vbsupport.ru/external/2009/12/68.jpg

to this...

https://vborg.vbsupport.ru/external/2009/12/69.jpg

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.


It's all picked up of your template name e.g if template is called custom_AboutUs it will appear like this - AboutUs, so if it's called custom_aboutus it will appear like aboutus. Pretty sure you cannot use spaces though.

nubian 12-18-2009 01:55 PM

Quote:

Originally Posted by betty02 (Post 1932738)
Ohh sorry, were would i find that? if i post that would it help?

--------------- Added [DATE]1261126003[/DATE] at [TIME]1261126003[/TIME] ---------------




It's all picked up of your template name e.g if template is called custom_AboutUs it will appear like this - AboutUs, so if it's called custom_aboutus it will appear like aboutus. Pretty sure you cannot use spaces though.

Damn damn damn, I was hoping in creating multiple pages like this with spacing in the words.

Lynne 12-18-2009 02:24 PM

Quote:

Originally Posted by betty02 (Post 1932738)
Ohh sorry, were would i find that? if i post that would it help?

I don't know where it is - you said you were using some script, so it would be in the file for that script.

turtile 12-19-2009 02:15 PM

I want to make a new page for my home page which would be index.html/php. I made the template and named it custom_homepage.

What shoud I use to call the template? If I make a file, index.php, what should go in it?

Thanks

Lynne 12-19-2009 03:02 PM

Quote:

Originally Posted by turtile (Post 1933486)
I want to make a new page for my home page which would be index.html/php. I made the template and named it custom_homepage.

What shoud I use to call the template? If I make a file, index.php, what should go in it?

Thanks

This is not the tutorial to use for what you want to do. You need to call the page using misc.php if you use this tutorial. There is another tutorial in this section for making vbulletin pages that you may call whatever you want (like a new index.php page).

anthony parsons 12-22-2009 04:22 AM

This needs an extra div class so that the now default vb css browser resetting will render HTML correctly. Using a default class from 4 and wrapping it around all custom entered HTML, then renders lists, paragraphs and so forth correctly.

<div class="article cms_clear restore">

M3xital 12-23-2009 02:01 PM

Thanks Allan, it works just fine on my board.

Magz 12-26-2009 02:50 PM

Sorry if this has been asked, but how can i set it to be viewable by only certain usergroups?

tia

Lynne 12-26-2009 03:58 PM

Quote:

Originally Posted by Magz (Post 1938651)
Sorry if this has been asked, but how can i set it to be viewable by only certain usergroups?

tia

You would have to put a condition around the stuff in the page you don't want others to see:
HTML Code:

<vb:if condition="is_member_of($bbuserinfo, x,y,z)">
the content you want usergroups x.y,and z to see
<vb:else />
You do not have permission to see this page
</vb:if>


Magz 12-26-2009 05:14 PM

Your a star,

thank you Lynne

4ums 12-30-2009 10:14 AM

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.:eek::up:

Magz 12-30-2009 12:51 PM

Quote:

Originally Posted by 4ums (Post 1942356)
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.:eek::up:

Problem sorted,

was nice chatting to you, take care and have a good night at the movies :)

simon157 01-01-2010 10:00 AM

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.

SuperGLS 01-01-2010 01:23 PM

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

Quote:

Originally Posted by betty02 (Post 1927751)
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 (Post 1927787)
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?

SuperGLS 01-03-2010 01:14 PM

Nevermind on this one. I'm using the other HOW TO now. Thanks anyway guys.

TheSupportForum 01-06-2010 05:16 AM

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

Longjohn 01-10-2010 01:14 AM

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

Turbine 09-04-2010 04:27 PM

Any ideas how to remove the navbar highlighting of "forum"?

Turbine 09-10-2010 01:49 PM

Noone?

Lynne 09-10-2010 02:20 PM

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.

VancouverGamers 09-23-2010 02:34 AM

How can I make this work and look half decent with a fixed style? when I go to the custom page it stretches it all out and distorts it.

MichaelDance 09-23-2010 12:20 PM

Btw this dont work for me im on VB4.0.7

Teascu Dorin 10-19-2010 06:07 PM

Works for me on 4.0.7 but I want to know how or what do I need to add to be able to use <ul> <ol> <li> tags!?
Thanks!

Lynne 10-19-2010 07:17 PM

Quote:

Originally Posted by dorin2oo7 (Post 2111734)
Works for me on 4.0.7 but I want to know how or what do I need to add to be able to use <ul> <ol> <li> tags!?
Thanks!

Put the text in a <div class="restore"> tag. I think that will work. (This has already been covered a couple of times in this thread, so if my memory is faulty on the class name, and it could be, please read the thread.)

andreamarucci 10-22-2010 12:53 PM

Fantastic thanks!!

steve71 11-01-2010 12:25 PM

Quote:

Originally Posted by simonhind (Post 1948494)
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


I had the same problem and it turned out to be the url.

Quote:

Originally Posted by Allan (Post 1923168)
  • Create one template named "custom_wazaaaa",
  • It'll just create a link to this url: /forum/misc.php?do=page&template=wazaaa

Either make sure you have the same amount of a's or just rename the template custom_test and view it by going to: forum/misc.php?do=page&template=test

EvilArcana 04-10-2012 12:15 PM

I'm using doubleclick for publishers and have my ad header code in a different include...so something everyone might consider including would be:
Code:

        {vb:raw headinclude_bottom}
right under the existing headinclude...

Also in order to address those that want spaces in the title...you don't have to use the vb page title variable...here's the code I'm using for information on advertising on my site.

Code:

{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml"<vb:if condition="$vboptions['enablefacebookconnect']"> xmlns:fb="http://www.facebook.com/2008/fbml"</vb:if> dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
<head>
        {vb:raw headinclude}
        <title>{vb:raw vboptions.bbtitle} - {vb:raw pagetitle}</title>
        {vb:raw headinclude}
        {vb:raw headinclude_bottom}
  </head>
  <body>
   
    {vb:raw header}
   
    {vb:raw navbar}
   
    <div id="pagetitle">
      <h1>{vb:raw pagetitle}</h1>
    </div>
   
    <h2 class="blockhead">Advertise With Us!</h2>
    <div class="blockbody">
      <div class="blockrow">
      <div class="article cms_clear restore">
        <p>Text and links and info about advertising with us goes here</p>
      </div>
      </div>
    </div>
    <br /><br />
    {vb:raw footer}
  </body>
</html>

You can replace both instances of {vb:raw pagetitle} with the version of your title that has spaces easily.

thecoo1est 05-29-2012 05:54 PM

Im on vb 4.2 can I use this? If so can I have this in the root while the forum is in a folder in root?

TheSupportForum 09-05-2012 02:52 PM

how do you load the additional.css into your custom pages

---
edit : found solutions, forgot to add {vb:cssfile additional.css}


All times are GMT. The time now is 10:54 PM.

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.01446 seconds
  • Memory Usage 1,818KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (29)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