PDA

View Full Version : Variable Help


MatiasCandy
09-01-2011, 03:21 PM
I have a product that is hard coded in a lot pf places when it comes to images.
(edit, delete, etc)

I want the images to change with the theme, can someone please tell me the variable(s) I need to use in my template to make this happen.

Right now it is hard coded at "/images/delete.gif"

nhawk
09-01-2011, 04:18 PM
There are 14 image variables in vB...

imgdir_attach
imgdir_button
imgdir_cms
imgdir_editor
imgdir_gradients
imgdir_icons
imgdir_misc
imgdir_mobile
imgdir_pagination
imgdir_rating
imgdir_reputation
imgdir_searchresults
imgdir_siteicons
imgdir_statusicon

So if the delete.gif is in the misc image directory you would use..
{vb:stylevar imgdir_misc}/delete.gif

BUT.. remember, that means every style would need to have that gif in it's misc image directory. And that's not something that is common. Mods/Add-ons usually have their own images if there are any that are custom and not common to vB.

MatiasCandy
09-01-2011, 05:16 PM
Thank you. I am trying to make sure the images change with the theme. With your help I am sure I can get it to work.

Thanks Again

MatiasCandy
09-04-2011, 05:17 PM
I am working on the path for the product and I got it to work in the plugin and templates but I noticed some of the php files are hard coded.

I am using the following in the plugin and it works just fine.
'. $vbulletin->options['custom_path'] .'

what would I use in the php files?

Thanks