×
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 Jawards

More
11 years 3 months ago #1 by sanderson
Jawards was created by sanderson
Yes i know there is a post about this..

I have just upgraded my fireboard but i can not integrate the Jawards hack to display under the avatar, any help?

I need to display 6 random awards under the avatar, if someone can let me know how to auto assign medals depending on amount of posts etc that would be good!

Thank you!

P.S it doesn't have to be Jawards if you can point me to something better.

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

More
11 years 3 months ago #2 by sanderson
Replied by sanderson on topic Re:Jawards
No body? :(

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

More
11 years 3 months ago #3 by squale
Replied by squale on topic Re:Jawards
here is the code i've inserted in message.php, working fine in my kunena forum :)

<?php
                    // Hack for jAwards integration, displays some medals of the user
                    $number_medals = 3;  // number of medals to show
                    $query = "SELECT b.image, b.name"
				. "\n FROM #__jawards_awards AS a"
				. "\n LEFT JOIN #__jawards_medals AS b ON b.id = a.award"
				. "\n WHERE a.userid=". $fmessage->userid
				. "\n ORDER BY RAND() LIMIT ".$number_medals;
 
		    $database->setQuery( $query );
                    $medals = $database->loadObjectList();
 
                    // URL links to the jAwards-Tab for Community Builder which displays all
                    // medals of the user - change to another URL of needed
                    $awards_url=sefRelToAbs('index.php?option=com_comprofiler&task=userProfile&user='.$fmessage->userid."&tab=getawardstab");
 
                    // CSS-class "ja_medals" allows individual styling of medal images and
                    // container. "nobr" keeps the medals from breaking apart, display them 
                    // in one row.
                    $msg_jawards = "<div class=\"ja_medals\"><nobr>";
	            foreach ($medals as $medal){
			$msg_jawards.= "<a href=\"$awards_url\" title=\"$medal->name (Click to see more)\">" 
				. "<img style='border:0px;padding:0px;' src=\"".KUNENA_JLIVEURL."/images/medals/".$medal->image ."\" alt=\"".$medal->name."\" />"
				. "</a>";	
		    }
 
		    $msg_jawards.="</nobr></div>";
		    unset($medals);
		    echo $msg_jawards;
 
				?>

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

More
11 years 3 months ago #4 by sanderson
Replied by sanderson on topic Re:Jawards
FANTASTIC! that one works.. :lol: thank you for your help!

Does anyone know how to display the badges in the Kunena profile rather than the community builder? or how to intergrate with something like jomsocial??

Thank you so much!

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

More
11 years 3 months ago #5 by cgicon
Replied by cgicon on topic Re:Jawards
THANK YOU!!!!!!!!!!

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

More
11 years 3 months ago #6 by sanderson
Replied by sanderson on topic Re:Jawards
Why won't this work in the userinfos.php? :unsure:

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

More
11 years 2 months ago #7 by holas84
Replied by holas84 on topic Re:Jawards
I just wanted to say thanks for the help here and I wanted to show off a screen shot of the integrated version on my site. I set up military ribbons as awards for various things and they look really nice...in my opinion, at least. Here you go:

Attachments:

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

More
11 years 2 months ago #8 by sozzled
Replied by sozzled on topic Re:Jawards
Thanks, holas84. Your "awards system" looks quite cool. Thanks for sharing with us. B)

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

More
10 years 9 months ago #9 by Dade
Replied by Dade on topic Re:Jawards
It is not strictly the correct place to ask this, but there is anyhow I can do the same with GroupJive?

Maybe using only one image - in case user is on more than one group.

Thanks in advance!

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

More
9 years 10 months ago #10 by squale
Replied by squale on topic Re:Jawards
up :)

since upgrade to kunena 1.6, jawards integration doesn't work... a solution please ?

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