×
Kunena 6.0.8 Released (17 Jan 2023)

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

Question AUP Rank Image in Post

More
13 years 2 months ago #1 by mjanzen128
I would like to show the rank image from AUP instead of the standard Kunena posting rank. So far, im using the following code in Kunena to show total points in message.php.
<?php
$database->setQuery("SELECT points FROM jos_alpha_userpoints WHERE userid = " . $fmessage->userid) ;

echo $database->loadResult();
?>

What could I use along those lines to show the AUP Rank image underneath the points total in Kunena?
The following user(s) said Thank You: nzy182

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

More
13 years 2 months ago #2 by xillibit
Replied by xillibit on topic Re:AUP Rank Image in Post
Hello,

The integration of AUP is in Kunena 1.5.7, i haven't tried this specific point so i can't tell if this works, but you can asked by PM the RC3 of kunena 1.5.7 for testing purposes.

I don't provide support by PM, because this can be useful for someone else.

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

More
13 years 2 months ago #3 by mjanzen128
Thanks a ton! I was experimenting today and I figured out a way anyway using
<?php
$database->setQuery("SELECT image FROM jos_alpha_userpoints_levelrank WHERE id = ( SELECT levelrank FROM jos_alpha_userpoints WHERE userid = " . $fmessage->userid . ")");

echo "<img src=\"http://totalplaystudios.com/components/com_alphauserpoints/assets/images/awards/large/" . $database->loadResult() . "\" />";
?>
Works really nicely.

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

More
13 years 2 months ago #4 by basnet
Replied by basnet on topic Re:AUP Rank Image in Post
thats a great news. when will Kunena 1.5.7 be released?

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

More
13 years 2 months ago #5 by xillibit
Replied by xillibit on topic Re:AUP Rank Image in Post
Hello,

Kunena 1.5.7 is in RC3, i think that some bugs need to be fixed before the final release, but i can't give dates.

I don't provide support by PM, because this can be useful for someone else.

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

More
13 years 2 months ago #6 by basnet
Replied by basnet on topic Re:AUP Rank Image in Post
willing to wait if Kunena gets AUP rank image in post. thats makes the forum more desirable to users and more appalling.

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

More
13 years 2 months ago - 13 years 2 months ago #7 by Mortti
Replied by Mortti on topic Re:AUP Rank Image in Post

willing to wait if Kunena gets AUP rank image in post. thats makes the forum more desirable to users and more appalling.


Currently (Kunena 1.5.7 RC3) AUP rank image option is not integrated in upcoming Kunena.
Last edit: 13 years 2 months ago by Mortti.

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

More
12 years 3 months ago #8 by PAUSIMS
Replied by PAUSIMS on topic Re: AUP Rank Image in Post
I use Kunena 1.6 and I've been searching for about half an hour now and I can't figure out how to show the AlphaUserPoints rank image under the avatar in each post. As I see, there's an option in the backend called "Habilitar Puntos en el Perfil" (Allow points in profile) but it doesn't show anything.

Thanks in advance :)

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

More
12 years 3 months ago #9 by PAUSIMS
Replied by PAUSIMS on topic Re: AUP Rank Image in Post
Anyone? :( isn't it compatible the rank image with K1.6?

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

More
12 years 1 week ago - 12 years 1 week ago #10 by samanoqo
Hi

This is a simple hack made by me! I hope you like it!
using Kunena 1.6.2 and AlphaUserPoints 1.5.13

WARNING: BACKUP FIRST AND USE IT AT YOUR OWN RISK!!!

find and open this file:

http://www.yoursite.com/com_kunena/template/yourtemplate/view/profile.vertical.php

Find the line:
defined ( '_JEXEC' ) or die (); ?>

Right after the line insert this code
<?php // Call AUP Functions BEGIN ?>
       
<?php
$livesite = JURI::base();
$api_AUP = JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php';
	if ( file_exists($api_AUP))
	{
		require_once ($api_AUP);
		$userrankinfo = AlphaUserPointsHelper::getUserRank('', $this->profile->userid);
	}
	$rank = $userrankinfo->rank;
?>        

<?php // Call AUP Functions END ?>

This will call Alphauserpoints ranking functions.

Now find this line:
<?php echo $this->userrankimage ?>

Delete it (or comment it) and insert this code instead:
<?php if($rank !=NULL && $userrankinfo->image !=NULL)
	echo '<img src="'.$livesite.'components/com_alphauserpoints/assets/images/awards/large/'.$userrankinfo->image.'" alt="'.JText::_($userrankinfo->rank).'" />'; ?>

This will insert the image

Finally edit the style and the size of the image via your Kunena template css.


If you want to show the name of AlphUserPoints ranks instead of Kunena ranks (for example: silver member instead of Junior border) find this line:
<?php echo $this->escape($this->userranktitle) ?>

and change it to:
<?php echo $userrankinfo->rank; ?>

That's all ;)


Hope that someday the great Kunena team make this feature native... :)
Last edit: 12 years 1 week ago by samanoqo. Reason: fixing a bug ;-)

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.077 seconds