[SOLVED] Suppressing login prompt (navbar?) and display mode: in footer for guest user

kenollan

Joined: 2010-09-10
Posts: 6
Posted: Fri, 2010-09-10 05:34

I have been able to find the info on how to customize the header and footer to remove the Gallery logo and the logo buttons from display. I also want to suppress the display mode: username | guest in the footer and the navigation bar in the header when a guest user accesses the website where I have embedded the Gallery call in an <iframe>. Can anyone direct me to the right code for this?

The other thing I'd like to know is if there is a way to include the user=guest in the src reference. Here's my code.
<iframe src="http://lonestarcafeandclub.com/Gallery/main.php?g2_itemId=140" frameborder="NO" width="1100" height="700" align="center" marginwidth="0" marginheight="0" scrolling="auto"></iframe>

Thanks for any help you can offer.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2010-09-10 12:24

Instead of a horrible iframe, why don't you try embedding your gallery the right way.
I have a tool to help.

to remove the guest preview, look to theme.tpl near the bottom {g->block type="core.GuestPreview"}
If you embed your gallery like I mention above, there is an option to suppress login

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
kenollan

Joined: 2010-09-10
Posts: 6
Posted: Fri, 2010-09-10 18:43

Although I would have preferred writing the code for the website myself, I am not the support person. I'm just helping get the website up and running with the desired features. The support person is learning html so we set the website up using RVSiteBuilder, a tool provided by the hosting company. I haven't been able to figure out how this thing works in terms of where the code is buried in the file structure and don't have time to dissect it. They use a template format and once you set that template it uses it for every page. I can't find the code for the template so I can't cut and paste it in as header and footer somewhere else. I enabled calendar functionality for a google calendar and they used an iframe. (Again because I didn't have access to the code for the header and footer I couldn't use WebCalendar as you have to have that code to make it look like your webpage.) I had checked out your tool but since I don't know how this site is working, I couldn't figure out how to fill in all the info needed. I couldn't use the method provided on the Gallery2 site to update the template because I don't have that code. I also saw iframe used on another forum post as an answer so I used it. It's working and I just need a few tweaks to be able to promote it to the site for use.

That said, I still need to know how to suppress the login and sidebar actions from the header and the display mode from the footer. Thanks!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2010-09-10 20:12

Embedding is easy, this took me only a few seconds:
http://www.flashyourweb.com/Gallery.php (my gallery of course)

You can use it yourself if you like, just rename the attached to Gallery.php and upload to:
http://lonestarcafeandclub.com/Gallery.php

to remove the guest preview, look to Gallery/themes/carbon/templates/theme.tpl near the bottom {g->block type="core.GuestPreview"}

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
kenollan

Joined: 2010-09-10
Posts: 6
Posted: Sat, 2010-09-11 16:31

Hmm, ok. I will try this. I had commented out the core.GuestPreview. For some reason, our website doesn't reflect all changes right away so I didn't think it worked. When I go in now, I find it worked.

But I notice that your Gallery view does not have the Login action next to Sidebar. How did you suppress this? Your Sidebar does what mine does right now, nothing. So maybe I can't get rid of that action.

How did you change the real album names to "Images"? Right now I am using nested albums and I would like to restrict the access so the user can't navigate higher than the album they entered in. Right now you get the root album, the bands showcase album, and then each of the bands albums themselves. I would like to limit it so they can't navigate up to the root album. Any suggestions?

What theme are you using for your gallery? I went with Carbon because I thought the pictures would look better on the site with a black background. Maybe I can use a Black color package with this theme.

Thank you for your help. It is appreciated.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2010-09-11 17:34
Quote:
For some reason, our website doesn't reflect all changes right away

Gallery caches templates. You must clear the template cache in Gallery Admin -> Maintenance to see your changes immediately.

Quote:
But I notice that your Gallery view does not have the Login action next to Sidebar. How did you suppress this?

If you read through Gallery.php I supplied, there are some options:
$gallery->setConfig('login', false);

Quote:
I would like to limit it so they can't navigate up to the root album. Any suggestions?

Again with the options 32 is the g2_itemId of my Images album:

$gallery->setConfig('defaultAlbumId', 32); // set the default g2_itemId of home album
$gallery->setConfig('breadcrumbRootId', 32); // set the default g2_itemId breadcrumb root

in your copy I commented these out as you need to set the id yourself.
With these options you could create as many "views" of your gallery.
You can create as many of these pages as you need, just name them differently and change the corresponding embedUri on line 28:
$ret = GalleryEmbed::init( array ('g2Uri'=>'/Gallery/main.php', 'embedUri'=>'/Gallery.php', 'fullInit'=>'false'));

Quote:
What theme are you using for your gallery?

I'm using Clear, a theme I made based on my favorite Carbon - I removed the dark background so your site's background can show through.
Another option in the file is to set the theme:
$ret = GalleryEmbed::setThemeForRequest('clear');
the theme chosen here must already be installed - Gallery Admin -> Plugins -> Themes

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2010-09-11 18:05

Something I just added to my example to hide the sidebar links completely:

        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
        <script>
            $(function(){
                $(".buttonShowSidebar").hide();
                $(".block-core-SystemLink:contains('Sidebar')").hide();
            });
        </script>

using jQuery to hide the elements after the page loads.
add the above script just before the </body> tag.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
kenollan

Joined: 2010-09-10
Posts: 6
Posted: Sun, 2010-09-12 04:23

Dear Suprsidr, This is very helpful. Again, my reference to the fact that our website is built using RVSiteBuilder. If I use RVSiteBuilder as usual and try to just call the php file, it will show the header & footer twice. I have found in the RVSiteBuilder file structure where it has the php for the two pages that I want to replace with this code. My question (and hopefully the last) is - since the php file will be in the RVSitebuilder directory and not the Gallery directory, what do I need to do to change it so it works properly? [My file structure is set up so that under the home directory, there is the RVSitebuilder directory and a public_html directory. The Gallery directory where I've copied my edited version of your code is a subdirectory of the public_html directory.] Thank you again for your assistance. kenollan

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2010-09-12 04:43

So why do you need to use RVSiteBuilder to include this file? this file is already complete, just upload it to public_html/Gallery.php

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
kenollan

Joined: 2010-09-10
Posts: 6
Posted: Sun, 2010-09-12 06:05

s
Because all the code that runs the site comes from RVSiteBuilder. The links on the website are run by RVSiteBuilder. So when you click on the Photo Album menu item for example, it runs the code that RVSiteBuilder promoted into the public_html directory. As I said, I have yet to figure out how it works on the actual code. I can tell where it is building the screens from the actual tool directory, but how it places them in the site directory so that it works, it's spaghetti and still a mystery. This is why I was using iframe. I didn't have to worry about the directory structure or how the code it creates actually works.
So, I've loaded the file (Gallerybands.php) into the public_html directory. I just have to figure out how to call it from within the RVSitebuilder program/directory structure so that when the menu item is clicked, it calls the code in the file (Gallerybands.php)
You can see that they are now basically looking like I want them to thanks to your help. (no login/sidebar/display with no root album)
http://lonestarcafeandclub.com/Gallerybands.php

I know that you might not be able to assist with this aspect and that's ok. I can see if there is a forum for RVSitebuilder and see if some one can tell me how to do this. I just thought if I knew how to call the code properly, I could put that in the tool and see what it came up with. Then I could maybe figure out how to edit the code it creates so it does what I need.
Thanks again,
k

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2010-09-12 11:45

Certainly RVSiteBuilder lets you simply add a menu item/link? say for an external page?

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
kenollan

Joined: 2010-09-10
Posts: 6
Posted: Mon, 2010-09-13 01:38

s

Oh, you said the magic words... link...external. There is an option in RVSitebuilder and this reminded me I had seen it on one of the menu pages. It is done and works!!! Thank you so much for your assistance.

lonestarcafeandclub.com

I just need to improve the google calendar with restylegc and my work is finished.
Thank you again,
k