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] Adding Stylesheets to Your vB4 Mod via Plugins (https://vborg.vbsupport.ru/showthread.php?t=228833)

xman_79 01-22-2010 06:56 PM

I had a similar problem , and :

In my php file i add :

PHP Code:

$myvbcsspath 'css.php?styleid=' $style['styleid'] . '&langid=' LANGUAGEID '&d=' $style['dateline'] . '&td=' $vbulletin->stylevars['textdirection']['string'] . '&sheet='


PHP Code:

$templater->register('myvbcsspath'$myvbcsspath); 

And in my template :
HTML Code:

<link rel="stylesheet" type="text/css" href="{vb:raw myvbcsspath}mytemplate.css" />
*Rebuild style information .

Now it's work .

Look includes/class_core.php , Line 3994

hayaldunya 03-02-2010 07:39 AM

Quote:

Originally Posted by xman_79 (Post 1963692)
I had a similar problem , and :

In my php file i add :

PHP Code:

$myvbcsspath 'css.php?styleid=' $style['styleid'] . '&langid=' LANGUAGEID '&d=' $style['dateline'] . '&td=' $vbulletin->stylevars['textdirection']['string'] . '&sheet='


PHP Code:

$templater->register('myvbcsspath'$myvbcsspath); 

And in my template :
HTML Code:

<link rel="stylesheet" type="text/css" href="{vb:raw myvbcsspath}mytemplate.css" />
*Rebuild style information .

Now it's work .

Look includes/class_core.php , Line 3994

I'm its problem

Jaxel 04-17-2010 09:27 PM

I dont understand the purpose of all this... I just made a template called "media.css" and added the following to the shell of my mod:

Code:

<link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}media.css" />
Easy. No plugins required.

CarlitoBrigante 04-17-2010 11:15 PM

There is now a hook for the original purpose of this thread. As I said, this thread can now be considered obsolete. Now it has become as easy as creating a "yourcss.css" template, adding a plugin in the parse_template hook, and then do something like this in the plugin:

Code:

$template_hook['custom_css_list'] .= ',yourcss.css';
This thread was made for product creators that needed a simple way to attach css to their styles with no need for people installing their stuff to edit their templates.

TheSupportForum 08-02-2010 06:55 PM

does anyone know how to add a customer template to an existing template for example header

then to insert the code below or above

{vb:raw ad_location.global_header2}


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

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01454 seconds
  • Memory Usage 1,735KB
  • 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
  • (2)bbcode_html_printable
  • (4)bbcode_php_printable
  • (1)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
  • (5)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