Kunena 6.4.8 Released

The Kunena team has announce the arrival of Kunena 6.4.8 [K 6.4.8] in stable which is now available for download as a native Joomla extension for J! 5.0.x/5.1.x/5.2.x/5.3.x/5.4.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 6.4
Important note: Go to the Kunena Dashboard after an upgrade so that the Kunena database tables are also updated. This is particularly necessary for major version jumps so that the table changes are adapted.

Question [SOLVED] How to add security to the Birthdate for guests?

More
14 years 7 months ago - 14 years 7 months ago #96688 by sozzled
I'm looking at the question

Cordel wrote:

In Kunena, when a user fills out his birthdate, it shows on the summary profile next to, or on top of his post depending on your configuration. I need this to not show for guest users.

In this case it makes no sense to modify the file ../administrator/components/com_kunena/libraries/user.php but, rather, you should modify the files that display these details. This would be ../components/com_kunena/template/view/profile.horizontal.php and ../components/com_kunena/template/view/profile.vertical.php. That gives you a place to start looking.

You need to add a test to line that reads
Code:
<?php echo $this->profile->profileIcon('birthdate'); ?>
Last edit: 14 years 7 months ago by sozzled.

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

More
14 years 7 months ago #96690 by Cordel
Thanks Migus that helps.

But I really need this to be in the backend, otherwise I'd have to many themes to modify which is why I'm looking at administrator/components/com_kunena/libraries/user.php as it would carry through all themes.
Allot of these folks downed themes and modified them so would be allot of work.... though maybe I can get payed good ;)

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

More
14 years 7 months ago - 14 years 7 months ago #96691 by Cordel
sozzled
It calls to the file that I listed that produces that Link.. already ahead of you. Thats why I listed it.
Smart enough to find it but ignorant enough that I can't figure out how to deal with it. :pinch:

Ideally it would be nice to pull from the option in Kunena config in the admin panel under the security tab "Allow Guests to see User Profiles" but any hack at this point would suffice. So I might just go ahead and start editing themes. I just thought if I was going to try, try to do it right and give it back.
Last edit: 14 years 7 months ago by Cordel.

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

More
14 years 7 months ago #96692 by sozzled
The PHP function to check if a user has logged-in or not (i.e. a "guest") is one of the following:

!KunenaFactory::getUser()->exists()

or

!JoomlaFactory::getUser()->id

I hope that helps.

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

More
14 years 7 months ago #96693 by migus

Cordel wrote: But I really need this to be in the backend

If you talk about self-made enhancement of Kunena backend - it's all the same only hack solution. Suppose it is good point for us to make feature request for next releases...

Altai Mountains - is a fairy tale!

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

More
14 years 7 months ago - 14 years 7 months ago #96695 by Cordel
BINGO!
Thank you sozzled. So I'll add this query into the function to create or not create the icons into the themes. Thats almost perfect! Then I'll query the database to check for the option of whether or not the config shows profiles to guests is true or not and put it together to make it appropriate!

As far a feature requests go, it would be to add this so that if option not to show profile to guests is true, then creation of birthdate Icon should be suppressed. And add to it the option to strip the Year off birthdays would be nice in the admin panel.

I'll see if I can figure a good way to word it and put in a feature request. I'll post the patch here of what I have done soon as I have it working on the test server.

Sozzled, is there an API listing somewhere I missed in the Kunena Wiki? How did you manage to find the Kunena function if I may ask so I don't have to ask on the forum dumb questions.

Cheers!
Last edit: 14 years 7 months ago by Cordel.

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

Time to create page: 0.331 seconds