MyBB Community Forums

Full Version: Expanded use of $theme['imgdir']
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have come across this before, but now i have to do a commision on this and updating the forum will be a real pain.

Many images inside the MyBB structure are strangely called for.

The one central point where you could store the info would be (and would make the most sense) in $theme['imgdir'] whch is controled in the theme manager option called "Image Directory". Now rename that dir and change that option, and you will see a big load of images are broken.

Stars for users, smilies, many small icons, "language" relativ images etc.

My suggestion is simply to include the $theme['imgdir'] in all image locations. Each smiley has /images/smilies/ in front of it, which is redundant again with the image dir itself.

With this option, you could either put it in a different directory or even on a completely different server (which is what i am doing currently). It would not break current operations of forums.
what are you suggesting?
I am suggesting changes to some parts of the code, to use the $theme['imgdir'] that currently do not use it, or simply ignore it. The stars for one are a very simple place to locate where this could help big time.

This also allows different sets (of smilies and stars) that fit better with the different colors of different themes.
errr actually you can do that, simply by copying different stars and things into each theme directory.

as i think the software looks for those images in the current theme directory before looking for it in the original imagedir.

atleast... thats why i think the rupee's on one of my themes worked with RC4...
Nope, it doesnt work. Also doesnt work for smilies and many other images.
its not supposed to work for smileys

smileys go in the smileys folder and are independant of the theme system.

it works here. used to do it to have rupee's show up instead of the stars on my zelda theme.
I encountered this problem when I made a dark theme for my own site. The codebutton images were practically invisible and I couldn't figure out why it wasn't using the custom ones in my theme's codebuttons directory. I didn't see it as that big of a deal to simply change the directory in the template manager, though. As long as you make sure to include the templates when you export your theme (for backup or sharing or whatever), it shouldn't be a problem.