Member Awards (2.0 Compatible!)

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

Previous topic - Next topic

BaghdadGhost

#2700
this is one of the must have mods I think. thanks for the author and all members helped to make it up to date.


I am using it with Ricky's wrap text around profile mod. It works great. I just need one thing.

I have chosen to use the display awards under the signature. but when a member does not have a signature the awards section jump next to the profile field which makes it unorganized, unlike when members have signature on (please see two attachments for more clarification). is it possible to make it always under the text area and always under the profile field?

when there is signature I like how it is separated with that thin line which I highlighted in yellow. can we make the line permanent and then the awards section even when there is no signature?




impreza

Useful, another woją very good modification. Thank you
Portal ToTemat.pl - Filmy i Artykuły

mmoking

having a problem with the icons on the award system it just shows a broken image instead of the incon where you click


hcfwesker

#2703
Was the images added to your custom theme?  check the SMF Default theme to see if the image appears there.

that image needs the award.gif image , added to Themes/(ThemeName)/images/admin/ folder

BaghdadGhost

Hi hcfwesker,


can you help me with me issue please. its explained in my previous reply.


thanks

mmoking

Quote from: hcfwesker on February 28, 2012, 07:56:08 PM
Was the images added to your custom theme?  check the SMF Default theme to see if the image appears there.

that image needs the award.gif image , added to Themes/(ThemeName)/images/admin/ folder

thanks just had to copy the file over only icon not showing is in the drop down menu

hcfwesker

Quote from: BaghdadGhost on February 28, 2012, 08:16:21 PM
Hi hcfwesker,  can you help me with me issue please. its explained in my previous reply.

I'll try,   upload your Display.template.php file. 

BaghdadGhost

you are the man. thanks a lot even if you wont be able.


attached. and could you please also narrate the changes here for the record and other members too.

thanks



hcfwesker

Can't test it myself, but try these edits.   If they dont work just revert it back and I'll take another stab at it

in that file

Find
echo '<fieldset><legend><a href="', $scripturl, '?action=profile;area=showAwards;u=', $message['member']['id'], '" title="', $txt['awards'], '">جوائز المغترب</a></legend>';

Replace with
echo '<div class="signature" id="msg_', $message['id'], '_signature"><fieldset><legend><a href="', $scripturl, '?action=profile;area=showAwards;u=', $message['member']['id'], '" title="', $txt['awards'], '">جوائز المغترب</a></legend></div>';

BaghdadGhost

ok this change made the line I was looking for, but it took the awards images out of their frame ( see attachment)


hcfwesker

With everything back to original try this.

in that file

Find
               // Show their awards?
if (!empty($message['member']['awards']) && $modSettings['awards_in_post'] > 0){
echo '<fieldset><legend><a href="', $scripturl, '?action=profile;area=showAwards;u=', $message['member']['id'], '" title="', $txt['awards'], '">جوائز المغترب</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>';


Replace with
               // Show their awards?
if (!empty($message['member']['awards']) && $modSettings['awards_in_post'] > 0){
echo '<div class="signature" id="msg_', $message['id'], '_signature"><fieldset><legend><a href="', $scripturl, '?action=profile;area=showAwards;u=', $message['member']['id'], '" title="', $txt['awards'], '">جوائز المغترب</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></div>';


BaghdadGhost

 :D that did it man thank you very much.

for those interested the final results are as shown in the attachment


btw, your avatar reminds me of MW3 lol



cameranutzII

'ello...I'm trying to assign a new award and I got a 501 Not Implemented  The requested method is not implemented by the server  error

The host site's response is:

mod_security rule triggered!
[Thu Mar 8 14:57:13 2012] [error] [client 72.187.119.21] ModSecurity: Access denied with code 501, [Rule: 'ARGS' '(?:\b(?:(?:n(?:et(?:\b\W+?\blocalgroup|\.exe)|(?:map|c)\.exe)|t(?:racer(?:oute|t)|elnet\.exe|clsh8?|ftp)|(?:w(?:guest|sh)|rcmd|ftp)\.exe|echo\b\W*?\by+)\b|c(?:md(?:(?:32)?\.exe\b|\b\W*?\/c)|d(?:\b\W*?[\\\/]|\W*?\.\.)|hmod.{0,40}?\+.{0,3}x))|[\;\|\`]\W*?\b(?:(?:c(?:h(?:grp|mod|own|sh)|md|pp)|p(?:asswd|ython|erl|ing|s)|n(?:asm|map|c)|f(?:inger|tp)|(?:kil|mai)l|(?:xte)?rm|ls(?:of)?|telnet|uname|echo|id)\b|g(?:\+\+|cc\b))|\/(?:c(?:h(?:grp|mod|own|sh)|pp)|p(?:asswd|ython|erl|ing|s)|n(?:asm|map|c)|f(?:inger|tp)|(?:kil|mai)l|g(?:\+\+|cc)|(?:xte)?rm|ls(?:of)?|telnet|uname|echo|id)(?:[\'\"\|\;\`\-\s]|$))']
2012-03-08 14:57:13.864 [NOTICE] [72.187.119.21:58958-0#APVH_simscrossing.net] Content len: 0, Request line: 'GET /smf/index.php?action=admin;area=awards;sa=viewassigned;id=5 HTTP/1.1'


My IP got blocked and they unblocked it but still have the error. Any idea what would still trigger this?

smf 2.02

FatLightng

#2713
Any help with this mod.

I am very new to modifying sites and don't know too much about code.  I am hoping to learn.

I still have my forums set to a temporary URL while I am building my pages before setting my site live and transferring our current site to it.

All the tests are successful, but this one below.

Here is the error I am getting:

Execute Modification   ./Sources/Subs.php   Test failed
   1.   Replace   ./Sources/Subs.php   Test failed

I am using SMF 2.02

sildenafil

An Error Has Occurred!
Unable to load the 'main' template.

BaghdadGhost

Quote from: FatLightng on March 10, 2012, 01:30:57 PM
Any help with this mod.

I am very new to modifying sites and don't know too much about code.  I am hoping to learn.

I still have my forums set to a temporary URL while I am building my pages before setting my site live and transferring our current site to it.

All the tests are successful, but this one below.

Here is the error I am getting:

Execute Modification   ./Sources/Subs.php   Test failed
   1.   Replace   ./Sources/Subs.php   Test failed

I am using SMF 2.02

upload your subs.php and I will try to edit it manually


Jaymjaym

Same issue as FatLightng, Subs.php attached.

BaghdadGhost

Quote from: Jaymjaym on March 11, 2012, 08:39:38 PM
Same issue as FatLightng, Subs.php attached.

I made the changes for you.


Jaymjaym


sildenafil

Hi, I have a problem. although i see the awards in the admin cpanel and create an award, upload images/badges, i cant see the awards if i look at a members profile and choose awards in the profile info. it shows: 

An Error Has Occurred!
Unable to load the 'awards' template.

Advertisement: