View Full Version : user favorites smilies
all-the-vb
07-01-2004, 10:00 PM
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/ (http://vbulleting.org/forum/vborg_miscacions.php?do=installhack&threadid=66775)
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/attachment.php?attachmentid=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:
<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:
if ($_REQUEST['do']=="getfavsmilie") {
Add after: if($bbuserinfo['smilie'] !=''){
$nabn = explode(" ", $bbuserinfo['smilie']);
}
Find:
foreach ($smilies AS $smilie)
{
Add after:
if ($nabn){
foreach ($nabn AS $favsmilie)
{
if($smilie['smilieid']==$favsmilie)
{
$smilie['checked']=true;
}
}
}
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
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.
thanks amykhar, I will give it a try :)
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*
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:
$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:
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:
<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:
<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
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>.
<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
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
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
: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
// %%%%%%%%%%%%%%%%%%% 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:
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
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:
[<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
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:
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.php?p=610588&postcount=21
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
The instructions state:
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
Gutspiller
08-19-2005, 07:25 PM
OK, now how do I remove the two [More] links when a user selects more favs than are allowed to be showed?
theArchitect
09-13-2005, 07:47 AM
example, from the smiles page :rolleyes:
Any chance of porting this for 3.5.0? My members are really missing it.
Paul M
09-25-2005, 10:20 AM
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.php?p=610588&postcount=21
Can someone fix this please?
Thanks
Well I installed this for Ice Castle last night and hit the same bug, so I fixed it.
In misc.php find ;
$query =$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET smilie=" . implode(",", $nabn) . " WHERE userid='$uid'");
and replace with ;
$query =$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET smilie='' WHERE userid='$uid'");
eure-mudder
10-06-2005, 12:30 PM
Is there any chance that this Hack will be port to 3.5?
Dybukk
10-12-2005, 06:56 PM
I just tried installing this hack on my 3.0.6 forum and I have the links to "More" and "Favorites" on the smilie page, but when I click on More to actually add one to my favorites, I don't have any of the check boxes. If I click on Favorites I get a new page that only has "Submit" and "Reset". Ive gone through all the updated code and everything looks to be OK.
Any thoughts?
Pamela
11-21-2005, 07:36 AM
Could we please get this for 3.5? I love this hack!
Thanks! :)
LeonHartHVA
01-31-2006, 05:45 AM
ya, i really love this hack, can release for vb 3.5 ?
Thanks
Stangsta
02-27-2006, 06:41 PM
Someone PLEASE port to 3.5.
Thanks.
tokenyank
06-05-2006, 11:25 AM
<a href="https://vborg.vbsupport.ru/showthread.php?t=94950&highlight=favorite+smilies" target="_blank">requesting thread for port</a>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.