Member Awards (2.0 Compatible!)

Started by Spuds, September 18, 2006, 03:14:03 PM

Previous topic - Next topic

hcfwesker

Quote from: Zeruda on January 22, 2011, 05:32:58 PM
Love this mod. Very useful! I'm wondering how to have that modification to make the awards appear in signatures instead of miniprofile? I saw it on the Brawl site and like it much better. I have version 1.1.2 on SMF1.1.12. Thanks in advance. :>

I'm not uptight.  :)  You coulda sent me a PM and I'd show you how.

For smf 1 , Under Themes/default/Display.template.php

First remove the awards from mini profiles. 

Find & REMOVE

// Show their awards?
if (!empty($message['member']['awards']) && $modSettings['awards_in_post'] > 0){
echo '
<li>
<fieldset style="border: 1px solid black; padding: 5px;">
<legend>', $txt['awards'], '</legend>';

// Couldn't limit it in Load.php, so let's do it here.
$awards = 0;
foreach ($message['member']['awards'] as $award){
if($awards < $modSettings['awards_in_post'])
echo '
<a href="', $scripturl, $award['more'], '"><img src="', dirname($scripturl), $award['img'], '" alt="', $award['description'], '" title="', $award['description'], '" /></a> ';
$awards++;
}

echo '
</fieldset>
</li>';
}


And find & REMOVE


// Awards!
echo '
<a href="', $scripturl, '?action=profile;sa=showAwards;u=', $message['member']['id'], '" title="', $txt['awards'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/award.gif" alt="' . $txt['awards'] . '" title="' . $txt['awards'] . '" border="0" />' : $txt['awards']), '</a>';



Now, to add them below member's signatures, in the same file

Find
             // Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
echo '
                                                       <hr width="100%" size="1" class="hrcolor" />
<div class="signature">', $message['member']['signature'], '</div>';


Add AFTER ( below the signature)  OR  BEFORE ( above the signature) <--- your prefernece
// Show their awards?
if (!empty($message['member']['awards']) && $modSettings['awards_in_post'] > 0){
echo '
<li> 
                                                          <hr>                                                 
<fieldset>
<legend><a href="', $scripturl, '?action=profile;sa=showAwards;u=', $message['member']['id'], '" title="', $txt['awards'], '">View Awards/Achievements</a></legend>';

// Couldn't limit it in Load.php, so let's do it here.
$awards = 0;
foreach ($message['member']['awards'] as $award){
if($awards < $modSettings['awards_in_post'])
echo '
<a href="', $scripturl, $award['more'], '"><img src="', dirname($scripturl), $award['img'], '" alt="', $award['description'], '" title="', $award['description'], '" /></a> ';
$awards++;
}

echo '
</fieldset>
</li>';
}



I edited it so you can click the text in the awards bar to view all of that members awards.



hcfwesker

Quote from: cloksin on January 25, 2011, 10:29:31 AM
I have this mod installed, and I have some awards added, with both large and small images, but when I select an award and a member to assign the award to, I get this error "You must select a member and/or award in order to continue!"  What is causing this and how do I correct it?

http://www.simplemachines.org/community/index.php?topic=114701.msg2184203#msg2184203

^ Have no idea why the MOD author did it this way, but after you type the name, you have to click the name you typed, wait for the window with the matching name appear, then click on it.

champion0052

the other mod im referring to is called Simple awards system its like Stars

Zeruda

hcfwesker, you are my hero. Many thanks for very helpfulness. It looks great!

hcfwesker

#2124
Quote from: Zeruda on January 30, 2011, 09:39:43 PM
hcfwesker, you are my hero. Many thanks for very helpfulness. It looks great!

You're welcome.  I just happened to randomly check this topic, so was glad when I could actually finally help someone  :o

Also, the line in the code

<legend><a href="', $scripturl, '?action=profile;sa=showAwards;u=', $message['member']['id'], '" title="', $txt['awards'], '">View Awards/Achievements</a></legend>';

View Awards/Achievements  <--- change that to whatever you want the text to say that links to that members awards.  that's just the text we use on our forum.


amiralib

Quote from: hcfwesker on January 30, 2011, 07:58:39 PM
Quote from: cloksin on January 25, 2011, 10:29:31 AM
I have this mod installed, and I have some awards added, with both large and small images, but when I select an award and a member to assign the award to, I get this error "You must select a member and/or award in order to continue!"  What is causing this and how do I correct it?

http://www.simplemachines.org/community/index.php?topic=114701.msg2184203#msg2184203

^ Have no idea why the MOD author did it this way, but after you type the name, you have to click the name you typed, wait for the window with the matching name appear, then click on it.
you are right
but it dose not show Persian usernames on my forum so I cant award them ! it just work with english usernames . do you have any suggestion for me ? how ca I fix this bug?

reinner

I still need help please... :(
I tried installing this mod in my forum

------------------------------------------
I am using RC2 4 and I am using Fuzzy theme.
I can't assign an award. I installed this mod and I got this message.
"An Error Has Occurred!
You must select a member and/or award in order to continue!"


I tried manually installing the mod but still got the same problem..
I am not sure if this is caused by the errors I got after installing simplead mod.

------------------------------------------

I tried to install the mod in a freshly installed smf and it is working fine.
just having the above mentioned problem in the my old forum..

hcfwesker

Quote from: reinner on January 31, 2011, 02:18:03 AM
I still need help please... :(
I tried installing this mod in my forum

------------------------------------------
I am using RC2 4 and I am using Fuzzy theme.
I can't assign an award. I installed this mod and I got this message.
"An Error Has Occurred!
You must select a member and/or award in order to continue!"


I tried manually installing the mod but still got the same problem..
I am not sure if this is caused by the errors I got after installing simplead mod.

------------------------------------------

I tried to install the mod in a freshly installed smf and it is working fine.
just having the above mentioned problem in the my old forum..

Read the post DIRECTLY above yours ;)

reinner

#2128
hi hcfwesker,

Thanks for your reply.

I did tried to do the 'install.php' thing from the link just above my previous post.
I am still having the same problem.. Please bare with me since I am really new
with this..

i got this error message:
Quote
Invalid argument supplied for foreach()
Apply Filter: Only show the errors from this file
File: /home/ourbabyb/public_html/Sources/ManageAwards.php
Line: 451

and
Quote
http://www.ourbabybits.net/index.php?action=admin;area=awards;sa=assign;step=2
8: Undefined index: recipient_to
Apply Filter: Only show the errors from this file
File: /home/ourbabyb/public_html/Sources/ManageAwards.php
Line: 451

hcfwesker

I never said anything about install.php  ???

just install the MOD, and awards, when you type in a members name (must be their username (not display name) ; click the name, and a box below will appear to click that name.  kinda like on vB forums, when typing in  aname to send a PM nto.

Dumb, i know, but it's how it's set up.

reinner

oh.. I did every possible solution i read in the link given above my previous post.
now i really felt stupid.

About the mod. I installed it on a freshly installed and fresh theme that I am using for my
forum. It went smooth and I can add awards on it...

The problem that I have now is with my old forum which btw got lots of problem (errors)
after installing the simplead mod which sad to say got no support to fix my problems...

I tried adding my member username and the supposedly box that would display below
the name is not showing (the one with the small 'x')

eric1234

Quote from: eric1234 on January 28, 2011, 11:45:48 AM
Yeah done.

I still got 1 more question.

I installed the " Member Awards" mod ( http://custom.simplemachines.org/mods/index.php?mod=475)

and realized that there're no "Awards" in Configuration ( it show in the SS of the mods in the website ) then i soon also realize that during the installation of the mods , Add Before   ./Sources/Admin.php) ( test failed )  and Replace   ./Sources/Subs.php ( Test failed ) . Therefore, i went to settle it. Unfortunately after i solve the error , i still unable to see the "award" in the configuration . Did something goes wrong? I suspect the Sources Admin.php file got problem.

http://custom.simplemachines.org/mods/index.php?action=parse
Can somebody help me please? Have a look at my admin.php file .

hcfwesker

#2132
Quote from: reinner on January 31, 2011, 12:49:48 PM
oh.. I did every possible solution i read in the link given above my previous post.
now i really felt stupid.

About the mod. I installed it on a freshly installed and fresh theme that I am using for my
forum. It went smooth and I can add awards on it...

The problem that I have now is with my old forum which btw got lots of problem (errors)
after installing the simplead mod which sad to say got no support to fix my problems...

I tried adding my member username and the supposedly box that would display below
the name is not showing (the one with the small 'x')

I've attached an image below, to show you what to look for.  the problem is, the member name pops up randomly (just make sure you're clicking the cursor on the box you're typing the name in.  .  I used a small name to show you, "Sora".  What I did, was type "S", clicked the box, "So" clicked the box, "Sor" clicked the box, then "Sora" clicked the box.  I tested all 4 different ways, and sometimes it showed one way, then wouldn't; while it showed another way, and vice versa.  It's stupid and random.  But, the persian names, you're most likely going to have a problem with it.


Quote from: eric1234 on January 28, 2011, 11:45:48 AM
Yeah done.

I still got 1 more question.

I installed the " Member Awards" mod ( http://custom.simplemachines.org/mods/index.php?mod=475)

and realized that there're no "Awards" in Configuration ( it show in the SS of the mods in the website ) then i soon also realize that during the installation of the mods , Add Before   ./Sources/Admin.php) ( test failed )  and Replace   ./Sources/Subs.php ( Test failed ) . Therefore, i went to settle it. Unfortunately after i solve the error , i still unable to see the "award" in the configuration . Did something goes wrong? I suspect the Sources Admin.php file got problem.

http://custom.simplemachines.org/mods/index.php?action=parse

If you made the edits correctly, this is most likely going to be a "languagaes" issue.  Check your Server Settings under your AdminCP, make sure you default language is set to "English".  If not, then let me know what it is set to.


reinner

hi hcfwesker,

Please see the attached

amiralib

hey no one hear me ?!!!
reinner, are you using not english forum ? if yes sothis mod dose not work for you ! when your users have unicode name or user name they dont show on the members list of this mod .

no one reply to this bug!!!

reinner

Quote from: amiralib on February 01, 2011, 02:14:56 AM
hey no one hear me ?!!!
reinner, are you using not english forum ? if yes sothis mod dose not work for you ! when your users have unicode name or user name they dont show on the members list of this mod .

no one reply to this bug!!!

It is in english... you can see the attached image i posted just above your post.
It is working fine in my test smf forum.. i think i just mess up something when
I tried to fix the error done by the simplead mod I installed earlier...

bharatforum

I would like to know if it is also possible to remove a frame around awards?

hcfwesker

#2137
Quote from: bharatforum on February 01, 2011, 10:41:13 AM
I would like to know if it is also possible to remove a frame around awards?

This is for SMF2 RC4 , since you didn't specifiy which smf version

/Themes/default/Display.template.php
Find
<fieldset style="border: 1px solid black; padding: 5px;">
<legend>', $txt['awards'], '</legend>';


Change 1px to 0px, and see if that works.  If not, then try  changing to  this.

<fieldset>
<legend>', $txt['awards'], '</legend>';




I haven't tested, just a theory.  So be sure to have a backup of the file in case it doesn't work.




eric1234

I clicked already and i didn't find anything relating to default language. I am using SMF 2.0 RC4 . Did you check the admin.php file? :)

hcfwesker

Quote from: eric1234 on February 01, 2011, 02:24:17 PM
I clicked already and i didn't find anything relating to default language. I am using SMF 2.0 RC4 . Did you check the admin.php file? :)

Admin > Configuration > Security Settings >  Default Forum Language

Advertisement: