forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: Walkinman on January 19, 2006, 07:55:14 pm

Title: Another question. Adding to the Gallery title bar
Post by: Walkinman on January 19, 2006, 07:55:14 pm
Hello folks,

I have another question. I've added a 'quick search' function to my site, thru the Template page, but I think I want to move it.

On this page:

http://www.skolaiimages.com/stock/displayimage.php?album=40&pos=4

for example, I would like the "Quick Search" form to appear in the little table with the headings "Home > Places > Southwest", on the right hand side of the table? I'd then remove the form from the Template.html file, so it wouldn't appear on the main Galleries page.

http://www.skolaiimages.com/stock/index.php

Hopefully, it would still appear, in the same little table, on this kind of page:

http://www.skolaiimages.com/stock/thumbnails.php?album=40

Is this possible, and can someone please explain, step-by-step how I might do that?

Thank you, I do appreciate your help.

Cheers

Carl
Title: Re: Another question. Adding to the Gallery title bar
Post by: Joachim Müller on January 21, 2006, 03:56:27 am
the section you refer to is named "breadcrumb". You'll have to move your quicksearch code into the section of theme.php that generates the breadcrumb.
Title: Re: Another question. Adding to the Gallery title bar
Post by: Walkinman on January 21, 2006, 05:47:05 am
Hey GauGau

Thank you. I'll give it a whirl and see how it goes. I'm sure I'll be back before long with questions abotu what I'm doing incorrectly.  ;)

Thanks again.

Cheers

Carl
Title: Re: Another question. Adding to the Gallery title bar
Post by: Walkinman on January 21, 2006, 11:43:40 pm
Hey GauGau,

Thanks again. It works, but I cna't get the button and text form to sit in the middle of the bar/table (vertically). It seems to sit towards the top. I tried to place it in the center, but nothing seemed to work. Do you have any idea what might cause this, or what I might do about it?

Here's an example:

http://www.skolaiimages.com/stock/thumbnails.php?album=36

Here's the section from the theme.php file.

Code: [Select]
// HTML template for the breadcrumb
$template_breadcrumb = <<<EOT
<!-- BEGIN breadcrumb -->
        <tr>
                <td colspan="4" align="left" class="tableh1"><span class="statlink"><b>{BREADCRUMB}</b></span></td>
<td align="right" valign="middle">  

<form method="get" action="http://www.skolaiimages.com/stock/thumbnails.php"

name="searchcpg">
<input type="hidden" name="album" value="search">

<input type="hidden" name="type" value="full">
<input type="input" style="height:95%; border:2px #808080 outset; width: 140px" name="search" maxlength="255" value="" class="textinput">
<input style="height:95%; width:95px; border:2px #0c0c0c0 inset; font:12px Verdana,Arial; color:#000000; background:#FFFFFF" type="submit" value="Quick Search">
<script language="javascript" type="text/javascript">
<!--
document.searchcpg.search.focus();
-->
</script>
                                        </form></td>

        </tr>
<!-- END breadcrumb -->


Thanks

Cheers

Carl
Title: Re: Another question. Adding to the Gallery title bar
Post by: Paver on January 22, 2006, 05:10:20 am
I copied your code to my theme and the button & text form are centered vertically, as you want.  I'm using the classic theme.  Maybe you can try that quickly to see if it works for the classic theme; just copy the breadcrumb variable only.  If it works, I guess it must be a style issue.  I don't know why the cell style valign="middle" wouldn't override all others set as default or for the table, but something's going on.  You might try "absmiddle" for kicks & giggles.  Otherwise you might need to follow the style tags.
Title: Re: Another question. Adding to the Gallery title bar
Post by: Joachim Müller on January 22, 2006, 01:33:55 pm
Try
Code: [Select]
// HTML template for the breadcrumb
$template_breadcrumb = <<<EOT
<!-- BEGIN breadcrumb -->
        <tr>
                <td colspan="4" align="left" class="tableh1"><span class="statlink"><b>{BREADCRUMB}</b></span></td>
        <td align="right" valign="middle" class="tableh1">
          <form method="get" action="http://www.skolaiimages.com/stock/thumbnails.php" name="searchcpg" style="margin:0px;padding:0px">
            <input type="hidden" name="album" value="search" />
            <input type="hidden" name="type" value="full" />
            <input type="input" style="height:95%; border:2px #808080 outset; width: 140px" name="search" maxlength="255" value="" class="textinput" />
            <input style="height:95%; width:95px; border:2px #0c0c0c0 inset; font:12px Verdana,Arial; color:#000000; background:#FFFFFF" type="submit" value="Quick Search" />
          </form>
          <script language="javascript" type="text/javascript">
          <!--
          document.searchcpg.search.focus();
          -->
          </script>
        </td>

        </tr>
<!-- END breadcrumb -->
(not tested though). You might as well try aligning every object within the table cell that holds the search form explicitely using CSS

Joachim

P.S. Your no-right-click script is childish imo, I leave pages that try that stunt immediately no matter how good their content may be. I recommend removing it, as others might feel the same way.
Title: Re: Another question. Adding to the Gallery title bar
Post by: Walkinman on January 23, 2006, 02:54:13 am
Hey GauGau,

Thank you, your code works perfectly. Paver, I tried absmiddle, but no luck. Thanks though, i do appreciate it.

GauGau, Can I ask why you would leave a site with a no-right click code? I understand there are simple ways around it, but I don't know why someone would leave a site just because of that code? Does it affect the way you can view a site?

Thanks again.

Cheers

Carl
Title: Re: Another question. Adding to the Gallery title bar
Post by: Tranz on January 23, 2006, 03:11:48 am
In Firefox, the right-click does a lot more than save pictures. It can be used to navigate, translate pages, view the page in IE, open link in new tab/window, etc. When a site disables those functions, it hampers the experience for the user and nobody wants a hampered experience. I don't revisit sites that disable right-click either.
Title: Re: Another question. Adding to the Gallery title bar
Post by: Walkinman on January 23, 2006, 04:46:50 am
Hey TranzNDance,

Ahh --  thank you. I didn't know that. I'm a Mac User, so I don't "Right Click" anything.  ;)  I'll go ahead and remove the script.

Thanks again.

Cheers

Carl