Member Awards (2.0 Compatible!)

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

Previous topic - Next topic

Kindred

that is correct. As far as I know, this mod does not display the actual awards... it displays a link to the user's awards page.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SgtMic

It used to.
See what happens when you don't stay updated. LOL
There is nothing more deadly than a US Marine and his rifle.
A close second is a US Marine and his K-BAR.
2/5 Fox Co.  (BlackHearts)
FAST Co. 5th Plt. (FIDO)

Kindred

it used to?  really?

maybe I am confusing myself...   but as far as I recall, this mod never did.  There are 2 other awards mods though.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SgtMic

I'm sure it was this mod. I still had the tables from the old version. It just gave me too many errors so I uninstalled it.
It also had an option to have the award show up in the signature area.


Oops, it was a different awards mod.  :-[
There is nothing more deadly than a US Marine and his rifle.
A close second is a US Marine and his K-BAR.
2/5 Fox Co.  (BlackHearts)
FAST Co. 5th Plt. (FIDO)

novastar

This updated mod is great!! I am using v1.1.1 with SMF 1.1.10.

Only one thing that bothers me. You can still only select one favorite. The box is checked in the admin section to allow more than one favorite, but still it does not. If that could be fixed, it would be awesome.

And a suggestion: Once the favorite issue is fixed, perhaps something that allows members to display JUST favorites if they wish?

صلاح الدين

I have a problem in this mod
when I add a user name in (Select Members) & a award from (Select Award) & click to continue ,,, it say : {You must select a member and/or award in order to continue!          }

TwitchisMental

Quote from: Saladine on October 11, 2009, 09:47:44 AM
I have a problem in this mod
when I add a user name in (Select Members) & a award from (Select Award) & click to continue ,,, it say : {You must select a member and/or award in order to continue!          }
I had the same problem,but when you type out a members name press enter then continue.

That worked for me =].

gitchuone

The only issue I've found so far is the automatic upload of the award images. On the default theme it worked perfectly. But once I applied it to my custom theme it doesn't work. I can still manually upload the graphics in the format it calls for 1.png/mini-1.png into the awards directory, but the automatic functionality was lost. Not 100% sure how to fix/enable that.

gitchuone

I too am using 1.1.10. I am not getting the awards to show in the posts either as it does with the default theme. I think there is something missing that could go into the next update that offers functionality to Themes.

I can probably continue to tweak with it, but it would just be nice if the dev could do the upgrade.

Kindred

mods only ever install in the default theme.  This is true of ALL mods.   You will have to manually apply the mod(s) in any custom theme.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

digit

Quote from: SgtMic on October 04, 2009, 10:16:17 PM
Quote from: Existence. on August 28, 2009, 11:55:20 PM
Hello,

