vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Major Additions - MySmilies vB (v3.8.0) (https://vborg.vbsupport.ru/showthread.php?t=220193)

Lord.Khalid 01-17-2010 09:32 AM

Thanks for the update, it works just fine but I didn't like the idea of showing hundred of smiles in the editor so I tried the admin controls option and it solved the issue : )

Anyway I notice that there is some kind of confusion especially with smiles which have similar replacement texts as it shows other smiles other than the user’s.

Thanks again, and keep the good work.
Khalid

choccyclaire 01-17-2010 01:54 PM

Quote:

Originally Posted by SecondV (Post 1957830)
hmm, in the 'bbcode_parse_complete' hook titled "Substitute The Replacement Text For The Image" try replacing:

PHP Code:

if ($this->registry->options['mysmiliesvb_option_masterswitch'] AND $GLOBALS['mysmiliesvb_userid']) 

with:
PHP Code:

if ($this->registry->options['mysmiliesvb_option_masterswitch'] AND $GLOBALS['mysmiliesvb_userid'] AND !empty($this->registry->sv_mysmiliesvb)) 


Didn't fix it yet. I know it is that particular plugin though coz when disabled, the errors disappear.

drsli 01-17-2010 02:51 PM

I don?t have the YAAS-addon, but I got a similar error like above. I changed the plugin accordingly and the error is gone! :)

Thank you very much for this awesome addon and the further development! :)

choccyclaire 01-17-2010 03:43 PM

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?

Eric 01-23-2010 06:37 PM

The change was because of the quoting - the new plugin allows the smilies to work in quotes when quoted by another user.

Quote:

Originally Posted by choccyclaire (Post 1958282)
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?


Hostboard 01-24-2010 08:10 PM

Can you make an ACP option to make the user smilies publicly available to use for private use only. I have many forums that are adult oriented and blocked from those underage and the smilies now are now globaly available and not really something that should be viewable for some.

Thanx

FitgirlWorld 02-06-2010 01:33 AM

thanks for a great mod.. installing it now. If eveything works right will click mark as installed ! whoo hoo!

Eric 02-10-2010 03:04 AM

Working on a vBulletin 4 version ...

Megatr0n 02-16-2010 01:56 PM

SecondV - can you please check your PM and get back to me, please! :)

choccyclaire 02-17-2010 01:53 PM

That invalid argument error I posted a few posts ago appears on other pages too, like:

http://www.xxx.com/register.php?do=requestemail

This is after I applied the fix you suggested.


All times are GMT. The time now is 03:15 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02269 seconds
  • Memory Usage 1,760KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete