vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   End-User Options - Favorite Smilies (https://vborg.vbsupport.ru/showthread.php?t=123116)

Darwinist 08-04-2006 10:00 PM

Favorite Smilies
 
This add-on will allow members to create their own favorite smilies list, which can be useful on boards with lots of smilies. If a member creates a list, it will be displayed in place of the normal smilie box.

Maximum number of smilies is based on the 'Smilie Menu Total Smilies' option in 'Message Posting Interface Options'.


Features:
  • Edit List in UserCP
  • Javascript Enforced Limit
  • Ignore Certain Smilie Categories
  • Allow/Disallow usage based on usergroup
  • Admin CP Help
Installation Overview:
Files to Modify: 1
Templates to Modify: 1
Files to Upload: 2
Product:
-Plug-Ins: 6
-Templates: 5
-vB Options: 4
-Phrases: 29

NOTICE: If you're upgrading to version 1.0.4 from a previous version, please read the 'Upgrade.htm' file. Otherwise, read the 'Install_3.6.0.htm' for vBulletin 3.6.0 installations or 'Install_3.6.1.htm' file for vBulletin 3.6.1 or newer installations for the installation procedure.

Version History:
1.0.5 - Fixed vulnerability.
1.0.4 - Added smilie selection count under smilie selection menu. One less template to edit.
1.0.3 - Added option to hide smilie titles on the selection menu (for boards with a very large number of smilies). Icon link to edit the list on the editor toolbar. Admin CP help text. Improved integration with the UserCP. One less file to edit. Fixed some text that wasn't phrased.
1.0.2 - Added option to limit who can use the Favorite Smilies listed based on usergroup permissions. Changed smilie selection page to include category names. Fixed Missing 'More' link in Smilie dropdown menu.
1.0.1 - Fixed problem with missing table prefixes.
1.0.0 - Initial release.

A version for 3.5 can be found Here
A version for 3.7 can be found Here

vphost 08-05-2006 02:26 PM

Ah, interesting, thank you :)

Kaleem 08-05-2006 03:07 PM

good

"Install"

CoreIssue 08-05-2006 03:32 PM

"Sweeeet!

Been wanting this for a long time!

Thanks!

Wordplay 08-05-2006 03:37 PM

nice, thanks for creating this.

Snake 08-05-2006 04:32 PM

Thanks I love it!

Sooner95 08-05-2006 11:10 PM

this should be put into VB default.. nice job!

Sooner95 08-06-2006 02:15 AM

crap, guessign this wont work in 3.5.5 tho... no prob..

Sooner95 08-06-2006 02:51 AM

welp, ok.. pretty pissed here.

Hack didnt work..ok NP. Yes, when i remove the steps, now my BBS is hosed. I understand that in the title it days 3.6, but would be nice if it Stated that it worked in ONLY 3.6

error

Quote:

Fatal error: Call to undefined function: query_read_slave() in /home/bull/public_html/forums/includes/functions_editor.php on line 432
for those that care. I am continuing to find a fix for this, as my board is crap now.

webwench 08-06-2006 03:34 AM

When I try to install this, I get a database error:

Code:

Database error in vBulletin 3.6.0:

Invalid SQL:
ALTER TABLE user ADD favsmilies TEXT NOT NULL;

MySQL Error  : Table 'ogfadmin_newdb.user' doesn't exist
Error Number : 1146
Date        : Sunday, August 6th 2006 @ 04:33:17 AM
Script      : http://www.oregongreenfree.com/forum/admincp/plugin.php?do=productimport
Referrer    : http://www.oregongreenfree.com/forum/admincp/plugin.php?do=productadd
IP Address  : 24.21.214.27
Username    : liane
Classname    : vb_database

The table of course should be vb_user, but I don't know what to change to make this install. Can anyone help?

43082448 08-06-2006 04:05 AM

$vbulletin->db->query("ALTER TABLE user ADD favsmilies TEXT NOT NULL");

==>

$vbulletin->db->query("ALTER TABLE " . TABLE_PREFIX . "user ADD favsmilies TEXT NOT NULL");

Darwinist 08-06-2006 05:20 AM

Quote:

Originally Posted by Sooner95
welp, ok.. pretty pissed here.

Hack didnt work..ok NP. Yes, when i remove the steps, now my BBS is hosed. I understand that in the title it days 3.6, but would be nice if it Stated that it worked in ONLY 3.6

