Custom Content for a specific user ideas?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
climberusa
Forum Members
Forum Members
Posts: 126
Joined: Sun Feb 26, 2006 7:10 pm

Custom Content for a specific user ideas?

Post by climberusa »

I'm using the latest releases of Custom Content and Front En Users and I'm trying to figure out an easy way for a client to create content for specific users. I'm starting to think the only easy way would be to develop a custom module but I thought I'd pose this question to the brain trust anyway.

What I'd like to do is be able to maybe select a user from a list of users in the database (from FEU). So when I create content maybe there i an option to select a user or users that can view it.

Right now I can do this UDT to grab the logged in name and set it as a variable for my use:

Code: Select all

global $gCms;
$module =& $gCms->modules['FrontEndUsers']['object'];
$username = $module->LoggedInName();
Then I place this in the page:

Code: Select all

{if $username == 'jeff'}
Custom content for Jeff
{/if} 
This is probably a crappy way to achieve this or altogether unnecessary but it's just for testing now anyway. 

My problem with this is that I'm afraid it will be too difficult for my client to remember. Plus, they might have 20 users (which are employees in this case)  that will have a custom message or some private information displayed for their eyes only.

So does anyone have any good ideas on how tis would best be implemented?

Jeff
cyberman

Re: Custom Content for a specific user ideas?

Post by cyberman »

climberusa wrote: So does anyone have any good ideas on how tis would best be implemented?
It seems the following project do what you want ::)

http://dev.cmsmadesimple.org/projects/feupermission/
FrontEndUsers Permissions will let you assign, the groups defined in the FEU module, permissions so that you can control the content of the web viewed by the particular user logged in.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Custom Content for a specific user ideas?

Post by calguy1000 »

why not create a global content block that matches each username
then in your page template you could do something like:

{if $ccuser->LoggedIn()}
{global_content name=$customcontent_loginname}
{/if}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
climberusa
Forum Members
Forum Members
Posts: 126
Joined: Sun Feb 26, 2006 7:10 pm

Re: Custom Content for a specific user ideas?

Post by climberusa »

Thanks Calguy, that looks like a very viable solution. Calguy strikes again!
jwaldeck

Re: Custom Content for a specific user ideas?

Post by jwaldeck »

Hello guys! I was looking for something exaclty like that, but in CMSMS 1.3, after logging in, the page sometimes tells me that:

string(55) "Smarty error: unable to read resource: "globalcontent:""

As if the CMS weren't able to find the "loginname". I have FEU and Custom Content Installed  and it sometimes shows me that error on the page. The problem is this "sometimes".

Can someone tell me what's wrong? Any clue?

Also tried to clean cache and nothing happened... could this be an issue with version 1.3 of CMSMS?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Custom Content for a specific user ideas?

Post by calguy1000 »

simple rule, any page with customcontent logic has to be marked as 'not cachable'.... or uncheck the cachable flag in the page options, or whatever it is.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
jwaldeck

Re: Custom Content for a specific user ideas? [solved]

Post by jwaldeck »

Uowww.. That was fast Calguy!

It worked, thanks a lot. Now I understood what happened.
climberusa
Forum Members
Forum Members
Posts: 126
Joined: Sun Feb 26, 2006 7:10 pm

Re: Custom Content for a specific user ideas?

Post by climberusa »

This is just about perfect for what I'm doing. Now my next question and need is to be able to have files in the global content block for the user that cannot be downloaded with the url typed in the the address bar. Is there any way protecting files (pdf, .doc, etc) so it's not public like the uploads folder? Perhaps with .htaccess?

If this can be achieved then we have a real solution for "secure" content.
cyberman

Re: Custom Content for a specific user ideas?

Post by cyberman »

If you use Uploads module to provide some files users wont see the URL to download. And Uploads can be protected with FEU/CustomContent.

And you can use unknown subfolders for this files too (like lsngf4).
jwaldeck

Re: Custom Content for a specific user ideas?

Post by jwaldeck »

Hi Guys!

I successfully implemented this "Custom Content" rule as a Global Content block for my FE Users, but i need something interesting and i couldn't think of how to apply it:

Sending an email to User after page update: Is it possible that, as soon as i finish editing this block and press "Submit" or "Apply", the system finds a user called "loginname", since i'm using the rule "$customcontent_loginname", and asks me (via ALERT) if i want to send this user an email (any general txt would work, not custom), telling him that the page was updated?

I thought maybe some javascript "onSubmit", that activates a PHP SENDMAIL script... But since i'm not a developer, i don't know you exactly to achieve this, if there's a simple way to do it.

Would that be possible? I really need it and am willing to pay if necessary.

Thanks in advance!
jw
Post Reply

Return to “Modules/Add-Ons”