how do i disable the header, and the "Add Album to Cart" links in my embedded gallery2?

greg@gregtompki...
greg@gregtompkins.com's picture

Joined: 2010-12-28
Posts: 43
Posted: Thu, 2011-04-28 01:02

Hello,

I haveb embedded the gallery2 into my existing site. I would like to hide the links to the following that show up underneath each image:

Add Album to Cart
Date
and View Count

Also, how can I hide the page navigation buttons at the top, but leave them in tact for the bottom of each page? I don't want sidebar, or the little icon to do the slideshow. I have looked and looked all over the configuration menus and documentation and don't see how to control those from appearing.

Thanks again ,great product!

--GREG--

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2011-04-28 01:49
 
greg@gregtompki...
greg@gregtompkins.com's picture

Joined: 2010-12-28
Posts: 43
Posted: Fri, 2011-04-29 11:37

This is what I want to hide..... See attached. THANKS! :)

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2011-04-29 12:18

Ah ha! I still have the page I made for you on my embed samples page.

I use CSS the most to hide items w/out editing gallery's theme directly.
within the adjustment styles block in photos.php:

<!-- Add our adjustment styles after our site style sheet -->
<style>
...

.buttonShowSidebar, .block-core-Pager:first-child,
.first-and-previous:first-child, .next-and-last:first-child {
    display: none;
}

...

</style>

this technique can be used to hide any unwanted elements.
Or edit the theme you are using.

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

 
greg@gregtompki...
greg@gregtompkins.com's picture

Joined: 2010-12-28
Posts: 43
Posted: Tue, 2011-05-03 02:16

Hi Suprsidr,

I put that code in my photos.php file and it's not changing anything.... I have changed quite a lot of my files since I last worked on it in January. One thing I did is make all my HTM files into php and call the navbar so I don't have to rely so much on dreamweaver and templates. I also put reinstalled gallery into the /gallery subdirectory. I've been learning a lot, and thanks again not only to you but all of those who have helped me! It still seems to me for what I am trying to do that the earler version, gallery2, is still the best option.

Here is what my photos.php code currently looks like:

Quote:
<?php
require_once ('embed.php');
$ret = GalleryEmbed::init( array ('main.php', 'embedUri'=>'photos.php', 'fullInit'=>'false'));
if ($ret) {
print 'G2 init error: '.$ret->getAsHtml();
}
$gallery->setConfig('showSidebarBlocks', false);
$gallery->setConfig('login', false);
$ret = GalleryEmbed::setThemeForRequest('Clear');
if($ret){
print 'Failed to set theme';
}
$g2data = GalleryEmbed::handleRequest();
if ($g2data['isDone']) {
exit;
}
GalleryEmbed::done();
?>
<!-- Your Html Head -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>4-T Acres LTD Photo Album - All Rights Reserved</title>
<!-- Gallery's Head -->
<?php
echo $g2data['headHtml'];
?>
<!-- End Gallery's Head -->
<link href="/CSS/4tacresss.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body class="mainbackground">
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">

<? include '../menubar_common.php'; ?>

<!-- Add our adjustment styles after our site style sheet -->
<style>
...

.buttonShowSidebar, .block-core-Pager:first-child,
.first-and-previous:first-child, .next-and-last:first-child {
display: none;
}

...

</style>

<tr>
<td>
<div class="contentpane">
<table width="100%" border="0" cellpadding="0" class="contentpane">
<tr>
<td>
<!-- End Your Html Body -->
<!-- Gallery's Body -->
<?php
echo $g2data['bodyHtml'];
?>
<!-- End Gallery's Body -->
</td>
</tr>
</table>
<!-- Your Html Footer -->
</div>
</td>
</tr>

<? include '../footer_common.php'; ?>

</table>
</body>
</html>
<!-- End Your Html Footer -->

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2011-05-03 02:26

the <style> tag belongs between the <head></head>

and the code I suggested contains illegal continuation characters ...

<!-- Add our adjustment styles after our site style sheet -->
<style>
...

.buttonShowSidebar, .block-core-Pager:first-child,
.first-and-previous:first-child, .next-and-last:first-child {
display: none;
}

...

</style>

w/out the "continuation ..."

<!-- Add our adjustment styles after our site style sheet -->
<style>
.buttonShowSidebar, .block-core-Pager:first-child,
.first-and-previous:first-child, .next-and-last:first-child {
display: none;
}
</style>

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

 
greg@gregtompki...
greg@gregtompkins.com's picture

Joined: 2010-12-28
Posts: 43
Posted: Tue, 2011-05-03 04:25

is this better? :)

other thing i don't know why is happening when i do the slideshow it does pop up but i have to scroll way down to see it.

http://www.4-tacres.com/gallery/photos.php

Quote:

<?php
require_once ('embed.php');
$ret = GalleryEmbed::init( array ('main.php', 'embedUri'=>'photos.php', 'fullInit'=>'false'));
if ($ret) {
print 'G2 init error: '.$ret->getAsHtml();
}
$gallery->setConfig('showSidebarBlocks', false);
$gallery->setConfig('login', false);
$gallery->setConfig('defaultAlbumId', 284); // set the default home album
$ret = GalleryEmbed::setThemeForRequest('Clear');
if($ret){
print 'Failed to set theme';
}
$g2data = GalleryEmbed::handleRequest();
if ($g2data['isDone']) {
exit;
}
GalleryEmbed::done();
?>
<!-- Your Html Head -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>4-T Acres LTD Photo Album - All Rights Reserved</title>
<!-- Gallery's Head -->
<?php
echo $g2data['headHtml'];
?>
<!-- End Gallery's Head -->
<link href="/CSS/4tacresss.css" rel="stylesheet" type="text/css" media="screen" />

<!-- Add our adjustment styles after our site style sheet -->

<style> .buttonShowSidebar, .block-core-Pager:first-child, .first-and-previous:first-child, .next-and-last:first-child {
display: none;
}
</style>

</head>
<body class="mainbackground">
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">

<? include '../menubar_common.php'; ?>

<tr>
<td>
<div class="contentpane">
<table width="100%" border="0" cellpadding="0" class="contentpane">
<tr>
<td>
<!-- End Your Html Body -->
<!-- Gallery's Body -->
<?php
echo $g2data['bodyHtml'];
?>
<!-- End Gallery's Body -->
</td>
</tr>
</table>
<!-- Your Html Footer -->
</div>
</td>
</tr>

<? include '../footer_common.php'; ?>

</table>
</body>
</html>
<!-- End Your Html Footer -->

 
greg@gregtompki...
greg@gregtompkins.com's picture

Joined: 2010-12-28
Posts: 43
Posted: Tue, 2011-05-03 04:33

DOH! I found a problem! If I use that code, and in Firefox, it completely HIDES the navigation --- I just want it to hide the one on top. Another peculiar thing I noticed, in I.E. it hides DIFFERENT things than is hidden in Firefox.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2011-05-03 12:31

Welcome to web design.
IE ignores most of that CSS and places that crappy piclensLite slideshow below the page. Whereas better browsers work as expected.
new strategy
gallery2/themes/clear/templates/local/album.tpl <- you may need to copy the original here
line ~51 remove this block:

	{if !empty($theme.navigator)}
	<div class="gbNavigator">
	  {* {g->block type="core.Navigator" navigator=$theme.navigator reverseOrder=true} *}
	  {g->theme include="navigator.tpl"}
	</div>
	{/if}

and change that css to read:

<!-- Add our adjustment styles after our site style sheet -->
<style>
.buttonShowSidebar {
display: none;
}
</style>

if you want to remove the navigator from the photo pages, goto gallery admin -> themes -> Clear -> uncheck "Show top photo navigator "

As for the slideshow blunder in IE update to my latest.

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

 
greg@gregtompki...
greg@gregtompkins.com's picture

Joined: 2010-12-28
Posts: 43
Posted: Sat, 2011-05-07 20:43

Hello,

Thanks again for all the help ... I unchecked the option to show the navigation at the top in the site admin for gallery - no change .... Would you mind logging into my site if I gave you a login so you can see it? I'm wondering if the CSS I have in my navbar might be throwing this all off? I made a common navbar, called menubar_common.php that I hardcoded directly the CSS into the file because for some reason my embedded photos.php screwed up my navigation buttons and made the fonts really big. The only way I could "fix" this was to put the CSS right into the the menubar_common.php file. If I understand correctly, CSS hardcoded directly into the HTML or PHP file takes the highest precedence....

Quote:
<style type="text/css">
@charset "utf-8";
/* CSS Document */

body {
color: #fff;
font: 16px/ 1.5 HelveticaNeue, Helvetica, Arial, serif;
background: #413000;
}
#menubarback {
background-color: #78A22F;
}

/* The outermost container of the Menu Bar, an auto width box with no margin or padding */
ul.MenuBarHorizontal
{
margin: 0;
padding: 0;
list-style-type: none;
font-size: small;
cursor: default;
}
/* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
ul.MenuBarActive
{
z-index: 1000;
}
/* Menu item containers, position children relative to this container and are a fixed width */
ul.MenuBarHorizontal li
{
margin: 0;
padding: 0;
list-style-type: none;
font-size: small;
position: relative;
text-align: left;
cursor: default;
float: left;
}
/* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
ul.MenuBarHorizontal ul
{
margin: 0;
padding: 0;
list-style-type: none;
font-size: small;
z-index: 1020;
cursor: default;
width: auto;
position: absolute;
left: -1000em;
}
/* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
{
left: auto;
}
/* Menu item containers are same fixed width as parent */
ul.MenuBarHorizontal ul li
{
width: 8.2em;
}
/* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
ul.MenuBarHorizontal ul ul
{
position: absolute;
margin: -5% 0 0 95%;
}
/* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
{
left: auto;
top: 0;
}

/*******************************************************************************

DESIGN INFORMATION: describes color scheme, borders, fonts

*******************************************************************************/

/* Submenu containers have borders on all sides */
ul.MenuBarHorizontal ul
{
border: 1px solid #CCC;
}
/* Menu items are a greenish block with padding and no text decoration */
ul.MenuBarHorizontal a
{
display: block;
cursor: pointer;
background-color: #78A22F;
padding: 0.5em 0.75em;
color: #FFF;
text-decoration: none;
}
/* Menu items that have mouse over or focus have a white background and white text */
ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
{
background-color: #78A22F;
color: #A80838;
}
/* Menu items that are open with submenus are set to MenuBarItemHover with a white background and white text */
ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
{
background-color: #FFF;
color: #78A22F;
}

/*******************************************************************************

SUBMENU INDICATION: styles if there is a submenu under a given menu item

*******************************************************************************/

/* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal a.MenuBarItemSubmenu
{
background-image: url(SpryMenuBarDown.gif);
background-repeat: no-repeat;
background-position: 95% 50%;
}
/* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
{
background-image: url(SpryMenuBarRight.gif);
background-repeat: no-repeat;
background-position: 95% 50%;
}
/* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
{
background-image: url(SpryMenuBarDownHover.gif);
background-repeat: no-repeat;
background-position: 95% 50%;
}
/* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
{
background-image: url(SpryMenuBarRightHover.gif);
background-repeat: no-repeat;
background-position: 95% 50%;
}

/*******************************************************************************

BROWSER HACKS: the hacks below should not be changed unless you are an expert

*******************************************************************************/

/* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
ul.MenuBarHorizontal iframe
{
position: absolute;
z-index: 1010;
filter:alpha(opacity:0.1);
}
/* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
@media screen, projection
{
ul.MenuBarHorizontal li.MenuBarItemIE
{
display: inline;
float: left;
background: #FFF;
}
}

.contentpane {
font-style: normal;
color: #000;
font-size: small;
background-color: #D7D89C;
text-decoration: none;
}

.footer {
font-size: x-small;
font-style: normal;
text-decoration: none;
color: #FFF;
}
A {
font-size: 14px !important;
}
.MenuBarHorizontal {
margin:0 0 0 11px;
}
table{
color:#000000;
}
</style>

<tr>
<th scope="col"></th>
</tr>
<tr>
<td><a href="index.php"><img src="/Images/header1.jpg" alt="" border="0" /></a></td>
</tr>
<tr>
<td id="menubarback">

<div id="MenuBarHorizontal">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a href="/index.php">Home</a></li>
<li><a href="/aboutus.php">About Us</a></li>
<li><a href="#">Availability</a></li>
<li><a href="/gallery/photos.php">Photos</a></li>
<li><a href="testimonials.php">Testimonials</a></li>
<li><a href="#">Calendar</a></li>
<li><a href="/contact_us.php">Contact Us</a></li>
<li><a href="#">Links</a></li>
<li><a href="/sustainability.php">Sustainability</a></li>
</ul>
</div>
</td>
</tr>

I also made the change to the .tpl file as you suggested and now here's what my photos.php file looks like:

Quote:
<?php
require_once ('embed.php');
$ret = GalleryEmbed::init( array ('main.php', 'embedUri'=>'photos.php', 'fullInit'=>'false'));
if ($ret) {
print 'G2 init error: '.$ret->getAsHtml();
}
$gallery->setConfig('showSidebarBlocks', false);
$gallery->setConfig('login', false);
$gallery->setConfig('defaultAlbumId', 284); // set the default home album
$ret = GalleryEmbed::setThemeForRequest('Clear');
if($ret){
print 'Failed to set theme';
}
$g2data = GalleryEmbed::handleRequest();
if ($g2data['isDone']) {
exit;
}
GalleryEmbed::done();
?>
<!-- Your Html Head -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>4-T Acres LTD Photo Album - All Rights Reserved</title>
<!-- Gallery's Head -->
<?php
echo $g2data['headHtml'];
?>
<!-- End Gallery's Head -->
<link href="/CSS/4tacresss.css" rel="stylesheet" type="text/css" media="screen" />

<!-- Add our adjustment styles after our site style sheet -->
<style>
.buttonShowSidebar {
display: none;
}
</style>

</head>
<body class="mainbackground">
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">

<? include '../menubar_common.php'; ?>

<tr>
<td>
<div class="contentpane">
<table width="100%" border="0" cellpadding="0" class="contentpane">
<tr>
<td>
<!-- End Your Html Body -->
<!-- Gallery's Body -->
<?php
echo $g2data['bodyHtml'];
?>
<!-- End Gallery's Body -->
</td>
</tr>
</table>
<!-- Your Html Footer -->
</div>
</td>
</tr>

<? include '../footer_common.php'; ?>

</table>
</body>
</html>
<!-- End Your Html Footer -->

 
greg@gregtompki...
greg@gregtompkins.com's picture

Joined: 2010-12-28
Posts: 43
Posted: Sat, 2011-05-07 20:51

Hi Again,

Trying to figure out the slideshow problem now ..... Where do I extract the files? My gallery is installed in /gallery not /gallery2. Thank You!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2011-05-07 21:26

PM me with gallery admin login and ftp login and I will fix this.

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