I'm unable to see member awards below anyone's posts in any topic. I've looked all over this thread but cannot find a solution. One person (Chaos Dragon) said they figured it out, but didn't say why. :(

I'm running SMF 2.0 RC1-1.

Thanks.

Same here. There is a small awards icon under their avatar that takes you to the awards page. But no awards image under their avatar of the actual award.

This sounds exactly like a problem I was having.  (but I am running 1.1.10)  The mod WAS applied to the default theme ok, since the Awards link was showing up, but the awards themselves were not showing up.  My problem was in Load.php.

The problem I had was this...  manually applying the mod, (I pretty meticulously follow the search and replaces, so I am not sure how/where this got messed up) I had this in Load.php... starting around line 885




if (!empty($users))
{
// Load the member's data.
$request = db_query("
SELECT$select_columns
FROM {$db_prefix}members AS mem$select_tables
WHERE mem." . ($is_name ? 'memberName' : 'ID_MEMBER') . (count($users) == 1 ? " = '" . current($users) . "'" : " IN ('" . implode("', '", $users) . "')"), __FILE__, __LINE__);
$new_loaded_ids = array();
while ($row = mysql_fetch_assoc($request))
{
$new_loaded_ids[] = $row['ID_MEMBER'];
$loaded_ids[] = $row['ID_MEMBER'];
$row['options'] = array();
$user_profile[$row['ID_MEMBER']] = $row;
$user_profile[$row['ID_MEMBER']]['awards'] = array();
}
mysql_free_result($request);
}
// if this is the user's profile screen, also grab the count of topics they've made
if (!empty($new_loaded_ids) && $set == 'profile')
{
$request = db_query("
SELECT ID_MEMBER_STARTED, COUNT( ID_TOPIC ) AS topics
FROM {$db_prefix}topics
WHERE ID_MEMBER_STARTED" . (count($new_loaded_ids) == 1 ? ' = ' . $new_loaded_ids[0] : ' IN (' . implode(', ', $new_loaded_ids) . ')') . '
GROUP BY ID_MEMBER_STARTED', __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
$user_profile[$row['ID_MEMBER_STARTED']]['topics'] = $row['topics'];
mysql_free_result($request);

// I'm sorry, but I've got to stick it somewhere...
if($modSettings['awards_in_post'] > 0 && !empty($new_loaded_ids)){
$awardsRequest = db_query("
SELECT
aw.id_award, aw.award_name, aw.description, aw.minifile,
am.ID_MEMBER, am.date_received, am.favorite
FROM {$db_prefix}awards_members AS am
INNER JOIN {$db_prefix}awards AS aw ON (aw.id_award = am.id_award)
WHERE am.ID_MEMBER IN(" . implode(',', $new_loaded_ids) . ")
ORDER BY am.favorite DESC, am.date_received DESC", __FILE__, __LINE__);

// Fetch the award info just once
while ($row = mysql_fetch_assoc($awardsRequest)){
$user_profile[$row['ID_MEMBER']]['awards'][] = array(
'id' => $row['id_award'],
'award_name' => $row['award_name'],
'description' => $row['description'],
'more' => '?action=profile;sa=awardsMembers;id=' . $row['id_award'],
'href' => '?action=profile;sa=showAwards;u=' . $row['ID_MEMBER'],
'minifile' => $row['minifile'],
'img' => '/' . (empty($modSettings['awards_dir']) ? '' : $modSettings['awards_dir'] . '/') . $row['minifile'],
);
}
mysql_free_result($awardsRequest);
}
}

if (!empty($new_loaded_ids) && $set !== 'minimal')
{
$request = db_query("
SELECT *
FROM {$db_prefix}themes
WHERE ID_MEMBER" . (count($new_loaded_ids) == 1 ? ' = ' . $new_loaded_ids[0] : ' IN (' . implode(', ', $new_loaded_ids) . ')'), __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
$user_profile[$row['ID_MEMBER']]['options'][$row['variable']] = $row['value'];
mysql_free_result($request);
}



It SHOULD have been...




if (!empty($users))
{
// Load the member's data.
$request = db_query("
SELECT$select_columns
FROM {$db_prefix}members AS mem$select_tables
WHERE mem." . ($is_name ? 'memberName' : 'ID_MEMBER') . (count($users) == 1 ? " = '" . current($users) . "'" : " IN ('" . implode("', '", $users) . "')"), __FILE__, __LINE__);
$new_loaded_ids = array();
while ($row = mysql_fetch_assoc($request))
{
$new_loaded_ids[] = $row['ID_MEMBER'];
$loaded_ids[] = $row['ID_MEMBER'];
$row['options'] = array();
$user_profile[$row['ID_MEMBER']] = $row;
$user_profile[$row['ID_MEMBER']]['awards'] = array();
}
mysql_free_result($request);

// I'm sorry, but I've got to stick it somewhere...
if($modSettings['awards_in_post'] > 0 && !empty($new_loaded_ids)){
$awardsRequest = db_query("
SELECT
aw.id_award, aw.award_name, aw.description, aw.minifile,
am.ID_MEMBER, am.date_received, am.favorite
FROM {$db_prefix}awards_members AS am
INNER JOIN {$db_prefix}awards AS aw ON (aw.id_award = am.id_award)
WHERE am.ID_MEMBER IN(" . implode(',', $new_loaded_ids) . ")
ORDER BY am.favorite DESC, am.date_received DESC", __FILE__, __LINE__);

// Fetch the award info just once
while ($row = mysql_fetch_assoc($awardsRequest)){
$user_profile[$row['ID_MEMBER']]['awards'][] = array(
'id' => $row['id_award'],
'award_name' => $row['award_name'],
'description' => $row['description'],
'more' => '?action=profile;sa=awardsMembers;id=' . $row['id_award'],
'href' => '?action=profile;sa=showAwards;u=' . $row['ID_MEMBER'],
'minifile' => $row['minifile'],
'img' => '/' . (empty($modSettings['awards_dir']) ? '' : $modSettings['awards_dir'] . '/') . $row['minifile'],
);
}
mysql_free_result($awardsRequest);
}
}
// if this is the user's profile screen, also grab the count of topics they've made
if (!empty($new_loaded_ids) && $set == 'profile')
{
$request = db_query("
SELECT ID_MEMBER_STARTED, COUNT( ID_TOPIC ) AS topics
FROM {$db_prefix}topics
WHERE ID_MEMBER_STARTED" . (count($new_loaded_ids) == 1 ? ' = ' . $new_loaded_ids[0] : ' IN (' . implode(', ', $new_loaded_ids) . ')') . '
GROUP BY ID_MEMBER_STARTED', __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
$user_profile[$row['ID_MEMBER_STARTED']]['topics'] = $row['topics'];
mysql_free_result($request);


}

if (!empty($new_loaded_ids) && $set !== 'minimal')
{
$request = db_query("
SELECT *
FROM {$db_prefix}themes
WHERE ID_MEMBER" . (count($new_loaded_ids) == 1 ? ' = ' . $new_loaded_ids[0] : ' IN (' . implode(', ', $new_loaded_ids) . ')'), __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
$user_profile[$row['ID_MEMBER']]['options'][$row['variable']] = $row['value'];
mysql_free_result($request);
}




I discovered the problem by doing a brand new install and automatically (through the package manager) installing the mod.... (the awards showed up ok there)  then comparing files...

I am posting this just in case others have had the same problem (I am not sure how likely that is).

digit


Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

phxmaximus

Quote from: novastar on October 10, 2009, 01:06:15 AM
This updated mod is great!! I am using v1.1.1 with SMF 1.1.10.

Only one thing that bothers me. You can still only select one favorite. The box is checked in the admin section to allow more than one favorite, but still it does not. If that could be fixed, it would be awesome.

And a suggestion: Once the favorite issue is fixed, perhaps something that allows members to display JUST favorites if they wish?

Yes that would be nice. Allow the users to select which awards and in what order they are displayed.

jolly_roger

#1512
Greetings! Thank you for the great mod. Unfortunately, i noticed 2 minor bugs here:
1. When you press 'Select user'  the default smf window which let you search users will appear. After clicking on user there, his or her user name aka login will be inserted in 'select user' field. But mod looking for display name to assign awards. If display name differs from user name, operation will fail.
2. I'm running russian forum. There is drop-down list of months in Assing Award interface, but it does not select the current month. Actually there is 2 problems: in first, it uses php function 'date' to get current month, which will return english name of month. In second, months in $txt['months'] array are in genetive case, and date('F') returns month in nominative case. In result, january will always appear as selected. I use this solution:

Code (ManageAwards.template.php) Select
<option value="', $key, '" ', date('F') == $month ? 'selected="selected"' : '', '>', $month, '</option>';
are replaced with:
<option value="', $key, '" ', $txt['months'][date('n')] == $month ? 'selected="selected"' : '', '>', $month, '</option>';

smf version: 1.1.10; mod version: 1.1.1
I do not know if it has been fixed in 2.x versions, but i hope this information will help others, who use non-english smf 1.1.10
I apologize for my poor English

novastar

#1513
Quote from: jolly_roger on October 14, 2009, 06:35:09 AM
When you press 'Select user'  the default smf window which let you search users will appear. After clicking on user there, his or her user name aka login will be inserted in 'select user' field. But mod looking for display name to assign awards. If display name differs from user name, operation will fail.

I noticed this too actually, although I did not put it together as to what the problem was. I had a user that changed his display name, but not his user name. Had to type the display name manually to add the award, would not use the 'search member' feature properly (search came up with display name, but put username in field when clicked).

LC

Quote from: Kindred on October 05, 2009, 12:01:28 AM
that is correct. As far as I know, this mod does not display the actual awards... it displays a link to the user's awards page.
It does display them but they are just small icons (16x16) that when you hover over them, they state what award they are.

digit

#1515
Boy we are ALL OVER the map with this mod.

It IS supposed to show the awards.  In the posts.  Full size.  After I found a small problem in Load.php...  it works just fine ... it displays the awards, (in a nice neat little legend layout), and also displays a small 16x16 image that links to the awards list.)

Look through the parser and you can see.
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

LC

Quote from: digit on October 16, 2009, 05:57:45 PM
Boy we are ALL OVER the map with this mod.

It IS supposed to show the awards.  In the posts.  Full size.  After I found a small problem in Load.php...  it works just fine ... it displays the awards, (in a nice neat little legend layout), and also displays a small 16x16 image that links to the awards list.)

Look through the parser and you can see.
Exactly, Digit. You can either have it show the full size icon for the award (for mine I had limited to the amount of awards shown in that manner) or you can show small icons for the awards. It's really a choice that the user has and certain awards can be displayed how they wish.

This of course is straight out of the box install (for me anyway), no modifications of the files for the awards mod.

digit

#1517
Where do you see the option to show small icons?

Maybe it's different for smf2+ (I am using 1.1.10)

BTW - did NOT add the small icon that's linked to the awards page.   8) (It seems like that should be in the menu somewhere)
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

LC

Quote from: digit on October 16, 2009, 06:06:37 PM
Where do you see the option to show small icons?

Maybe it's different for smf2+ (I am using 1.1.10)

BTW - did NOT add the small icon that's linked to the awards page.   8) (It seems like that should be in the menu somewhere)
You just need to make the smaller version (icon) of the award.
:) I use 1.1.10 as well.
Here's what I mean.


Then it will make this appear in the posts. And when you hover over them, they each have a description that will explain the award.


You can also set how many awards you want shown (large icon or small icon)


Make sense?


digit

Oh yes!  My bad!    8)
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

Advertisement: