vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   general question about templates/custom pages and styling (https://vborg.vbsupport.ru/showthread.php?t=316636)

user25148 01-13-2015 04:50 PM

general question about templates/custom pages and styling
 
So i have a custom page (template?) created and the tabs all link to it fine etc...

Now usually with a html/php page I could write the code and then link it to a css stylesheet. Now I obviously want my custom page to be the same theme as the rest of my forum and be able to change themes with the rest of the forum. To do this, should I write all the html code for the page by editing the template in the adminCP? If so, how would I go about adding CSS to the page while keeping my theme? The additional.css file is not inherited across all my themes, so if I added it in there I would have to go through each theme and add the css to that themes additional.css file. Is there another way to do this?

bridge2heyday 01-13-2015 06:04 PM

I think you need to read this https://vborg.vbsupport.ru/showthread.php?t=228112

user25148 01-13-2015 09:03 PM

Quote:

Originally Posted by bridge2heyday (Post 2532333)

I've read over that several times, and already have the page created. I need to know where to style it using CSS.

cellarius 01-13-2015 09:16 PM

additional.css. And if not all of your styles implement it, then make them. That's the way to do it through vB.

squidsk 01-13-2015 09:29 PM

If you'd followed the guide as laid out by lynne then it would automatically be styled according to the selected style of the user. Further additional.css style rules would be used on that page as the setup includes the code necessary to include that file.

user25148 01-13-2015 10:45 PM

Quote:

Originally Posted by cellarius (Post 2532346)
additional.css. And if not all of your styles implement it, then make them. That's the way to do it through vB.

Quote:

Originally Posted by squidsk (Post 2532349)
If you'd followed the guide as laid out by lynne then it would automatically be styled according to the selected style of the user. Further additional.css style rules would be used on that page as the setup includes the code necessary to include that file.

Thanks for the replies. I know additional.css would work but I wanted to know if there was a better way instead of going through each themes additional.css and add the same CSS code.

squidsk 01-14-2015 12:06 AM

Quote:

Originally Posted by user25148 (Post 2532363)
Thanks for the replies. I know additional.css would work but I wanted to know if there was a better way instead of going through each themes additional.css and add the same CSS code.

Yes create a template called mypage.css and link to it in the head section of your custom page. Naming the template with .css at the end will group it in with the other css templates in vbulletin.

cellarius 01-14-2015 05:08 AM

Quote:

Originally Posted by user25148 (Post 2532363)
Thanks for the replies. I know additional.css would work but I wanted to know if there was a better way instead of going through each themes additional.css and add the same CSS code.

You should have a parent style with your own styles as child style, so changes are inherited.

user25148 01-14-2015 07:24 AM

Quote:

Originally Posted by squidsk (Post 2532373)
Yes create a template called mypage.css and link to it in the head section of your custom page. Naming the template with .css at the end will group it in with the other css templates in vbulletin.

I went ahead and made a css file and it did group itself with the other css templates in the style manager. I tried to link my custom template page to this css file using
Code:

<link rel="stylesheet" type="text/css" href="name of css template here">
in between the <head></head> tags however this had no effect and the code inside this css template did not run.

Quote:

Originally Posted by cellarius (Post 2532422)
You should have a parent style with your own styles as child style, so changes are inherited.

The styles do have a main parent style but alot of the code that creates the variations of the themes is probably in the additional.css file and therefore it isnt inherited.

cellarius 01-14-2015 07:56 AM

Quote:

Originally Posted by user25148 (Post 2532439)
I went ahead and made a css file and it did group itself with the other css templates in the style manager. I tried to link my custom template page to this css file using
Code:

<link rel="stylesheet" type="text/css" href="name of css template here">
in between the <head></head> tags however this had no effect and the code inside this css template did not run.

You don't create actual files in the template manager, and therefore you can't integrate them that way. That code would look for a stylesheet file with that name in your forum root, and where should that come frome?

You need to create an actual, physical css file in your file system and link to that properly.


All times are GMT. The time now is 03: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.01089 seconds
  • Memory Usage 1,740KB
  • 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
  • (8)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
  • (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