Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
Mood Manager - with AJAX mood update. Details »»
Mood Manager - with AJAX mood update.
Version: 1.2.5, by -=Sniper=- -=Sniper=- is offline
Developer Last Online: Dec 2013 Show Printable Version Email this Page

Category: Profile Enhancements - Version: 3.6.2 Rating:
Released: 09-21-2006 Last Update: 07-23-2007 Installs: 1132
DB Changes Uses Plugins Template Edits
 
No support by the author.

By http://www.vbulletinexpert.com

UPDATES ON 24/07/2007

1.2.5
-----

- Fixed XSS security issue
- Added Banned usergroup option

UPDATES ON 15/04/2007

1.2.4
-----

Credits to hambil - https://vborg.vbsupport.ru/member.php?u=57845 for this update

- Aligned text and images for a cleaner look
- Changed dropdown to contain mood images instead of text, with admin option
- Added optional auto replace for postbit and postbit legacy templates

UPDATES ON 08/10/2006

1.2.3
-----

- Changed how the dropdown menu looks slighty, better I think.

- One of the plugins was left inactive by mistake, now active.
which resulted in dead mood images e.g. cross displayed in IE

- Fixed a few mood names / images, so are the same.

- Added a few NEW mood images, thanks to GlitterKill

UPDATES ON 22/09/2006
~~~~~~~~~~~~~~~~~

1.2.0
------

Simply Import the product and make sure you select "allow overwrite"

- No Mood option added
- User Moods will no longer disaply in postbit if moods are disabled.


1.1.3
------

- thanks to basilrath for the moods.

PLEASE READ THE INSTALL FILE

What is It?

It allows users to set a personal mood, which can be changed without reloading the page. The moodis displayed in the members profile and postbit.

Instructions Incuded in the attached file.

Demo

Support I can provide better support at www.vbcmspro.com

Upgrade My other hack depended on another hack, this does not, so simply undo / delete the other hack.

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #672  
Old 10-10-2007, 02:11 PM
connkid25's Avatar
connkid25 connkid25 is offline
 
Join Date: Jul 2005
Location: Los Angeles, CA
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone figured out how to add the dropdown to the users "edit profile" page? I got it in there and then the save changes button no longer works. It would be great to add it above $customfields[regular] in the modifyprofile template. Any ideas on how to get that to work?
Reply With Quote
  #673  
Old 10-10-2007, 02:29 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by connkid25 View Post
Has anyone figured out how to add the dropdown to the users "edit profile" page? I got it in there and then the save changes button no longer works. It would be great to add it above $customfields[regular] in the modifyprofile template. Any ideas on how to get that to work?
I couldn't get that to work either. However, I admit I didn't try very hard since the change mood appears on every page just under # of private messages. Having it in modifyprofile as well would probably be superfluous.
Reply With Quote
  #674  
Old 10-10-2007, 02:39 PM
connkid25's Avatar
connkid25 connkid25 is offline
 
Join Date: Jul 2005
Location: Los Angeles, CA
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by djbaxter View Post
I couldn't get that to work either. However, I admit I didn't try very hard since the change mood appears on every page just under # of private messages. Having it in modifyprofile as well would probably be superfluous.
Yeah but I removed it from under the private messages because I have a ton of pages that are outside of the forums that use the navbar. I have almost a youtube type area, personals etc that it refuses to work with. The best option on mine is just to add it to the profile page.
Reply With Quote
  #675  
Old 10-11-2007, 12:49 AM
rwilkins108's Avatar
rwilkins108 rwilkins108 is offline
 
Join Date: Oct 2006
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've made some changes in this that I thought would be good for updating this plugin. For the most part, the changes only affect image drop downs.

#1 I've gotten rid of the multiple optgroups and replaced them with just options. This has resulted in a much smaller code size, plus, the selected image is no longer blurred out and it looks much better and is faster.

#2 Since I've got a lot of animated .gifs and they have different sizes, I had a problem with overlapping images and it was hard to select those moods. So what I've done is made the size of the selections changeable. I made the size the biggest gif I had, in my case 36px x 100px. This makes the selections more spaced out, but I think it looks nicer. These changes have my defaults in them. I've also separated out the style info into a css tag, so that should make the code smaller as well.

Hopefully you'll find this useful.

If you're not comfortable making these changes, please don't or at least back things up...

The changes are in 2 places:
#1 replace the contents of the template quick_mood_change_by_sniper with
Code:
<!-- / dropdown mood select by sniper start -->
<style>
.moods_option {
 height: 36px; width: 100px; background-repeat: no-repeat; background-position: center;
}
</style>

<div class="vbmenu_popup" id="moods_menu" style="display:none">
<table cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td class="thead" valign="middle">$vbphrase[change_mood]:</td>
    </tr>
    <tr>
        <td class="alt1" valign="middle">
        <form action="index.php?do=ajax_mood_update" method="post" id="mood_form">
            <input type="hidden" name="s" value="$session[sessionhash]" />
                <select name="mood" size="7" onchange="change_mood(this.value);">
                    <option style="text-align: center;" value=""<if condition="empty($bbuserinfo[mood])"> Selected</if>>$vbphrase[no_mood]</option>
                    $vbmoods[mood]
                </select>
        </form>
        </td>
    </tr>
</table>
</div>

<div><strong>$vbphrase[change_mood]:</strong> <a href="#" id="moods"><if condition="!empty($bbuserinfo[mood])"><img src="$vboptions[bburl]/images/mood/$bbuserinfo[mood].gif" border="0" align="absmiddle"/><else />$vbphrase[change_mood]</if></a> <script type="text/javascript"> vbmenu_register("moods", 1); </script></div>
<!-- / dropdown mood select by sniper end -->


#2
replace the contents of the plugin [Mood Manager] - Make Drop Down Menu with
PHP Code:
if ($vbulletin->options['moodmanageronoff'] AND $vbulletin->userinfo['userid'] AND !in_array($vbulletin->userinfo['usergroupid'], explode("|"$vbulletin->options['moodmanagerusergroup'])))
{
    
$vbulletin->templatecache['header'] .= '<script type=\"text/javascript\">
<!--
    function update_mood()
    {
        fetch_object(\'moods\').innerHTML = \'Updating...\';
        if (ajax_mood.handler.readyState == 4 && ajax_mood.handler.status == 200 && ajax_mood.handler.responseText)
        {
            fetch_object(\'moods\').innerHTML = ajax_mood.handler.responseText;
        }
    }

    function change_mood(mood)
    {
        ajax_mood = new vB_AJAX_Handler(true);
        ajax_mood.onreadystatechange(update_mood);
        ajax_mood.send(\'ajax.php\', \'do=insertmood&mood=\' + PHP.urlencode(mood));
    }
//-->
</script>'
;

$moodslist explode("\n"$vbulletin->options['moodmanagermoods']);
if (
$vbulletin->options['moodmanagerimages'] && !eregi("MSIE"$_SERVER['HTTP_USER_AGENT'])) 
{
    
$vbmoods['mood'] .= '<optgroup>';
}
foreach (
$moodslist AS $mood)
{
    
$mood trim($mood);

    if (
$mood == $vbulletin->userinfo['mood']) { $selectedmood ' Selected'; } else { $selectedmood ''; }

    if (!
$vbulletin->options['moodmanagerimages'] || eregi("MSIE"$_SERVER['HTTP_USER_AGENT']))
    {
        
$vbmoods['mood'] .= '<option value="' .$mood'"' .$selectedmood'>' .$mood'</option>';
    }
    else
    {
        
$vbmoods['mood'] .= '<option class="moods_option" style="background-image: url(images/mood/' .$mood'.gif);" value="' .$mood'"' .$selectedmood'></option>';
    }
    
}
if (
$vbulletin->options['moodmanagerimages'] && !eregi("MSIE"$_SERVER['HTTP_USER_AGENT'])) 
{
    
$vbmoods['mood'] .= '</optgroup>';
}

    if (
$vbulletin->options['moodmanagerglobal'])
    {
        
$search_text '$vbphrase[private_messages_nav]';
        
$vbulletin->templatecache['navbar'] = str_replace($search_text$search_text "<br />" fetch_template('quick_mood_change_by_sniper'), $vbulletin->templatecache['navbar']);
    }
    else
    {
        eval(
'$usermoods = "' fetch_template('quick_mood_change_by_sniper') . '";');
    }

To change the size of the amount of space each gif takes, modify
.moods_option
height: 36px; width: 100px;
to the size you want.


Here's a picture of what it looks like on my site:
(Sorry for the poor quality animated gif!)


you can try it out on my site by registering on http://www.u-assist.com
Reply With Quote
  #676  
Old 10-11-2007, 10:43 AM
connkid25's Avatar
connkid25 connkid25 is offline
 
Join Date: Jul 2005
Location: Los Angeles, CA
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by connkid25 View Post
Has anyone figured out how to add the dropdown to the users "edit profile" page? I got it in there and then the save changes button no longer works. It would be great to add it above $customfields[regular] in the modifyprofile template. Any ideas on how to get that to work?
Forget about my above message. I created a new VB page (mood.php) and added the link in the User CP sidebar. It works good and actually looks better! Thanks for this awesome hack!
Reply With Quote
  #677  
Old 10-12-2007, 02:25 PM
connkid25's Avatar
connkid25 connkid25 is offline
 
Join Date: Jul 2005
Location: Los Angeles, CA
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey everyone, im just uploading this as this is how I created a new page and placed the link in the User CP. This will drop the location under the private messages and create a new page that uses forum permissions. You can edit the text of the new page and customize it as you wish.

Unregistered and banned users will not be able to access the page. I have included all the code and instructions in the zip file.

I did it this way because its a pain to get this to work in areas outside of the forums but the mood manager is an awesome addition to anyones forums!
Reply With Quote
  #678  
Old 10-12-2007, 03:08 PM
vitrag24's Avatar
vitrag24 vitrag24 is offline
 
Join Date: Nov 2006
Location: India
Posts: 639
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by connkid25 View Post
Hey everyone, im just uploading this as this is how I created a new page and placed the link in the User CP. This will drop the location under the private messages and create a new page that uses forum permissions. You can edit the text of the new page and customize it as you wish.

Unregistered and banned users will not be able to access the page. I have included all the code and instructions in the zip file.

I did it this way because its a pain to get this to work in areas outside of the forums but the mood manager is an awesome addition to anyones forums!
i didnt understand wht you have did?
mood wont be shown below usercp and posts?
Reply With Quote
  #679  
Old 10-12-2007, 03:53 PM
connkid25's Avatar
connkid25 connkid25 is offline
 
Join Date: Jul 2005
Location: Los Angeles, CA
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vitrag24 View Post
i didnt understand wht you have did?
mood wont be shown below usercp and posts?
All this does is changes the mood dropdown and places it in its own page. This is so you dont have to have it under the private messages. Nothing else changes just the dropdown location. Also, only members have access to the new page and the link will be in the user control panel where they edit their profile.
Reply With Quote
  #680  
Old 10-13-2007, 05:06 PM
vitrag24's Avatar
vitrag24 vitrag24 is offline
 
Join Date: Nov 2006
Location: India
Posts: 639
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then i don't think it is worth to change..
as below pm is cool for me.

Do you have added more gifs/moods which i can use in same version installed earlier??
Reply With Quote
  #681  
Old 10-13-2007, 07:55 PM
rwilkins108's Avatar
rwilkins108 rwilkins108 is offline
 
Join Date: Oct 2006
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If someone posts a mod or an addition to a mod, you don't have to write and say not interested, just don't take it and move along...
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:37 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05899 seconds
  • Memory Usage 2,355KB
  • Queries Executed 28 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete