Member Awards (2.0 Compatible!)

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

Previous topic - Next topic

Emrak

Might be in the next versiyon i hope.. Because i need it, it can be as a admin option that we can select or adjust.
...

JayBachatero

I can give you the changes to make.  I'll post them tonight.
Follow me on Twitter

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

dracomiconia

It could be interesting to be show in the posts.... near the signature:

Winner of Soccer Award
Winner of Basket award

TechnoDragon

or at the very least a small image of their favorite award maybe?
Don't tell me to get into shape...I have a shape...It is round!


littleone

Quote from: dracomiconia on September 26, 2006, 02:07:22 AM
It could be interesting to be show in the posts.... near the signature:

Winner of Soccer Award
Winner of Basket award

well again this would have to be a permission, as I wouldnt want that since some of my members have well over 200 awards.  So that wouldnt work.

Quote from: TechnoDragon on September 26, 2006, 02:11:35 AM
or at the very least a small image of their favorite award maybe?
This could become an issue,  if the image is 400x400, and ur shrink that down, it wouldnt be recognizible.  Even for me my awards are 96x60 and I wouldnt want them to show full size and any shrinking of that would distort them to much to serve a purpose.  I guess it would work on a per case bases, but not sure if it would really be worth all the effort.

Like Jay said it was a custom mod that he made for me per my needs, that I said he could release public, so I am not to sure how much change he would really make or wanna make to a public release version.

JayBachatero

I agree with littleone on this one.  Doing it just clutters up the page.
Follow me on Twitter

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

TechnoDragon

Well i do know that it would be a simple change to the display template to show their favorite award...and I can agree with not adding it to the overall mod, but I don't suppose you could figure out the code that would need placing to call and show their favorite?

I have picked specific images that have been resized (all of them) to a size no bigger than allowed for avatars on my forum so I would just like to add whatever code needed to show their favorite award.

Basically a mod to the mod that I will hand code on my own...I am just not good enough with PHP to come up with the code by myself!
Don't tell me to get into shape...I have a shape...It is round!


JayBachatero

I'll see if I post something when I get a chance.
Follow me on Twitter

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

TechnoDragon

Don't tell me to get into shape...I have a shape...It is round!


dracomiconia

Well.... it could be something like:

Image of award (2)

chadk

#70
Well it looks like Juan did this mod for a specific purpose for Littleone.  He released it to the public but instead of calling it "Littleone's very specific mod" he called it "Awards Mod" so either he increase the scope of his mod or someone should take it over and add some of the features we've been asking for.  As well as fixing some things that were seemingly broken like the 777 on the public_html dir.



(edit: changed "are seemingly broken" to "were seemingly broken")

JayBachatero

How about I don't do sht?  I stated before the problem about CHMOD 777.  It's not my problem if you are on a crappy as host that doesn't allow that.  I also updated the mod to only CHMOD the AWARDS dir if not writeable.  This mod NEVER CHMODed the public_html dir.  If you don't want to use the mod then don't.  I'm getting tired of your whining.

Why don't you follow up on the last few posts and get up to date.  I did state that when I get time I was going to give a how to on some of the things that were requested.

Everyfeature that was added to the mod was thought out carefully not to have impact on the server and not clutter things up.  If you want a mod that will clutter things up and hit the server then you are looking at the wrong mod and mod developer.  I take pride in my work and what ever I release represents me.  If you don't like it then so be it.  Find someone else that will make such a mod for you.
Follow me on Twitter

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

TechnoDragon

Quote from: chadk on September 27, 2006, 01:50:51 PM
Well it looks like Juan did this mod for a specific purpose for Littleone.  He released it to the public but instead of calling it "Littleone's very specific mod" he called it "Awards Mod" so either he increase the scope of his mod or someone should take it over and add some of the features we've been asking for.  As well as fixing some things that are seemingly broken like the 777 on the public_html dir.
Rather than start a flame war...why don't you show gratitude that he even released it?

Personally I have been waiting patiently for someone to release a mod like this and the fact that littleone was gracious enough to let juan release this mod to share with everyone is phenomenal.  Mods like this take hours if not days or weeks to write and to give it out free for everyone is extremely giving.  Instead of spewing mean things why not try asking nicely...I Did and got a response that he would porbably post the edits needed to do what I wanted to do...again more than he should have ever been expected to do.

I for one want to thank Juan and Littleone for beneficially giving this mod so everyone could enjoy it and even if he never posts the code that I requested I am more than happy with the mod the way it is and my members are enjoying it immensly!
Don't tell me to get into shape...I have a shape...It is round!


chadk

Damn, I thought I was flippin DEFENDING HIM!  What the hell.. All I'm saying is if people want something that does something OTHER than what Littleone wanted, then someone should take THIS MOD and CHANGE IT to do that.  I was agreeing with him not flaming him.  You guys need to take a pill and realize how difficult it is to convey emotion in black in white text like this on a forum where people may not want to take 20 minutes and write a very carefully thought out message and instead, spend 2 minutes typing things the way they fall.

Juan: Your mod chmodded the public_html directory to 777 when an award was added which is a slight security risk and has nothing to do with the quality of the host.  It did it and it shouldn't do that.  I'm not the only one who had this issue.  You fixed it, which is all I cared about.

littleone

Quote from: chadk on September 28, 2006, 09:03:43 AM
Damn, I thought I was flippin DEFENDING HIM!  What the hell.. All I'm saying is if people want something that does something OTHER than what Littleone wanted, then someone should take THIS MOD and CHANGE IT to do that.  I was agreeing with him not flaming him.  You guys need to take a pill and realize how difficult it is to convey emotion in black in white text like this on a forum where people may not want to take 20 minutes and write a very carefully thought out message and instead, spend 2 minutes typing things the way they fall.

Juan: Your mod chmodded the public_html directory to 777 when an award was added which is a slight security risk and has nothing to do with the quality of the host.  It did it and it shouldn't do that.  I'm not the only one who had this issue.  You fixed it, which is all I cared about.

Again, I am using this mod, I was using this mod for about a week before it went public, I never had a problem, so your CHMOD issue is blowing hot air.  I dont think you have a clue what your talking about.  There isnt a single script or line of code in that whole mode that would change any CHMOD but the AWARDS directory, so where you get off on Juan for saying it change your entire forum is ridiculous.  I see ur the only one complaining.  The other complains were with the actuall AWARDS directory now being CHMOD because the host wouldnt allow that and Juan fixed that, but it had ABSOLUTELY NOTHING to do with changing the entire forum.  I am not exactly the most intellegent person when it comes to code, but obviously you have no idea what your talking about. 

It took Juan with myself testing it as we went along (which I am sure sped things up some) the better part of 3 + days to write it and then as I was going through, from Friday through Monday actually using it, and finding other little issues, he was right there instantly to fix things.  You know you can only work on something so long until you need a break.  He then spent the better part of a day re-writing it to release it public, so that it wouldnt look weird to other users besides me.

There are alot of other mod others that you make suggestions to and they dont even bother to respond, at least he is acknowledging you and and explaining the situation.  Alot of what you want, is most benefitical to you, and only you.  It wouldnt work for the masses.  The way I look at it, is that your asking for custom features.  How about you offer him something for what you expect.  Keep in mind, your using a mod, that cost me money, and I dont generate much money on my forum.  He did what I wanted and need to my exact specifications and I sent him what it was worth to me and I couldnt thank him enough for his hard work.  IF you want something different, why dont you contact him privately and work out and arrangement or as said previously dont use it at all.

Suggesting that someone TAKEOVER his mod because you wanna have a piss fit that your requests arent being done ASAP is down right rude, and disrespectful.  You need to show some respect and gratitude, and I have seen none to speak of.  I think you need to take a pill, and relax.  Be happy with what you got.  A week ago, you had NOTHING, this week you have a fully functional mod, that does more than most people would expect, and you didnt pay a DAMN THING for it.

If you sense a little attitude in my comments, your not wrong, there is plenty of it in there.

chadk

#75
What the hell people?  I'm ON YOUR DAMN SIDE.  I'm saying, if they like the mod as it is, USE it.  If they want something that does so much more then they should take a copy of the mod and do it themselves.  How is this so hard to understand?  I give up.  I use Jay's other mods and love them.   

I don't know why you guys seem to think I'm bashing him.  His mods are terrific and I use them.  I enjoy them and so do the users on my site.  Please take a breath, and read what I wrote again and carefully.


(edit to add the following):
I admit and am sorry for giving his mod a negative review initially but I was very frustrated at the fact that it locked up my site when I tried it and it took me a bit to figure out how it did it so I could fix it.  I am a programmer and a web host.  I DO have a clue, though I'm not an expert.

JayBachatero

Chad like I've stated before the mod does not CHMOD the public_html dir.  Is that where you have SMF installed.  If you do it's mostlikely an issue when you installed the mod and it asked you for FTP information.  That is SMF asking for FTP info to CHMOD not this mod.
Follow me on Twitter

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

