tommo77funk
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin: NextGen Gallery] add search possibility also to pictures ! how toHi,
Found some code about 3am this morning that fixed my problem, if anyone else is having difficulty with nextgen image search results not being active links, try this code in functions.php
## Function to do searches on gallery pics from NextGen Gallery plugin
##
## 2 vars : (1) $keywords (usually coming from the standard search query from wordpress)
## (2) $numberPicCol (number of pic by row, if null it takes 4 )
function ngg_get_search_pictures ($keywords, $numberPicRow = NULL) {
global $wpdb;
$count=1;
if (!$numberPicRow) { $numberPicRow = “4”; }$nngquery = “
SELECT pid,description,alttext
FROM wp_ngg_pictures
WHERE MATCH (description, filename, alttext) AGAINST (‘*$keywords*’ IN BOOLEAN MODE)
AND exclude = ‘0’
“;
$pictures = $wpdb->get_results($nngquery, ARRAY_A);if ($pictures) foreach($pictures as $pic) {
$out .= ‘‘;
$out .= ‘<img class=”ngg-singlepic” src=”‘.nggallery::get_thumbnail_url($pic[pid]).'” alt=”‘.stripslashes($pic[alttext]).'” title=”‘.stripslashes($pic[alttext]).'” />’;
$out .= “\n”;
if ($count == 0) {
$out .= “
“;
}
++$count;
$count%=$numberPicRow;
}
return $out;
};Best wishes,
tom
Hi yyeric,
yeah I’ve seen it, and its really cool ?? as are your pics and site, I would like to do search but show results like the results when a tag is clicked.
I can make them appear, but not as links.
e.g. visit here use search box up the top, to search for ‘northern lights’ it will bring up some images from the gallery as well as some posts.
My problem, the images just dont click… ??
So i wonder if the code from ‘image’ post, for displaying the results, could go in search.php ?
I am new to wordpress/php, so will take me a bit of time ??
I dont want to hijack this post with another topic, so i’m sorry for that!
I’ll try and work through it and make a new post on the search tomorrow ??
cheers yyeric !
tom
Hi,
Great work and many thanks yyeric ! Good luck with your work ??
cheers,
tom
I am now trying to implement a search, from this post
Forum: Plugins
In reply to: [Plugin: NextGen Gallery] add search possibility also to pictures ! how toHi,
Many thanks for this post psykonevro, just what i wanted ?? I have to some degree of success implemented a search for my NextGen gallery. I just have 2 problems that i was hoping could be fixed.
please see here
Firstly I have tried AengusM’s code and it works, but strangely not for my nextgen tags ??
and secondly when displaying pics as well as posts from a search, (I do want to search both) the resulting pics in the search results are not active, meaning they cannot be clicked, to show larger image.
The code i got from here to post in search results does not seem to allow a link to larger image to be made. I have been trying for hours to solve this, but no joy.
I have looked at AengusM gallery and it is excellent, as well as the pics, all works as intended,
So any tips or advice would be really gratefully received ??
best wishes,
tom
Hi,
Thanks for reply shopefowler. After quite a few hours I managed to get yyeric’s code to work. The trouble was creating the url to display the images ??
Yyeric if you are reading this, a thousand thank you’s ! and also to realsol !
I am a very happy man ??
best wishes,
tom
p.s. I will post link to library when finished, right now I have an awful lot of tagging to do ??
Hi,
Thank you so much for posting this php code to allow tags for nextGen, I have followed the tutorial kindly posted by yyeric, and all is working apart from when i click a tag in the cloud, I am not getting the resulting pics to show.
Anyone know what i’m doing wrong ?
here is a link https://tommills.co.uk/latestnews/image-library/
Really grateful for any advice ??
best wishes,
tom
Forum: Plugins
In reply to: Nextgen, slideshow and lightbox when blog is fed to another websiteSorry just forgot to put nextgen-gallery tag on my post