- Moderated by:
- Support Team
-
- rank:
-
Helper
- registered:
- July 2004
- Status:
- offline
- last visit:
- 17.06.07
- Posts:
- 175
I am wondering if it is possible to set up a permission so that unregistered people can view the link of the title to the artilce and then when they click on the link have a notice that says you must register to view this article.
see my site http://bettermyhealthtoday.com/index.php?name=Sections&req=listarticles&secid=3
I would like people to be able to get to this list of articles but have to register in order to click on the link. Can anyone help???
--
http://www.bettermyhealthtoday.com -
- rank:
-
Professional
- registered:
- March 2003
- Status:
- offline
- last visit:
- 19.11.08
- Posts:
- 901
I have never used sections before, but in permissions
Unregistered | Sections:: | Article:: | none
- Igor
--
Have a nice day
zikulapro.be is currently running
Zikula 1.0.2 -
- rank:
-
Helper
- registered:
- July 2004
- Status:
- offline
- last visit:
- 17.06.07
- Posts:
- 175
It still allows people to click on it...here are my permissions
Admins .* .* Admin
2 All groups Menublock:: Main Menu:Administration: None
3 Users .* .* Comment
4 Unregistered Menublock:: Main Menu:(My Account|Logout|Submit News): None
5 Unregistered Sections:: Article:: None
6 Unregistered .* .* Read
http://www.bettermyhealtoday.com
--
http://www.bettermyhealthtoday.com -
- rank:
-
Professional
- registered:
- March 2003
- Status:
- offline
- last visit:
- 19.11.08
- Posts:
- 901
How about this:
Unregistered | Sections::Article | .* | None
- Igor
--
Have a nice day
zikulapro.be is currently running
Zikula 1.0.2 -
- rank:
-
Helper
- registered:
- July 2004
- Status:
- offline
- last visit:
- 17.06.07
- Posts:
- 175
Nope. That completely takes away the links to the artile so then it looks like there are no artilces in that section at all.
I need to have the link to the title there so it intices someone to click on the link and read the article. Then once they want to read it the site forces them to register.
You know what i mean?
--
http://www.bettermyhealthtoday.com -
- rank:
-
Professional
- registered:
- March 2003
- Status:
- offline
- last visit:
- 19.11.08
- Posts:
- 901
Yes, I do... unfortunately I have no solution with the permissions system.
If it were me, I'd look in the source files and use the
Code
if (pnUserLoggedIn()) { }
in the function viewarticle()
- Igor
--
Have a nice day
zikulapro.be is currently running
Zikula 1.0.2 -
- rank:
-
Helper
- registered:
- July 2004
- Status:
- offline
- last visit:
- 17.06.07
- Posts:
- 175
OK, I did this and it didn't work. Did I do it right?
function viewarticle()
{
if (pnUserLoggedIn()) { }
list($artid,
$page,
$allpages) = pnVarCleanFromInput('artid',
'page',
'allpages');
--
http://www.bettermyhealthtoday.com -
- rank:
-
Professional
- registered:
- March 2003
- Status:
- offline
- last visit:
- 19.11.08
- Posts:
- 901
Not exactly, however, since I don't have experience with the sections module, I suggest you first make a backup of the file [you never know], but how about following code:
Code
function viewarticle()
{
if (pnUserLoggedIn()) {
list($artid,
$page,
$allpages) = pnVarCleanFromInput('artid',
'page',
'allpages');
} else {
pnRedirect('user.php');
}
}
Or if someone knows the perm order for sections... feel free to jump in
- Igor
--
Have a nice day
zikulapro.be is currently running
Zikula 1.0.2
