Arrow Home arrow Forums
larger font smaller font default font Fixed screen resolution Auto adjust screen size

Joomlapolis Forums  


<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>
Re:Plugin - jAwards AutoReward
Date: 2008/10/07 00:22 By: piersol Status: CB Doc subscriber  
Karma: 2  
Senior Joomlapolitan

Posts: 65
graphgraph
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.
File Attachment:
File name: mod_cb_popularitycontestSUITE_J15_UNZIPFIRST.zip
File size:17584 bytes
Click here to see the profile of this user The administrator has disabled public write access.

Re:Plugin - jAwards AutoReward
Date: 2008/10/07 02:50 By: krileon Status: CB Doc subscriber  
Karma: 29  
Gold Joomlapolitan

Posts: 268
graphgraph
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
Click here to see the profile of this user The administrator has disabled public write access.

Re:Plugin - jAwards AutoReward
Date: 2008/10/07 09:44 By: sunnyjey Status: CB Doc subscriber  
Karma: 4  
Junior Joomlapolitan

Posts: 45
graphgraph
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
Click here to see the profile of this user The administrator has disabled public write access.

Re:Plugin - jAwards AutoReward
Date: 2008/10/07 19:50 By: piersol Status: CB Doc subscriber  
Karma: 2  
Senior Joomlapolitan

Posts: 65
graphgraph
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.
Click here to see the profile of this user The administrator has disabled public write access.

Re:Plugin - jAwards AutoReward
Date: 2008/10/07 21:10 By: piersol Status: CB Doc subscriber  
Karma: 2  
Senior Joomlapolitan

Posts: 65
graphgraph
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                             );                         }         }     }

Click here to see the profile of this user The administrator has disabled public write access.

Re:Plugin - jAwards AutoReward
Date: 2008/10/07 21:30 By: krileon Status: CB Doc subscriber  
Karma: 29  
Gold Joomlapolitan

Posts: 268
graphgraph
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
Click here to see the profile of this user The administrator has disabled public write access.

<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Documentation

Documentation Subscription Service
(updated for CB 1.2 RC2)

What?

Why?

Where?

Just click here for answers!

Click here for a yearly subscription: subscribe now

Download Latest Release

The latest stable Community Builder Release is version 1.1 for Joomla 1.0 and Mambo.
You need to be a registered member of Joomlapolis to download.

The latest release candidate of Community Builder is version 1.2 RC3, native for Joomla 1.0, 1.5 and Mambo.
It is available as "thank you" to all CB documentation subscribers at this time.

CB Login