Kunena 6.3.0 released
The Kunena team has announce the arrival of Kunena 6.3.0 [K 6.3.0] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x. This version addresses most of the issues that were discovered in K 6.2 and issues discovered during the last development stages of K 6.3
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 Kunena Hide Tags Hack Force Reply To View Hidden Content
What the hide hack does is for users who create post's on the forum using "Hide Tags" it quiries if they have replied or not to the topic yet before it grants them access to view the hidden content. (Brilliant little feature against leechers and content scrappers.), This shall also allow users to know what members are gaining access to the content they provide on the forum hence the fact other members have to reply to the topic to view the content.
This feature is being used in forums such as vBulletin, PHPBB, SMF, IPBoard and MyBB. But now it can also be featured in Kunena too :woohoo: !!
Feature list :
- Force reply to view hidden content of posts in a topic
- Choose to either reply to topic or click the Thanks button
- Set user post count requirement to view hidden contents. (
Part of the message is hidden for the guests. Please log in or register to see it.
It is very small and simple only one file needs to be edited.
site/components/com_kunena/lib/kunena.praser.php
kunena.praser.php (Lines : 1059 - 1074)
For those who are to lazy to locate the code just overwrite your kunena.praser.php at the following location site/components/com_kunena/lib/kunena.praser.php
(Extract the praser.php from the zip archive)
This file is for The force reply hack only :
This file contains all Features Force Reply, Click Thanks button hack feature, Set post count (
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.
Please Log in or Create an account to join the conversation.
@C0n
FYI: you should probably use static variable to cache the results as the query only needs to be run once. There's also better way to get current topic (parser is used also for categories, announcements and others), $this->parent contains a lot of useful information (just remember that it can be NULL!)
Please Log in or Create an account to join the conversation.
Also i think the user object was also already loaded in the praser.php
But thanks for the advice Matias i will study kunena a bit more and work on ways to improve this.
Please Log in or Create an account to join the conversation.
- radioactive
- Offline
- New Member
- Posts: 14
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Can you limit the SQL query to return only the first value:
$database->setQuery("SELECT thread FROM #__kunena_messages WHERE userid='$usr_id' AND thread='$lol'", 0, 1);
Makes it to run a bit faster on large topics.
Please Log in or Create an account to join the conversation.
- radioactive
- Offline
- New Member
- Posts: 14
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Make sure that is what your looking at before you edit / overwrite the code.
Also if you doubt it's ability to work it's live on one of my sites.
Part of the message is hidden for the guests. Please log in or register to see it.
Matias i added your snippet to the original post replacing the old MySQL query very nice.
I've uploaded a kunena.praser.php aswell so users who are doing something wrong can just overwrite the old file to save them searching through lines of code.
Please Log in or Create an account to join the conversation.
But i see in your attachment zip file on line 1057 its lost one character "i" before "f" = its must be " if "
Love Simplicty
read...... and learn........
My Joomla Test Site
Please Log in or Create an account to join the conversation.