PDA

View Full Version : [HOW TO - vB4] Create a own vBulletin page (without plugin and php file)


Allan
30 Nov 2009, 21:00
Here is a trick that allows you to create vBulletin pages without plugin or php files.
Create one template named "custom_wazaaaa", add in:{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 ;)

Zaiaku
01 Dec 2009, 03:40
I was wondering if this changed or not. Best to use this with a mod rewrite so it just don't look wierd.

Brandon Sheley
01 Dec 2009, 04:26
Great info Allan!

Adem GENĒ
01 Dec 2009, 12:29
without php file, mytest.php -->plugin

/forum/mytest.php --> /forum/misc.php???????????

Is this possible?

VonDoom
01 Dec 2009, 13:11
I dont know but, ive worked this code ten ways from Sunday and it just reverts to the smilie list. Either that or the instructions are geared towards somebody with more experience then me, and im missing something.

Lynne
02 Dec 2009, 04:48
Works just fine for me guys.

Allan, perhaps something you need to emphasize here....
- 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_

Allan
02 Dec 2009, 06:55
Works just fine for me guys.

Allan, perhaps something you need to emphasize here....
- 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_
Yes, i will add ;)

VonDoom
02 Dec 2009, 17:40
where xxxxxx is the part of the template name after custom_
haha there it is.

betty02
03 Dec 2009, 12:05
Having problems with this,

Put the code in a custom template called custom_shoutbox but when you navigate to it then nothing loads?

http://www.twingooc.com/misc.php?do=page&template=shoutbox


EDIT: SORTED!!

--------------- Added 1259851799 at 1259851799 ---------------

Ok i have done a test template for a simple homepage layout here (http://www.twingooc.com/misc.php?do=page&template=home)

Can you see the second ''block'' how would i alight that to the right of the first block and also create a block to the left of that as well?

So works out like a 3 column template?

Lynne
03 Dec 2009, 15:41
Ok i have done a test template for a simple homepage layout here (http://www.twingooc.com/misc.php?do=page&template=home)

Can you see the second ''block'' how would i alight that to the right of the first block and also create a block to the left of that as well?

So works out like a 3 column template?
You'll use divs and float:right and float:left . You should google "css help" and you'll find several good places that will help you with your css.

niake
03 Dec 2009, 22:20
:up: Thanks

betty02
09 Dec 2009, 13:43
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?

Dave-ahfb
09 Dec 2009, 14:45
I was thinking this might make an easier way to integrate my current php scripts, using this article to create header and footer templates. I should have known somehow some way things would screw up, it just seemed to easy.
<?php
include_once('/home/ahfb/public_html/ahfb2000.com/public/4test/misc.php?do=page&template=css2header');
?>


Gives me the error Warning: include_once(/home/ahfb/public_html/ahfb2000.com/public/4test/misc.php?do=page&template=css2header) [function.include-once]: failed to open stream: No such file or directory in /home/ahfb/public_html/ahfb2000.com/public/4test/cssgenerator2.php on line 2

Warning: include_once() [function.include]: Failed opening '/home/ahfb/public_html/ahfb2000.com/public/4test/misc.php?do=page&template=css2header' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/ahfb/public_html/ahfb2000.com/public/4test/cssgenerator2.php on line 2

Not being a programmer, my guess is that .......I am clueless ;)


UPDATE

I found that due to the variables
(/home/ahfb/public_html/ahfb2000.com/public/4test/misc.php?do=page&template=css2header will not work, it must be done with the url
include('http://www.ahfb2000.com/4test/misc.php?do=page&template=css2header');
which leads to error "URL file-access is disabled in the server configuration " in addition to the previous errors. To solve this you are supposed to change php.ini to read

allow_url_fopen = On
and
Allow_url_include = On

Still have all 3 errors ...hmmm


oops, forgot to reload apache, now my errors are Warning: include(http://www.ahfb2000.com/4test/misc.php?do=page&template=css2header) [function.include]: failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required in [path]/cssgenerator2.php on line 3

Warning: include() [function.include]: Failed opening 'http://www.ahfb2000.com/4test/misc.php?do=page&template=css2header' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in [path]/cssgenerator2.php on line 3

Lynne
09 Dec 2009, 15:33
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?
For the condition used for the tab, did you try this?
if (THIS_SCRIPT == 'misc')
or, you may have to do:
if (THIS_SCRIPT == 'misc' AND $_REQUEST['template'] == 'whatever')

Something like that should work. Play with it.

I was thinking this might make an easier way to integrate my current php scripts, using this article to create header and footer templates. I should have known somehow some way things would screw up, it just seemed to easy.
.....

Not being a programmer, my guess is that .......I am clueless ;)
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 (http://www.vbulletin.org/forum/showthread.php?t=228112)

Dave-ahfb
09 Dec 2009, 15:35
update..again
removing the htaccess, now it works perfect!!

Problem is how can I have a secret hidden test folder to get everything setup :(

--------------- Added 1260373985 at 1260373985 ---------------

Lynne,

I used your tutorial on my static pages, it is very well writtin and was easy to follow, worked a charm :). On my scripts, well that is a different issue. I read 3 or 4 different tutorials and just could not get my pea-brain wrapped around the concept. Once this one was published I knew that though it may not be the optimal method to use, I could probably make it suit my needs.

Yes, it does have downfalls, I must either go live and do the work on the live pages without htaccess or find a way for the include to send the htpasswd (thinking it can be done but have not investigated yet). The biggest possible downfall is potential security issues having Allow_url_fopen and Allow_url_include = On. I have read there could be issues but have not read what these issues could be. Is it possible you could enlighten me to these issues and any others I may not be aware of?

thanks

Lynne
09 Dec 2009, 16:22
Yes, it does have downfalls, I must either go live and do the work on the live pages without htaccess or find a way for the include to send the htpasswd (thinking it can be done but have not investigated yet). The biggest possible downfall is potential security issues having Allow_url_fopen and Allow_url_include = On. I have read there could be issues but have not read what these issues could be. Is it possible you could enlighten me to these issues and any others I may not be aware of?

thanks
You should probably post that sort of question out in the general forums. I'm really not a security expert (I know just enough for my little site!), but there are some server guys around who could probably answer your question.

Dave-ahfb
09 Dec 2009, 17:25
I am about to give up, using my method the login does not work. Lynne, this particular script I am working on is a very simple proprietary tool. I hate to post this here for help as there are many attempts on the net to copy it. Do you mind if I pm you?

Adem GENĒ
13 Dec 2009, 22:47
For Privacy Policy the very good :up:
Thank you very much

Ted Clore
14 Dec 2009, 21:45
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.

nubian
15 Dec 2009, 06:02
Any way to make these URL friendly?
Like mydomain.com/aboutus ?

Lynne
15 Dec 2009, 17:41
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?

Any way to make these URL friendly?
Like mydomain.com/aboutus ?
Google "htaccess mod_rewrite"

nubian
15 Dec 2009, 17:53
Google "htaccess mod_rewrite"
Oh cool, all's that needed it a mod rewrite.
I'm currently using Mattyasia's.

Thanks for replying

Ted Clore
16 Dec 2009, 00:08
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/forums/content.php?59-The-Westminster-Confession-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?

Lynne
16 Dec 2009, 00:31
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).

Ted Clore
16 Dec 2009, 01:35
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 (http://www.light-after-darkness.org/forums/articles/WCF1.php)

So I don't think it is something wrong with the code.

Lynne
16 Dec 2009, 05:18
The code works OK if it isn't in a widget:

SEE ME (http://www.light-after-darkness.org/forums/articles/WCF1.php)

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:
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:
http://www.light-after-darkness.org/forums/#I

- notice that url is incorrect for the page, it should be something like:
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.

nubian
16 Dec 2009, 05:37
Would it be possible to get rid of what I have attached here in yellow?

https://www.vbulletin.org/forum/external/2009/12/79.jpg

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.

Lynne
16 Dec 2009, 06:33
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.

nubian
16 Dec 2009, 06:48
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? :confused:

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:
<span>aboutus</span>

This is what the code looks like.
{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...
{vb:raw navbar}
would do it but that removes my entire menu.

Thanks

I.am
16 Dec 2009, 12:27
I can't see the text when i write on this template what stylevar color i have to edit?

betty02
16 Dec 2009, 16:18
For the condition used for the tab, did you try this?
if (THIS_SCRIPT == 'misc')
or, you may have to do:
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 (http://www.vbulletin.org/forum/showthread.php?t=228112)

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!

Lynne
16 Dec 2009, 16:55
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? :confused:

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

....
I thought maybe getting rid of this...
{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).

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 (http://www.vbulletin.org/forum/showthread.php?t=230309)
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.

Ted Clore
16 Dec 2009, 22:45
You can see that the links are different, right? In the standalone code above, the link for the first article is:
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:
http://www.light-after-darkness.org/forums/#I

- notice that url is incorrect for the page, it should be something like:
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. :)

nubian
17 Dec 2009, 07:27
Would it be possible to get "aboutus" to display "About Us"?

https://www.vbulletin.org/forum/external/2009/12/79.jpg

betty02
17 Dec 2009, 08:32
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 (http://www.vbulletin.org/forum/showthread.php?t=230309)

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?

{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>

dtommy79
17 Dec 2009, 13:52
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/misc.php?do=page&template=banners

betty02
17 Dec 2009, 15:14
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?

dtommy79
17 Dec 2009, 16:05
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 (http://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.

Lynne
17 Dec 2009, 17:10
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/misc.php?do=page&template=banners
Did you put the template in that particular style?

Heres my current code if this helps mate?

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

nubian
17 Dec 2009, 17:22
Heres my current code if this helps mate?

{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...

https://www.vbulletin.org/forum/external/2009/12/68.jpg

to this...

https://www.vbulletin.org/forum/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.

betty02
18 Dec 2009, 08:45
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 1261126003 at 1261126003 ---------------

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://www.vbulletin.org/forum/external/2009/12/68.jpg

to this...

https://www.vbulletin.org/forum/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
18 Dec 2009, 15:55
Ohh sorry, were would i find that? if i post that would it help?

--------------- Added 1261126003 at 1261126003 ---------------




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
18 Dec 2009, 16:24
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
19 Dec 2009, 16:15
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
19 Dec 2009, 17:02
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
22 Dec 2009, 06:22
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
23 Dec 2009, 16:01
Thanks Allan, it works just fine on my board.

Magz
26 Dec 2009, 16:50
Sorry if this has been asked, but how can i set it to be viewable by only certain usergroups?

tia

Lynne
26 Dec 2009, 17:58
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:
<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
26 Dec 2009, 19:14
Your a star,

thank you Lynne

4ums
30 Dec 2009, 12:14
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
30 Dec 2009, 14:51
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 Jan 2010, 12:00
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 Jan 2010, 15:23
Very easy to get working, thanks Allan! Working great in vB4 gold.

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?

For the condition used for the tab, did you try this?
if (THIS_SCRIPT == 'misc')
or, you may have to do:
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.php?do=page&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
03 Jan 2010, 15:14
Nevermind on this one. I'm using the other HOW TO now. Thanks anyway guys.

TheSupportForum
06 Jan 2010, 07:16
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
10 Jan 2010, 03:14
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
04 Sep 2010, 18:27
Any ideas how to remove the navbar highlighting of "forum"?

Turbine
10 Sep 2010, 15:49
Noone?

Lynne
10 Sep 2010, 16:20
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
23 Sep 2010, 04:34
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
23 Sep 2010, 14:20
Btw this dont work for me im on VB4.0.7

Teascu Dorin
19 Oct 2010, 20:07
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
19 Oct 2010, 21:17
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
22 Oct 2010, 14:53
Fantastic thanks!!

steve71
01 Nov 2010, 14:25
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.


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
10 Apr 2012, 14:15
I'm using doubleclick for publishers and have my ad header code in a different include...so something everyone might consider including would be:
{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.


{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
29 May 2012, 19:54
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
05 Sep 2012, 16:52
how do you load the additional.css into your custom pages

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