Support Forums | Demo Gallery [1.x] [2.x] | Downloads | News | Site Map ]
Nuked Gallery
  Create a FREE account or Login   As a guest, you don't have access to our FULL navigation system.
 Forum FAQForum FAQ   StatisticsStatistics   SearchSearch   UsergroupsUsergroups   FavoritesFavorites  

Search on every Gallery page
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    NukedGallery.net Forum Index » Postnuke Issues » Gallery 1 Integration View previous topicPrinter friendly versionView next topic
Author Message
dzinn

User
User


Joined: Apr 09, 2005
Posts: 39

PostPosted: Wed Apr 20, 2005 2:04 am    Post subject: Search on every Gallery page Reply with quote

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
Back to top
Offline View user's profile Send private message
AdBot
   Post subject: Search on every Gallery page  

Back to top
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6292
Location: Washington Township, NJ, USA

PostPosted: Wed Apr 20, 2005 6:24 am    Post subject: Re: Search on every Gallery page Reply with quote

hmmm......yes, it's possible. you will want to edit these files:
view_album.php
view_photo.php

by adding:
PHP: › <?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>';
    } 
?>
to them where you see fit.
Back to top
Offline View user's profile Send private message Visit poster's website
dzinn

User
User


Joined: Apr 09, 2005
Posts: 39

PostPosted: Wed Apr 20, 2005 5:35 pm    Post subject: Re: Search on every Gallery page Reply with quote

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
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6292
Location: Washington Township, NJ, USA

PostPosted: Wed Apr 20, 2005 8:48 pm    Post subject: Re: Search on every Gallery page Reply with quote

yes, if you remove the if clause.
Back to top
Offline View user's profile Send private message Visit poster's website
dzinn

User
User


Joined: Apr 09, 2005
Posts: 39

PostPosted: Thu Apr 21, 2005 6:05 am    Post subject: Re: Search on every Gallery page Reply with quote

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
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6292
Location: Washington Township, NJ, USA

PostPosted: Thu Apr 21, 2005 6:19 am    Post subject: Re: Search on every Gallery page Reply with quote

in view_album.php, find:
PHP: › <?php echo '<table><tr><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></tr></table>'

$adminText '';

$albums_strpluralize_n2(ngettext("1 sub-album""%d sub-albums",$numAlbums), $numAlbums_("No albums"));

$imags_strpluralize_n2(ngettext("1 image""%d images"$numPhotos), $numPhotos_("no images"));

$pages_str=pluralize_n2(ngettext("1 page""%d pages"$maxPages), $maxPages_("0 pages")); ?>


add it before there...it should look like this:
PHP: › <?php $adminText '';

$albums_strpluralize_n2(ngettext("1 sub-album""%d sub-albums",$numAlbums), $numAlbums_("No albums"));

$imags_strpluralize_n2(ngettext("1 image""%d images"$numPhotos), $numPhotos_("no images"));

$pages_str=pluralize_n2(ngettext("1 page""%d pages"$maxPages), $maxPages_("0 pages")); ?>


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.
Back to top
Offline View user's profile Send private message Visit poster's website
dzinn

User
User


Joined: Apr 09, 2005
Posts: 39

PostPosted: Thu Apr 21, 2005 6:23 am    Post subject: Re: Search on every Gallery page Reply with quote

Thanks will give it a go next week & let you know.

Thanks again!
Deb
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6292
Location: Washington Township, NJ, USA

PostPosted: Thu Apr 21, 2005 6:28 am    Post subject: Re: Search on every Gallery page Reply with quote

welcome Smile
Back to top
Offline View user's profile Send private message Visit poster's website
dzinn

User
User


Joined: Apr 09, 2005
Posts: 39

PostPosted: Tue May 24, 2005 5:59 pm    Post subject: Re: Search on every Gallery page Reply with quote

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
Back to top
Offline View user's profile Send private message
dzinn

User
User


Joined: Apr 09, 2005
Posts: 39

PostPosted: Tue May 24, 2005 6:34 pm    Post subject: Re: Search on every Gallery page Reply with quote

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 .= '&nbsp;' . popup_link("[" . _("delete photo") ."]",
"delete_photo.php?id=$id&nextId=$nextId", false, true, 500, 500, 'admin');
}
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6292
Location: Washington Township, NJ, USA

PostPosted: Wed May 25, 2005 6:18 am    Post subject: Re: Search on every Gallery page Reply with quote

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.
Back to top
Offline View user's profile Send private message Visit poster's website
dzinn

User
User


Joined: Apr 09, 2005
Posts: 39

PostPosted: Wed May 25, 2005 6:09 pm    Post subject: Re: Search on every Gallery page Reply with quote

Hi,

I don't know how to do what you asked..

I just copied the 'code' from Crimson Editor...???

Thanks,
Deb
Back to top
Offline View user's profile Send private message
dzinn

User
User


Joined: Apr 09, 2005
Posts: 39

PostPosted: Thu May 26, 2005 6:25 am    Post subject: Re: Search on every Gallery page Reply with quote

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
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6292
Location: Washington Township, NJ, USA

PostPosted: Thu May 26, 2005 7:20 am    Post subject: Re: Search on every Gallery page Reply with quote

can you post a link to your gallery so that i can see the html source?
Back to top
Offline View user's profile Send private message Visit poster's website
dzinn

User
User


Joined: Apr 09, 2005
Posts: 39

PostPosted: Fri May 27, 2005 6:06 pm    Post subject: Re: Search on every Gallery page Reply with quote

http://www.bead-database.org/modules.php?name=Gallery

Thanks! and Melbourne is a great city.

Kind regards & thanks for your help,
Deb
Back to top
Offline View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    NukedGallery.net Forum Index » Postnuke Issues » Gallery 1 Integration View previous topicPrinter friendly versionView next topic
Goto page 1, 2  Next

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours

Powered by phpBB © phpBB Group



Sponsors: Dedicated ServersDomain NamesWeb HostingDomain Name RegistrationAustralian Web HostingNeckermannLook For GadgetsSwag Listings

10th year online! 2003-2013
Legal Use of this site consitutes agreement to the Acceptable Use Policy
Hosted by Implosion Works SourceForge.net Logo Theme by TonicMedia