Quote:
Originally Posted by ddluk I've trying to do some strange thing.I need a possibility to give people access to one category only when they are registered and about 18 years old. The best solution will be the field in profile with age o user, and if the age is above 18 then access will be given. I'm trying to do that all day but nothing happen. Could someone give me same help or solution? I'm sorry if I write in not good category. |
There are 2 possibilities.
1) Advansed Login.But one must also add new fields in the database, then check this fields......
2) 2 option I think the easiest...
Add special tag in your text story (example: <mytag>This text see only people above 18 years old</mytag>).
Then you can add a new feature in plugin/function.embedvideos.php
something like that
Text initially hidden, and then if the user agrees(I agree and I above 18 years old), then he will see the text.I recommend use Javascript.
Code:
$MyNewTag = '<div id="mydiv" style="display:none;">$1</div>' ;
// replace <mytag> tags with the mytag code
$displayed_story = preg_replace("/\<mytag\>(.+?)\<\/mytag\>/is", $MyNewTag , $displayed_story);
This is not working code, this only as an example
Sorry for my english.