When the description states 3.6, best bet is to assume it's for 3.6 only unless told otherwise. You could've asked...

Quote:

Originally Posted by Sooner95
error



for those that care. I am continuing to find a fix for this, as my board is crap now.

You didn't revert the code in 'functions_editor.php'. Change 'query_read_slave' to 'query_read'.

I've posted a version that will work in 3.5 Here.

Quote:

Originally Posted by webwench
When I try to install this, I get a database error:

The table of course should be vb_user, but I don't know what to change to make this install. Can anyone help?

Install code fixed.

webwench 08-06-2006 11:14 AM

Quote:

Originally Posted by 43082448
$vbulletin->db->query("ALTER TABLE user ADD favsmilies TEXT NOT NULL");

==>

$vbulletin->db->query("ALTER TABLE " . TABLE_PREFIX . "user ADD favsmilies TEXT NOT NULL");

And if so, could you please explain? Thanks

Darwinist 08-06-2006 02:08 PM

Quote:

Originally Posted by webwench
And if so, could you please explain? Thanks

Just download the updated files and reinstall... in contains the fixes.

kvnband 08-06-2006 04:09 PM

Weird. I installed but when I try to set my favorite smilies, I get this error

Code:

Database error in vBulletin 3.6.0:

Invalid SQL:
UPDATE user SET favsmilies='212' WHERE userid='1';

MySQL Error  : Unknown column 'favsmilies' in 'field list'
Error Number : 1054
Date        : Sunday, August 6th 2006 @ 12:07:17 PM
Script      : http://www.secondwivesclub.com/portal/forum/misc.php
Referrer    : http://www.secondwivesclub.com/portal/forum/misc.php?do=editfavsmilies
IP Address  : 70.173.100.38
Username    : admin
Classname    : vB_Database

I checked in phpmyadmin and the column does indeed exist. Any idea what the deal is?

kvnband 08-06-2006 04:40 PM

You have problems in the product.

Line 143 should be changed from

Code:

$db->query("UPDATE user SET favsmilies='$favsmilies' WHERE userid='" . $vbulletin->userinfo['userid'] . "'");
to
Code:

$db->query("UPDATE " . TABLE_PREFIX . "user SET favsmilies='$favsmilies' WHERE userid='" . $vbulletin->userinfo['userid'] . "'");
and line 126 should be changed from
Code:

$db->query("UPDATE user SET favsmilies='' WHERE userid='" . $vbulletin->userinfo['userid'] . "'");
to
Code:

$db->query("UPDATE " . TABLE_PREFIX . "user SET favsmilies='' WHERE userid='" . $vbulletin->userinfo['userid'] . "'");
Kevin

Darwinist 08-06-2006 05:47 PM

I fixed it this morning... download the script again and reinstall.

webwench 08-06-2006 06:32 PM

Thanks very much!

GoNz00 08-08-2006 06:20 AM

i think i found a bug related, i removed this and deleted bitfield_user_smiley.xml from the xml folder, now i can save usergroups without the following error.

is this related to your product ?

Code:

Database error in vBulletin 3.6.0:
Invalid SQL:
UPDATE vb3_usergroup SET
### UPDATE QUERY GENERATED BY fetch_query_sql() ###
 `title` = '(COPPA) Users Awaiting Moderation',
 `description` = '',
 `usertitle` = '',
 `opentag` = '',
 `closetag` = '',
 `passwordexpires` = '0',
 `passwordhistory` = '0',
 `forumpermissions` = '131072',
 `attachlimit` = '0',
 `pmquota` = '50',
 `pmpermissions` = '0',
 `pmsendmax` = '0',
 `calendarpermissions` = '32',
 `wolpermissions` = '0',
 `adminpermissions` = '0',
 `genericpermissions` = '0',
 `genericoptions` = '48',
 `profilepicmaxwidth` = '100',
 `profilepicmaxheight` = '100',
 `profilepicmaxsize` = '65535',
 `avatarmaxwidth` = '80',
 `avatarmaxheight` = '80',
 `avatarmaxsize` = '20000',
 `signaturepermissions` = '139263',
 `sigpicmaxwidth` = '500',
 `sigpicmaxheight` = '100',
 `sigpicmaxsize` = '20000',
 `sigmaxrawchars` = '4000',
 `sigmaxchars` = '2000',
 `sigmaxlines` = '0',
 `sigmaxsizebbcode` = '7',
 `sigmaximages` = '30',
 `usmilie_permissions` = '0'
