Register Arama Bugünkü Mesajlar Tüm Forumu Okundu Say

Reply
 
Thread Tools
[HOW TO - VB4] Adding Stylesheets to Your vB4 Mod via Plugins
vB.Org Poster
vB.Org Poster has disabled reputation
Kayıt Tarihi: Jul 2018
Mesajlar: 298

Show Printable Version Email this Page
Makale: vBulletin 4 Makaleleri, yazan vB.Org Poster 09 Jul 2018, 23:24

THIS ARTICLE IS NO LONGER NEEDED FOR vB 4.0.0+: you can now just use the hook in the headinclude_bottom template: headinclude_bottom_css. As I wrote at the beginning of this tutorial, this was to help people working with beta versions.

As many coders have noticed, we still don't have a template hook in headinclude to add our own CSS to the css.php call in the template. Additionally, the simple method I am listing here might still be useful in the future, even when we get that hook.

One of the great things of the new vBulletin, in fact, is that you can manipulate CSS generation as you have been used to in your scripts.

Here you go.

1. First, add a template in Style & Templates, and assign it to your product in development. Let's call this template yourproduct.css.
2. Now, add a plugin for your product for caching this template. Go to Plugin Manager -> Add Plugin, call the plugin as you prefer, then choose the cache_template hook, and finally put the following code in it:

Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

3. Add another plugin for your product. Choose the css_start hook, then place this code in it:

Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

The in_array check makes sure that your CSS is added only to the main vbulletin.css call.

That's it - your CSS will be added to the generated CSS file.
Views: 29
Reply With Quote
Reply

Thread Tools

Şunları Yapabilirsin
Yeni Konu Açmak
Konuya Cevap Yazmak
Eklenti Eklemek
Düzenleme Yapabilmek

Forum Atla


LD'de Yeni misin? Yardıma mı ihtiyacın var?

All times are GMT +3. The time now is 12:23.

Tasarım Özelliği | Genişlik: Geniş Renk: [HOW TO - VB4] Adding Stylesheets to Your vB4 Mod via Plugins [HOW TO - VB4] Adding Stylesheets to Your vB4 Mod via Plugins [HOW TO - VB4] Adding Stylesheets to Your vB4 Mod via Plugins [HOW TO - VB4] Adding Stylesheets to Your vB4 Mod via Plugins [HOW TO - VB4] Adding Stylesheets to Your vB4 Mod via Plugins