- Posts: 91
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Registred content AND public content display in same publico
Registred content AND public content display in same publico
- STEPHAN HERBY
-
Topic Author
- Offline
- Premium Member
Less
More
9 years 7 months ago #147733
by STEPHAN HERBY
Registred content AND public content display in same publico was created by STEPHAN HERBY
Hi,
I have a K2 installed with 2 categories :
Category A - For public
Category B - For registred users
If I create a K2ContentModule to display both categories, Cat B items will be shown only if user is registred AND connected.
I need to have both categories display even if user is public, even if he clic on a title and the loggin page will be display...
Is that something possible ?
Thanks for any suggestion...
I have a K2 installed with 2 categories :
Category A - For public
Category B - For registred users
If I create a K2ContentModule to display both categories, Cat B items will be shown only if user is registred AND connected.
I need to have both categories display even if user is public, even if he clic on a title and the loggin page will be display...
Is that something possible ?
Thanks for any suggestion...
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 7 months ago #147738
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Registred content AND public content display in same publico
Hmm you could manually restrict the access in the template.
By bypassing Joomla!'s ACL you are able to show these items everywhere and perform the user group check directly in the item.php file.
By bypassing Joomla!'s ACL you are able to show these items everywhere and perform the user group check directly in the item.php file.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- STEPHAN HERBY
-
Topic Author
- Offline
- Premium Member
Less
More
- Posts: 91
9 years 2 months ago - 9 years 2 months ago #150962
by STEPHAN HERBY
Replied by STEPHAN HERBY on topic Registred content AND public content display in same publico
OK, here I am 4 months later with that problem...
The only solution I found for this is to hack the helper.php file in modules > mod_k2_content
I took the line 121 (K2 V 2.6.9) :and wrote it in :
That's now working for me.
I know that this is NOT an override, so I have the be careful with an update. But I also know that the next version will probably be brand V3.0 ok K2, so... :¬p
What I wonder is:
is my website still secure after that hack?
Any advice will be welcome... Tks in advance.
The only solution I found for this is to hack the helper.php file in modules > mod_k2_content
I took the line 121 (K2 V 2.6.9) :
$query .= " WHERE i.published = 1 AND i.access IN(".implode(',', $user->getAuthorisedViewLevels()).") AND i.trash = 0 AND c.published = 1 AND c.access IN(".implode(',', $user->getAuthorisedViewLevels()).") AND c.trash = 0";
$query .= " WHERE i.published = 1 AND i.trash = 0 AND c.published = 1 AND c.trash = 0";
That's now working for me.
I know that this is NOT an override, so I have the be careful with an update. But I also know that the next version will probably be brand V3.0 ok K2, so... :¬p
What I wonder is:
is my website still secure after that hack?
Any advice will be welcome... Tks in advance.
Last edit: 9 years 2 months ago by STEPHAN HERBY.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 2 months ago #150978
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Registred content AND public content display in same publico
You already have the code posted here as a backup so you will be ok.
There will 2.7 as well for existing sites in Joomla! 1.5 and 2.5 and the ones using too many 3rd party extensions.
There will 2.7 as well for existing sites in Joomla! 1.5 and 2.5 and the ones using too many 3rd party extensions.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Registred content AND public content display in same publico