Kunena 7.0.2 Released

The Kunena team has announce the arrival of Kunena 7.0.2 [K 7.0.2] in stable which is now available for download as a native Joomla extension for J! 5.3.x/5.4.x/6.0.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 7.0

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

This category may also contain a few topics relating to K 1.6 that may have been moved here possibly by mistake.

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

Question Prevent View of Messages

More
16 years 8 months ago #24206 by milgaz
Hi,

I want to prevent guests from viewing the messages but also keep them to see the category and the message title. Actually, a guest should see only the titles. How do I do this?

Thanks..

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

More
16 years 8 months ago - 16 years 8 months ago #24217 by sozzled
Replied by sozzled on topic Re:Prevent View of Messages
This is not possible with the standard, out-of-the-box Kunena. You would have to alter the way that Kunena operates. Do you have examples of other forum software where these features are available?
Last edit: 16 years 8 months ago by sozzled.

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

More
16 years 8 months ago #24220 by milgaz
Replied by milgaz on topic Re:Prevent View of Messages
yes, for example, I saw it in a turkish web site based on vbulletin.

www.medikalforum.net

I think I have to change the "view.php" in kunena and insert something like that:

$user =& JFactory::getUser();
if ($user->get('guest')) {
echo "You should register to see the content of this message";
}
else {
....(the code that is present in kunena)......


The problem is that I could not find where to place this piece of code.

Actually, another way may be this:

When you view a message as "guest", you can also see the "forum tools" on the right. If you click on "post new topic" as "guest", you get a message that you should register. I want exactly this to happen in my case.

Thanks for interest..

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

More
16 years 8 months ago - 16 years 8 months ago #24250 by @quila
Replied by @quila on topic Re:Prevent View of Messages
Hi milgaz,

there is a more ways to do this, just a quick two.

1). open the file kunena.php line 579, in this way the Guest can't see the page of the message.

/components/com_kunena/

change this
Code:
###################################################################### case 'view': if (file_exists(KUNENA_ABSTMPLTPATH . '/view.php')) { include (KUNENA_ABSTMPLTPATH . '/view.php'); } else { include (KUNENA_PATH_TEMPLATE_DEFAULT .DS. 'view.php'); } break; #######################################################################
with this
Code:
###################################################################### case 'view': $hidemessage='You should register to see the content of this message'; if ($kunena_my->get('guest')) { echo '<h1>'.$hidemessage.'</h1>'; } else { if (file_exists(KUNENA_ABSTMPLTPATH . '/view.php')) { include (KUNENA_ABSTMPLTPATH . '/view.php'); } else { include (KUNENA_PATH_TEMPLATE_DEFAULT .DS. 'view.php'); } } break; #######################################################################

2). open the file message.php line 100, in this way the Guest see all post except the content.

/components/com_kunena/template/default_ex/

changr this
Code:
<div class = "msgtext"><?php echo $msg_text; ?></div>
with this
Code:
<div class = "msgtext"> <?php $hidemessage='You should register to see the content of this message'; if ($kunena_my->get('guest')) { echo '<h1>'.$hidemessage.'</h1>'; } else { echo $msg_text; } ?> </div>

Hope this helps.

Regards
Last edit: 16 years 8 months ago by @quila.

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

More
16 years 8 months ago - 16 years 8 months ago #24251 by @quila
Replied by @quila on topic Re:Prevent View of Messages
milgaz wrote:

Actually, another way may be this:

When you view a message as "guest", you can also see the "forum tools" on the right. If you click on "post new topic" as "guest", you get a message that you should register. I want exactly this to happen in my case.


Hi again,
for this try the file in attachment and let me know if work.

Regards

File Attachment:

File Name: REDIRECT_LOGIN.zip
File Size:33.9 KB
Last edit: 16 years 8 months ago by @quila.

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

More
16 years 8 months ago #24258 by milgaz
Replied by milgaz on topic Re:Prevent View of Messages
Thanks in advance Moderator.

I have tried your first simple suggestion and it worked. The problem now is that when onmouseover the message title, the content can be viewed. I get rid of this by changing flat.php line 236:

<?php echo CKunenaLink::GetThreadLink('view', $leaf->catid, $leaf->id, kunena_htmlspecialchars(stripslashes($leaf->subject)), kunena_htmlspecialchars(stripslashes($messagetext[$leaf->id])) , 'follow', 'fb-topic-title fbm');?>

to

<?php echo CKunenaLink::GetThreadLink('view', $leaf->catid, $leaf->id, kunena_htmlspecialchars(stripslashes($leaf->subject)), kunena_htmlspecialchars(stripslashes($leaf->subject)), 'follow', 'fb-topic-title fbm');?>

Now, when onmouseover the message title, it shows message title.

Should I make any other changes?

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

Time to create page: 0.326 seconds