2014-01-09, 05:17 PM
Hi all!
Please don't judge me too hard - I'm a newbie in this forum and in MyBB in-general. =)
I was testing the GRA4 Social Network for MyBB (that one: http://mods.mybb.com/view/gra4-social-network ) on different themes, and encountered a weird thingie...
Well, let me back up a bit and explain the environment:
The scripts on the plugin run not as ...mybb/somescript.php , but as ...mybb/somedir/somescript.php
So, the weired thingie: I've noticed in that in ...mybb/somedir/somescript.php several themes show broken pictures in top menu, breadcrumbs, etc.
I'd like to highlight: only some themes, such as DarkFusion. The other ones, including the Default, work just fine.
After investigation I found out that the $theme['imgdir'] is broken, for example in DarkFusion the value is "images" instead of "images/darkfusion".
I did the print_r($theme) and guess what: there is serialized field there ("params"? "parameters"? - something like that) containing exactly correct $imagedir = "images/darkfusion"
The question: Is there an API way to say to a theme: "Ok, dear theme, we run from this location, please adjust". Of shall I just implement a hook (if "yes" - where?) and brutally unserialize correct value over the wrong one ?
Thanks a lot
AT
Please don't judge me too hard - I'm a newbie in this forum and in MyBB in-general. =)
I was testing the GRA4 Social Network for MyBB (that one: http://mods.mybb.com/view/gra4-social-network ) on different themes, and encountered a weird thingie...
Well, let me back up a bit and explain the environment:
The scripts on the plugin run not as ...mybb/somescript.php , but as ...mybb/somedir/somescript.php
So, the weired thingie: I've noticed in that in ...mybb/somedir/somescript.php several themes show broken pictures in top menu, breadcrumbs, etc.
I'd like to highlight: only some themes, such as DarkFusion. The other ones, including the Default, work just fine.
After investigation I found out that the $theme['imgdir'] is broken, for example in DarkFusion the value is "images" instead of "images/darkfusion".
I did the print_r($theme) and guess what: there is serialized field there ("params"? "parameters"? - something like that) containing exactly correct $imagedir = "images/darkfusion"
The question: Is there an API way to say to a theme: "Ok, dear theme, we run from this location, please adjust". Of shall I just implement a hook (if "yes" - where?) and brutally unserialize correct value over the wrong one ?
Thanks a lot
AT