Tuesday 18 July 2006 5:19:49 am
Hi, @Kristof: Thanks, i browsed the link you gave me and indeed it seems like what I want to do, on a core / PHP level. but I don't think I am so proficient or how will the performance impact be, so I think I'll opt for a template - level solution (see below)
@Fabricio: yes, this is somewhat similar to what I wanted to do, and actually I was thinking to move the check to the template level, instead of fiddling with roles etc. luckily the site is still very simple, for now. But I do not get this - if you let them buy the single number via the eZ shop, do they still manage to see it online when bought, or you let them download it instead of viewing it online? The client wants it to be always available online (the full view of the issue will also have the possibility to download it). I was thinking tonight of a solution, refined from what you both say. Let's have three different users. anonymous, subscribed for a time period, and prepaid users.
anonymous don't see anything. that's said for them.
those subscribed for a time period will have a date attribute signalling expiry. a cronjob will deactivate those users.
the prepaid users will only be able to watch those issues to which they have an object relation to. I'll write an extension with a frontend view which will allow users to subscribe to an issue, by adding an object relationship. the template will check if the current user has relationship to the currently viewed node and act accordingly. I think this could be the way to go ... but have to think a little about caching, and I do not know if it's a roboust enough security (e.g.how many templates do I have to insert that check into? full, print full, etc ........ I might forget something). What do you think of this? cheers, Max
|