vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   user favorites smilies (https://vborg.vbsupport.ru/showthread.php?t=66775)

all-the-vb 07-01-2004 10:00 PM

user favorites smilies
 
Hello Everyone. :)

hack : user favorites smilies

by All-the-vb

Description:
that's hack allow each member to choose his favorite smiles .. let's discover the other features guyz


Queries to Run: 1
Files to edit: 2
Templates to edit:2
Templates to add:3
new Phrases: 3

if you use this hack don't forgot click https://vborg.vbsupport.ru/

all-the-vb 07-02-2004 02:18 AM

example, from the smiles page :rolleyes:

all-the-vb 07-02-2004 02:23 AM

example, after using the hack and before using the favorite smiles in newthread/newreply

AND

example after using


to members using Standard Editor

all-the-vb 07-02-2004 02:24 AM

example, after using the hack and before using the favorite smiles in newthread/newreply

AND

example after using


to members using full WYSIWYG Editing

gwhooooey 07-02-2004 03:07 AM

Downloaded it, but it's got some weird coding in some of the files... or that's a different language, I don't know https://vborg.vbsupport.ru/images/newsm/ermm.gif Anyway, I don't understand it

teksigns 07-02-2004 04:07 AM

maybe we install if you upload english version !

nexialys 07-02-2004 04:16 AM

all-the-vb always forget that he have to release his hacks in english... and $vbphrase driven... ;)

all-the-vb 07-02-2004 09:03 AM

gwhooooey & nexialys & teksigns

im very sorry i upload a wrong file
i upload this hack to vb2 and arabic version.

now download
hack english version and to vb3
https://vborg.vbsupport.ru/attachmen...chmentid=19477

msimplay 07-02-2004 04:54 PM

does this work with smiley catergories ?

msimplay 07-02-2004 05:29 PM

hmm the more smilies button disappears after adding ur first smilies and if u select no smilies when u click submit instead of resetting the smilies to normal it gives u a database error

Milorad 07-06-2004 05:06 PM

any plans to fix the DB error thing?

My users would love something like this.

Osterling 08-19-2004 01:35 AM

i love the idea of this hack.. when installed tho i got this error

Parse error: parse error, unexpected $ in /home/exas77ko/public_html/forum/misc.php on line 574

blubber12 08-20-2004 01:53 PM

I got no errors on install or use. But there is an oddity. In testing it, I choose 9 favorite smilies. Worked fine. But I then noticed that other members now had the same 9 smilies to choose from. Their's are no longer random, they have my 9. I have not given the info about this hack yet, so I know they did not choose the same 9. Is there a way around this? Thank you.

amykhar 10-03-2004 08:33 PM

It's working fine on my board, but it needs to be fixed so that if you have already added favorites, the favorites edit page has the selected ones checked. I'll work on it and post it as soon as I get it done.

amykhar 10-03-2004 09:41 PM

Got it.

Change the vbcode_nnnn_smiliesbits to say:

Code:

<tr valign="top">
<if condition="$show['wysiwyg']">
        <td class="$bgclass"><input type='checkbox' name='smilies[]' value='$smilie[smilieid]' multiple="multiple" <if condition="$smilie[checked]">checked</if>><img src="$smilie[path]" alt="$smilie[title]" border="0" /></td>
<else />
        <td class="$bgclass"><input type='checkbox' name='smilies[]' value='$smilie[smilieid]' multiple="multiple" <if condition="$smilie[checked]">checked</if> ><img src="$smilie[path]" alt="$smilie[title]" border="0" /></a></td>
</if>
        <td class="$bgclass" colspan="3">$smilie[text]</td>
</tr>

in misc.php, find:
Code:

if ($_REQUEST['do']=="getfavsmilie") {
Add after:
Code:

if($bbuserinfo['smilie'] !=''){
  $nabn = explode(" ", $bbuserinfo['smilie']);
}


Find:
Code:

foreach ($smilies AS $smilie)
                {

Add after:
Code:

    if ($nabn){
                    foreach ($nabn AS $favsmilie)
                        {
                          if($smilie['smilieid']==$favsmilie)
                          {
                              $smilie['checked']=true;
                          }
                        }
                        }


Polo 10-04-2004 07:33 PM

anyone using this mod on a vbulletin 3.0.3? sounds like a nice addon :)

amykhar 10-04-2004 08:12 PM

Yes, polo. My board is 3.0.3.

Amy

amykhar 10-04-2004 08:14 PM

Quote:

Originally Posted by blubber12
I got no errors on install or use. But there is an oddity. In testing it, I choose 9 favorite smilies. Worked fine. But I then noticed that other members now had the same 9 smilies to choose from. Their's are no longer random, they have my 9. I have not given the info about this hack yet, so I know they did not choose the same 9. Is there a way around this? Thank you.

I don't see this happening on my board. People with no favorites are pulling up smilies in the default order. Check your installation.

Polo 10-04-2004 08:44 PM

thanks amykhar, I will give it a try :)

Tipi 10-31-2004 05:27 PM

Sorry for bumping this thread, but i have a question. I've installed this hack now. It's perfect for my forum, i have almost 600 smilies on my smilieslist.

Started to add favorites, and when i was doen i clicked submit. Checked out my list (favorites) later, and discovered that the whole smilielist where in there. 600 smilies!! Have I doen something wrong? If not, can somebody plz tell me the point of this hack? *lol*

Kali 02-11-2005 09:50 PM

I just installed this on a 3.0.6. and it works quite nicely once you add the modification amykhar added to it. I did run into one snag though and I was wondering someone out there could help me sort it out.

As it is currently, when I attempt to remove all my selected favorites, rather than go back to the default smiley set, it causes an error and refuses to remove the last smiley. I want people to be able to go back to the default if they decide they don't want to use favorites.

The only way I'm able to reset it back to default currently is to go into the user table and manually take out the data... which is a bit of a pain obviously.

The error I'm getting is:

Warning: implode(): Bad arguments. in /misc.php on line 505

Database error in vBulletin 3.0.6:

Invalid SQL: UPDATE user SET smilie= WHERE userid='1'
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE userid='1'' at line 1

mysql error number: 1064


Line 505 looks like this currently:
PHP Code:

 $query =$DB_site->query("UPDATE " TABLE_PREFIX "user SET smilie=" implode(","$nabn) . " WHERE userid='$uid'"); 

Does anyone have any suggestions? I'd really appreciate any help someone could give. :nervous:

Moxi 02-18-2005 06:01 PM

My users would love this...we also have a rather large smilie list...but I'm recieving the same error as Kali...I am recieving a database error when trying to remove all my favourites, which I would like to see fixed.

Also, how can I have it so that the [more] smilies link is still visible even after my members choose favourites? I'd also like to have a favourites link in quick reply, if that's possible. Does anyone know how?

Cyricx 03-01-2005 02:22 AM

Thanks for the mod Amy :)

Installed this hack and lovin it.

Referring to a response from above about the 600 smilies..

It kinda has to list them all for them to select their favorites doesn't it? ;)

Bulleh 03-02-2005 08:15 AM

Ok, it works fine in the sense that my Favourites are actually working, BUT how do i get the "more" link back under favourites? im a bit of a n00b :)

Anette 03-29-2005 04:24 PM

