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)

redlabour 09-22-2006 10:02 PM

Love it - somebody out there who can make German Icons ?

Muellmann 09-22-2006 11:12 PM

[S]Doesn't work in Firefox :(
If I remove the style "Display: none" it works and shows a Box, but a very long Box with Text[/S]

It works now fine. I removed all my old Firefox-Settings and uninstalled Firefox and reinstalled with the new 1.507.

now i figured out in what the problem is. if i anonymize my firefox and i make useragent.override then the ajax-script doesn't work.

I uninstalled it again

Lionel 09-23-2006 12:18 AM

This is a real nice module, specially that now we can place the changer anywhere.
Is it hard to do a module for vbadvanced? The best place for me to display it would be in certain pages as the first right item

Calibre_k 09-23-2006 12:24 AM

How will Users know what my mood is?

You know where on the left people have there avatar how can I have my moods there so other users can view my mood?

Gread mod I must say, Thank you.

eNforce 09-23-2006 12:37 AM

Quote:

Originally Posted by Calibre_k
How will Users know what my mood is?

You know where on the left people have there avatar how can I have my moods there so other users can view my mood?

Gread mod I must say, Thank you.

step 3 in the instructions

Lionel 09-23-2006 12:40 AM

Perfect. The vbadvanced module was the easiest one ever for me to make.

Exitilus 09-23-2006 12:57 AM

Quote:

Originally Posted by -=Sniper=-
Exitilus; it should work on any page which uses the navbar template. I have it on my forums, works in the gallery, arcade etc.

thank you

Well the problem is when you attempt to change the mood when your on a different directory / address it doesn't work. Just hangs at updating the mood.

On my main page, the Mood just doesn't even display.

NeutralizeR 09-23-2006 01:02 AM

Quote:

Originally Posted by Lionel
Perfect. The vbadvanced module was the easiest one ever for me to make.

How did you do it?

Calibre_k 09-23-2006 01:26 AM

Quote:

Originally Posted by eNforce
step 3 in the instructions

Yep I've done that but it doesnt show.

NeutralizeR 09-23-2006 01:58 AM

Quote:

Originally Posted by Exitilus
Well the problem is when you attempt to change the mood when your on a different directory / address it doesn't work. Just hangs at updating the mood.

On my main page, the Mood just doesn't even display.

I think the problem is Plugins > [Mood Manager] - Make Drop Down Menu:
Quote:

if ($vbulletin->options['moodmanageronoff'])
{
$vbulletin->templatecache['header'] .= '<script type=\"text/javascript\">
<!--
function update_mood()
{
fetch_object(\'mood_box\').innerHTML = \'G?ncelleştiriliyor...\';
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(\'ajax.php\', \'do=insertmood&mood=\' + PHP.urlencode(mood));
}
//-->
</script>';

$moodslist = explode("\n", $vbulletin->options['moodmanagermoods']);

foreach ($moodslist AS $mood)
{
$mood = trim($mood);
if ($mood == $vbulletin->userinfo['mood']) { $selectedmood = ' Selected'; } else { $selectedmood = ''; }
$vbmoods['mood'] .= '<option value="' .$mood. '"' .$selectedmood. '>' .$mood. '</option>';
$vbmoods['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('quick_mood_change_by_sniper') . '";');
}
}
ajax.php is not in the external directory...

Quote:

On my main page, the Mood just doesn't even display.
Templates > quick_mood_change_by_sniper:
Quote:

<img src="images/mood/$bbuserinfo[mood].gif" border="0" />
replace it with:
Quote:

<img src="http://www.yourdomain.com/forum/images/mood/$bbuserinfo[mood].gif" border="0" />
This hack won't work (unless updated) if you have some vb integrated pages out of the forum folder...

Calibre_k 09-23-2006 02:04 AM

Guys its working now Thank You.

Gaia 09-23-2006 03:30 AM

Nice,

/me installs

steadicamop 09-23-2006 06:22 AM

Quote:

Originally Posted by -=Sniper=-
Exitilus; it should work on any page which uses the navbar template. I have it on my forums, works in the gallery, arcade etc.

Calibre_k; if you enable auto edit, in the admincp -> mood manager it should appear in the PM area, other wise you need to use "$usermoods" in the navbar to place it anywhere you want.

please have a read though the install file, if there are any parts you do not understand, please let me know so I can improve on it.

C_P; I ONLY use FF, so yes it works in FF.

thank you

Any suggestions on how to sort this small issue out - https://vborg.vbsupport.ru/showpost....8&postcount=30 just one line between the mood drop down and another hack - I just can't find any br tags that might cause it....

Thanks!

Jason

-=Sniper=- 09-23-2006 06:58 AM

steadicamop; try disabling the auto edit and do it manually.

NeutralizeR; does it work with the full path then?

Gizmo5h1t3 09-23-2006 08:35 AM

weird this, just tried to selest "worried", and it shows a red x....

checked the directory, and worried aint even there.
on further investigation, a few others werent there either....

dont the images and the product run in synch??

NeutralizeR 09-23-2006 11:15 AM

Quote:

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

NeutralizeR; does it work with the full path then?

Except from the ajax.php section...
How can we state the full path for it?

I can see the mood images and the moods on the list but i can't change them...

-=Sniper=- 09-23-2006 03:41 PM

I need to delete the moods which have no images, as simple as that, not a bug or anything.

NeutralizeRl; try using your domain before ajax.php

C_P 09-23-2006 04:02 PM

Sniper, I know you allow users to place your code "anywhere you want" but maybe you should offer suggestions? I know myself not being a coder, placing anywhere I want, I'd be dropping in at the topp so I can remove it easier if it looks bad. Maybe for each section you could "suggest" a "find this and aftr it place code here"?

-=Sniper=- 09-23-2006 04:14 PM

Quote:

Originally Posted by C_P
Sniper, I know you allow users to place your code "anywhere you want" but maybe you should offer suggestions? I know myself not being a coder, placing anywhere I want, I'd be dropping in at the topp so I can remove it easier if it looks bad. Maybe for each section you could "suggest" a "find this and aftr it place code here"?

will do later on :) though my suggested locations would be the auto edits :)

newbe_haselina 09-23-2006 04:17 PM

Quote:

Originally Posted by -=Sniper=-
will do later on :) though my suggested locations would be the auto edits :)

Hi Sniper, that would be great :)
I'm also struggling with that stuff, because I'm everythin but a coder :knockedout:

Thanks for your advice :-)

NeutralizeR 09-23-2006 09:20 PM

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

Download mymood.gif below: (Right click and "Save as...")
https://vborg.vbsupport.ru/

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:
http://img230.imageshack.us/img230/6974/snap4qm1.png

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:
http://img235.imageshack.us/img235/4030/snap3sf2.png

NeutralizeR 09-23-2006 09:39 PM

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

Emanet-Kaos 09-23-2006 10:29 PM

thanks very much, cool hack :O)

Lionel 09-24-2006 02:56 PM

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

NeutralizeR 09-24-2006 03:20 PM

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.

Exitilus 09-24-2006 09:33 PM

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 :|

NeutralizeR 09-24-2006 11:14 PM

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?

Exitilus 09-25-2006 12:13 AM

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.

Morrus 09-25-2006 12:27 AM

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).

Adrian Schneider 09-25-2006 12:36 AM

Cool hack... may add it to one of my sites.

Morrus 09-25-2006 12:49 AM

Quote:

Originally Posted by Calibre_k
How will Users know what my mood is?

You know where on the left people have there avatar how can I have my moods there so other users can view my mood?

Gread mod I must say, Thank you.

Same problme here - doing the postbit edit in the install instructions has no effect. Did you manage to solve it?

Kihon Kata 09-25-2006 02:39 AM

Sniper, question.

The table seems to be extra tall where and opens up a kinda large space where the hack goes. LOok at my forums here and you'll see what I'm talking about

icemanic 09-25-2006 07:02 AM

hey, this is weird, my mods and admins can see it, the drop down ajax mod, and can change moods, but the drop down ajax mood menu box is missing from registered users, how do i get this to be there?

murrtex 09-25-2006 07:20 AM

love,yehaw,worried,stressed,phsciadelic,paranoid,h ungover gifs are absent in the gif pack.
have you ??

-=Sniper=- 09-25-2006 09:09 AM

Anyone, If you have the OLD "Quick Mood Changer By Sniper" installed, uninstall it.

I'll update it so users have the need to change the image patch can do so though the admincp, rather than edit the plugin and the update on the instructions.

Morrus; it should display nothing if the user has "no mood" selected, make sure the user has a mood selected for it to disaply in the postbit.

Kihon Kata; I'm gona look at that later on, I'm starting last year at uni this weekm so not had as much time.

icemanic; it should display for all members, are you using the auto edit or you edited the templates your self?

murrtex; some mood images are there but the mood names do not match, I'm gona fix that, other than that you will have find some more moods, as I don't have any more.

Kihon Kata 09-25-2006 12:31 PM

Quote:

Originally Posted by -=Sniper=-
Kihon Kata; I'm gona look at that later on, I'm starting last year at uni this weekm so not had as much time.

Thanks very much Sniper. I've included a snapshot to better show you :)

Morrus 09-25-2006 02:17 PM

Quote:

Originally Posted by -=Sniper=-

Morrus; it should display nothing if the user has "no mood" selected, make sure the user has a mood selected for it to disaply in the postbit.

Gimme some credit! :)

I had a mood selected, and the moods are displaying just fine in the profile. It's the postbit only where the problem is arising.

icemanic 09-25-2006 03:10 PM

SNIPER: I am using auto-edit, i have logged in as admin and i see mood dropbox and change moods, if i log in as a regular user, i see no mood dropbox and cannot change moods i have even reverted templates fully for the navbar to try to see what may go wrong but problem persists

-=Sniper=- 09-25-2006 10:31 PM

ok, I think a manual edit might help, I will update tomorrow after uni with a suggested location.

Morrus; PM admin access to have a look so I can see whats going wrong.

Exitilus 09-25-2006 11:17 PM

Meh .... I guess there is no way to specify the actual path to ajax.php ? (Either with URL or Web Folder). Been trying to figure it out but no luck :|


All times are GMT. The time now is 02:50 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.01986 seconds
  • Memory Usage 1,891KB
  • 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
  • (4)bbcode_php_printable
  • (30)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)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