{g->block type="core.EmergencyEditItemLink" class="gbBlock"

schlimmest

Joined: 2007-01-20
Posts: 15
Posted: Fri, 2007-01-26 22:55

Is there any way to align this RIGHT without messing up all other gbBlock's?
I've tried to .gbBlock{float:right;} ,but that messes up alot more than just right align the code under...

i've tried to made a new class called .gbBlock2{float:right;} (and changed to {g->block type="core.EmergencyEditItemLink" class="gbBlock2") just for this code under, but it still doesnt work..

Quote:
{g->block type="core.EmergencyEditItemLink" class="gbBlock"
checkSidebarBlocks=true
checkAlbumBlocks=true}
{* Show any other album blocks (comments, etc) *}
{foreach from=$theme.params.albumBlocks item=block}
{g->block type=$block.0 params=$block.1}
{/foreach}

Thanks!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2007-01-27 04:35

in album.tpl and photo.tpl I changed

core.EmergencyEditItemLink" class="gbBlock"

to

core.EmergencyEditItemLink" class="gbBlock2"

and added

.gbBlock2 {
float: right;
}

to the theme.css and it worked for me.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team || G2 Theme Contest!

 
schlimmest

Joined: 2007-01-20
Posts: 15
Posted: Sat, 2007-01-27 11:13

Hi,
Exactly what i've done. But it still wont work..
I've added my photo.tpl, album.tpl and theme.css.

Thanks!

album.tpl wrote:
{*
* $Revision: 1.14 $
* If you want to customize this file, do not edit it directly since future upgrades
* may overwrite it. Instead, copy it into a new directory called "local" and edit that
* version. Gallery will look for that file first and use it if it exists.
*}
<table width="100%" cellspacing="0" cellpadding="0">
<tr valign="top">
{if !empty($theme.params.sidebarBlocks)}
{if $user.isAdmin}
<td id="gsSidebarCol">
{g->theme include="sidebar.tpl"}
</td>
{/if}
{/if}
<td>

{if !count($theme.children)}
<div class="gbBlock giDescription gbEmptyAlbum">
<h3 class="emptyAlbum">
{g->text text="This album is empty."}
{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}
</h3>
</div>
{else}

{assign var="childrenInColumnCount" value=0}
<div class="gbBlock">
<table id="gsThumbMatrix">
<tr valign="top">
{foreach from=$theme.children item=child}

{* Move to a new row *}
{if ($childrenInColumnCount == $theme.params.columns)}
</tr>
<tr valign="top">
{assign var="childrenInColumnCount" value=0}
{/if}

{assign var=childrenInColumnCount value="`$childrenInColumnCount+1`"}
<td class="{if $child.canContainChildren}giAlbumCell gcBackground1{else}giItemCell{/if}"
style="width: {$theme.columnWidthPct}%">
{if ($child.canContainChildren || $child.entityType == 'GalleryLinkItem')}
{assign var=frameType value="albumFrame"}
{else}
{assign var=frameType value="itemFrame"}
{/if}
<div>
{if isset($theme.params.$frameType) && isset($child.thumbnail)}
{g->container type="imageframe.ImageFrame" frame=$theme.params.$frameType
width=$child.thumbnail.width height=$child.thumbnail.height}
<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}">
{g->image id="%ID%" item=$child image=$child.thumbnail
class="%CLASS% giThumbnail"}
</a>
{/g->container}
{elseif isset($child.thumbnail)}
<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}">
{g->image item=$child image=$child.thumbnail class="giThumbnail"}
</a>
{else}
<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}"
class="giMissingThumbnail">
{g->text text="no thumbnail"}
</a>
{/if}
</div>

{g->block type="core.ItemLinks" item=$child links=$child.itemLinks}

{if !empty($child.title)}
<p class="giTitle">
{if $child.canContainChildren}
{g->text text="%s" arg1=$child.title|markup}
{else}
{$child.title|markup}
{/if}
</p>
{/if}

{if !empty($child.summary)}
<p class="giDescription">
{$child.summary|markup|entitytruncate:256}
</p>
{/if}

{g->block type="core.ItemInfo"
item=$child
showDate=true

showSize=true
showViewCount=true
showSummaries=true
class="giInfo"}
</td>
{/foreach}

{* flush the rest of the row with empty cells *}
{section name="flush" start=$childrenInColumnCount loop=$theme.params.columns}
<td>&nbsp;</td>
{/section}
</tr>
</table>
</div>
{/if}

{if !empty($theme.jumpRange)}
<div id="gsPages" class="gbBlock gcBackground1">
{g->block type="core.Pager"}
</div>
{/if}

{* Our emergency edit link, if the user all blocks containing edit links *}

{g->block type="core.EmergencyEditItemLink" class="gbBlock2"
checkSidebarBlocks=true
checkAlbumBlocks=true}
{* Show any other album blocks (comments, etc) *}
{foreach from=$theme.params.albumBlocks item=block}
{g->block type=$block.0 params=$block.1}
{/foreach}
</div>
</td>
</tr>
</table>

photo.tpl wrote:
{*
* $Revision: 1.8 $
* If you want to customize this file, do not edit it directly since future upgrades
* may overwrite it. Instead, copy it into a new directory called "local" and edit that
* version. Gallery will look for that file first and use it if it exists.
*}
{if !empty($theme.imageViews)}
{assign var="image" value=$theme.imageViews[$theme.imageViewsIndex]}
{/if}
<table width="100%" cellspacing="0" cellpadding="0">

<td>
<div id="gsContent">

<div id="gsImageView" class="gbBlock">
{if !empty($theme.imageViews)}
{capture name="fallback"}
<a href="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$theme.item.id`"
forceFullUrl=true forceSessionId=true}">
{g->text text="Download %s" arg1=$theme.sourceImage.itemTypeName.1}
</a>
{/capture}

{if ($image.viewInline)}
{if isset($theme.photoFrame)}
{g->container type="imageframe.ImageFrame" frame=$theme.photoFrame
width=$image.width height=$image.height}
{g->image id="%ID%" item=$theme.item image=$image
fallback=$smarty.capture.fallback class="%CLASS%"}
{/g->container}
{else}
{g->image item=$theme.item image=$image fallback=$smarty.capture.fallback}
{/if}
{else}
{$smarty.capture.fallback}
{/if}
{else}
{g->text text="There is nothing to view for this item."}
{/if}
</div>

{* Download link for item in original format *}
{if !empty($theme.sourceImage) && $theme.sourceImage.mimeType != $theme.item.mimeType}
<div class="gbBlock">
<a href="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$theme.item.id`"}">
{g->text text="Download %s in original format" arg1=$theme.sourceImage.itemTypeName.1}
</a>
</div>
{/if}

{* Show any other photo blocks (comments, exif etc) *}
{foreach from=$theme.params.photoBlocks item=block}
{g->block type=$block.0 params=$block.1}
{/foreach}

</div>
</td>
</tr>
</table>

theme.css wrote:
/* ********************************************************************************
* Building blocks
* h2, h3, p, etc Standard html tags
* div.gbBlock Sidebar or content section with style for contained lists
* ul.gbBreadCrumb List of links/path elements
* table.gbDataTable Table for data/form elements with styles for shading rows
*/

#gallery h2, #gallery h3, #gallery h4, #gallery form {
margin: 0;
padding: 0;
}

#gallery p {
margin: 0.6em 0;
padding: 0;
}

.gbBlock {
}
.gbBlock2 {
float: right;
}
.gbBlock ul {
margin: 0;
padding: 0;
list-style-type: none;
}

.gbBlock ul ul {
margin: 0 0 0.5em 1.0em;
}

.gbBlock li {
padding: 6px 0 0 0;
}

#gallery .gbBlock h3 {
margin-bottom: 0.5em;
}

#gallery .gbBlock h4 {
margin-top: 0.5em;
}

#gsNavBar div.gbBreadCrumb {
margin: 0;
padding: 4px 8px;
}

table.gbDataTable {
padding-bottom: 4px;
}

table.gbDataTable th, table.gbDataTable td {
padding: 4px;
}

.tabell2 { color: #d1026f; font: 11pt verdana, arial, helvetica, sans-serif; }
table.stor { border-color: #d1026f; font: 11pt verdana, arial, helvetica, sans-serif; border-style: dashed;border-width:8px ;}

.giBlockToggle {
padding: 0 0.4em 0.1em;
}
.giBlockToggle:hover {
cursor: pointer;
}

.gbMarkupBar {
margin: 4px 0;
}

#gallery .gbMarkupBar input {
margin: 0;
padding: 0;
}

/* ********************************************************************************
* Sections
* body.gallery Page body in G2 standalone (doesn't apply to embedded)
* #gallery Page container
* #gsNavBar Top bar with breadcrumb and other links
* #gsSidebar Sidebar
* #gsContent Main content
*/

body.gallery {
margin: 0;
padding: 0;
}

#gallery {
padding: 8px;
}
#gallery.rtl {
direction: rtl;
}

