News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Member Awards (2.0 Compatible!)

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

Previous topic - Next topic

iGate

Can someone offer me a quick explanation of the database set up this uses.

i want to know what is the table and field of where the following are stored:

- Award Name
- Game Name
- Location to where award images are stored.

thx


iGate

for all those who have Tinyportal and are interested i am trying to find a php coder to create a script that displays the medals, a description of it and lists those who have it.

those who are interested in seeing it created plz voice yourselves here:
http://www.tinyportal.net/index.php?topic=21494

the more community support we get the more likely it is someone will code it for us.



if any1 is interested in coding it plz see the above linked thread as well.

jabroni pkp

Quote from: iGate on January 22, 2008, 04:08:08 AM
Can someone offer me a quick explanation of the database set up this uses.

i want to know what is the table and field of where the following are stored:

- Award Name
- Game Name
- Location to where award images are stored.

thx



ive only been using this a few days really but from what i can see its using a new table called smf awards and the fields are in there.  Is that what you wanted to know?

Krysia

Quote from: JayBachatero on October 31, 2006, 09:30:02 AM
In
File: Load.php
Code (find) Select

$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;
}
mysql_free_result($request);


Code (Add After) Select

// Load the awards
$request = db_query("
SELECT COUNT(*) AS awards, ID_MEMBER
FROM {$db_prefix}awards_members
WHERE ID_MEMBER IN ('" . implode("', '", $loaded_ids) . "')
GROUP BY ID_MEMBER", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
$user_profile[$row['ID_MEMBER']]['awards'] = $row['awards'];
mysql_free_result($request);


Code (find) Select

'group_stars' => str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($profile['stars'][1]) ? $settings['images_url'] . '/' . $profile['stars'][1] : '') . '" alt="*" border="0" />', empty($profile['stars'][0]) || empty($profile['stars'][1]) ? 0 : $profile['stars'][0]),
'local_time' => timeformat(time() + ($profile['timeOffset'] - $user_info['time_offset']) * 3600, false),


Code (Add After) Select

'awards' => &$profile['awards'],


File: Display.template.php
Code (find) Select

// Show how many posts they have made.
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />
<br />';


Code (Add After) Select

// Show number of awards
echo '
', $txt['awards'], ': ', !empty($message['member']['awards']) ? $message['member']['awards'] : 0, '<br />
<br />';

Thank you! :D What a fun mod!



Krysia

I've plowed through all 29 pages of this thread, and I didn't see the following request, but if this has already been broached, apologies.

Is there a way to assign an award through like, a member search (individual award assigning), rather than through the current system which lists all the members of that group?

I ask because my board has over 1300 members, and keeps growing. I'm just concerned that say, at 5000, the load time or something might cause my browser to stroke. LOL...



Fustrate

If he updates this for SMF 2.0 (or if I get around to it before he publishes the new code), that's one of the things I want to make - a small form to just type in a member's name and choose which award(s) to assign to them. Based on the 1.1.x code, it won't seem too hard. Just make a form and with an <input> and a <select>, populate it with the awards, and use his same code on the other end to update the database.
Steven Hoffman
Former Team Member, 2009-2012

SlipperyDuck

#566
Quote from: daragor on December 26, 2007, 01:43:35 PM
hi, great mod mate. any chance to display badge in user's data in posts?


Quote from: Mother Goose on December 26, 2007, 11:05:17 PM
Yes!


urm, I'd like to do this with themes, but i don't know the code, what code will i put in the display.index.html (if thats all i need to modify)

I've dont the Above suggestion from Krysia and I get the Number of awards displayed on the user posts, but I dont see the award pictures.

