Go Back   Pligg Forum > Pligg Development > Pligg Mods
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-19-2008, 03:40 PM
ddluk ddluk is offline
Casual Pligger
 
Join Date: Feb 2008
Posts: 33
Downloads: 17
Uploads: 0
Thanks: 3
Thanked 13 Times in 6 Posts
Category only for registered and ...

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.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-16-2008, 11:25 AM
abraxas's Avatar
abraxas abraxas is offline
Pligg Donor
Pligg Version: Plig
Pligg Template: b-Ice
 
Join Date: Feb 2008
Location: Boulder county, CO.
Posts: 101
Downloads: 28
Uploads: 0
Thanks: 24
Thanked 1 Time in 1 Post
I'd like to find something similar.

I understand that Joomla does this, but I've invested so much work into my Pligg-based site so far, I don't want to convert.
Reply With Quote
  #3 (permalink)  
Old 07-16-2008, 07:06 PM
grusha's Avatar
grusha grusha is offline
Constant Pligger
 
Join Date: Jul 2007
Posts: 105
Downloads: 53
Uploads: 2
Thanks: 2
Thanked 28 Times in 16 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 Images
File Type: jpg pligg_18.jpg (32.0 KB, 5 views - Who Downloaded?)
__________________
PliggTemplates.eu is the most popular Pligg Templates Club.

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



Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Help-how to add sub-categories? huangweiqiu General Help 3 08-07-2008 01:12 AM
pligg 9.8.2 Categories 100% Bug! bbrian017 Bug Report 12 07-18-2008 01:38 AM
Control of meta description - categories Divisive Cotton Suggestions 57 05-04-2008 09:23 PM
bold the main category, but unbold the subcategory? abcdefgary Pligg Templates 11 01-28-2008 04:15 PM
[Fixed] Ampersand (&) in Category name shows All Biomech Bug Report 5 03-16-2007 06:02 PM


LinkBacks Enabled by vBSEO 3.0.0