Worked fine. But not on smilies on quick reply! :(

kthlnwrnr 04-30-2005 07:39 PM

is there any way that we can get the more smiliey link back along with the fav smiliey link? Mine disappeared after selecting favorites.

Pamela 05-07-2005 04:57 PM

Has anyone figured out how to have it so that the [more] smilies link is still visible even after we chose our favourites? Otherwise, we can't get to the rest of our smilies anymore! This is a great idea for a hack...but we definitely need the [more] smilies link back!

Melker 05-10-2005 07:54 AM

Change "vbcode_smilies_editfav" to the following:
Code:

<tr>
  <td class="smallfont" colspan="$vboptions[smcolumns]" align="center" style="border-width:0px; border-style:inset" title="$vbphrase[favorites_smilies]">[<a target="_blank" href="misc.php?do=getfavsmilie">$vbphrase[favorites]</a>]</td>
  <tr><td></td></tr>
  <td class="smallfont" colspan="$vboptions[smcolumns]" align="center" style="border-width:0px; border-style:inset">[<a href="#" onclick="open_smilie_window(smiliewindow_x, smiliewindow_y, $wysiwyg, '$forumid'); return false" title="<phrase 1="$vboptions[smtotal]" 2="$totalsmilies">$vbphrase[showing_x_smilies_of_y_total]</phrase>">$vbphrase[more]</a>]</td>
</tr>

Replace the table in editor_smiliebox with the following:

Code:

<table cellpadding="4" cellspacing="0" border="0" align="center">
        $smiliebits
        $vbcode_smilies_editfav
        <if condition="$show['moresmilieslink']">
        <tr>
<if condition="$bbuserinfo['smilie']==''">
<td class="smallfont" colspan="$vboptions[smcolumns]" title="$vbphrase[favorites_smilies]">
[<a target="_blank" href="misc.php?do=getfavsmilie">$vbphrase[favorites]</a>]
</td></tr>
<tr><td></td></tr>
<tr>
                <td class="smallfont" colspan="$vboptions[smcolumns]">[<a href="#" onclick="open_smilie_window(smiliewindow_x, smiliewindow_y, $wysiwyg, '$forumid'); return false" title="<phrase 1="$vboptions[smtotal]" 2="$totalsmilies">$vbphrase[showing_x_smilies_of_y_total]</phrase>">$vbphrase[more]</a>]</td>
        </tr>
</if>
        </if>
        </table>

It seems to work for me. YMMV :up:

Pamela 05-11-2005 08:07 AM

Quote:

Originally Posted by Melker
It seems to work for me. YMMV :up:

WOOHOO!!! Works for me too!!!

Thanks so much Melker!!! You are awesome!!! :D

Melker 05-12-2005 11:32 AM

I noticed that there was some issues with the option [More] showing up twice if there was more fav smilies selected than was allowed in the smiliebox. I fixed it by moving the following portion in the editor_smilebox inside the second set of <if></if>.

Code:

<tr>
                <td class="smallfont" colspan="$vboptions[smcolumns]">[<a href="#" onclick="open_smilie_window(smiliewindow_x, smiliewindow_y, $wysiwyg, '$forumid'); return false" title="<phrase 1="$vboptions[smtotal]" 2="$totalsmilies">$vbphrase[showing_x_smilies_of_y_total]</phrase>">$vbphrase[more]</a>]</td>
        </tr>

I have tried several ways and it seems to works perfectly now. Please see my earlier post for the updated information.

php4dev 07-14-2005 08:21 AM

Quote:

Originally Posted by Anette
Worked fine. But not on smilies on quick reply! :(

all-the-vb


please help us to put it on the quick reply ......


thanks & best regards

yoyoyoyo 07-14-2005 11:29 AM

This thread is a mess, and the author has not even posted here since april, so I am upping a fixed version of the instructions, with the changes mentioned in this thread by amykhar and melker, so people won't have to wade through the posts. If you follow the new install info it will install fine in to 3.0.7

php4dev 07-14-2005 02:55 PM

Quote:

Originally Posted by yoyoyoyo
This thread is a mess, and the author has not even posted here since april, so I am upping a fixed version of the instructions, with the changes mentioned in this thread by amykhar and melker, so people won't have to wade through the posts. If you follow the new install info it will install fine in to 3.0.7


:speechless: :speechless: :speechless: :speechless:


but i am looking to install this hack on the quick reply

can you do it yoyoyoyo ?

yoyoyoyo 07-14-2005 08:05 PM

Quote:

Originally Posted by php4dev
:speechless: :speechless: :speechless: :speechless:


but i am looking to install this hack on the quick reply

can you do it yoyoyoyo ?

I haven't really looked in to it yet, but will try to do so later. In the meantime, the question came up about whether or not this is compatible with the smilie category hack, and it is! Just add
Code:

// %%%%%%%%%%%%%%%%%%% fav smilie hacks  by All-the-vb %%%%%%%%%%%%%%%%%%%%
if ($_REQUEST['do']=="addtodata") {
$uid = $bbuserinfo[userid];
$smilie=$_POST['smilies'];
if(isset($smilie) and count($smilie)>0){
$smil=array();
foreach($smilie as $id_smilie)
{
array_push ($smil, $id_smilie);

}
$inimplode=implode(" ", $smil);
$querf =$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET smilie='$inimplode' WHERE userid='$uid'");
}
else
{
 $query =$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET smilie=" . implode(",", $nabn) . " WHERE userid='$uid'");
}
$url="index.php";
eval(print_standard_redirect('redirect_addfav'));
}
// %%%%%%%%%%%%%%%%%% fav smilie hacks  by All-the-vb %%%%%%%%%%%%%%%%%%%%
if ($_REQUEST['do']=="getfavsmilie") {

$smilies = $DB_site->query("
                SELECT smilietext AS text, smiliepath AS path, smilie.title, smilieid,
                imagecategory.title AS category
                FROM " . TABLE_PREFIX . "smilie AS smilie
                LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
                ORDER BY imagecategory.displayorder, smilie.displayorder
        ");

  while ($smilie = $DB_site->fetch_array($smilies)) {
                $smcache["$smilie[smilieid]"][] = $smilie;
        }


        $popup_smiliesbits = '';
        $bits = array();
        exec_switch_bg();
        foreach ($smcache AS $category => $smilies)
        {
                if (sizeof($bits) == 1)
                {
                eval('$popup_smiliesbits .= "' . fetch_template('vbcode_nnnn_smiliesbits') . '";');
                }
$bits = array();
                foreach ($smilies AS $smilie)
                {
                        $smilie['js'] = addslashes($smilie['text']);
                        eval('$bits[] = "' . fetch_template('vbcode_nnnn_smiliesbits') . '";');
                        if (sizeof($bits) == 2)
                        {
                                exec_switch_bg();
                                $smiliecells = implode('', $bits);
                        eval('$popup_smiliesbits .= "' . fetch_template('vbcode_nnnn_smiliesbits') . '";');
                                $bits = array();
                        }
                }
        }
        if (sizeof($bits) == 1)
        {
                eval('$popup_smiliesbits .= "' . fetch_template('vbcode_nnnn_smiliesbits') . '";');
        }
eval('print_output("' . fetch_template('vbcode_nnnn_smilies') . '");');

}

after this:
Code:

unset($shutdownqueries['pmpopup']);
    eval('print_output("' . fetch_template('smiliepopup') . '");');

}

that you pasted in with the category hack. If you place it after the first instance that is commented out it will obviously come up blank.

php4dev 07-15-2005 12:41 AM

not done :disappointed:

yoyoyoyo 07-15-2005 01:32 AM

Quote:

Originally Posted by php4dev
not done :disappointed:

I do not have time to do this, and since it is something you care about more than I do, this is the general code:
Code:

[<a href="#" onclick="open_smilie_window(smiliewindow_x, smiliewindow_y, $wysiwyg, '$forumid'); return false" title="<phrase 1="$vboptions[smtotal]" 2="$totalsmilies">$vbphrase[showing_x_smilies_of_y_total]</phrase>">$vbphrase[more]</a>]
(note: you may have to place that inside of a <td class="smallfont" colspan="$vboptions[smcolumns]"></td> set)

the template you are looking for is showthread_quickreply

Just look around in that template and try placing that code, or some variation where you need it.

php4dev 07-16-2005 12:29 AM

i want to put a favorites smilies in quick reply

not the other smilies

i wish you understand me

thanks for your caring

Gutspiller 08-03-2005 09:23 PM

Quote:

Originally Posted by yoyoyoyo
This thread is a mess, and the author has not even posted here since april, so I am upping a fixed version of the instructions, with the changes mentioned in this thread by amykhar and melker, so people won't have to wade through the posts. If you follow the new install info it will install fine in to 3.0.7

The instructions state:

Code:

in misc.php also FIND:

foreach ($smilies AS $smilie)
                {

That code is in misc.php 3 times. Can somebody give some decent instructions... Also I have the smilie category hack installed, after I install this hack do I just need to follow the instructions given by yoyo?


Can someone actually clean up the code and instructions? You could at least put both file edits for misc.php by each, or add them together as it look as the 2nd one is just under the original insert. It's not that hard... I just need to know where to post the F'in code. :(

Can somebody please help!?

Black_Widow 08-08-2005 08:38 PM

This is a very useful hack however it still need some fixes.
i have installed on 3.0.7 and have the same problem of Kali
https://vborg.vbsupport.ru/showpost....8&postcount=21

Quote:

I just installed this on a 3.0.6. and it works quite nicely once you add the modification amykhar added to it. I did run into one snag though and I was wondering someone out there could help me sort it out.

As it is currently, when I attempt to remove all my selected favorites, rather than go back to the default smiley set, it causes an error and refuses to remove the last smiley. I want people to be able to go back to the default if they decide they don't want to use favorites.

The only way I'm able to reset it back to default currently is to go into the user table and manually take out the data... which is a bit of a pain obviously.

The error I'm getting is:

Warning: implode(): Bad arguments. in /misc.php on line 505

Database error in vBulletin 3.0.6:

Invalid SQL: UPDATE user SET smilie= WHERE userid='1'
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE userid='1'' at line 1

mysql error number: 1064
Can someone fix this please?
Thanks

yoyoyoyo 08-18-2005 09:35 PM

Quote:

Originally Posted by Gutspiller
The instructions state:

Code:

in misc.php also FIND:

foreach ($smilies AS $smilie)
                {

That code is in misc.php 3 times. Can somebody give some decent instructions... Also I have the smilie category hack installed, after I install this hack do I just need to follow the instructions given by yoyo?


Can someone actually clean up the code and instructions? You could at least put both file edits for misc.php by each, or add them together as it look as the 2nd one is just under the original insert. It's not that hard... I just need to know where to post the F'in code. :(

Can somebody please help!?

after the first instance


All times are GMT. The time now is 05:24 AM.

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.01514 seconds
  • Memory Usage 1,860KB
  • 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
  • (13)bbcode_code_printable
  • (1)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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