View Single Post
  #3 (permalink)  
Old 07-16-2008, 08:06 PM
grusha's Avatar
grusha grusha is offline
Pligg Donor
 
Join Date: Jul 2007
Posts: 133
Thanks: 4
Thanked 30 Times in 18 Posts
Quote:
Originally Posted by ddluk View Post
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.
Attached Thumbnails
category-only-registered-pligg_18.jpg  
__________________
PliggTemplates.eu is the most popular Pligg Templates Club.

Last edited by grusha; 07-16-2008 at 08:19 PM..
Reply With Quote