Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 MyBB Hacks Mood System
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #11
RE: MyBB Hacks Mood System
(12-01-2010 05:06 AM)Skiilz Wrote:  member_profile

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
<!-- Start Mood !-->
<if $userfields['fid7'] != '' then>
<a href="javascript:;" value="Reload Page" onClick="window.location.reload()"><img src="{$mybb->settings['bburl']}/refresh.png" alt="Refresh" title="Refresh Mood" /></a>
&nbsp;<strong>MyMood:</strong> 
<if $GLOBALS['mybb']->user['uid'] == $memprofile['uid'] then>
<a href="javascript:;" onclick="MyBB.popupWindow('MyMood.php', 'imcenter', 450, 300);"><img src="images/MyMood/<?=str_replace(' ', '', $customfieldval)?>.gif" alt="MyMood" title="Click to change your Mood." valign="middle" /></a>
<else>
<img src="images/MyMood/<?=str_replace(' ', '', $customfieldval)?>.gif" alt="MyMood" title="{$memprofile['username']} is {$customfieldval}" valign="middle" />
</if>
<else>
No Mood Selected.
</if>
<!-- End Mood !-->


Do you mean in member_profile_customfields_field  template?

12-01-2010 06:16 AM
Find all posts by this user Quote this message in a reply
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #12
RE: MyBB Hacks Mood System
No. member_profile template.

[Image: 468x602b.png]
(This post was last modified: 12-01-2010 07:49 AM by Skiilz.)
12-01-2010 07:49 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #13
RE: MyBB Hacks Mood System
You "can't" use $customfieldval variable directly in member_profile template.
The variable works in member_profile_customfields_field template.
That's why I provided the code for the member_profile_customfields_field template, not in member_profile template.

(This post was last modified: 12-01-2010 08:01 AM by RateU.)
12-01-2010 08:00 AM
Find all posts by this user Quote this message in a reply
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #14
RE: MyBB Hacks Mood System
But I have this code running in my other forums without any problems... (http://postbomb.net/)
So..What code can I use instead of $customfieldval?

[Image: 468x602b.png]
(This post was last modified: 12-01-2010 08:59 AM by Skiilz.)
12-01-2010 08:22 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #15
RE: MyBB Hacks Mood System
(12-01-2010 08:22 AM)Skiilz Wrote:  But I have this code running in my other forums without any problems... (http://postbomb.net/)
Possibly because of a quirk in the way MyBB works.  It'll work if you only care about the last field (in terms of display order).

(12-01-2010 08:22 AM)Skiilz Wrote:  So..What code can I use instead of $customfieldval?
BOMBS AWAY!

My Blog
12-01-2010 10:28 AM
Find all posts by this user Quote this message in a reply
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #16
RE: MyBB Hacks Mood System
mhmm.. BOMBS AWAY? Please.. Smile

[Image: 468x602b.png]
12-01-2010 09:26 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #17
RE: MyBB Hacks Mood System
(12-01-2010 08:22 AM)Skiilz Wrote:  But I have this code running in my other forums without any problems... (http://postbomb.net/)
Really.......?
Screenshot:
   

And this is your output code for your mood code there:

HTML Code
<img src="images/MyMood/.gif" alt="" title="Skiilz is " valign="middle" />


So, what is the difference with your mood in your test forum?

(12-01-2010 03:27 AM)Skiilz Wrote:  In my test forums the mood image alt link is showing like this:
http://mysite.com/images/MyMood/.gif

12-02-2010 04:01 AM
Find all posts by this user Quote this message in a reply
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #18
RE: MyBB Hacks Mood System
The image isn't working... (Chrome)
[Image: attachment.php?aid=303]

Strange...  Frown (Mozilla)
[Image: semttuloyg.png]

HTML Code
<img src="images/MyMood/Yeehaw.gif" alt="Yeehaw" title="Click to change your Mood." valign="middle" />


But since the code you posted was for member_profile_customfields_field then the right image is the Chrome one..
So.. Is there one code to put there instead of the $customfieldval one that will work on member_profile?


Any help?

[Image: 468x602b.png]
(This post was last modified: 12-03-2010 12:41 AM by Skiilz.)
12-02-2010 06:59 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #19
RE: MyBB Hacks Mood System
Maybe something like this:

HTML Code
<img src="images/mybbhacksmood/<?php echo htmlspecialchars_uni(str_replace(' ', '', $userfields['fid7'])); ?>.png" alt="<func htmlspecialchars_uni>{$userfields['fid7']}</func>" title="Click to change your Mood." />


12-03-2010 06:07 AM
Find all posts by this user Quote this message in a reply
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #20
RE: MyBB Hacks Mood System
Yes it worked. Thank you.

[Image: 468x602b.png]
(This post was last modified: 12-04-2010 12:24 AM by Skiilz.)
12-03-2010 07:46 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: