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 your own vBulletin page (https://vborg.vbsupport.ru/showthread.php?t=228112)

wilford brimley 04-20-2012 04:10 AM

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.

addamroy 04-22-2012 01:32 PM

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.

cellarius 04-22-2012 03:09 PM

By putting it into the php file? Right after "// ###### YOUR CUSTOM CODE GOES HERE #####"?

Eq4bits 04-23-2012 07:09 PM

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)

Anatoliy2 05-28-2012 10:00 AM

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!

Lynne 05-28-2012 05:05 PM

Quote:

Originally Posted by Anatoliy2 (Post 2333834)
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!

You would enter into the Tab Script(s) field what you entered as THIS_SCRIPT in your page.

thecoo1est 05-30-2012 03:36 AM

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.

Anatoliy2 05-30-2012 07:22 AM

Quote:

Originally Posted by Lynne (Post 2333947)
You would enter into the Tab Script(s) field what you entered as THIS_SCRIPT in your page.

Thanks for the answer! That's what I did originally and it doesn't work. :( I created file links.php (put it in the root), created a new template TEST, made a new nav tab Links, put links.php in the Tab Script(s) field. Doesn't work. The "Forum" link is highlighted when I'm on links.php page. :( Please help to understand what I'm doing wrong.

Lynne 05-30-2012 04:28 PM

Quote:

Originally Posted by thecoo1est (Post 2334528)
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.

You need to first render the "slideshow" template and then add the results of it as a variable into the "custom home" template.

$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:

Originally Posted by Anatoliy2 (Post 2334560)
Thanks for the answer! That's what I did originally and it doesn't work. :( I created file links.php (put it in the root), created a new template TEST, made a new nav tab Links, put links.php in the Tab Script(s) field. Doesn't work. The "Forum" link is highlighted when I'm on links.php page. :( Please help to understand what I'm doing wrong.

Tab Script is probably just "links" - check to see what variable you defined as THIS_SCRIPT at the top of the page.

Anatoliy2 05-30-2012 08:15 PM

Quote:

Originally Posted by Lynne (Post 2334750)
Tab Script is probably just "links" - check to see what variable you defined as THIS_SCRIPT at the top of the page.

It works! Thank you very much!


All times are GMT. The time now is 11:10 AM.

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.02066 seconds
  • Memory Usage 1,747KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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