Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Jreviews => CB Activity Stream

  • Roland
  • Roland
  • OFFLINE
  • Posts: 161
  • Thanks: 16
  • Karma: 11
11 years 7 months ago #224058 by Roland
Jreviews => CB Activity Stream was created by Roland
Hello,

I hired a freelancer to write a Jreviews-CB-Activity-Stream plugin.

At the moment the titles are working: test30.simple-quality.de/

At the moment we are fighting to get more information in the content. Any hints how to get it?

I have looked in the database and there are a field "message" for that. But how did I get a message box (<div class="activityItemContentTitle"><h5>) like the kunena plugin?

Greetings, Roland

www.simple-quality.de - The Quality-Web-Portal

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 7 months ago #224071 by krileon
Replied by krileon on topic Jreviews => CB Activity Stream
That's just the message variable. Kunena has custom message output though that's done through API. I'm not sure how you're developer is implemented jReviews support, but it all should be done through CB triggers. Please see the below.

Trigger: activity_addActivity
Purpose: Adds new activity to the database
Variables: $userId, $type, $user, $subtype, $item, $from, $to, $title, $message, $icon, $class, $date

Trigger: activity_onBeforeAccess or activity_onAfterAccess
Purpose: Allows custom access permission checking for your custom activity (you unset its row if it fails)
Variables: &$rows, $plugin

Trigger: activity_onBeforeMessageDisplay or activity_onAfterMessageDisplay
Purpose: Allows custom message output for custom activity (as seen with GJ, Kunena, etc.. message display)
Variables: &$return, $row, &$cache, $user, $plugin

Using the above 3 triggers is all you should need to add new activity, determine if the current user can access it, and control its message display.


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.

  • Roland
  • Roland
  • OFFLINE
  • Posts: 161
  • Thanks: 16
  • Karma: 11
11 years 5 months ago - 11 years 5 months ago #227095 by Roland
Replied by Roland on topic Jreviews => CB Activity Stream
Hello,

as written before I hired a freelancer who should make a plugin that brings the Jreviews-news into the CB Activity Stream.

From Jreviews direction everything is working fine... But the freelancer always place the complete text including picture and so one in the header of the activity.
He wasn't willing to use CB Api or something else... After paying I don't get any help from him to move it in the right direction...

Could anyone help to finish the plugin.

Attached the actual state...
(components/com_jreviews/jreviews/plugins/)

Greetings, Roland

www.simple-quality.de - The Quality-Web-Portal
Attachments:
Last edit: 11 years 5 months ago by Roland.

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

  • Roland
  • Roland
  • OFFLINE
  • Posts: 161
  • Thanks: 16
  • Karma: 11
11 years 5 months ago #227379 by Roland
Replied by Roland on topic Jreviews => CB Activity Stream
Here a answer from Alejandro (Developer of JReviews) after asking him which way is the best:

I don't know what's better, but either way it should be implemented in a way that provides the same result as if you were using the CB API. I see this code was used to insert the activities:

$title=addslashes($act->title);
$db= &JFactory::getDBO();
$sql="INSERT INTO #__comprofiler_plugin_activity (`user_id`, user, `type`, `subtype`, `item`, `from`, `to`, `title`, `icon`,`date`) VALUES ('{$actor}','{$target}','jreviews','{$subtype}',NULL,NULL,NULL,'{$title}','pencil',now())";
$db->setQuery($sql);
$db->query();

I don't know if there's a 'content' column in the CB activities table and it wasn't included if the 'item' column represents the content of the activity. Maybe it was easier to do this than figure out how to run the CB API triggers, but again whichever way is used if the CB API has an option to post the content separately then that's how it should be done if you also want this result.


www.simple-quality.de - The Quality-Web-Portal

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #227424 by krileon
Replied by krileon on topic Jreviews => CB Activity Stream
API method is best, but direct database inserts will work perfectly fine. You won't have access control or message display control without using the triggers provided in my previous reply though. Message display can at least be hardcoded without the trigger by altering the template files, but access can't unless you edit core files.


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.

  • Roland
  • Roland
  • OFFLINE
  • Posts: 161
  • Thanks: 16
  • Karma: 11
11 years 4 months ago - 11 years 4 months ago #228616 by Roland
Replied by Roland on topic Jreviews => CB Activity Stream
Hello together,

attached the Jreviews-Plugin for CB Activity Stream.

Just unpack and copy to the correct folder.

Where could be an issue with the time... Just check it.

Some example how it looks like:

New Review, photo, document:


New listing:


Greetings, Roland

www.simple-quality.de - The Quality-Web-Portal
Attachments:
Last edit: 11 years 4 months ago by Roland.
The following user(s) said Thank You: beat, nant, krileon, pepperstreet

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

Moderators: beatnantkrileon
Powered by Kunena Forum