CG Blog with FEU - View Blogs by Group

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
beattie
Forum Members
Forum Members
Posts: 98
Joined: Sun Dec 21, 2008 11:35 pm

CG Blog with FEU - View Blogs by Group

Post by beattie »

Going round and round in circles on this one...

I created a simple non-commercial website for kids to create blogs, see the site here http://www.kidsblogs.com.au. I made it for my daughter and decided to share it with other parents. The idea being that parents can rest easy as the blogs are kept private and can only be viewed by the blog author. This was easy to do thanks to Calguys CGBlog, FrontEndUsers, SelfRegistration and Custom Content modules.

Now it seems that kids and parents like it so much that some have requested a 'group blog' where a family for instance (or maybe a classroom) can see all the blogs posted within their family group. Each member would have a different username but belong to the 'families' group. So when they view their 'family' group blog, they can see all the family's blog posts or filter the family's blogs by username. I guess I'm being daft but I just can't seem to work this out ???

This is how my templates are set up, any help would be very much appreciated.

Registration page:

Code: Select all

{cms_module module=SelfRegistration group=3to5}
(Currently I have 4 diferent age groups)

Login page:

Code: Select all

{if $ccuser->loggedin()}
You are already logged in. 
Take me to my blog.
{else} 
{cms_module module=FrontEndUsers form=login} 
{/if}
View blog - only the logged in user's posts are displayed:

Code: Select all

{capture assign='author'}{eval var=$ccuser->property('username')}
{/capture}

{CGBlog author="$author"}
I am assuming that I have to make a new group called 'families' or similar and have code something like

Code: Select all

 {if ($ccuser->memberof('families'))}
show all posts relating to this families group only
{/if} 
But I can't get this to work! any ideas?

System Information:
CMSMS 1.10.3
CGBlog 1.8.3
CGExtensions 1.28.1
CGFeedback 1.5.4
CGSimpleSmarty 1.5
CustomContent 1.8.2
FrontEndUsers 1.17.1
SelfRegistration 1.6.15
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: CG Blog with FEU - View Blogs by Group

Post by Dr.CSS »

I think you have too many ( ) in it..?

From CC Help...

{if $ccuser->memberof('members') && $ccuser->ipmatches('192.168.0.0/24')}
Welcome logged in local member
{elseif $ccuser->memberof('members')}
Welcome logged in member
{elseif $ccuser->loggedin()}
Welcome user from some other group
{else}
Anonymous user
{/if}
beattie
Forum Members
Forum Members
Posts: 98
Joined: Sun Dec 21, 2008 11:35 pm

Re: CG Blog with FEU - View Blogs by Group

Post by beattie »

Thanks for your reply and I think you are right, however that is not the root of the problem. I just don't know how to go about:

- getting users to sign up to a particular FEU group, e.g. 'famillies' group
- the first user creates a group name, e.g. 'The Jones Family'
- subsequent users sign up to the Jones Family group.
- only the Jones Family users can see their blogs.

Maybe one Jones Family member registers as The Jones Family and creates a list of users during sign up?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: CG Blog with FEU - View Blogs by Group

Post by Dr.CSS »

The group name has to be made in the admin, not the front end, before anyone can sign up for it...
beattie
Forum Members
Forum Members
Posts: 98
Joined: Sun Dec 21, 2008 11:35 pm

Re: CG Blog with FEU - View Blogs by Group

Post by beattie »

I realise that, and I have made a group name in the admin but I still can't get my head around how to organise it so that a series of users can sign up to a group name like 'families', but also be attributed to a family name which only they can login to. One family shouldn't be able to view the blogs of another family....
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: CG Blog with FEU - View Blogs by Group

Post by Dr.CSS »

Group: family1
username:email@something.com
password: xyz321

Group: family2
username:email@somethingelse.com
password: abc987

{if $ccuser->memberof('family1')}

{CGBlog category='family1'}

{elseif $ccuser->memberof('family2')}

{CGBlog category='family2'}

{/if}
beattie
Forum Members
Forum Members
Posts: 98
Joined: Sun Dec 21, 2008 11:35 pm

Re: CG Blog with FEU - View Blogs by Group

Post by beattie »

So I guess the bottom line is, can a user register their own group? otherwise if the groups are pre-determined by admin then it's not going to work...
Post Reply

Return to “Modules/Add-Ons”