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)
-   -   Profile Enhancements - Mood Manager - with AJAX mood update. (https://vborg.vbsupport.ru/showthread.php?t=127220)

BigDog56 07-04-2007 02:07 AM

Great mod, installed!

eido 07-04-2007 01:55 PM

hi
i installed mood manager and followed the steps
the installation was successful.

but i cant see anything in my vbulletin forums, no mood manager no nothing.

plz help.

wtrk 07-08-2007 06:05 PM

some users cant change their moods? anybody know anything about how to fix this. works fine for most people.

rjmjr69 07-08-2007 06:39 PM

Quote:

Originally Posted by wtrk (Post 1286003)
some users cant change their moods? anybody know anything about how to fix this. works fine for most people.


I've had this problem many times. I bet the users having issues are using FF if so have them sign into the forum using IE instead then set their mood and go back to FF..

wtrk 07-08-2007 08:24 PM

Quote:

Originally Posted by rjmjr69 (Post 1286024)
I've had this problem many times. I bet the users having issues are using FF if so have them sign into the forum using IE instead then set their mood and go back to FF..

I use FF and dont have a problem. Ill see if thats it. thanks.

harley_m 07-12-2007 05:51 PM

I do now need to reset all my members moods - how might I go about doing that?

This is to prevent loads of members having images that don't exist or options no longer in existance (I am updating the list) and being unable to change it.

An admin option to change a members mood would be mighty handy!

But a reset will do fine!


Thanks so much for an awesome mod :)


Harley

-=Sniper=- 07-13-2007 12:57 AM

run this query
PHP Code:

UPDATE user SET mood 'newmood.gif' WHERE mood 'oldmood.gif' 


Kaycee123 07-13-2007 05:05 PM

Quote:

Originally Posted by hotwheels (Post 1133388)
Now click on the [<< >>] and locate postbit templates, open it........now depending on if your have your postbit at the top, you would select "postbit", if you have your postbit on the side, you would select "postbit_legacy"..

With the correct one open, look for
PHP Code:

<div>
                    
$vbphrase[posts]: $post[posts]
                </
div

and directly under that code you put
PHP Code:

<if condition="!empty($post[mood])">
                <
div>
                    
$vbphrase[my_mood]: <img src="images/mood/$post[mood].gif" border="0" />
                </
div>
                </if> 

and that will put the moods in your post bit........


THANK YOU SO MUCH FOR THIS ADVICE!!!! I've been trying to get this to work for quite awhile - I was adding the code to the postbit_legacy file - I didn't realize that if our postbit was at the top that it had to be in the postbit file. I bet this is a problem a lot of people have had - maybe should be added to the install file???

Anyway, THANKS! Our users are loving this mod already. I guess it pays to read through 33 pages of notes :D

Ba$im 07-14-2007 04:43 PM

hello
thanks for gr8 hack
but can i translate it to another language?
any way to show option of mood when user go to vb/profile.php?do=editprofile
?

thanks

donatas 07-16-2007 08:57 AM

if some 1 interested - i've did a litle addon, to show users mood in who's online, get it here ;)

kennethsia 07-16-2007 04:01 PM

i wonder is it possible to limit it to a certain usergroup?

rainyleaves 07-17-2007 04:36 PM

Quote:

Originally Posted by RaceJunkie (Post 1148173)
AdminCp>>>>vBa CMPS>>>>Default Settings>>>>
Look for Portal Output Global Variables

Add in the box
vbmoods
usermoods


Click Save at bottom of the page..

Thanks !!
Works perfectly. :)

Poppet 07-18-2007 09:48 AM

Installed and working great :up:

Our members love it :D

selwonk 07-18-2007 12:10 PM

Just to speed the process up, if you create/rename your mood icons, this little bit of VBscript will create a file called _List.txt which looks like this:
Code:

Aggressive
Amazed
Amused
Angelic
Angry
Apprehensive
Approved
Asleep
Bahahaha
...
Wasted
Where
Wicked
Woot
Yeehaw

Just create a _List.vbs text file in the \images\mood\ folder and paste this code
Code:

        Function FileExists( str_FileName )
                Set obj_FSO = CreateObject("Scripting.FileSystemObject")
                If (obj_FSO.FileExists(str_FileName)) Then
                        FileExists = True
                Else
                        FileExists = False
                End If
                Set obj_FSO = Nothing
        End Function

        Function WriteToFile( str_FileName, str_Message )
                Set obj_FSO = CreateObject("Scripting.FileSystemObject")
                Set obj_OutputFile = obj_FSO.OpenTextFile(str_FileName, 2, True, 0)
                obj_OutputFile.WriteLine(str_Message)
            obj_OutputFile.Close
            Set obj_OutputFile = Nothing
                Set obj_FSO = Nothing
        End Function

        Function ReadTextFile( str_FileName )
                int_ReadTextFileCounter = 0
                While FileExists(str_FileName) = False And int_ReadTextFileCounter < 1000 ' 3.0
                        int_ReadTextFileCounter = int_ReadTextFileCounter + 1
                        ' Wait for file to be created
                Wend

                Set obj_FSO = CreateObject("Scripting.FileSystemObject")
                Set obj_InputFile = obj_FSO.GetFile(str_FileName)
                Set obj_TextStream = obj_InputFile.OpenAsTextStream(1, TristateFalse)
                str_Text = obj_TextStream.ReadAll
            Set obj_InputFile = Nothing
                Set obj_FSO = Nothing
                ReadTextFile = str_Text
        End Function

        Sub DeleteFile( str_FileName )
            Set obj_FSO = CreateObject("Scripting.FileSystemObject")
                If obj_FSO.FileExists(str_FileName) Then
                        obj_FSO.DeleteFile(str_FileName)
                End if
                Set obj_FSO = Nothing
        End Sub
       
        ' Parameters
        Set obj_FSO = CreateObject("Scripting.FileSystemObject")
        GBL_IN = obj_FSO.GetAbsolutepathname("") & "\"
        GBL_OUT = obj_FSO.GetAbsolutepathname("_List.txt")
        Set obj_FSO = Nothing

        Set obj_FSO = CreateObject("Scripting.FileSystemObject")
        Set obj_Folder = obj_FSO.GetFolder(GBL_IN)

        str_Log = ""

        For Each obj_File In obj_Folder.Files
                str_FileName = obj_File.Name
                If Right(str_FileName, 4) = ".gif" Then
                        WScript.Echo str_FileName
                        str_Log = str_Log & Left(str_FileName, Len(str_FileName) - 4) & vbcrlf
                End If
        Next

        Set obj_Folder = Nothing
        Set obj_FSO = Nothing

        WriteToFile GBL_OUT, str_Log

Get to a DOS prompt, change to that folder and type
Code:

cscript _List.vbs
Edit the resultant file and paste the results into the Admin CP

Hope that helps...

Poppet 07-21-2007 12:16 PM

Quote:

Originally Posted by -=Sniper=- (Post 1289615)
run this query
PHP Code:

UPDATE user SET mood 'newmood.gif' WHERE mood 'oldmood.gif' 


Please could you elaborate on this one :) (Sorry tired brain after reading 33 pages :D)

I've just had an issue with one of our members where I needed to reset their mood but didn't know how to :( Would it be possible to provide a way to reset moods in the Admin CP.

-=Sniper=- 07-22-2007 07:54 PM

kennethsia; i'll add the ability to ban/disable the mood feature for usergroups

Poppet; I'll add the options in the admincp -> user edit/add section to reset a users mood.

as for running the query;

in the admincp -> Maintenance -> Execute SQL Query -> enter the code I gave above!

I'll start to work on it after work tomorrow, so last chance to make suggestions :)

-=Sniper=- 07-24-2007 06:30 PM

HACK updated to fix XSS SECURITY ISSUE!

PoetJA-1975 07-24-2007 06:59 PM

Thanx for the update ;)

Jacquii.

Shazz 07-24-2007 07:04 PM

So in the upgrade to fix the XSS security issue would be to over write the product and thats all? :|

odie3 07-24-2007 07:06 PM

thanks for the update!

wizardan 07-24-2007 07:08 PM

Thanks for the quick fix, Sniper.

Big Jeff 07-24-2007 07:15 PM

Tiny CMPS issue. You need to add some code to make the dropdown gifs display correctly on the CMPS pages.

CMPS users, you need to modify the

Plugin Manager > [Mood Manager] - Make Drop Down Menu:

Quote:

$vbmoods['mood'] .= '<optgroup style="background-image: url(http://www.yourforumname/forum/images/mood/' .$mood. '.gif); height: 15px; width: 72px;"><option value="' .$mood. '"' .$selectedmood. '></option></optgroup>';

That should do it.. Works fine on my forum CMPS now.

-=Sniper=- 07-24-2007 07:26 PM

yep just a simple upgrade of the product file will do

MSSN 07-24-2007 07:35 PM

Thanks for the quick fix!

I upgraded and now we have double moods on posts. I looked at the postbit templates but I don't see anything out of whack (not that I'm any expert).

Anyone else?

-=Sniper=- 07-24-2007 07:36 PM

please go to admincp - mood manager to disable auto edits.

MSSN 07-24-2007 07:40 PM

Quote:

Originally Posted by -=Sniper=- (Post 1300477)
please go to admincp - mood manager to disable auto edits.

Thank you! That was easy. :)

-=Sniper=- 07-24-2007 07:42 PM

if you want to fix the security issue your self, you have to replace two instances of TYPE_STR to TYPE_HTML in the product.xml file, other wise download the latest version.

-=Sniper=- 07-24-2007 08:10 PM

almost forgot you can now reset the user mood from the admincp when editing a user, at the moment its only a input box but I will change it to a dropdown menu.

specktra.net 07-24-2007 08:32 PM

Quote:

Originally Posted by Big Jeff (Post 1300457)
CMPS users, you need to modify the

Plugin Manager > [Mood Manager] - Make Drop Down Menu:

That should do it.. Works fine on my forum CMPS now.

Having the same issue with CMPS drop down images not appearing, this fix isn't working for me. :( BTW - Kudos for the quick update Sniper! :)

-=Sniper=- 07-24-2007 08:35 PM

I'll set it to use the full site URL for images in the next update tomorrow, so it should work in CMPS, though I won't be able to test it since I dont use it.

BellyBelly 07-24-2007 08:48 PM

I've just installed the update but now my members have 2 x moods displaying in their postbit... one under the other... what happened there?!?!

-=Sniper=- 07-24-2007 08:49 PM

Quote:

Originally Posted by -=Sniper=- (Post 1300477)
please go to admincp - mood manager to disable auto edits.

from the previous page!

I need to disable auto edits by default or remove them, will decide on the next update!

Ev!L ErN!E 07-24-2007 09:37 PM

thank you for the quick update Sniper

MysticMoon 07-24-2007 09:48 PM

hmm does this update make it no longer work with version 3.5.x?
I see it is now listed in 3.6 mods & states it's for 3.6.x
but when I installed it months ago it was for 3.5.x.

Anyhow, as to why I'm asking ...
I get this error when I try to import & overwrite the product

Quote:

Database error in vBulletin 3.5.4:
Invalid SQL:
### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO plugin
(`active`, `executionorder`, `title`, `hookname`, `phpcode`, `product`)
VALUES
('1', '5', '[Mood Manager] - Ajax Update', 'ajax_start', 'if ($_POST[\'do\'] == \'insertmood\')\r\n{\r\n $vbulletin->input->clean_array_gpc(\'p\', array(\'mood\' => TYPE_NOHTML));\r\n\r\n $usermood =& datamanager_init(\'User\', $vbulletin, ERRTYPE_STANDARD);\r\n $usermood->set_existing($vbulletin->userinfo);\r\n $usermood->set(\'mood\', htmlspecialchars_uni(convert_urlencoded_unicode($v bulletin->GPC[\'mood\'])));\r\n $usermood->save();\r\n $new_mood = convert_urlencoded_unicode($vbulletin->GPC[\'mood\']);\r\n\r\n if ($new_mood)\r\n {\r\n die(\"<img style=\\\"vertical-align: middle;\\\" src=\\\"images/mood/\" . $new_mood. \".gif\\\" border=\\\"0\\\" />\");\r\n }\r\n else\r\n {\r\n die($vbphrase[change_mood]);\r\n }\r\n}', 'moodmanager');
MySQL Error : Unknown column 'executionorder' in 'field list'
Error Number : 1054
Thanks

|Jordan| 07-24-2007 09:52 PM

Awesome sniper, thanks for the quick update!

Nathan2006 07-24-2007 09:52 PM

Thank you for the update :)

MysticMoon 07-24-2007 10:17 PM

Ya know I may have clicked installed for this awhile ago when I actually don't have it lol Can I blame then pregnancy hormones? :p
If I have this of yours installed:
https://vborg.vbsupport.ru/showthread.php?t=102270
Then I more then likely do not have this one installed I'm replying to?
*walks away feeling kinda dumb & blushing" :erm:

Quote:

Originally Posted by MysticMoon (Post 1300600)
hmm does this update make it no longer work with version 3.5.x?
I see it is now listed in 3.6 mods & states it's for 3.6.x
but when I installed it months ago it was for 3.5.x.

Anyhow, as to why I'm asking ...
I get this error when I try to import & overwrite the product



Thanks


BellyBelly 07-24-2007 10:50 PM

Sorry thanks for that - I cant see anyone else's mood now though, only my own, is that right?
Thank-you for such a quick fix and response!

Ev!L ErN!E 07-24-2007 10:54 PM

Quote:

Originally Posted by specktra.net (Post 1300532)
Having the same issue with CMPS drop down images not appearing, this fix isn't working for me. :( BTW - Kudos for the quick update Sniper! :)

same problem for me.... no images work in drop down, and the fix Big Jeff posted doesn't work either.

Shazz 07-24-2007 10:56 PM

Successfully upgated.


All times are GMT. The time now is 03:52 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.02571 seconds
  • Memory Usage 1,845KB
  • 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
  • (3)bbcode_code_printable
  • (4)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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