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)

deezelpope 03-25-2007 10:09 AM

The names of your moods need to be typed in your vBulletin Options in your AdminCP exactly as they're named and uploaded into your image folder.

hambil 03-26-2007 08:34 PM

Hey, here is some code to align the image with the text and make it look nicer. I already made the edits on my board, and thought I'd share :)

In the quick_mood_change_by_sniper template
HTML Code:

<span style="vertical-align: middle;">$vbphrase[my_mood]: </span><a href="#" id="moods"><if condition="!empty($bbuserinfo[mood])"><img style="vertical-align: middle;" src="images/mood/$bbuserinfo[mood].gif" border="0" /><else />$vbphrase[change_mood]</if></a>
In the ajax_start plugin
PHP Code:

die("<img style=\"vertical-align: middle;\" src=\"images/mood/" $new_mood".gif\" border=\"0\" />"); 

In the postbit or postbit_legacy templates
HTML Code:

                                <if condition="!empty($post[mood])">
                                <div>
                                        <span style="vertical-align: middle;">$vbphrase[my_mood]:</span> <img style="vertical-align: middle;" src="images/mood/$post[mood].gif" border="0" />
                                </div>

Feel free to put this into the hack with no obligation or need to mention me. Great hack btw!

dbirosel 03-26-2007 08:39 PM

Quote:

Originally Posted by hambil (Post 1213043)
Hey, here is some code to align the image with the text and make it look nicer. I already made the edits on my board, and thought I'd share :)

In the quick_mood_change_by_sniper template
HTML Code:

<span style="vertical-align: middle;">$vbphrase[my_mood]: </span><a href="#" id="moods"><if condition="!empty($bbuserinfo[mood])"><img style="vertical-align: middle;" src="images/mood/$bbuserinfo[mood].gif" border="0" /><else />$vbphrase[change_mood]</if></a>
In the ajax_start plugin
PHP Code:

die("<img style=\"vertical-align: middle;\" src=\"images/mood/" $new_mood".gif\" border=\"0\" />"); 

In the postbit or postbit_legacy templates
HTML Code:

                                <if condition="!empty($post[mood])">
                                <div>
                                        <span style="vertical-align: middle;">$vbphrase[my_mood]:</span> <img style="vertical-align: middle;" src="images/mood/$post[mood].gif" border="0" />
                                </div>

Feel free to put this into the hack with no obligation or need to mention me. Great hack btw!

Can i see a sshot of the differences and improvements you have done?

hambil 03-26-2007 09:15 PM

Sure, I also used optgroup to put images in the drop down instead of text.

Here is a couple screenshots:

deezelpope 03-26-2007 10:27 PM

WOW!!! That's cool!!! Great job!!! I think I might hafta do it your way!!! I like, I like!!:up: :up: :up:

How'd you do that??

hambil 03-26-2007 10:31 PM

LOL

If what I already posted makes no sense to you, then I recommend you wait for the mod author to incorporate my changes if he/she decides to do so. ;)

deezelpope 03-26-2007 10:34 PM

You added the images to the drop-down with just that coding? I can handle that!! But it's what you said about using 'optgroup'? I'm sorry, but ya lost me there.:o

hambil 03-26-2007 10:41 PM

Oh. Optgroup is an html tag that allows background images.

So, I made this change to the select in the "[Mood Manager] - Make Drop Down Menu" hook:

PHP Code:

foreach ($moodslist AS $mood)
{
    
$mood trim($mood);
    if (
$mood == $vbulletin->userinfo['mood']) { $selectedmood ' Selected'; } else { $selectedmood ''; }
    
$vbmoods['mood'] .= '<optgroup style="background-image: url(images/mood/' .$mood'.gif); height: 15px; width: 72px;"><option value="' .$mood'"' .$selectedmood'></option></optgroup>';
    
$vbmoods['mood'] .= "\r";


Also note that you need to make two small changes in the images. In Love.gif will need to have the space removed (and the name in settings needs the space removed to match). And Psychadelic.gif needs to be Psychedelic.gif (which technically is a problem with or without images in the drop-down, but might as well fix it) :)

I hard-coded the image size. If someone wanted to get all fancy they could probably make that more dynamic, but with the included images it works just fine.

deezelpope 03-26-2007 10:50 PM

Sweet!! Thank you for taking the time to explain this to me. I will work on this in the morning! I'm looking forward to this!! I will let you know how it goes! Thanks again, Hambil! BTW, LOVE your avatar!! So cute!:o

Invalid ID 03-27-2007 01:11 AM

It's not working with vbadvanced. Please check the attached photo. Thanks

PoetJA-1975 03-27-2007 04:41 AM

Quote:

Originally Posted by hambil (Post 1213043)
Hey, here is some code to align the image with the text and make it look nicer. I already made the edits on my board, and thought I'd share :)

--snip--

Very nice! Anyway you can make the directions more clear please?
ALSO - how can this be implemented to work with vBAdvanced pages as well?

Thanx for the sharing.