WHERE usergroupid=4;
MySQL Error  : Unknown column 'usmilie_permissions' in 'field list'
Error Number : 1054
Date        : Tuesday, August 8th 2006 @ 09:08:37 AM
Script      : http://www.clandesertrats.co.uk/foru....php?do=update
Referrer    : http://www.clandesertrats.co.uk/foru...&usergroupid=4
IP Address  : 62.253.128.14
Username    : GoNz0
Classname    : vb_database

i tried your updated version as well to no joy :(

GoNz00 08-09-2006 09:15 AM

bump?

Darwinist 08-10-2006 01:26 AM

No, this is not related to this add-on. Sounds like it's a problem with the 'Custom User Smileys' product you installed.

GoNz00 08-10-2006 06:07 AM

ahh, its no longer installed, it was removed with the upgrade, it must have left that file after the uninstall then.. great news as they have all been crying for there fav smilies back :D

thanks for clearing it up for me, i shall reinstall after work :)

acegames 08-11-2006 10:20 AM

installed and working

Aislinn 08-14-2006 06:15 PM

Ok can you please tell what misc.php file do we edit for step 2. Where is it located as there are quite a few misc.php files.

Never mind, after checking three misc.php files I found it.

And Im having an error now that its all installed.. I get the error when clicking the popup smilie box on the quick reply and in the user cp when trying clicking the link for the edit favorite smilies. But I dont get it when clicking the smilies on my signature box in the user cp or in the advanced reply.

Parse error: parse error, unexpected ',' in /usr/local/psa/home/vhosts/sitename/httpdocs/forum/misc.php on line 77

Heres the section of that file:

'getsmilies' => array(
'smiliepopup',
'smiliepopup_category',
'smiliepopup_row',
'smiliepopup_smilie',
'smiliepopup_straggler'
),
############### FAVORITE SMILIES #################
'editfavsmilies' => array(
'favoritesmilies',
'favoritesmilies_bit',
'favoritesmilies_bit_blank',
'favoritesmilies_row'
),
############### /FAVORITE SMILIES ################
),
'showsmilies' => array(
'help_smilies',
'help_smilies_smilie',
'help_smilies_category',
)
);
$actiontemplates['none'] =& $actiontemplates['showsmilies'];

// allows proper template caching for the default action (showsmilies) if no valid action is specified
if (!empty($_REQUEST['do']) AND !isset($actiontemplates["$_REQUEST[do]"]))
{
$actiontemplates["$_REQUEST[do]"] =& $actiontemplates['showsmilies'];
}

Darwinist 08-14-2006 08:06 PM

You have two closing parentheses... delete the line that I highlighted below:

'getsmilies' => array(
'smiliepopup',
'smiliepopup_category',
'smiliepopup_row',
'smiliepopup_smilie',
'smiliepopup_straggler'
),
############### FAVORITE SMILIES #################
'editfavsmilies' => array(
'favoritesmilies',
'favoritesmilies_bit',
'favoritesmilies_bit_blank',
'favoritesmilies_row'
),
############### /FAVORITE SMILIES ################
),
'showsmilies' => array(
'help_smilies',
'help_smilies_smilie',
'help_smilies_category',
)
);
$actiontemplates['none'] =& $actiontemplates['showsmilies'];

// allows proper template caching for the default action (showsmilies) if no valid action is specified
if (!empty($_REQUEST['do']) AND !isset($actiontemplates["$_REQUEST[do]"]))
{
$actiontemplates["$_REQUEST[do]"] =& $actiontemplates['showsmilies'];
}

Aislinn 08-15-2006 01:25 AM

thank you. Works perfectly.

But I noticed the favorite smilies only show up in the tool box in the advanced post and the advanced post drop down, not in the quick reply drop down. Anyway to put them into the quick reply drop down too?

Muellmann 08-15-2006 12:26 PM

Now my Users can choose them favorite Smilies.
I have so many Smilies in my Board, that everyone had to search
long time to find his favorite ones. Thankies :D

ComputerVitals 08-16-2006 01:18 AM

Wonder if you can help me
I Installed Catagory smilies. And would also like the Favorite smiley

Heres my problem
In template 'editor_smiliebox', find:
Code:

        title="<phrase 1="$vboptions[smtotal]" 2="$totalsmilies">$vbphrase[showing_x_smilies_of_y_total]</phrase>"
