MyBB Community Forums

Full Version: Variables in Stylesheets?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Simple version: Any chance of this making it into 1.8?

I've been messing about with an idea recently and I think I've managed to make the base of it work, variables are parsed on load, although it does have it's downsides.
So far I've forced it to load from css.php, thereby (I believe) bypassing the cache. There's no simple way to add variables (yet), but I've tested it with a few common ones.

I've still to update my localhost though, so stylesheet minification stopped me from doing some of it, so I'll do that now and keep testing.
It's unlikely we'll be adding anything like this. I believe someone's working on a plugin for 1.8 though.
(2013-06-25, 07:01 AM)Nathan Malcolm Wrote: [ -> ]It's unlikely we'll be adding anything like this.

Darn. Thanks though. Smile

(2013-06-25, 07:01 AM)Nathan Malcolm Wrote: [ -> ]I believe someone's working on a plugin for 1.8 though.

I think that's Audentio, isn't it?
We're (WeDevign) doing one on 1.6/1.8. Well, it's already done for 1.6 actually. xD

http://i5.minus.com/iM11UzZuL4ZSV.png

(2013-06-25, 07:07 AM)Seabody Wrote: [ -> ]
(2013-06-25, 07:01 AM)Nathan Malcolm Wrote: [ -> ]It's unlikely we'll be adding anything like this.

Darn. Thanks though. Smile

(2013-06-25, 07:01 AM)Nathan Malcolm Wrote: [ -> ]I believe someone's working on a plugin for 1.8 though.

I think that's Audentio, isn't it?

Yes, we have one being made. Won't be ready for awhile though.
That sounds like a wonderful idea Wink
Doesn't really require a plugin. I believe in css.php you can just change
echo $stylesheet;
to
eval("echo $stylesheet;");
and it should work, maybe.
Yeah, I saw it recently in the Scratchboard thread.

@Stefan - that's essentially what I did. The problem is that stylesheets are loaded from the cache, so I had to figure out a way to force them to load from css.php. Once that was done, I just eval'd the stylesheet right before it was echoed, and that worked.