Skip to Content Skip to Menu

Plugin - jAwards AutoReward

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
16 years 1 month ago #76456 by krileon
Replied by krileon on topic Re:Plugin - jAwards AutoReward
piersol wrote:

Thanks. i did originally use author instead of Author. And i did also try Special, just in case.

I want to clarify again, the plugin is working in that id displays those who are already awarded awards manually. Its just the autoaward aspect that is the issue.

i appreciate your efforts on this very much!


I believe I may have found a fix, but I can't be for certain.

Go to:
[code:1]
\components\com_comprofiler\plugin\user\plug_autoawards
[/code:1]
Open cb.autoawardstab.php

Locate line: 22
[code:1]
global $database, $_CB_framework;
[/code:1]

Change it to:
[code:1]
global $database, $_CB_framework, $user;
[/code:1]

This MIGHT remedy the issue, but I can't be for certain as I still use 1.0 and not 1.5 so I really have no idea how well it'll function in 1.5 if at all.

I've got 1 other solution in mind, but give this a whirl first and let me know how it goes.

sunnyjey wrote:

This is absolutely fantastic plugin for which I was waiting for so long.

Thank you making it available for community.

Is it possible to award if certain user is a member of certain Group of GroupJive? I really need this extended functionality.

Thanks, yes it's possible to add that for groupjive. You can add it manually by inspecting the plugin. All you need to do is setup the query, which is fairly easy to do.

I can probably get that put together for you here shortly.

Post edited by: krileon, at: 2008/10/05 23:18


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • sunnyjey
  • sunnyjey
  • OFFLINE
  • Posts: 41
  • Thanks: 0
  • Karma: 4
16 years 1 month ago #76458 by sunnyjey
Replied by sunnyjey on topic Re:Plugin - jAwards AutoReward
Thank you Piersol for an instant prompt reply.

Frankly speaking I am not that good in sql and database. Secondly I afraid if i do some tweaking from my side it might result in some errors in database.

I would rather prefer to wait for this additional functionality from you.:)

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
16 years 1 month ago #76459 by krileon
Replied by krileon on topic Re:Plugin - jAwards AutoReward
sunnyjey wrote:

Thank you Krileon for an instant prompt reply.

Frankly speaking I am not that good in sql and database. Secondly I afraid if i do some tweaking from my side it might result in some errors in database.

I would rather prefer to wait for this additional functionality from you.:)


Ya put the wrong name so I fixed it for ya, lol.

Anyway it's done. You'll just need to manually add it. Follow the instructions I'm about to provide and you'll have it going in no time.

Navigate to:
[code:1]
\components\com_comprofiler\plugin\user\plug_autoawards
[/code:1]

Open:
cb.autoawardstab.php

Locate Line: 408
After } press enter to create a blank line
Paste in:
[code:1]
//Groupjive Group
if ($params->get('groupjivegroup','0') == 0) {
$query = 'SELECT id_group FROM #__gj_users WHERE id_user = '.$user->id.' AND name = '.$params->get('gjgroup','').' AND status = "active"';
$database->setQuery($query);
$gjgUserDetails=$database->loadResultArray();
$isBelong=count($gjgUserDetails);
if ($isBelong>=1) {
$gjggive = $params->get('gjg1id',''); $gjgreason = $params->get('gjg1reason','');
$query = "SELECT userid,award FROM #__jawards_awards WHERE award='".$gjggive."' AND userid=".$user->id;
$database->setQuery($query);
$check=$database->loadObjectList();
if (count($check)==0) {
getAutoAwardsTab::AddAwards(
$user->id
,$gjggive
,$gjgreason
);
}
}
}
[/code:1]

Save & Close

Open:
cb.autoawardstab.xml

Locate line: 247
After /> press enter to create a blank line
Paste in:
[code:1]
<param name="@spacer" type="spacer" default="" label="" description="" />
<param name="groupjivegroup" type="radio" default='1' label="Groupjive Group" description="Grants users awards for joining a specific group.">
<option value='0'>On</option>
<option value='1'>Off</option>
</param>
<param name="gjg1id" type="text" size="5" default="" label="ID 1" description="" />
<param name="gjg1reason" type="text" size="50" default="" label="Reason" description="" />
<param name="gjgroup" type="text" size="20" default="" label="Group" description="Name of group the user must join for award. MUST BE EXACT!" />
[/code:1]

Now visit your plugins settings and it should be there.

Post edited by: krileon, at: 2008/10/05 23:34


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • sunnyjey
  • sunnyjey
  • OFFLINE
  • Posts: 41
  • Thanks: 0
  • Karma: 4
16 years 1 month ago #76463 by sunnyjey
Replied by sunnyjey on topic Re:Plugin - jAwards AutoReward
Sorry for the name mistake!

Krileon, I have tried (twice thats why took so much time to reply) exactly what you mentioned in previous post. But getting following error whn i open autoaward plugin-

Parse error: syntax error, unexpected T_IF, expecting T_FUNCTION in domain/public_html/components/com_comprofiler/plugin/user/plug_autoawards/cb.autoawardstab.php on line 408

Somewher I am going wrong. Krileon, can you upload updated plugin here so that others will also get benefited with.

Post edited by: sunnyjey, at: 2008/10/06 00:29

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
16 years 1 month ago #76468 by krileon
Replied by krileon on topic Re:Plugin - jAwards AutoReward
sunnyjey wrote:

Sorry for the name mistake!

Krileon, I have tried (twice thats why took so much time to reply) exactly what you mentioned in previous post. But getting following error whn i open autoaward plugin-

Parse error: syntax error, unexpected T_IF, expecting T_FUNCTION in domain/public_html/components/com_comprofiler/plugin/user/plug_autoawards/cb.autoawardstab.php on line 408

Somewher I am going wrong. Krileon, can you upload updated plugin here so that others will also get benefited with.

Post edited by: sunnyjey, at: 2008/10/06 00:29


Here you go.

You do not have to reinstall either. You can simply unpack the files and replace your current plugin with the updated one. You'll then see the new fields as well as enable/disable capability for Groupjive Group. You'll find this under the Groupjive awards.

I've added other updates to the plugin as well so be sure to check them out.

The changes I've also made are: You can now select to enable/disable just posts or just karma or both for fireboard. You can now also enable/disable just mods or just admins or both awards.

The groupjive group award is only designed to grant an award for ONE group. Hopefully ya pick wisely as I do not plan to add multiple groups.

Enjoy. I've tested and debugged. All works as it should.

Attachment plug_autoawards_v3.zip not found



Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Attachments:

Please Log in or Create an account to join the conversation.

  • piersol
  • piersol
  • OFFLINE
  • Posts: 36
  • Thanks: 0
  • Karma: 5
16 years 1 month ago #76508 by piersol
Replied by piersol on topic Re:Plugin - jAwards AutoReward
i updated to the V3. I also changed [code:1]global $database, $_CB_framework, $user;[/code:1]

on line 22 as you recommended.

With cid of 1 and group level of Author, it still does not award awards in 1.54.

You mentioned one other idea to try, can we give that one a shot?

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum