Kunena 6.3.8 Released

The Kunena team has announce the arrival of Kunena 6.3.8 [K 6.3.8] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x/5.2.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 and issues discovered during the last development stages of K 6.3
Note: Please go to the Kunena Dashboard after an upgrade so that the Kunena database tables are also updated.

This category contains miscellaneous, uncategorised user contributions, (templates, modules, plugins and hacks) relating to older versions of Kunena that are no longer supported.

The topics in this category are for historical interest only. Owing to the structural changes that occurred in K 1.7, many of the ideas in these topics will not work with later versions and, for that reason, the topics are locked.

Question How to hide posts to unregistered member in K 1.7.2?

More
12 years 10 months ago - 12 years 10 months ago #1 by pocketer
I wanna do something like this



Visitor can only view the first post while the rest of the replies are hidden.

I was trying to get the first post in the code, but i couldn't find it.

Please help!
Attachments:
Last edit: 12 years 10 months ago by pocketer.

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

More
12 years 10 months ago #2 by sozzled
G'day, pocketer, and welcome to Kunena.

(1) The subject refers to K 1.6. K 1.6 is not supported. Please upgrade to K 1.7.2.

(2) Use the "hide" BBcode tag like this:


Part of the message is hidden for the guests. Please log in or register to see it.
The following user(s) said Thank You: pocketer

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

More
12 years 10 months ago - 12 years 10 months ago #3 by pocketer

sozzled wrote: G'day, pocketer, and welcome to Kunena.

(1) The subject refers to K 1.6. K 1.6 is not supported. Please upgrade to K 1.7.2.

(2) Use the "hide" BBcode tag like this:


Part of the message is hidden for the guests. Please log in or register to see it.


Hi, thanks for your reply.
I upgraded to K 1.7.2 just now. Is there other ways to do it other than using BBcode?
something like

Code:
$user =& JFactory::getUser(); if($user->get('guest') == 1) : ?> <div class="kmsgbody"> <div class="kmsgtext"> <-------------(for the rest of the replies) <?php echo "Please login or register" ?> </div> </div> <?php endif; ?> <?php if($user->get('guest') == 0) : ?> <div class="kmsgbody"> <div class="kmsgtext"> <---------------(only show 1st post) <?php echo ??? ?> <-------------(how to retrieve the 1st message?) </div> </div>

Because i want to apply it for all of the posts. Please advise!
Last edit: 12 years 10 months ago by pocketer.

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

More
12 years 10 months ago #4 by sozzled
You have three choices:

(1) Use the
Part of the message is hidden for the guests. Please log in or register to see it.

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

More
12 years 10 months ago #5 by pocketer
i figured it out already.
i added
Code:
if($message->parent >0){ $user =& JFactory::getUser(); if($user->get('guest') == 1){ $this->messageHtml = "....."; } }

Thanks anyway :)
The following user(s) said Thank You: C0n

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

  • C0n
  • C0n's Avatar
  • Offline
  • Premium Member
  • Only the strongest will survive
More
12 years 10 months ago #6 by C0n
Nice work like how to implimented the non messedge parent.

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

Time to create page: 0.394 seconds