Single Picture without login, when logged in, show albums

xorcist

Joined: 2009-07-26
Posts: 16
Posted: Tue, 2009-08-04 04:12

Okay, I may be thinking WAY to hard on this one, but I just cant figure out how to do what I'm trying to do. What I'm tryin to do, is that when you first hit my site, the first picture you see is a static picture, and then once you login, it takes you to the albums. The way it is right now, is go to the site, and it just shows this album is empty, and once you login, everything is good. Is there any way to make where it shows this album is empty, show a picture? Thanks

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 10934
Posted: Tue, 2009-08-04 22:57

Either edit your theme to have a static photo or upload the picture you want everyone to see and click Edit Permissions on that photo and make sure the group Everyone has view permission. This means that they'd be able to click on that photo. If you just want a single, static photo that's not clickable, then you'll need to edit your theme.

If using the Matrix theme for example, edit /themes/matrix/templates/album.tpl

http://codex.gallery2.org/Gallery2:Themes:Reference:Variables

You can check if a user is a registered user (meaning they've logged in) and not display that photo and instead display the "There's no photos" message.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
xorcist

Joined: 2009-07-26
Posts: 16
Posted: Wed, 2009-08-05 02:45

i editted the spot where it used to say albums are empty, but now its showing the path of the static pic i want, not the pic...isnt this code right?

<h3 class="emptyAlbum">
<img src={g->url href="http://www.mydomain.com/IMG_08461.jpg"} alt=""/>
{if isset($theme.permissions.core_addDataItem)}
<br/>
<a href="{g->url arg1="view=core.ItemAdmin" arg2="subView=core.ItemAdd"
arg3="itemId=`$theme.item.id`"}">

i found where it referenced another image in the tpl and from what i can tell, its right, but its not showing the pic.

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 10934
Posted: Wed, 2009-08-05 03:54

Just change this:
<img src={g->url href="http://www.mydomain.com/IMG_08461.jpg"} alt=""/>

To this:
<img src="http://www.mydomain.com/IMG_08461.jpg" alt=""/>
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
xorcist

Joined: 2009-07-26
Posts: 16
Posted: Wed, 2009-08-05 04:04

k i tried it, same thing

when viewing the source as viewing it, it shows this
</div>
</div>
</td>
<td>
<div class="giDescription gbEmptyAlbum">
<h3 class="emptyAlbum">
http://www.mydomain.com/IMG_08461.jpg
</h3>
</div>
</td>
</tr>
</table>

i changed the tpl
{if !count($theme.children)}
<div class="giDescription gbEmptyAlbum">
<h3 class="emptyAlbum">
<img src="http://www.mydomain.com/IMG_08461.jpg" alt=""/>
{if isset($theme.permissions.core_addDataItem)}
<br/>
<a href="{g->url arg1="view=core.ItemAdmin" arg2="subView=core.ItemAdd"
arg3="itemId=`$theme.item.id`"}">
{g->text text="Add a photo!"}
</a>
{/if}

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 10934
Posted: Wed, 2009-08-05 04:54

Be sure to clear your cache:
FAQ: How can I clear cached data?

If that doesn't fix it, post a link to your site please.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
xorcist

Joined: 2009-07-26
Posts: 16
Posted: Wed, 2009-08-05 14:44

sweet that worked, now i just need to resize my image, cause it fills my monitor..lol thanks for the help

Login or register to post comments