MyBB Hacks

Full Version: MyBB Hacks Mood System
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(12-01-2010 05:06 AM)Skiilz Wrote: [ -> ]member_profile

Code:
<!-- 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?
No. member_profile template.
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.
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?
(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!
mhmm.. BOMBS AWAY? Please.. Smile
(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:
[attachment=303]

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
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?
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." />

Yes it worked. Thank you.
Pages: 1 2
Reference URL's