I dont have that. This is my line
Code:

                <td class="smallfont" colspan="$vboptions[smcolumns]">[<a href="#" onclick="vB_Editor['$editorid'].open_smilie_window(430, smiliewindow_y); return false" title="<phrase 1="$vboptions[smtotal]" 2="$totalsmilies">$vbphrase[showing_x_smilies_of_y_total]</phrase>">$vbphrase[more]</a>]</td>
How would I change it to make them both work? This is what I did and it doesn't show the favorites
Code:

                <td class="smallfont" colspan="$vboptions[smcolumns]">[<a href="#" onclick="vB_Editor['$editorid'].open_smilie_window(430, smiliewindow_y); return false" title="<if condition="$vbulletin->userinfo['favsmilies']"><phrase 1="$favsmtotal" 2="$totalsmilies">$vbphrase[showing_x_favsmilies_of_y_total]</phrase><else /><phrase 1="$vboptions[smtotal]" 2="$totalsmilies">$vbphrase[showing_x_smilies_of_y_total]</phrase></if>">$vbphrase[more]</a>]</td>
Any way for this to work for me?


Never mind....
Guess it would work if I were to upload the 2 edited files.. Hehe...
Well atleast you can use the above if somone has Catagory Smilies installed.

Works great!!

jw00dy 08-17-2006 01:45 AM

Great hack, thank you!!!

*installed*

jwaany 08-17-2006 01:17 PM

installed and working

thank you

Maagic 08-22-2006 02:18 PM

Installed and working however the [More] link in the smilies window does not appear now. Is there any way to get that back?

Darwinist 08-22-2006 03:31 PM

Quote:

Originally Posted by Maagic
Installed and working however the [More] link in the smilies window does not appear now. Is there any way to get that back?

Sounds like you skipped the second part of step #1, editting the 'includes/functions_editor.php' file. It's a change to the '$show['moresmilieslink']' variable.

Maagic 08-22-2006 11:36 PM

Quote:

Originally Posted by Darwinist
Sounds like you skipped the second part of step #1, editting the 'includes/functions_editor.php' file. It's a change to the '$show['moresmilieslink']' variable.

No I did edit that file, but I may have done it incorrectly. Me go check now... TY!


(cool mod btw... my users love it!)

Maagic 08-23-2006 12:39 AM

Hmm I re-checked my functions_editor.php file and I DID make the proper edit, yet I still don't see the [More] part. This is in Firefox btw... I checked it in IE and it shows [] just like in Firefox but I can click on the ] and get the smilies window. Weird.

Darwinist 08-23-2006 03:50 AM

Double check that you have the changes to the 'editor_smiliebox' template exactly as they should be.

If you don't mind, can you post a link to your forum so I can check out the problem?

Maagic 08-23-2006 12:59 PM

Quote:

Originally Posted by Darwinist
Double check that you have the changes to the 'editor_smiliebox' template exactly as they should be.


Ahh that was it... I left out one of these

<

Apparently they're quite necessary to the code :)

Darwinist 08-23-2006 01:25 PM

:up:

scoles15 08-27-2006 01:05 AM

Ok, I'm lost. Everything is installed and everything has been double checked.

It all seems to work. Only one small problem. The smilie box is not the ones chosen. It is my sites' standard set of smilies. I've checked the DB and the new fields are there with my selected smilies in the correct field. So I am at a loss.

The only Thing I've noticed is that in the code and templates, whether or not the custom set is shown, depends on whether or not the value of $vbulletin->userinfo['favsmilies'] is set. I can't find in the code where it is set to the value in the DB and when I display the value in a template, it is null.

scoles15 08-27-2006 01:46 PM

Quote:

Originally Posted by scoles15
Ok, I'm lost. Everything is installed and everything has been double checked.

NEVER MIND! I re-did all the manual edits and now all is working. Wonderful hack!!!

But I still don't understand How it works. Where does value of $vbulletin->userinfo['favsmilies'] get set. As far as I know simply adding a new field to the user table does not get the value automatically loaded into the userinfo array

Darwinist 08-27-2006 05:07 PM

Any field you add to the user table is loaded into the userinfo cache.


All times are GMT. The time now is 06:11 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.01776 seconds
  • Memory Usage 1,841KB
  • 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
  • (10)bbcode_code_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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