#gsNavBar {
border-top-width: 1px;
border-bottom-width: 1px;
}

#gsNavBar div.gbSystemLinks {
padding: 4px 6px;
}

#gsNavBar div.gbSystemLinks span {
padding: 0 4px;
}

#gsSidebar {
border-right-width: 0px;
width: 175px;
overflow: hidden;
}
#gsSidebarCol {
width: 1%; /* Expand to fit content ("0" bad4 firefox, "1px" bad4 opera) */
}

td.giAlbumCell, td.giItemCell {
padding: 1em;
text-align: center;
}

#gallery td.giAlbumCell select, #gallery td.giItemCell select {
margin-top: 0.8em;
}

/* So imageframed thumbs can be centered */
td.giAlbumCell table, td.giItemCell table {
margin: auto;
}

#gsPages span {
padding: 0 0.3em;
}

#gallery #gsSidebar ul {
font-size: 1em;
}

/* ********************************************************************************
* Matrix Theme for Gallery 2
* by Ross A. Reyman, Jon Huang, and Chad Kieffer
* updated by Alan Harder
*/

/* ********************************************************************************
* Building blocks
* #gallery Default font/color settings
* .gcBackground1,2.. Palette of backgrounds
* .gcBorder1,2.. Palette of borders
* a, h2, h3, etc Standard html tags
* .giTitle, .giSubtitle, .giDescription, .giInfo, .giSuccess, .giWarning, .giError
* Palette of text styles
* div.gbBreadCrumb List of links/path elements
* table.gbDataTable Table for data/form elements with styles for shading rows
* div.gbTabBar UI component for selectable tabs
* .autoComplete* Styles for autoComplete popup lists
*/

#gallery {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 62.5%;
color: #d1026f;
background-color: #ffffff;
}
body.gallery {
background-color: #ffffff;
}

.gcBackground1 {
background-color: #ffffff;
}

.gcBackground2 {
background-color: #ffffff;
}

.gcBorder1 {
border: 1 solid #d1026f;border-width:1px;
}

.gcBorder2 {
border: 0 solid #d1026f;
}

#gallery a {
font-weight: none;
text-decoration: underline;
color: blue;
}
#gallery a:hover {
text-decoration: underline;
color: #d1026f;
}
#gallery a:active {
text-decoration: underline;
color: blue;
}

#gallery img {
border-width: 0;
}

#gallery h2, #gallery h3, #gallery h4 {
}

#gallery input:focus, #gallery textarea:focus {
background-color: #ffc;
color: #000;
}

#gallery input.inputTypeSubmit, #gallery input.inputTypeButton { /* No input[type=submit] in IE */
color: #333;
background-color: #eee;
border-width: 2px;
border-style: solid;
border-color: #e7e7e7 #666 #666 #e7e7e7;
}

#gallery select {
font-size: 1em;
}

.giTitle, #gallery h2, #gallery h3, #gallery h4 {

}

#gallery pre, #gallery tt {
font-family: Courier New;
font-size: 1.2em;
}

.giSubtitle {
font-size: 0.9em;
font-weight: normal;
vertical-align: text-bottom;
}

.giDescription {
font-size: 10pt;
line-height: 1.4em;
}

.gbEmptyAlbum {
height: 400px;
}

.giDescription h3.emptyAlbum {
line-height: 4.0em;
text-align: center;
}

.giInfo {
font-size: 0.9em;
color: #d1026f;
}

.giInfo span.summary {
display: block;
}

.giSuccess, .giWarning, .giError {
font-weight: none;
}

.giSuccess { color: #5c0; }
.giWarning { color: #c50; }
.giError { color: #a44; }

.giNew, .giUpdated {
border-width: 2px;
border-style: ridge;
padding: 0 6px;
line-height: 1.9em;
}

#gsNavBar div.gbBreadCrumb {
font-size: 1.1em;
font-weight: none;
}

#gsNavBar div.gbBreadCrumb a, #gsNavBar div.gbBreadCrumb span {
padding: 0 0 0 14px;
background: url('images/icon_path_separator.gif') no-repeat left;
}

#gsNavBar div.gbBreadCrumb a.BreadCrumb-1 { /* no :first-child in IE */
padding-left: 0;
background-image: none;
white-space: nowrap;
}

#gsThumbMatrix {
width: 100%;
}

#gallery.IE div.gbBreadCrumb span {
display: inline-block; /* IE loses padding-left on wrapped inline nowrap element */
padding-right: 4px; /* IE has less space at right of each span */
}

#gsNavBar div.gbBreadCrumb span.BreadCrumb-1 { /* no :first-child in IE */
padding-left: 0;
background-image: none;
}

#gsNavBar div.gbSystemLinks {
float: left;
}

table.gbDataTable th {
text-align: left;
background-color: #e7e7e7;
}

.gbEven {
background-color: #fff;
}

.gbOdd {
background-color: #eee;
}

div.gbTabBar {
font-size: 0.9em;
font-weight: none;
margin: 0.8em 0 0;
padding: 6px;
background: url('../matrix/images/tab_bg.gif') repeat-x bottom;
white-space: nowrap;
}

div.gbTabBar span.o {
padding: 6px 0 5px 8px;
background: url('../matrix/images/tab_left.jpg') no-repeat left top;
}
#gallery.IE div.gbTabBar span.o {
display: inline-block; /* IE loses padding-left on wrapped inline nowrap element */
margin-bottom: 1px; /* ..and then adds padding differently with inline-block.. */
}
/* IE may clip off the right end of a long set of tabs, so allow IE to wrap them */
#gallery.IE div.gbTabBar { padding-bottom: 0; white-space: normal; }
#gallery.IE div.gbTabBar span.giSelected { margin-bottom: 0; }

#gallery div.gbTabBar span span {
padding: 6px 12px 5px 4px;
background: url('../matrix/images/tab_right.jpg') no-repeat right top;
}

#gallery div.gbTabBar a {
color: #777;
text-decoration: none;
}

#gallery div.gbTabBar a:hover {
color: #333;
}

#gallery div.gbTabBar span.giSelected {
padding-bottom: 6px;
background-image: url('../matrix/images/tab_left_on.jpg');
}

#gallery div.gbTabBar span.giSelected span {
color: #333;
padding-bottom: 6px;
background-image: url('../matrix/images/tab_right_on.jpg');
}

.autoCompleteBackground {
border: 1px solid #ccc;
border-top-style: none;
margin: 0;
}

.autoCompleteHighlight {
text-decoration: underline;
}

.autoCompleteNotSelected {
background-color: #eee;
padding: 3px 4px 3px 17px;
}

.autoCompleteSelected {
background-color: #ffc;
padding: 3px 4px 3px 17px;
}

#gallery .gbMarkupBar input {
font-size: 1.1em;
}

#ProgressBar #progressDone {
background-color: #fd6704;
border: thin solid #ddd;
}

#ProgressBar #progressToGo {
background-color: #eee;
border: thin solid #ddd;
}

.giSearchHighlight {
font-weight: none;
background-color: #ff6;
}

/* ********************************************************************************
* Sections
* #gallery Page container
* #gsNavBar Top bar with breadcrumb and other links
* #gsSidebar Sidebar
* #gsContent Main content
* #giFormUsername Form field for entering a username
* #giFormGroupname Form field for entering a group name
*/

#gsNavBar div {
margin-top: 0.1em; /* Align system links with breadcrumb */
font-weight: none;
}

#gsSidebar div ul { /* no > in IE */
font-size: 1.1em;
font-weight: none;
}
#gsSidebar div ul ul { font-size: 1.0em; }

#gsSidebar ul span {
color: #999;
}

#giFormUsername, .giFormUsername {
background: url('../matrix/images/userinfo.png') no-repeat 0 1px;
padding-left: 17px;
}

#giFormGroupname {
background: url('../matrix/images/groupinfo.png') no-repeat 0 1px;
padding-left: 17px;
}

#giFormPassword {
background: url('../matrix/images/key7-16-bw.gif') no-repeat 0 1px;
padding-left: 17px;
}

/* Opera ignores padding in form inputs; put icons on right side instead */
#gallery.opera #giFormUsername, #gallery.opera .giFormUsername,
#gallery.opera #giFormGroupname, #gallery.opera #giFormPassword {
background-position: right center;
}

div.gbNavigator div.next-and-last {
float: right;
}
div.gbNavigator div.next-and-last.no-previous {
float: none;
text-align: right;
}

div.gbNavigator a.first {
padding-left: 27px;
background: url("images/nav_first.gif") left no-repeat;
}

div.gbNavigator a.previous {
padding-left: 27px;
background: url("images/nav_prev.gif") left no-repeat;
}

div.gbNavigator a.next {
padding-right: 27px;
background: url("images/nav_next.gif") right no-repeat;
}

div.gbNavigator a.last {
padding-right: 27px;
background: url("images/nav_last.gif") right no-repeat;
}

div.gbNavigator div.first-and-previous img {
vertical-align: middle;
padding-right: 0.5em;
}
div.gbNavigator div.next-and-last img {
vertical-align: middle;
padding-left: 0.5em;
}

#gallery.rtl div.gbNavigator div.next-and-last {
float: left;
}
#gallery.rtl div.gbNavigator div.next-and-last.no-previous {
float: none;
text-align: left;
}
#gallery.rtl div.gbNavigator div.first-and-previous {
text-align: right;
}
/* Both IE and Gecko have bugs with omitting padding on rtl inline content */
#gallery.IE.rtl div.gbNavigator a {
display: inline-block;
}
#gallery.gecko.rtl div.gbNavigator a {
display: -moz-inline-box;
}

#gallery.rtl div.gbNavigator a.first {
padding: 0 27px 0 0;
background: url("images/nav_last.gif") right no-repeat;
}
#gallery.rtl div.gbNavigator a.previous {
padding: 0 27px 0 0;
background: url("images/nav_next.gif") right no-repeat;
}
#gallery.rtl div.gbNavigator a.next {
padding: 0 0 0 27px;
background: url("images/nav_prev.gif") left no-repeat;
}
#gallery.rtl div.gbNavigator a.last {
padding: 0 0 0 27px;
background: url("images/nav_first.gif") left no-repeat;
}
#gallery.rtl div.gbNavigator div.first-and-previous img {
padding: 0 0 0 0.5em;
}
#gallery.rtl div.gbNavigator div.next-and-last img {
padding: 0 0.5em 0 0;
}

div.block-search-SearchBlock a.advanced {
display: block;
padding: 3px;
}

div.block-core-ItemLinks {
margin: 3px 0;
}
div.block-core-ItemLinks a {
padding: 3px;
}
div#gsSidebar div.block-core-ItemLinks a {
display: block;
}

div#gsSidebar div.block-core-PeerList a {
display: block;
padding: 3px;
}

div#gsSidebar div.block-core-PeerList span {
font-weight: none;
display: block;
padding: 3px;
}

div#gsSidebar div.block-core-PeerList span.current {
color: #0b6cff;
}

/* ***************************************************** */
/* Dynamic blocks */
/* ***************************************************** */

div.block-comment-ViewComments {
margin: 5px;
}

div.block-comment-ViewComments div.one-comment {
border: 1px solid #e7e7e7;
padding: 5px;
margin-bottom: 5px;
}

div.block-comment-ViewComments h3 {
}

div.block-comment-ViewComments span {
padding-right: 5px;
}

div.block-comment-ViewComments p.info {
font-style: italic;
text-align: right;
font-size: 0.95em;
}

div.block-core-GuestPreview {
float: right;
}
#gallery.rtl div.block-core-GuestPreview {
float: left;
}

span.block-core-SystemLink {
}

div.block-exif-ExifInfo {
margin: 5px;
}

span.bsw_ButtonDisabled {
color: #999;
}

span.bsw_ButtonEnabled {
color: #000;
cursor: pointer;
}

table.bsw_ParamTable {
width: 100%;
border: 1px solid #999;
border-collapse: collapse;
}

tr.bsw_ParamHeaderRow {
background-color: #EEE;
}

tr.bsw_ParamHeaderRow td {
font-weight: none;
text-align: center;
border: 1px solid #999;
}

td.bsw_BlockCommands {
white-space: nowrap;
text-align: center;
}

#gsFooter {
padding-top: 4px;
}

/* ********************************************************************************
* Rating module style fix for Matrix
*/
.giRatingUI {
margin: 10px auto; /* Required to center default rating module star images */
}
#gsThumbMatrix .giRatingAverageContainer {
margin: auto;
}

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2007-01-27 17:48

URL?
_____________________________________________
Blog & G2 || floridave - Gallery Team || G2 Theme Contest!