| Author | Message |
| Post Title: Search on every Gallery page | |
dzinn
Joined: Apr 09, 2005 Posts: 39
|
Posted: Wed Apr 20, 2005 2:04 am
Hi all,
Is it possible in Gallery 1 (I'm using within PHP Nuke), to have Search appear on EVERY page of the Gallery? Or at least more than just the first page -- as if you want to search, you have to go back.... Hope this makes sense. I did a quick Archive search but couldn't find the answer. Help appreciated! Deb |
| Author | Message |
| Post Title: Re: Search on every Gallery page | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Wed Apr 20, 2005 6:24 am
hmmm......yes, it's possible. you will want to edit these files:
view_album.php view_photo.php by adding: PHP: › to them where you see fit.<?php if ($numPhotos != 0) {
|
| Author | Message |
| Post Title: Re: Search on every Gallery page | |
dzinn
Joined: Apr 09, 2005 Posts: 39
|
Posted: Wed Apr 20, 2005 5:35 pm
Sorry to be lazy, but is your response the same as this advice? It looks a bit different to me?
http://gallery.menalto.com/index.php?na ... highlight= Thanks! Deb |
| Author | Message |
| Post Title: Re: Search on every Gallery page | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Wed Apr 20, 2005 8:48 pm
yes, if you remove the if clause.
|
| Author | Message |
| Post Title: Re: Search on every Gallery page | |
dzinn
Joined: Apr 09, 2005 Posts: 39
|
Posted: Thu Apr 21, 2005 6:05 am
Hi,
ok, I tried with the 'if clause' but it didn't work (cut & paste) (I think it was a parse error or something) WHERE do I put it within the 2 files you mention? Sorry, I'm not a PHP programmer!!!! Many thanks for your patience, Deb |
| Author | Message |
| Post Title: Re: Search on every Gallery page | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Thu Apr 21, 2005 6:19 am
in view_album.php, find:
PHP: ›
<?php echo '<table><tr><td valign="middle" align="right">';
add it before there...it should look like this: PHP: ›
<?php $adminText = '';
you might have to tweak the table a little so that it fits in your style. it would be put in a similar place in view_photo.php; after the call to include the photo.header file, in a table. |
| Author | Message |
| Post Title: Re: Search on every Gallery page | |
dzinn
Joined: Apr 09, 2005 Posts: 39
|
Posted: Thu Apr 21, 2005 6:23 am
Thanks will give it a go next week & let you know.
Thanks again! Deb |
| Author | Message |
| Post Title: Re: Search on every Gallery page | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Thu Apr 21, 2005 6:28 am
welcome
|
| Author | Message |
| Post Title: Re: Search on every Gallery page | |
dzinn
Joined: Apr 09, 2005 Posts: 39
|
Posted: Tue May 24, 2005 5:59 pm
Wooooooowie,
I think it worked! Now.... how can I add SEARCH at the top of the page when displaying every individual IMAGE in the database? Our site is search crazy. Many thanks!!!!!!!! Deb |
| Author | Message |
| Post Title: Re: Search on every Gallery page | |
dzinn
Joined: Apr 09, 2005 Posts: 39
|
Posted: Tue May 24, 2005 6:34 pm
Hi again,
Ok, I tried the same thing in view_photo.php -- & the Search box appears, but doesn't work (e.g., doesn't find search results.... Help -- I've copied a bit of the code to below.. Did I put it in the right place? --- Thanks, Deb includeHtmlWrap("photo.header"); ?> <!-- Top Nav Bar --> <form name="admin_form" action="view_photos.php"> <table border="0" width="<?php echo $mainWidth ?>" cellpadding="0" cellspacing="0"> <tr> <td> <?php if ($numPhotos != 0) { echo '<td valign="middle" align="right">'; echo makeFormIntro('search.php', array( 'name' => 'search_form', 'method' => 'post')); echo '<span class="search">'. _("Search") .': </span>'; echo '<input class="fineprint" type="text" name="searchstring" value="" size="25">'; echo '</form></td>'; } $adminCommands = ''; $page_url=makeAlbumUrl($gallery->session->albumName, $id, array("full" => 0)); if (!$gallery->album->isMovie($id)) { print "<a id=\"photo_url\" href=\"$photoURL\" ></a>\n"; print '<a id="page_url" href="'. $page_url .'"></a>'."\n"; if ($gallery->user->canWriteToAlbum($gallery->album)) { $adminCommands .= popup_link("[" . _("resize photo") ."]", "resize_photo.php?index=$index", false, true, 500, 500, 'admin'); } if ($gallery->user->canDeleteFromAlbum($gallery->album) || ($gallery->album->getItemOwnerDelete() && $gallery->album->isItemOwner($gallery->user->getUid(), $index))) { // determine index of next item (after deletion) // we move to previous image if we're at the end // and move forward if we're not if ($index >= $numPhotos && $index > 1) { $nextIndex = $index - 1; } elseif ($index + 1 <= $numPhotos) { $nextIndex = $index + 1; } else { $nextIndex = $index; } // make sure that the "next" item isn't an album if ($gallery->album->isAlbum($nextIndex)) { $nextId=''; } else { $nextId = $gallery->album->getPhotoId($nextIndex); } $adminCommands .= ' ' . popup_link("[" . _("delete photo") ."]", "delete_photo.php?id=$id&nextId=$nextId", false, true, 500, 500, 'admin'); } |
| Author | Message |
| Post Title: Re: Search on every Gallery page | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Wed May 25, 2005 6:18 am
can you edit your post and use either the "code" or "php" bbcodes for your code? the parser is, I think, removing some of the code you've posted.
|
| Author | Message |
| Post Title: Re: Search on every Gallery page | |
dzinn
Joined: Apr 09, 2005 Posts: 39
|
Posted: Wed May 25, 2005 6:09 pm
Hi,
I don't know how to do what you asked.. I just copied the 'code' from Crimson Editor...??? Thanks, Deb |
| Author | Message |
| Post Title: Re: Search on every Gallery page | |
dzinn
Joined: Apr 09, 2005 Posts: 39
|
Posted: Thu May 26, 2005 6:25 am
Hi,
I compared the code in Crimson Editor & what was included in my post -- I think the text is the same (indentation was removed)??? Again, the Search Box shows up, but the search doesn't work.... (on the page with an individual image) (So close, but yet so far away!) Search does work on each album page now. Deb |
| Author | Message |
| Post Title: Re: Search on every Gallery page | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Thu May 26, 2005 7:20 am
can you post a link to your gallery so that i can see the html source?
|
| Author | Message |
| Post Title: Re: Search on every Gallery page | |
dzinn
Joined: Apr 09, 2005 Posts: 39
|
Posted: Fri May 27, 2005 6:06 pm
http://www.bead-database.org/modules.php?name=Gallery
Thanks! and Melbourne is a great city. Kind regards & thanks for your help, Deb |
| Author | Message |
| Post Title: Re: Search on every Gallery page | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Tue May 31, 2005 9:54 am
hrm...ok, the main gallery and album search work fine, but when you're viewing a photo it 404s on you. the reason, it gives you this URL:
http://www.bead-database.org/view_photo ... tring=bead which is incorrect. you can change the form "action" portion of the code to correctly direct you to modules.php.... instead of view_photos.php..... |