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)

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!


All times are GMT. The time now is 11:39 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.02044 seconds
  • Memory Usage 1,751KB
  • 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
  • (1)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
  • (3)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