×
Kunena 5.1.18 Released (30 Jun 2020)

The Kunena team has announce the arrival of Kunena 5.1.18 [K 5.1.18] which is now available for download as a native Joomla extension for J! 3.9.x. This version addresses most of the issues that were discovered in K 5.1 and issues discovered during the development stages of K 5.1.

Question Kunena Integration with AUP + Jomsocial at the same time

More
9 years 6 months ago #11 by grandslamjmh
well i guess ill remove the acl i have installed and try out the artof users one.

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

More
9 years 5 months ago - 8 years 10 months ago #12 by clairestrife
This is a litte hack which made by me, only showing AUP on kunena user profile with jomsocial integration on.

Log on to your back-end -> Go to kunena configuration -> Integration -> set Activity Notifications to Jomsocial

open profile.vertical.php on your website root -> components -> com_kunena -> template -> default -> view.

find code
<?php defined ( '_JEXEC' ) or die ();
 
if (!isset($this->showUnusedSocial)) $this->showUnusedSocial = false; ?>

bellow this code insert this code
<?php 
	$userid = intval($this->profile->userid);
	$query = "SELECT points FROM #__alpha_userpoints WHERE userid = " . $userid ;
	$db =& JFactory::getDBO();
	$db->setQuery( $query );
	$myPoints = $db->loadObject();
?>

so it will become like this
<?php defined ( '_JEXEC' ) or die (); 
if (!isset($this->showUnusedSocial)) $this->showUnusedSocial = false; 
?>
 
<?php 
	$userid = intval($this->profile->userid);
	$query = "SELECT points FROM jos_alpha_userpoints WHERE userid = " . $userid ;
	$db =& JFactory::getDBO();
	$db->setQuery( $query );
	$myPoints = $db->loadObject();
?>

then find this code
<?php if ($this->userpoints) : ?>
<span class="kpost-userposts"><?php echo JText::_('COM_KUNENA_AUP_POINTS') . intval($this->userpoints); ?></span>
<?php endif ?>

and replace it with this
<li class="kpost-userposts">
<?php echo JText::_('COM_KUNENA_AUP_POINTS') ?> 
<?php echo $myPoints->points; ?></li>

This method will show activity stream and AUP on kunena profile.;)
Last edit: 8 years 10 months ago by clairestrife.
The following user(s) said Thank You: AbleGamers

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

More
9 years 4 months ago #13 by AbleGamers
If I read the "hack" correctly you will show the AUP points in the forum, and that is cool, but will it award the points in AUP for creating and reply'ing to a post?

I do not see where it would do that.

I want to use JomSocial Activity stream because it is nicer, but I want the points in AUP for forum use.

Thanks!

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

More
9 years 4 months ago - 9 years 4 months ago #14 by clairestrife
Ups, my bad. Sorry. I still can't find that method. I will try to find the method or please wait until someone hack it completely .... :)
Last edit: 9 years 4 months ago by clairestrife.
The following user(s) said Thank You: AbleGamers

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

More
9 years 4 months ago #15 by AbleGamers
I think I found the method, it is in administrator/components/com_kunena/libraries/integration/

but from there I am lost. I suspect you would need to add the AUP call to the JomSocial call as well.

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

More
9 years 4 months ago #16 by clairestrife
yes, i think it's possible to merged both activity.php between Jomsocial and AUP.
I will do some more experiment. :)

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

More
9 years 4 months ago #17 by grandslamjmh

clairestrife wrote: yes, i think it's possible to merged both activity.php between Jomsocial and AUP.
I will do some more experiment. :)


Going to be more complicated than just copying code from one activity.php to another. Already tested that..

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

More
9 years 4 months ago - 9 years 4 months ago #18 by clairestrife
huft, this experiment really made me dizzy... :blink: but i'm glad it finally works :laugh:

since the hack code is too long, i wont write it here since it will be spamming this thread. :P

So i attached this file, to made it works, simply replace the activity.php on your website root -> administrator -> components -> com_kunena -> libraries -> integration -> jomsocial.

Enjoy my hack :P
use it at your own risk :P


File Attachment:

File Name: activity_2...2-19.zip
File Size:3 KB
Attachments:
Last edit: 9 years 4 months ago by clairestrife.
The following user(s) said Thank You: AbleGamers

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

More
9 years 4 months ago - 9 years 4 months ago #19 by grandslamjmh
Thanks. so in the code what did you really do?
Last edit: 9 years 4 months ago by grandslamjmh.

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

More
9 years 4 months ago - 9 years 4 months ago #20 by clairestrife
Just in case my hack not work, Please use the default kunena template and simply edit the AUP version on it ;)
Last edit: 9 years 4 months ago by clairestrife.

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

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.190 seconds