Looks pretty good!

Jacquii.

hambil 03-27-2007 05:21 AM

Quote:

Originally Posted by PoetJA-1975 (Post 1213385)
Very nice! Anyway you can make the directions more clear please?
ALSO - how can this be implemented to work with vBAdvanced pages as well?

Thanx for the sharing.

Looks pretty good!

Jacquii.

I have no idea. I don't use vbAdvanced and this isn't my hack. Mostly I wanted to share my changes with the author. I do not really want to get into trying to support his hack. What I suggest is you wait for him to notice and consider the changes I offered, and if he incorporates them then you won't need to worry about it.

deezelpope 03-27-2007 03:01 PM

Quote:

Originally Posted by Invalid ID (Post 1213285)
It's not working with vbadvanced. Please check the attached photo. Thanks

Same thing happened to me, but everything else looks good!

Invalid ID 03-27-2007 03:15 PM

Yeah, but there must be some solution to this problem :)

deezelpope 03-27-2007 04:07 PM

Yeah, well, I'm sure there is...Hambil got it to work, but considering the mess I had to clean up, no thanks...I'll keep things the way they are, AND I'll be happy about it. Hehehe.;)

Invalid ID 03-27-2007 05:26 PM

He did? I have to make it work alright, so I am at it... checking what he did :)

Invalid ID 03-27-2007 05:40 PM

I fail to understand what Hambil did :(

deezelpope 03-27-2007 07:36 PM

From what I can see, he replaced the original coding with his own. But when I did it, I had the same result as you...no moods. So, I had to uninstall the product, reinstall, and re-type all my moods into my options. It took awhile, and I'm not willing to try again.

hambil 03-27-2007 08:59 PM

Hey, my intention was not to cause problems. Please do not try to do what Hambil did. :) And, if you really, really want to make sure you BACK UP everything first.

hambil 03-27-2007 09:00 PM

It does work fine, btw. Check my (under construction) site to see. www.catnine.net.

hambil 03-27-2007 09:20 PM

Okay, since people are doing this against advice, and now I feel bad that I am causing problems for the author of this wonderful hack, I will try to make the directions clearer. However, I still recommend not doing it, and if you do go forward BACK UP first.

Step 1:
In the quick_mood_change_by_sniper template find:
HTML Code:

$vbphrase[my_mood]: <a href="#" id="moods"><if condition="!empty($bbuserinfo[mood])"><img src="images/mood/$bbuserinfo[mood].gif" border="0" /><else />$vbphrase[change_mood]</if></a>
and replace with:
HTML Code:

<span style="vertical-align: middle;">$vbphrase[my_mood]: </span><a href="#" id="moods"><if condition="!empty($bbuserinfo[mood])"><img style="vertical-align: middle;" src="images/mood/$bbuserinfo[mood].gif" border="0" /><else />$vbphrase[change_mood]</if></a>
Step 2:
In the "[Mood Manager] - Ajax Update" plugin find:
PHP Code:

        die("<img src=\"images/mood/" $new_mood".gif\" border=\"0\" />"); 

and replace with:
PHP Code:

        die("<img style=\"vertical-align: middle;\" src=\"images/mood/" $new_mood".gif\" border=\"0\" />"); 

Step 3:
In the postbit and/or postbit_legacy templates find:
HTML Code:

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

and replace with:
HTML Code:

                                <if condition="!empty($post[mood])">
                                <div>
                                        <span style="vertical-align: middle;">$vbphrase[my_mood]:</span> <img style="vertical-align: middle;" src="images/mood/$post[mood].gif" border="0" />
                                </div>
                                </if>

Step 4:
In the "[Mood Manager] - Make Drop Down Menu" hook find:
PHP Code:

    $vbmoods['mood'] .= '<option value="' .$mood'"' .$selectedmood'>' .$mood'</option>'

and replace with:
PHP Code:

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

Step 5:
In vBulletin Options -> [Sniper] Mood Manager change "In Love" to "InLove"

Step 6:
In your images/mood directory on your server rename "In Love.gif" to "InLove.gif" and rename Psychadelic.gif to Psychedelic.gif

You should be good to go. But again, PLEASE use with caution, or better yet wait for the author of this hack to decide what to do with this. Thanks :)

deezelpope 03-27-2007 09:25 PM

Oh no, no! I know your intentions were good! Stuff happens, I know this.

I looked at everything you did, and did what you said, it just didn't work for me. No big deal.

And I don't think you're causing problems at all...you're just trying to improve an already awesome hack!

The alignment coding went swimmingly...putting the mood images in the drop-down just didn't go so well. But it's ok.

You don't have anything to feel bad about!

dbirosel 03-27-2007 09:50 PM

So far it's working great. Just gotta do the images in the list. We'll see how that goes, and i'll update everyone. So far great job hambil. I like when things look organize and clean. :)

hambil 03-27-2007 09:53 PM

Wow, I just realized this has been changed to not supported. I'm contacting the author for permission to be added to the support list for this hack, so it can be changed back to supported again.

