Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 24 Aug 2011, 11:51
Asterix_ita's Avatar
Asterix_ita Asterix_ita is offline
 
Join Date: Aug 2009
Template Css adding in my addon

I used this plugin to upload my template.css, but sometimes is it loaded and others no why? (vBulletin 4.1.5)


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Is there any other way to load your css template?

In several articles I found this code, but everyone says outdated


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Thanks

Regards
Reply With Quote
  #2  
Old 24 Aug 2011, 16:11
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Take a look at the headinclude template:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

There is an if/else there. You can only use the template hook custom_css_list if the css is not being stored in the file system. So, two different template_hooks need to be defined.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)

Last edited by Lynne; 24 Aug 2011 at 16:24.
Reply With Quote
  #3  
Old 24 Aug 2011, 16:22
Asterix_ita's Avatar
Asterix_ita Asterix_ita is offline
 
Join Date: Aug 2009
Thanks Lynne

I have to replace xxxx and yyy with the name of my template.css, is it correct?

Regards
Reply With Quote
  #4  
Old 24 Aug 2011, 16:29
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
No, not exactly. The _links hook requires a full on link. (I actually got this code from one of BOPs mods.)

Try this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #5  
Old 24 Aug 2011, 16:46
Asterix_ita's Avatar
Asterix_ita Asterix_ita is offline
 
Join Date: Aug 2009
Thanks it works fine.

You know how these two ways of interpreting the CSS code



Regards
Attached Images
File Type: jpg Selezione_128.jpg (23.0 KB, 33 views)
File Type: jpg Selezione_129.jpg (24.3 KB, 30 views)
Reply With Quote
  #6  
Old 24 Aug 2011, 20:50
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
I have no idea why that gap is there. You'd need to analyze the box using something like firebug.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #7  
Old 25 Nov 2011, 16:52
CvP's Avatar
CvP CvP is offline
 
Join Date: Aug 2006
I actually got in to some trouble with this a few minutes ago and Lynne was kind enough (as always!) to point me I'm using process_tempaltes_complete instead of parse_templates.

With that help, now I am using this in my codes:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #8  
Old 25 Nov 2011, 17:22
Asterix_ita's Avatar
Asterix_ita Asterix_ita is offline
 
Join Date: Aug 2009
Hi CvP

Thanks, but your code works fine on my addon with parse_templates hook, doesn't work with process_tempaltes_complete

regards
Reply With Quote
  #9  
Old 25 Nov 2011, 23:15
CvP's Avatar
CvP CvP is offline
 
Join Date: Aug 2006
Yes, it needs to be on parse_templates. I used process_templates_complete and banging my head on table until Lynne stepped in.
Reply With Quote
  #10  
Old 26 Nov 2011, 00:31
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Originally Posted by Lynne View Post
You can only use the template hook custom_css_list if the css is not being stored in the file system. So, two different template_hooks need to be defined.
What hooks would you use if the css IS stored in the file system?
Reply With Quote
  #11  
Old 26 Nov 2011, 01:40
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Real name: Brooks
Originally Posted by Boofo View Post
What hooks would you use if the css IS stored in the file system?
custom_css_links
__________________
"Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time!"
"It's important to only think about what you desire, not what you fear to achieve your ultimate goal!!
Reply With Quote
  #12  
Old 08 Dec 2011, 03:40
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Real name: Brooks
Changing this up a bit....in the headinclude template here:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Would it be safe to say we can use the template hook headinclude_css to add on to the -ie.css? For example, I'd like to add sidebar-ie.css to it, but unsure if that would work (since I don't use IE 8).

Also, if we can use that hook location, would we use the same method of adding to the store css as files? Like this maybe? .....

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Or would it just be....

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Thanks in advance
__________________
"Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time!"
"It's important to only think about what you desire, not what you fear to achieve your ultimate goal!!
Reply With Quote
  #13  
Old 08 Dec 2011, 16:08
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
If you want to add something for IE only, you need to put that comment code around it.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #14  
Old 09 Dec 2011, 01:15
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Real name: Brooks
So something like this should work, right?

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Sorry, haven't been able to think straight the past few days
__________________
"Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time!"
"It's important to only think about what you desire, not what you fear to achieve your ultimate goal!!
Reply With Quote
  #15  
Old 10 Dec 2011, 03:16
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Real name: Brooks
This appears to work (not sure if it's correct though) .....

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
"Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time!"
"It's important to only think about what you desire, not what you fear to achieve your ultimate goal!!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 17:34.

Layout Options | Width: Wide Color: