Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

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
  #62  
Old 09-23-2006, 09:20 PM
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Posts: 355
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think it looks better this way (at least for my own style):

Download mymood.gif below: (Right click and "Save as...")


Upload mymood.gif to /forum/images/mood/ folder...

Open your quick_mood_change_by_sniper template:

Replace:
Quote:
$vbphrase[my_mood]:
with the code below:
Quote:
<img src="images/mood/mymood.gif" width="72" height="15" border="0" />
Replace:
Quote:
<script type="text/javascript"> vbmenu_register("moods"); </script>
with the code below: (if you don't want the arrow icon)
Quote:
<script type="text/javascript">vbmenu_register("moods" ,1);</script>
Result:


For the postbit_legacy template:

Replace:
Quote:
<if condition="!empty($post[mood])">
<div>
$vbphrase[my_mood]: <img src="images/mood/$post[mood].gif" border="0" />
</div>
</if>
with the code below:
Quote:
<if condition="!empty($post[mood])">
<div><img src="images/mood/mymood.gif" width="72" height="15" border="0" /> <img src="images/mood/$post[mood].gif" border="0" />
</div>
</if>
Result:
Reply With Quote
  #63  
Old 09-23-2006, 09:39 PM
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Posts: 355
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by -=Sniper=-
steadicamop; try disabling the auto edit and do it manually.

NeutralizeR; does it work with the full path then?
Yes, i've solved the vBadvanced CMPS problem...

Add vbmoods to Portal Output Global Variables list.

If you use vBadvanced and the index of it is not located in the same directory with your forum e.g. http://www.msxlabs.org/index.php (my vbadvanced page), http://www.msxlabs.org/forum/ (my forums), you have to edit these template and the plugins:

quick_mood_change_by_sniper template:
Add the bold text:
Quote:
<img src="http://www.yourdomain.com/forum/images/mood/$bbuserinfo[mood].gif" border="0" />
Plugin Manager > [Mood Manager] - Ajax Update:
Quote:
die("<img src=\"http://www.yourdomain.com/forum/images/mood/" . $new_mood. ".gif\" border=\"0\" />");
Plugin Manager > [Mood Manager] - Make Drop Down Menu:
Quote:
ajax_mood.send(\'../forum/ajax.php\', \'do=insertmood&mood=\' + PHP.urlencode(mood));
Thanks for the hack
Reply With Quote
  #64  
Old 09-23-2006, 10:29 PM
Emanet-Kaos Emanet-Kaos is offline
 
Join Date: Jul 2006
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks very much, cool hack :O)
Reply With Quote
  #65  
Old 09-24-2006, 02:56 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NeutralizeR
How did you do it?
create a template adv_portal_mymood
PHP Code:
<tr>
<
td>$usermoods</td></tr
here is the module (basically the same as hack. Only this line is added : eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_mymood') . '";');
)

PHP Code:
<?php
if ($vbulletin->options['moodmanageronoff']) 

$vbulletin->templatecache['header'] .= '<script type="text/javascript"> 
<!-- 
    function update_mood() 
    { 
        fetch_object(\'mood_box\').innerHTML = \'Updating...\'; 
        if (ajax_mood.handler.readyState == 4 && ajax_mood.handler.status == 200 && ajax_mood.handler.responseText) 
        { 
            fetch_object(\'mood_box\').innerHTML = ajax_mood.handler.responseText; 
        } 
    } 
     
    function change_mood(mood
    { 
        ajax_mood = new vB_AJAX_Handler(true); 
        ajax_mood.onreadystatechange(update_mood); 
        ajax_mood.send(\'/forums/ajax.php\', \'do=insertmood&mood=\' + PHP.urlencode(mood)); 
    } 
//--> 
</script>'

$moods explode("\n"$vbulletin->options['moodmanagermoods']); 
foreach (
$moods AS $mood

    
$mood trim($mood); 
    if (
$mood == $vbulletin->userinfo[mood]) { $selected ' Selected'; } 
    
$moods[mood] .= '<option value="' .$mood'"' .$selected'>' .$mood'</option>'
    
$moods[mood] .= "\r"

if (
$vbulletin->options['moodmanagerglobal']) 

    
$search_text '$vbphrase[private_messages_nav]'
    
$vbulletin->templatecache['navbar'] = str_replace($search_text
    
$search_text.fetch_template('quick_mood_change_by_sniper'),$vbulletin->templatecache['navbar']); 

else 

  
    eval(
'$usermoods = "' fetch_template('adv_portal_quick_mood_change_by_sniper') . '";');
eval(
'$home[$mods[\'modid\']][\'content\'] = "' fetch_template('adv_portal_mymood') . '";');


?>
use shell module
Reply With Quote
  #66  
Old 09-24-2006, 03:20 PM
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Posts: 355
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lionel
create a template adv_portal_mymood
PHP Code:
<tr>
<
td>$usermoods</td></tr
here is the module (basically the same as hack. Only this line is added : eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_mymood') . '";');
)

PHP Code:
<?php
if ($vbulletin->options['moodmanageronoff']) 

$vbulletin->templatecache['header'] .= '<script type="text/javascript"> 
<!-- 
    function update_mood() 
    { 
        fetch_object(\'mood_box\').innerHTML = \'Updating...\'; 
        if (ajax_mood.handler.readyState == 4 && ajax_mood.handler.status == 200 && ajax_mood.handler.responseText) 
        { 
            fetch_object(\'mood_box\').innerHTML = ajax_mood.handler.responseText; 
        } 
    } 
     
    function change_mood(mood
    { 
        ajax_mood = new vB_AJAX_Handler(true); 
        ajax_mood.onreadystatechange(update_mood); 
        ajax_mood.send(\'/forums/ajax.php\', \'do=insertmood&mood=\' + PHP.urlencode(mood)); 
    } 
//--> 
</script>'

$moods explode("\n"$vbulletin->options['moodmanagermoods']); 
foreach (
$moods AS $mood

    
$mood trim($mood); 
    if (
$mood == $vbulletin->userinfo[mood]) { $selected ' Selected'; } 
    
$moods[mood] .= '<option value="' .$mood'"' .$selected'>' .$mood'</option>'
    
$moods[mood] .= "\r"

if (
$vbulletin->options['moodmanagerglobal']) 

    
$search_text '$vbphrase[private_messages_nav]'
    
$vbulletin->templatecache['navbar'] = str_replace($search_text
    
$search_text.fetch_template('quick_mood_change_by_sniper'),$vbulletin->templatecache['navbar']); 

else 

  
    eval(
'$usermoods = "' fetch_template('adv_portal_quick_mood_change_by_sniper') . '";');
eval(
'$home[$mods[\'modid\']][\'content\'] = "' fetch_template('adv_portal_mymood') . '";');


?>
use shell module
Thanks for the reply... I've found an alternative way as i have many non-vbulletin pages in different folders integrated to forum database.
Reply With Quote
  #67  
Old 09-24-2006, 09:33 PM
Exitilus Exitilus is offline
 
Join Date: Jul 2004
Location: Spokane, WA
Posts: 432
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NeutralizeR
Yes, i've solved the vBadvanced CMPS problem...

Add vbmoods to Portal Output Global Variables list.

If you use vBadvanced and the index of it is not located in the same directory with your forum e.g. http://www.msxlabs.org/index.php (my vbadvanced page), http://www.msxlabs.org/forum/ (my forums), you have to edit these template and the plugins:

quick_mood_change_by_sniper template:
Add the bold text:


Plugin Manager > [Mood Manager] - Ajax Update:


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

Thanks for the hack
I also had to add usermoods to the Global Output for vBadvanced to get it working.

Though I'm still having a problem with the final edit. the ../forums/ajax.php\

If I set that it will work on the vbAdvanced Page. But will not work in the main forums. Though what I really need to do is specify a exact path. I have two different folders, gallery and forums. So obviously when I'm in gallery folder the mod doesn't work because of the directory. if I can define the exact location or url .. then it woudl work. Just dunno how :|
Reply With Quote
  #68  
Old 09-24-2006, 11:14 PM
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Posts: 355
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Exitilus
I also had to add usermoods to the Global Output for vBadvanced to get it working.

Though I'm still having a problem with the final edit. the ../forums/ajax.php\

If I set that it will work on the vbAdvanced Page. But will not work in the main forums. Though what I really need to do is specify a exact path. I have two different folders, gallery and forums. So obviously when I'm in gallery folder the mod doesn't work because of the directory. if I can define the exact location or url .. then it woudl work. Just dunno how :|
Did you try /forums/ajax.php ?
****
Can you type all of the custom folders you have?
Reply With Quote
  #69  
Old 09-25-2006, 12:13 AM
Exitilus Exitilus is offline
 
Join Date: Jul 2004
Location: Spokane, WA
Posts: 432
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In my public_html directory I have gallery and forums directories.

But I use them in such a way as forums.houseofcrazed.com and gallery.houseofcrazed.com

if I try /forums/ajax.php it will only work on my vbadvanced page.
Reply With Quote
  #70  
Old 09-25-2006, 12:27 AM
Morrus Morrus is offline
 
Join Date: Jan 2002
Posts: 494
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Seems to work fine. Even got it displaying in my blog area.

However, I can't seem to get it to show up in the postbit. Wherever I place it, nothing happens. Any ideas?

I addition, if the user has not slected a mood, I get a broken image. Right-clicking indicates it's trying to find an image with no name (images/moods/.gif).
Reply With Quote
  #71  
Old 09-25-2006, 12:36 AM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool hack... may add it to one of my sites.
Reply With Quote
Reply


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 07:26 AM.


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.05535 seconds
  • Memory Usage 2,362KB
  • Queries Executed 26 (?)
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
  • (4)bbcode_php
  • (14)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
  • (2)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_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