2010-08-07, 11:11 PM
I had this same complaint for 1.4x but now I'm going to make a bit of a stink about this.
The problem is that smilies use the following code from class_parser.php.
Above this there is code for the base_url.
The problem arises if you want to use external server smilies. In admincp you can add/edit a smilie and use a full url.
However it won't work using a url since the code in class_parser will prevent that. This is really uncool imho. Also just like some other parts of admincp you should be able to use {theme} for the smilies image path.
Right now MyBB add support in 1.6x for external theme image dir and that's great. So please consider this other change as well. The whole base_url thing is pointless imho. A few minor changes and this will work very well.
Thank you.
EDIT:
Then there is code like this in the admin smilies module.
So it appears a half-assed attempt was made to use imgdir but what's "{theme:imgdir}". Never saw that one. Old code? Bad admin stuff not completed wtf?
The problem is that smilies use the following code from class_parser.php.
$this->smilies_cache[$smilie['find']] = "<img src=\"{$this->base_url}{$smilie['image']}\" style=\"vertical-align: middle;\" border=\"0\" alt=\"{$smilie['name']}\" title=\"{$smilie['name']}\" />";
Above this there is code for the base_url.
// Set base URL for parsing smilies
$this->base_url = $mybb->settings['bburl'];
if($this->base_url != "")
{
if(my_substr($this->base_url, my_strlen($this->base_url) -1) != "/")
{
$this->base_url = $this->base_url."/";
}
}
The problem arises if you want to use external server smilies. In admincp you can add/edit a smilie and use a full url.
Quote:Image Path Image Path *
This is the path to the smilie image.
However it won't work using a url since the code in class_parser will prevent that. This is really uncool imho. Also just like some other parts of admincp you should be able to use {theme} for the smilies image path.
Right now MyBB add support in 1.6x for external theme image dir and that's great. So please consider this other change as well. The whole base_url thing is pointless imho. A few minor changes and this will work very well.
Thank you.
EDIT:
Then there is code like this in the admin smilies module.
while($smilie = $db->fetch_array($query))
{
$smilie['image'] = str_replace("{theme:imgdir}", $theme['imgdir'], $smilie['image']);
if(my_strpos($smilie['image'], "p://") || substr($smilie['image'], 0, 1) == "/")
{
$image = $smilie['image'];
}
else
{
$image = "../".$smilie['image'];
}
So it appears a half-assed attempt was made to use imgdir but what's "{theme:imgdir}". Never saw that one. Old code? Bad admin stuff not completed wtf?