Page 1 of 1

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

Posted: Sun Nov 28, 2010 4:55 pm
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...

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

Posted: Thu Dec 23, 2010 10:59 am
by logon68
nice information

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

Posted: Thu Dec 23, 2010 11:02 am
by eyedee
Nobody an idea?

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

Posted: Thu Dec 23, 2010 11:14 am
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