Resource icon

XenMoods 1.1.3

No permission to download
I have added the template edit that hides the "No Mood" image if the user has never set a mood before, but if I have set my mood once, and go back to "No Mood" the image will still show up in the profile / posts.
What do I have to edit to hide the image as if I never set the mood?
 
I have added the template edit that hides the "No Mood" image if the user has never set a mood before, but if I have set my mood once, and go back to "No Mood" the image will still show up in the profile / posts.
What do I have to edit to hide the image as if I never set the mood?
Which template edit did you use?
 
I edited the first line in the mood_display template:

Code:
<xen:if is="{$canViewMoods} && ({$user.mood_id} || (!{$user.mood_id} && {$visitor.user_id} == {$user.user_id}))">
 
Try this:
Code:
<xen:if is="{$canViewMoods} && ({$user.mood_id} !== ID || ({$user.mood_id} == ID && {$visitor.user_id} == {$user.user_id}))">
Replace the two instances of ID with the default mood's ID. You can find this by going into the Admin CP and into the Moods Manager page. Click on the default mood, and check the URL. It should be something like this:
Code:
http://localhost/XenForo/admin.php?moods/no-mood.54/edit
In this case, "54" would be the number you want.
 
Hmm. That didn't seem to do any difference for me.

My mood_display template looks like this: (my no-mood URL is admin.php?moods/no-mood.18/edit)

Code:
<xen:if is="{$canViewMoods} && ({$user.mood_id} !== 18 || ({$user.mood_id} == 18 && {$visitor.user_id} == {$user.user_id}))">
    <xen:set var="$moodImageUrl">{xen:if "{$user.mood_id}", {$moods.{$user.mood_id}.image_url}, {$moods.{$defaultMoodId}.image_url}}</xen:set>
 
    <div class="userMood">
        <xen:if is="{$visitor.user_id} == {$user.user_id} && {$canHaveMood}">
            <a href="{xen:link moods/mood-chooser, '', 'redirect={$requestPaths.requestUri}'}" class="OverlayTrigger Tooltip" title="{xen:phrase mood_chooser}" data-cacheOverlay="false" data-offsetY="-8">
                <img src="{$moodImageUrl}" alt="{$moods.{$user.mood_id}.title}" />
            </a>
        <xen:else />
            <img src="{$moodImageUrl}" alt="{$moods.{$user.mood_id}.title}" />
        </xen:if>
    </div>
</xen:if>
 
The Mood "mischievious" is spelt incorrectly, it should be spelt "mischievous"

Can we have it corrected pls.
 
Hmm. That didn't seem to do any difference for me.
Sorry, slight error in the code, try:
Code:
<xen:if is="{$canViewMoods} && (({$user.mood_id} != 18 || ({$user.mood_id} == 18 && {$visitor.user_id} == {$user.user_id})) ||  ({$user.mood_id} || (!{$user.mood_id} && {$visitor.user_id} == {$user.user_id})))">
 
The Mood "mischievious" is spelt incorrectly, it should be spelt "mischievous"

Can we have it corrected pls.
This will be fixed in the next release, for new installations only. If you are running the add-on currently, you will need to rename the mood manually (through the Admin CP).
 
Sorry, slight error in the code, try:
Code:
<xen:if is="{$canViewMoods} && (({$user.mood_id} != 18 || ({$user.mood_id} == 18 && {$visitor.user_id} == {$user.user_id})) ||  ({$user.mood_id} || (!{$user.mood_id} && {$visitor.user_id} == {$user.user_id})))">
Sorry, still no difference.

Is there anything else I could try?
 
How do I put the mood below of the gender?

5782225207d3bd4af829d49d44798bf8.png
 
Moods are not there by default. I installed it, set the permissions, but in the mood admin area it says "No moods have been added yet." Do I need to add them manually?

Sorry I did a quick search but did not find anything on this thread!

Thanks!
 
Moods are not there by default. I installed it, set the permissions, but in the mood admin area it says "No moods have been added yet." Do I need to add them manually?

Sorry I did a quick search but did not find anything on this thread!

Thanks!

As Archet stated the moods can be added by dropping the xfmood table and importing the sql file so you don't have to manually have to add each and every mood. In the first post of this thread there's is a link added to helpful tips on how to disable the hook so your able to move the moods wherever you want inside the messageuserblock.

Ps. if you find after importing the old moods still show log into your admincp in the mood options and edit a mood but do nothing just save and the moods v2 will appear.
 
You can add them manually or if you have Shelley's Mood Pack, you can do it via SQL. More info about that here: http://xenforo.com/community/threads/bbsmiley-com-mood-icon-pack-v2.14710/#post-193397

Awesome, got it to work.. the problem was that I uploaded the moods graphic folder after I ran the xml file, so it wasn't finding them.

Also there a small mistype on the SQL styles/default/xenmoods/Animelonlover.png , no biggie, just taught I would report it :D

As Archet stated the moods can be added by dropping the xfmood table and importing the sql file so you don't have to manually have to add each and every mood. In the first post of this thread there's is a link added to helpful tips on how to disable the hook so your able to move the moods wherever you want inside the messageuserblock.

Ps. if you find after importing the old moods still show log into your admincp in the mood options and edit a mood but do nothing just save and the moods v2 will appear.

Very helpful.. Thank you!
 
Awesome, got it to work.. the problem was that I uploaded the moods graphic folder after I ran the xml file, so it wasn't finding them.

Also there a small mistype on the SQL styles/default/xenmoods/Animelonlover.png , no biggie, just taught I would report it :D



Very helpful.. Thank you!

Yeah, animelon was a custom mood vodkaholic used for his site since he provided the sql file that's the reason you see that in there. I'll upload a new sql myself with the update file soon in the mood icon topic so members don't need to touch or edit anything or manually add the extra few moods from the update i made a couple of days ago.

I've been meaning to do this for a while I'll try and get around to doing this today.
 
Thought I'd throw this suggestion at you Dismounted. When we change our moods (In the overlay) I've noticed there's so much real estate being wasted and currently the moods are listed in 3's. Anychance you could change the code up by default so they display in rows of 4? You might even want to try 5 if the suggestion is welcomed.

I just feel the space can be utilized more efficiently. :)

Also, not sure you want to do this but increase the height of .moodChooser ol from 250px to 300px though if this isn't considered no biggie but the paragraph above I hope you take into consideration.

Anyone that wants and prefers them displayed in 4s throw the following in extra.css template. If you want to try them in rows of 5 adjust the widths accordingly.

Code:
.chooserColumns.threeColumns li {
    width: 24% !important;
}
 
.moodChooser li {
    width: 24% !important;
}

mood-overlay1.webp


Below is the width at 19% and displayed in rows of 5. Probably a bit cluttered for my taste haven't decided whether i prefer this yet.

mood-overlay5.webp
 
When we change our moods (In the overlay) I've noticed there's so much real estate being wasted and currently the moods are listed in 3's. Anychance you could change the code up by default so they display in rows of 4? You might even want to try 5 if the suggestion is welcomed.
I've always thought about it, but didnt want to limit the length of the moods. I'll probably add a change to get rows of 4 in the next release (whenever that is!). I do like the nearly-perfect selection border around moods in rows of 5's though!
 
I've always thought about it, but didn't want to limit the length of the moods. I'll probably add a change to get rows of 4 in the next release (whenever that is!). I do like the nearly-perfect selection border around moods in rows of 5's though!

I wouldn't worry about the width of the moods themselves too much because there is an actual limit to what width they can be since the messageuserblock is a fixed size (I know this can be increased) but I think 4 minimum at an increase mood icon width would still allow for 4 in a row. Possibly 5 even and you wouldn't see any issues in the overlay. I wouldn't say your limiting it because the messageuserblock width does that itself, even the .visitorPanel forces a max width more than what the overlay does or you ever could but I hear what your saying.

That said, good to know this will be introduced and thanks again Dismounted for the constant improvements/updates and general maintenance of this add-on. (y)
 
Back
Top Bottom