Implement graphics from a separate Folder in a Gallery, when User is logged in.

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
eyedee
New Member
New Member
Posts: 8
Joined: Mon May 25, 2009 12:59 pm

Implement graphics from a separate Folder in a Gallery, when User is logged in.

Post by eyedee »

Hi all from Germany :)

I have a gallery, which shows all images from one folder. Now I am looking for a possibility to show additional pictures from a second folder for users, who are logged in in the same gallery.

Logged off: Imagefolder1 in Gallery1
Logged in: Imagefolder1 +  Imagefolder2 in Gallery1

Here is my Code:

Code: Select all

global $gCms;
$pageinfo =& $gCms->variables['pageinfo']; $imgs = glob('uploads/images/gallery/'.$pageinfo->content_alias.'/*.{jpg,gif,jpeg,png,JPG}',
GLOB_BRACE);
echo '<ul class="gall2">';
foreach($imgs as $img){
            if(strpos(basename($img), "thumb") === 0)
                        continue;
            echo '<li>'.'<img src="/'.$img.'"
alt="'.$pageinfo->content_title.'" /><div class="text-holder"><p><span class="color1"><span>'.$pageinfo->content_title.'</span></span></p>';

if($pageinfo->content_titleattribute != ''){ echo '<p><span class="color2"><span>'.$pageinfo->content_titleattribute.'</span></span></p>';
}
echo '</div></li>';
}
echo "</ul>";
Thanks a lot fpr your help...
eyedee
New Member
New Member
Posts: 8
Joined: Mon May 25, 2009 12:59 pm

Re: Implement graphics from a separate Folder in a Gallery, when User is logged in.

Post by eyedee »

Nobody an idea?
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: Implement graphics from a separate Folder in a Gallery, when User is logged in.

Post by Jos »

hi eyedee,

You need the modules FrontEndUsers and CustomContent to create a members-only area. Maybe Selfregistration to let users create their own accounts.

To set up those modules you can read this pdf: http://calguy1000.com/uploads/1/Hiding_ ... e-pdf.html
Post Reply

Return to “The Lounge”