I'm using the previous version of that particular plugin for now and all seems to be working okay apart from quoting.
(I am not much of a coder) Why did you need to change this plugin? What differs to make the mod more effective.
Old code:
Code:
if (!isset($GLOBALS['mysmiliesvb_userid']) OR empty($GLOBALS['mysmiliesvb_userid']))
{
// Just in case... just depending on $GLOBALS['mysmiliesvb_userid'] without this
// check didn't work for me on previews when editing signature.
$GLOBALS['mysmiliesvb_userid'] = $this->registry->userinfo['userid'];
}
if ($this->registry->options['mysmiliesvb_option_masterswitch'] AND $GLOBALS['mysmiliesvb_userid'])
{
$smiliesurlbase = $this->registry->options['mysmiliesvb_option_smiliesurl'];
$smilies = $this->registry->db->query("
SELECT *
FROM " . TABLE_PREFIX . "mysmiliesvb
WHERE userid='{$GLOBALS['mysmiliesvb_userid']}'
");
while ($smilie = $this->registry->db->fetch_array($smilies))
{
if (empty($smilie['smilietext_parsed']))
{
continue;
}
eval('$smilie[\'image\'] = "' . fetch_template('mysmilies_imagebit') . '";');
$text = preg_replace("@" . $smilie['smilietext_parsed'] . "@isU", $smilie['image'], $text);
$this->cached['text'] = $text;
}
}
New code:
Code:
if (!isset($GLOBALS['mysmiliesvb_userid']) OR empty($GLOBALS['mysmiliesvb_userid']))
{
// Just in case... just depending on $GLOBALS['mysmiliesvb_userid'] without this
// check didn't work for me on previews when editing signature.
$GLOBALS['mysmiliesvb_userid'] = $this->registry->userinfo['userid'];
}
if ($this->registry->options['mysmiliesvb_option_masterswitch'] AND $GLOBALS['mysmiliesvb_userid'] AND !empty($this->registry->sv_mysmiliesvb))
{
$smiliesurlbase = $this->registry->options['mysmiliesvb_option_smiliesurl'];
foreach ($this->registry->sv_mysmiliesvb AS $smilie)
{
eval('$smilie[\'image\'] = "' . fetch_template('mysmilies_imagebit') . '";');
$text = preg_replace("@" . $smilie['smilietext_parsed'] . "@isU", $smilie['image'], $text);
$this->cached['text'] = $text;
}
}
I see mention of the database in the old version. Does that mean I will create more queries by altering this?