|
|
|
Re:Plugin - jAwards AutoReward
|
|
Date: 2008/10/07 00:22
|
By: piersol
|
Status:
|
|
|
Karma: 2  
|
|
Senior Joomlapolitan  | Posts: 65 |   | |
|
to add a lil more info here, i installed a module and cb plugin for j 1.5 that i have attached that auto awards a medal to the user with the most profile views during a set period of time.
1.)perhaps you can compare code to see the difference between your plugin and this module, to see if that helps.
2.)when i tested this, i had one award for groups that are authors. as stated before, it displays this award if added manually but will not auto create the award for me. BUT, a 2nd award given for winning the popularity contest, which DOES get awarded automatically also appears in the same tab. In my case, thats no so bad. I just thought it was unique that it showed ALL awards in this tab, not just the one outlined in the plugin.
Ive attached these working modules and plugin for j1.5.
|
|
The administrator has disabled public write access. |
|
|
|
Re:Plugin - jAwards AutoReward
|
|
Date: 2008/10/07 02:50
|
By: krileon
|
Status:
|
|
|
Karma: 29  
|
|
Gold Joomlapolitan  | Posts: 268 |   | |
|
Sorry for the delay. Kids buggin' me all day, lol.
I've dug and dug and honestly I can not figure it out.
Have you tried any of the other awards to test and see if they automatically award?
I'm not sure if it's $user or maybe even strtolower.
It should work just fine, but something is causing it to go screwy.
Can you see if any of the other awards auto award for me? This way I can isolate it down.
Also are you making sure you log off then log back in? The awards are only auto-granted upon login. It also will not grant the award if you already have the award according the jawards database.
Try this..
Open cb.autoawards.php
Locate line 411
| Code: |
$mods = strtolower($user->usertype) == ''.$params->get('modsgroup','').'';
|
Change it to:
| Code: |
$mods = (strtolower($user->usertype) == ''.$params->get('modsgroup','').'');
|
THEN see if it works.
Post edited by: krileon, at: 2008/10/07 02:53 AllMySocials "Where social networks come together" www.allmysocials.com
|
|
The administrator has disabled public write access. |
|
|
|
Re:Plugin - jAwards AutoReward
|
|
Date: 2008/10/07 09:44
|
By: sunnyjey
|
Status:
|
|
|
Karma: 4  
|
|
Junior Joomlapolitan  | Posts: 45 |   | |
|
Thank you Krileon,
It is working now. Thanks a lot for taking time and modifying plugin as per my request.
Sorry for my late reply. I was out of the town
|
|
The administrator has disabled public write access. |
|
|
|
|
Re:Plugin - jAwards AutoReward
|
|
Date: 2008/10/07 19:50
|
By: piersol
|
Status:
|
|
|
Karma: 2  
|
|
Senior Joomlapolitan  | Posts: 65 |   | |
|
I will make the change you mentioned. before i do, as i mentioned in the previous post I am able to get the popularity contest module to work and autoaward the winner of the contest an award. so the concept does work.
I attached the module and plugin that is working to a previous post so you can compare the code.
|
|
The administrator has disabled public write access. |
|
|
|
|
Re:Plugin - jAwards AutoReward
|
|
Date: 2008/10/07 21:10
|
By: piersol
|
Status:
|
|
|
Karma: 2  
|
|
Senior Joomlapolitan  | Posts: 65 |   | |
|
It seems you gave the same code twice for the find and then change.
| Code: | $mods = strtolower($user->usertype) == ''.$params->get('modsgroup','').'';
|
any other ideas?
just to bring focus, this issue seems related to moderator portion of the code below when using J1.5X:
| Code: | if ($params->get('mods','0') == 0) {
$admins = strtolower($user->usertype) == 'administrator' || strtolower($user->usertype) == 'super administrator';
$mods = strtolower($user->usertype) == ''.$params->get('modsgroup','').'';
if ($mods && $params->get('modsgroup','')!="") {
$modsgive = $params->get('modsid',''); $modsreason = $params->get('modsreason','');
}
elseif ($admins) {
$modsgive = $params->get('adminsid',''); $modsreason = $params->get('adminsreason','');
}
$query = "SELECT userid,award FROM #__jawards_awards WHERE award='".$modsgive."' AND userid=".$user->id;
$database->setQuery($query);
$check=$database->loadObjectList();
if (count($check)==0) {
getAutoAwardsTab::AddAwards(
$user->id
,$modsgive
,$modsreason
);
}
}
}
|
|
|
The administrator has disabled public write access. |
|
|
|
Re:Plugin - jAwards AutoReward
|
|
Date: 2008/10/07 21:30
|
By: krileon
|
Status:
|
|
|
Karma: 29  
|
|
Gold Joomlapolitan  | Posts: 268 |   | |
|
It's not the same code. Look again at the code I'm having you replace it with.
| Code: |
$mods = (strtolower($user->usertype) == ''.$params->get('modsgroup','').'');
|
Post edited by: krileon, at: 2008/10/07 21:32 AllMySocials "Where social networks come together" www.allmysocials.com
|
|
The administrator has disabled public write access. |
|
|