dbirosel 03-27-2007 10:02 PM

Hey Hambil, for the image list of moods, it doesn't work. For the url i tried many variations. From full url, to the simplest form. If possible, you think you can help me out on this? I think having this addition will be really great for my members. :D Thank alot!

hambil 03-27-2007 10:06 PM

Sure. PM me your site details.

-=Sniper=- 03-27-2007 11:39 PM

hambil has volunteered to support this hack, while I hope to do the same in a couple of months or so.

hambil 03-27-2007 11:42 PM

Thanks Sniper! I will be releasing a version with my latest edits once I've worked with a couple of you to make sure it won't break anything. Anyone who wants to 'beta' this change please PM me.

-=Sniper=- 03-28-2007 12:13 AM

n/p please let me know via pm/email when you have a updated version ready, so I can update the attachment. thanks

kaptanblack 03-28-2007 03:58 PM

Thanks...

Installed ;)

HeRmAn'S 03-28-2007 04:15 PM

Thanks! ...version 3.6.5 ..good working ...and *Installed*

verbs 03-28-2007 10:15 PM

Quote:

Originally Posted by NuclioN (Post 1208066)
This is asked before but i saw no answer to it, so again this question. Is it possible to have the moodselector outside the navbar on forumhome and how to do that? :)

I'm still having the same problem. On my homepage the mood image shows up as a red x, but once you're in the messageboard index or deep in threads it shows up just fine. Has anyone found a fix for this?

hambil 03-29-2007 07:18 AM

Quote:

Originally Posted by verbs (Post 1214838)
I'm still having the same problem. On my homepage the mood image shows up as a red x, but once you're in the messageboard index or deep in threads it shows up just fine. Has anyone found a fix for this?

I'm testing an update now, I'll see if I can spot what might cause such behavior.

hambil 03-29-2007 08:57 AM

Okay, the beta is ready. You can get it here.

This beta may break your system, cause havoc, destroy the free world, etc... Do not try it unless you really want to help beta it.

Once the kinks our worked out it will be posted here in its hopefully full glory.

captainslater 03-29-2007 09:00 AM

Do I really have to register on your board? ;)

hambil 03-29-2007 09:10 AM

I suppose I can email it to you or something, if you have some kind of registration phobia. Can I download your German hacks without registering?

hambil 03-29-2007 09:14 AM

It's just for the beta. I want a place to deal with it that won't clog up and confuse this thread and Snipers non-beta users. Once we're sure it's good I'll email it to Sniper and he'll just put it up here. I can't put it up here. And I don't want to post it as an attachment for 100s of people to download no matter how many warnings I give out ;)

I don't even validate email.

But, anyone who really wants it and doesn't want to register, can give me an email (via PM) and I'll send it that way.

captainslater 03-29-2007 09:26 AM

Quote:

Originally Posted by hambil (Post 1215128)
I suppose I can email it to you or something, if you have some kind of registration phobia. Can I download your German hacks without registering?

No I don't have a registration phobia, I simply don't want to be remembered as zero poster ;)
The points according the german translations goes to you - but that's a simple licensing issue ;)

Quote:

Originally Posted by hambil (Post 1215131)
It's just for the beta. I want a place to deal with it that won't clog up and confuse this thread and Snipers non-beta users. Once we're sure it's good I'll email it to Sniper and he'll just put it up here. I can't put it up here. And I don't want to post it as an attachment for 100s of people to download no matter how many warnings I give out ;)

I don't even validate email.

But, anyone who really wants it and doesn't want to register, can give me an email (via PM) and I'll send it that way.

I've joined your board now. Do you have anywhere noted which changes are made since version 1.2.4 and I'm missing an open thread to discuss issues ;)

hambil 03-29-2007 10:08 AM

Quote:

Originally Posted by captainslater (Post 1215134)
No I don't have a registration phobia, I simply don't want to be remembered as zero poster ;)
The points according the german translations goes to you - but that's a simple licensing issue ;)


I've joined your board now. Do you have anywhere noted which changes are made since version 1.2.4 and I'm missing an open thread to discuss issues ;)

The hack thread itself says what changes have been made, right at the top:
Quote:

1.2.4
-----

- 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
1.2.4 is the new version :)

It's got a whole forum to discuss issues. Just post your issue as a thread. Think of it as working like the premium support forums for some hacks here :)

cheat-master30 03-29-2007 11:52 AM

Okay, I just found something which I think the modification creator should fix. In the product file, and what the menu looks for spells a mood as Psychedelic, but in the image file, it is named Psychadelic, which because they don't match, means anyone selecting this mood will have no icon (maybe a broken one) and no mood selector. I fixed this by renaming the image file in CPanel, but please could the author look into fixing this typo, as it renders the modification useless to anyone who chooses the wrong mood.


All times are GMT. The time now is 01:25 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.02121 seconds
  • Memory Usage 1,868KB
  • 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
  • (8)bbcode_html_printable
  • (7)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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