Chad

Quote from: Juan Hernandez on September 28, 2006, 10:56:04 AM
Chad like I've stated before the mod does not CHMOD the public_html dir.  Is that where you have SMF installed.  If you do it's mostlikely an issue when you installed the mod and it asked you for FTP information.  That is SMF asking for FTP info to CHMOD not this mod.

Ok I'll check it out but it's really a moot point because your fix repaired the problem.  I really am not trying to bash your work here Jay, sorry for the misunderstanding.  Hopefully I've explained the neg rating issue.  I was very frustrated (to say the least) and took it out on your rating.  Sorry.  I'll take my meds before I rate any mods in the future.  8)

TechnoDragon

#78
Ok, I have hit a dead end, and don't quite know MySql well enough to get past this road block...perhaps you can help?  I am trying to write the code that will pull the members favorite award and put it in the display on posts...I know where to put this and everything...the issue I am having is getting to actually pull the filename...I can get it to pull the proper ID but  Ican't figure out how to pass that ID to a second query to pull the file name...

//BEGIN Awards Favorite image
global $context, $modSettings, $txt, $settings;
        $result_award = db_query("SELECT ID_AWARD
                                     FROM {$db_prefix}awards_members
                                     WHERE ID_MEMBER = {$message['member']['id']} AND favorite = 1
                                     LIMIT 1", __FILE__, __LINE__);
$result_award2 = db_query("SELECT filename
                                     FROM {$db_prefix}awards
                                     WHERE ID_AWARD = {$result_award}
                                     LIMIT 1", __FILE__, __LINE__);
            $row_award = mysql_fetch_array($result_award2, MYSQL_ASSOC);
           
            if($row_award['ID_AWARD'] !== "") {
                echo "Favorite Award:<br /> <img src='{$boardurl}/awards/{$row_award['filename']}' /><br>";
            }
//END Awards Favorite image


EDIT:  Figured it out finally...if you want to display the image in the display template here is the code to make it happen:
//BEGIN Awards Favorite image
global $context, $modSettings, $txt, $settings;
        $result_award = db_query("SELECT ID_AWARD
                                     FROM {$db_prefix}awards_members
                                     WHERE ID_MEMBER = {$message['member']['id']} AND favorite = 1
                                     LIMIT 1", __FILE__, __LINE__);
            $row_award = mysql_fetch_array($result_award, MYSQL_ASSOC);
$result_award2 = db_query("SELECT filename
                                     FROM {$db_prefix}awards
                                     WHERE ID_AWARD = {$row_award['ID_AWARD']}
                                     LIMIT 1", __FILE__, __LINE__);
            $row_award2 = mysql_fetch_array($result_award2, MYSQL_ASSOC);
           
            if($row_award2['filename'] !== "") {
                echo "Favorite Award:<br /> <img src='{$boardurl}/awards/{$row_award2['filename']}' /><br>";
            }
//END Awards Favorite image
Don't tell me to get into shape...I have a shape...It is round!


JayBachatero

#79
Ok in Display.php find

mysql_free_result($request);
$posters = array_unique($posters);


Add after

// Load the members awards
$awards_request = db_query("
SELECT pab.filename, pam.ID_MEMBER
FROM {$db_prefix}awards_members AS pam
LEFT JOIN {$db_prefix}awards AS pab ON (pab.ID_AWARD = pam.ID_AWARD)
WHERE pam.ID_MEMBER IN (" . implode(', ', $posters) . ")
AND pam.favorite = 1
GROUP BY pam.ID_MEMBER", __FILE__, __LINE__);

$context['awards'] = array();
while ($row = mysql_fetch_assoc($awards_request))
$context['awards'][$row['ID_MEMBER']] = '<img src="' . dirname($scripturl) . '/' . (empty($modSettings['pa_awardsDir']) ? '' : $modSettings['pa_awardsDir'] . '/') . $row['filename'] . '" alt="' . $row['filename'] . '" />';

mysql_free_result($awards_request);



In Display.template.php find

// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<div style="overflow: auto; width: 100%;">', $message['member']['avatar']['image'], '</div><br />';



Add after

// Show the fav award
if (isset($context['awards'][$message['member']['id']]))
echo '
<div style="overflow: auto; width: 100%;">', $context['awards'][$message['member']['id']], '</div><br />';



I didn't test this out so not sure if it's going to fully work.  It should work though.
Follow me on Twitter

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

Advertisement: