cotonti.com : Password-protect Category [Solved] https://www.cotonti.com Son konu mesajları Cotonti en Fri, 28 Nov 2025 03:55:47 -0000 aiwass # tensh : I'm working on a project where one user needs two levels of access. It means that by login in he has regular Cotonti rights to view come categories (not viewed by guests), but to access another category, another password is needed. One user name represents one group of people, so multiple people will log in to on user name, but only group's chief will have access to higher level of access.

It's a very custom implementation anyway.

No shit, sounds complicated. Wasn't there a plugin that allowed users to be part of 2 group levels in this forum ? Maybe that one can help you on your quest !?!

Otherwise you can achieve this by a simple .htaccess file if you run a parallel system in another /catalog. It might be a quick and fairly dirty solution. :)]]>
Çrş, 22 Nis 2009 23:05:57 -0000
tensh
It's a very custom implementation anyway.]]>
Çrş, 22 Nis 2009 14:23:08 -0000
aiwass
I have, however a similar section on my website called list.php?c=tutorials and this section is for members only and to protect that against any other which is not a member, just add rights for members to view and no guests. This applies for RSS aswell.

To see what i'm talking about :
http://www.megamind.dk/temporary/rss.php?c=tutorials (Blank !)
http://www.megamind.dk/temporary/list.php?c=tutorials

Why make something that you can easily protect with setting rights for different groups in the Admin portion of the website ?]]>
Sal, 21 Nis 2009 23:42:56 -0000
tensh $res = sed_sql_query("SELECT * FROM $db_structure"); while($row = mysql_fetch_assoc($res)) if ($c==$row['structure_code']) { $category_path = $row['structure_path']; } if($category_path==2) { blabla... }
By now I entered just "2", but the plugin is not finished. Gonna add Plugin configuration entries.
Also, RSS feeds are not protected, I'm not sure how to do this. Hack rss.php? :P Or create a plugin for RSS? I will see.]]>
Sal, 21 Nis 2009 22:14:25 -0000
pieter Sal, 21 Nis 2009 22:06:15 -0000 tensh
IF category ID = (my variable) THEN { ... } or:
IF category NAME = (my variable) THEN { ... }

Just I don't know Cotonti functions that well.

Is it "$category['id']" or something...?

Ok, found it out eventually. problem solved.]]>
Sal, 21 Nis 2009 20:12:35 -0000
Kort Sal, 21 Nis 2009 20:08:27 -0000 tensh
Is there a possibility to separately password-protect a Category using a plugin? Maybe this can be done at least based on plugin "adminlogin"? I need a fast answer.

Thanks in advance :)

OK, I nearly got it, just need small tip:

How to make this script execute only in list.php?c=myname and not in all categories? Currently it asks for password in all categories. I need an "if" statement like "IF category ID = something THEN", but I'm new to Sed and Cotonti plugins and don't know Cotonti functions that well.

Hello? :) Any help?]]>
Sal, 21 Nis 2009 18:37:08 -0000