Member Awards (2.0 Compatible!)

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

Previous topic - Next topic

AllanD

sorry was eating dinner but worked great thanks
Check out this great sites.
KnD Hosting

hcfwesker

You're welcome, and you can remove the admin access if you like.  Good Luck with your site.  :)

AllanD

Check out this great sites.
KnD Hosting

venex

THIS MOD IS LOOKING GOOOODDD!!! Can't wait :B!!! :D

MaNaRa

#2364
thanks for this great mod but I have a question, How I can make the awards show on the user's signature?
I'm use the SMF 2.0
mi versión de foro es SMF 2.0

hcfwesker

Quote from: MaNaRa on July 28, 2011, 11:55:59 AM
thanks for this great mod but I have a question, How I can make the awards show on the user's signature?
I'm use the SMF 2.0 and this is my Display.template.php

I'll post the edits I made for them, to appear on my site, for ya when I get home later tonight.  Do you want them above, or below the signature?

Also, the 2.0 update plans on adding this, but it's up to you, if you want to wait.

MaNaRa

Quote from: hcfwesker on July 28, 2011, 08:04:41 PM
Quote from: MaNaRa on July 28, 2011, 11:55:59 AM
thanks for this great mod but I have a question, How I can make the awards show on the user's signature?
I'm use the SMF 2.0 and this is my Display.template.php

I'll post the edits I made for them, to appear on my site, for ya when I get home later tonight.  Do you want them above, or below the signature?

Also, the 2.0 update plans on adding this, but it's up to you, if you want to wait.

Hi hcfwesker, I prefer below the signature. Take a long time to get the 2.0 update?
If take a long time I could help to implement it manually? Here are my new display.template.php.

If it takes a few days do not mind waiting but I really need this modification


Info: Im use an aditional theme but this theme don't have the display.template, this is of default theme ;)
mi versión de foro es SMF 2.0

Xarkurai

Is anyone else having the "Add/Modify" field in the wrong place at the admin section?
For me its at the wrong spot, but it still works o.O .
Useful paid mod: Badge Awards - Award members for actions

matthewj234

ive followed instructions, but on posts there are two award boxes, which file have i duplicated the code in?

hcfwesker

Quote from: MaNaRa on July 29, 2011, 02:10:52 PMHi hcfwesker, I prefer below the signature. Take a long time to get the 2.0 update?
If take a long time I could help to implement it manually? Here are my new display.template.php.

If it takes a few days do not mind waiting but I really need this modification


Info: Im use an aditional theme but this theme don't have the display.template, this is of default theme ;)

Ok, question, though, have you installed the Member Awards MOd to your site, yet.  I don't see any of the edits in the file you attached.  If I make these edits, then you install the MOd afterwards, you'll have awards showing in post profiles and under signatures. 

I'll just show you the manual edits.  This is for AFTER you install the MOD.

Display.template.php

Step 1
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>';
}



Step 2
Find & REMOVE

// Awards!
echo '
<li><a href="', $scripturl, '?action=profile;area=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></li>';



Step 3

Find
// Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
echo '
<div class="signature" id="msg_', $message['id'], '_signature">', $message['member']['signature'], '</div>';


Add AFTER
               // 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'], '">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>';
}



Quote from: matthewj234 on July 29, 2011, 06:27:43 PM
ive followed instructions, but on posts there are two award boxes, which file have i duplicated the code in?

the MOd seems to add duplicates, according to the Parse.  Just look above in my post, and follow steps 1 & 2 to remove the duplicate codes.

MaNaRa

#2370
Quote from: hcfwesker on July 29, 2011, 07:48:16 PMI don't see any of the edits in the file you attached.  If I make these edits, then you install the MOd afterwards, you'll have awards showing in post profiles and under signatures. 

I'll just show you the manual edits.  This is for AFTER you install the MOD.

Yeah no problem with this, I uninstalled the mod because not show the awards under the signature preferred to wait to find the solution to install later, but now it is installed and working perfectly, but I have a problem...
Only shows one award, Is it possible to show all awards under the signature and not just one?, and is it possible to eliminate the framework of the awards?"
mi versión de foro es SMF 2.0

hcfwesker

#2371
Quote from: MaNaRa on July 29, 2011, 10:34:47 PMYeah no problem with this, I uninstalled the mod because not show the awards under the signature preferred to wait to find the solution to install later, but now it is installed and working perfectly, but I have a problem...
Only shows one award, Is it possible to show all awards under the signature and not just one?
,

Admin > Awards > Settings >  should be the last option about how many awards to display,

Awards in Post:
How many awards should be shown under a user's avatar? Set to 0 to show none.


just set it to a higher number


Quoteand is it possible to eliminate the framework of the awards?"

This may work, but will remove the frame and frame title.

in the same file....

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

But Awards will merge with sigs without a divider separating them.  looks really tacky when i just tested.


MaNaRa

Now it's perfect! thank you so much :)

Quote from: hcfwesker on July 29, 2011, 11:30:57 PMBut Awards will merge with sigs without a divider separating them.  looks really tacky when i just tested.

And couldn't put a dividing line and a little jump page similar to this?

mi versión de foro es SMF 2.0

hcfwesker

Yeah, a line could be added, or is that what you did, already.

MaNaRa

No, I still have not done it because not know much about php code, but if you could add a little to separate them would be perfect ;)
mi versión de foro es SMF 2.0

hcfwesker

Quote from: MaNaRa on July 30, 2011, 03:38:26 AM
No, I still have not done it because not know much about php code, but if you could add a little to separate them would be perfect ;)

I'm not home to test, but you can try this ...

in the same file, with the awards under sig edit

Find
<a href="', $scripturl, $award['more'], '"><img src="', dirname($scripturl), $award['img'], '" alt="', $award['description'], '" title="', $award['description'], '" /></a> ';
$awards++;


change to
<hr><a href="', $scripturl, $award['more'], '"><img src="', dirname($scripturl), $award['img'], '" alt="', $award['description'], '" title="', $award['description'], '" /></a> ';
$awards++;

MaNaRa

Now looks good, but But I think one </hr> is missing, because the line doesn't end.

mi versión de foro es SMF 2.0

hcfwesker

Try just using this, for the entire awards code ...

// Show their awards?
if (!empty($message['member']['awards']) && $modSettings['awards_in_post'] > 0){
echo '
<li>
<div class="signature"></div>';

// 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 '
</li>';
}

MaNaRa

Perfect!! Now works excellent :D
Just a tip: I already have changed but I've noticed there's an extra <li>

<li>
<div class="signature"></div>';


I deleted it and works great, thank you very much for your patience and support ;)
mi versión de foro es SMF 2.0

hcfwesker

Too Pro.   I just left the <li></li>  both in there, since 1 was opening and the other was closing, and didn't seem to make any difference when testing.

And, you're welcome.   Glad I could help.

Advertisement: