Quote:
Thank you for responding. My site is not operational yet, so it's turned off, but here is a screenshot of it: This is my relevant .php code (forgive me if it's hilariously wrong :) ) : Code:
// ###### YOUR CUSTOM CODE GOES HERE ##### Code:
{vb:stylevar htmldoctype} Again, forgive me if it is all hilariously wrong, but I am a rank beginner :D Jack |
If you want a simple skeleton page bundled together as a vB product see:
https://vborg.vbsupport.ru/showthread.php?t=266449 It provides a tab and a Google search. Because it is so lightweight it is easy to adapt to another purpose. I published it as 'Re-usable Code' so no ? issues. Kym |
Quote:
Thank you very much, Kym, I will try it. (Fine site BTW, congrats!) And nice to meet another photographer too :D Cheers, Jack |
Is it possible to create a new page, containing a new forum with new sections? I mean, basically copy the excisting "Forum" page to a new page with a new title, new sections, new forums etc?
|
Quote:
|
How can I add my forum sidebar to the page?
|
You would need to add the template code from the FORUMHOME template into your template for the block and also add all the php from the forum.php file for the block to your php file (along with any templates needed, etc.)
|
Quote:
Update: solved |
im working on this, thanks got my page going. Ive been looking through the 50 page sbut cant find my answers.
I need. 1. page to work in all skins not just default. I put a chat box on my page and a video stream 2. only want the page visible to certian usergroups and definatly not the general public.I want a private veiwng room. thannks. |
1. Then you need to add the template to all the skins.
2. Then put a condition regarding is_member_of - do a search in the thread on that function and you should find the answer. |
ok, cool. Thanks, I figured out how to edit the MASTER STYLE via debug nad add the template all skins. I have it set to only let logged in regs see it, and made my page load from a "forum" link only visable to usergroups, however any reg and logge din user can actually access it if they know the url.
I;ll search, thanks. --------------- Added [DATE]1334899949[/DATE] at [TIME]1334899949[/TIME] --------------- found it, thanks. |
Can anyone either direct me to the appropriate post, or tell me how I can execute PHP code in these custom pages?
I searched through this article and the forum itself, can't find any solid info on how to do this. |
By putting it into the php file? Right after "// ###### YOUR CUSTOM CODE GOES HERE #####"?
|
vB4.1.12
successfully created php file successfully created template I'm using this as a custom page in my CMS (long explanation that's not pertinent) but instead of having the 'Forum' tab 'highlighted'/active and the forum navbar links I need to have the 'Home' tab 'highlighted'/active and the 'home' navbar links. Also in Firefox v11.0 everything displays correctly, however in IE v9.0.8112.16421 the log-in in the header is whacked out and the 'page' is fluid instead of adhering to the fixed width as defined in my stylevars. (link to page in above paragraph) |
Thank you very much for describing how to make a custom page. I made it and everything worked like a charm! I have a question. I made a new nav tab "Links" and pointed it to my custom page links.php. How can I make that when I'm in, the "Links" tub would be highlighted, not the "Forum" as it is now. My site is www.oregonfishingforum.com
Thanks in advance! |
Quote:
|
Hi Lynne, Would you answer one question for me? Im not sure I fully understand how to call additional templates in to existance.
I have the "custom home" template setup with your settings looks great of course. I then added another template, its a slideshow slider. How do I call the "slideshow" template into the" custom home" template above the vb:raw footer? What exaclty would I need to do to the php file? I know the slider works because if I add it to the custom home template I can see it, but I would rather have it in its own template for easy editing when I apply new pictures and links. |
Quote:
|
Quote:
$newTemplate = vB_Template::create('slideshow'); $newTemplate->register('variable1', $somearray); $newTemplate->register('variable2', $variabletwo); $slideshow = $newTemplate->render(); then register slideshow for use in the "custom home" template. Quote:
|
Quote:
|
How can we get custom pages to pull a custom child style?
|
Quote:
|
Quote:
Each forum section on my site uses its own template set, I would like to utilize the different styles in the respected off forum sections. green widget forum= green widget style= I want to use this style in my green widgets tutorials which are integrated using the methods explained in this thread. red blue yellow |
Quote:
I looked in to this and can't find a really good way to do it. You could create a plugin using hook global_bootstrap_init_start, check for your value of THIS_SCRIPT and call $bootstrap->force_styleid(); (passing it the id of the style you want to use). I know, it seems strange that you shoudl have to have a plugin when you're writing your own script, but the problem is that the style is decided on and loaded all within global.php. I suppose another method would be to be to copy the code from global.php instead of including it, then you can insert a call to force_styleid(). But then you might have to update your scripts if global.php changes in a later version. A style can be specified in the parameter "styleid", so you might be able to do something like set $_REQUEST['styleid'] before global.php is included, but I notice that that sets a cookie with that style value, and I'm not sure if that will affect other pages or not. |
Quote:
I should be able to create globalgreenwidget.php, specify $bootstrap->force_styleid(); and of course change the custom page call to global to globalgreenwidget.php. The downfall as mentioned above, is having to maually fix this with every upgrade. |
AFAIR, the GET-method will set the style cookie. The best and easiest option really is to go with the plugin, in my opinion. Just have one plugin for all your custom pages, supply them with a unique THIS_SCRIPT or a unique constant of your choice, and switch it.
--------------- Added [DATE]1338576139[/DATE] at [TIME]1338576139[/TIME] --------------- Our posts crossed. You cannot use $bootstrap->force_styleid() in your own php page. You need to create a plugin, jsut as kh99 explained. Then there's no problem on updates. |
Can you give me an example?
|
Well, it's everything there, really.
In your own page, do something like this: After "define('THIS_SCRIPT', 'test');", add PHP Code:
Then create a plugin at global_bootstrap_init_start PHP Code:
|
not working, even tried registering $force_my_style on the custom page, still the parent style
|
That's my fault - [S]try using hook global_bootstrap_init_complete.[/S]
Sorry...one more time. This time I tested it: use hook global_bootstrap_complete and change the code to: Code:
global $force_my_style; BTW, nice solution, cellarius. Maybe this should be added to the article. |
Works great, thanks!
This will help maintaining different ads per category |
Quote:
|
Quote:
|
I have been able to create my custom pages ok and use the following code for my templates
Code:
// ###### When do == 'xxx' ##### |
Quote:
|
Hello everyone,
I'm new here and I'm urgently looking for help in regards to this topic. Here's my issue: 1: I have created a custom page with a .php uploaded to the root folder as per the instructions. 2: Both of this I have created a template on the Default Style and Mobile Style. 3: The issue is I can view the page normally on the desktop version and Andriod devices and mobile version via the desktop however when I open it on an IPhone ie IPhone 4, the entire screen goes blank and stays blank. I appreciate all the help I can get. Thanks Guys |
Quote:
|
Well, Lynne, I want to thank you very much for the article; I've used it with success here @work (up to a point), but I'm very sorry I have to chime in with YAQ (Yet another question).
On our sites, I can't seem to get the site footer to work. Here's the relevant section of my PHP script: PHP Code:
I suppose what's really confusing is that the $templater object does contain the footer code as it's supposed to. So is this some sort of rendering issue? It doesn't appear in the HTML source code of the resulting page --- no footer HTML in there at all. Here's the 'pfs' template code: Code:
{vb:stylevar htmldoctype} I you don't mind to help me close this bug, I'd be quite appreciative. :) Whacks w/the clue stick are appreciated as well :D |
Quote:
|
Doh! Too much stuff this week for brain to function properly! Thanks much!
Where do you want your cookies sent? :) |
All times are GMT. The time now is 12:40 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 | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|