I've tried scrolling through the last 28 pages and I must say, it's left me even more confused about it.
I assume this is something to do with user award favorites, even if I mark mine as favorite, I dont see it.
what else do I add (since ive added Krysia's code above) to get the pictures from the awards displayed.

I DO have the awards.gif icon - with the little dood, but not the award picture assigned to the user....

JayBachatero

Quote from: Krysia on January 27, 2008, 04:40:24 PM
I've plowed through all 29 pages of this thread, and I didn't see the following request, but if this has already been broached, apologies.

Is there a way to assign an award through like, a member search (individual award assigning), rather than through the current system which lists all the members of that group?

I ask because my board has over 1300 members, and keeps growing. I'm just concerned that say, at 5000, the load time or something might cause my browser to stroke. LOL...
Sounds like a good idea.  I just need to get myself to work on this mod again.  If I do update it it will be for SMF 2.0.
Quote from: YodaOfDarkness on January 28, 2008, 03:38:27 AM
If he updates this for SMF 2.0 (or if I get around to it before he publishes the new code), that's one of the things I want to make - a small form to just type in a member's name and choose which award(s) to assign to them. Based on the 1.1.x code, it won't seem too hard. Just make a form and with an <input> and a <select>, populate it with the awards, and use his same code on the other end to update the database.
Umm with 2.0 it's pretty easy todo actually.  I can just use the controls that were added to the PM system.  You can use that to search for members.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Fustrate

Yay for new coding features :) I'm working on my 1.1.x theme, updating it to use less sloppy coding in 2.0 and I just love how much cleaner it is...

and @ SlipperyDuck: have you tried my code on page 23 (or around there)?
http://www.simplemachines.org/community/index.php?topic=114701.msg1144061#msg1144061
Steven Hoffman
Former Team Member, 2009-2012

JayBachatero

Yoda I suggest that you wait till after at least Beta 3 to update your themes.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

SlipperyDuck

Quote from: YodaOfDarkness on January 28, 2008, 08:11:42 PM
Yay for new coding features :) I'm working on my 1.1.x theme, updating it to use less sloppy coding in 2.0 and I just love how much cleaner it is...

and @ SlipperyDuck: have you tried my code on page 23 (or around there)?
http://www.simplemachines.org/community/index.php?topic=114701.msg1144061#msg1144061

Yoda - you legend, thanks for that.

Yes I did read that post, but the text in there suggested that it would only add the Number of awards to my users posts. So Many thanks for that
I'm Stoked!

kaburan

Guys I could use some assistance.

I installed the mod successfully however the profile links are invisible although there seems to be space added for a link. Also in the ACP, there is no link there either however if I manually type in the URL to get to the awards page it works fine.

Could use some help please.

TrueSatan

Please go to ACP>Server Settings and check that your forum language is set to English and not English utf8...alter if it is wrong.

N6REJ

#573
i'm so frustrated right now I could scream! :-\
I've tried to uninstall this mod at least 12x and it keeps leaving behind fragments of itself.  Then on reinstall it just makes things worse!
I need to somehow back out this thing from SMF COMPLETELY so things can be restored properly.
Right now after install I get this... Fatal error: Cannot redeclare template_awards() (previously declared in /home/treeturn/public_html/n6rej.com/forum/Sources/Load.php(1732) : eval()'d code:2371) in /home/treeturn/public_html/n6rej.com/forum/Sources/Load.php(1732) : eval()'d code on line 2652 after I click on a member's name from admin.  ONly by removing the package does this stop.  But then it leaves behind all kinds of artifacts of itself.
Can someone PLEASE help
just one example of what is happening after removal is this...

ReneNF

Hi to all

This is great Mod. But it only works in english. And my board works on german.

Can someone help me, to modificate it that the mod will work with german language?

Thanks

kaburan

Quote from: TrueSatan on February 06, 2008, 07:31:58 PM
Please go to ACP>Server Settings and check that your forum language is set to English and not English utf8...alter if it is wrong.

Yeah its already set to English. I made sure of that when I got it first installed

gordo

#576
\i have just installed and get the following error, inside the award section i admin panel

Unknown column 'awardName' in 'field list'
File: /home/*****/public_html/*****/Sources/ManageAwards.php
Line: 193

ReneNF

Quote from: kaburan on February 15, 2008, 01:34:41 PM
Quote from: TrueSatan on February 06, 2008, 07:31:58 PM
Please go to ACP>Server Settings and check that your forum language is set to English and not English utf8...alter if it is wrong.

Yeah its already set to English. I made sure of that when I got it first installed

Where can I set the settings which will be used to translate the links und functions into the german?
Can you help me or have I search for it?

perplexed

quick question for Jay,  I have to uninstall and reinstall this mod as I'm upgrading.  Will I lose the awards that members have been assigned or will the tables with all the info still be there when I reinstall?

thanks

N6REJ

you will have a mess!  I've done exactly that and now everything is fubar'd.  I'm having to have SMF take a look to fix it.

Advertisement: