parap
Forum Replies Created
-
Forum: Plugins
In reply to: NextGEN Gallery – edit link of photo to specific post?I’d like to say that trick is just a logical game, no particular php skills are required.
As a foreword, I found some posts near here an infuriated guy giving me reprimands on forum protocol, while I was expecting to some cool feedback, so I let he reconsiders different ways to adress to strangers and I post it here.
You can use this trick to obtain, in NextGen Gallery, some of the thumbnails of your choice link to an URL : a post, a page, a file to download, whatever.
1- Extract a copy of NextGen to your Desktop.
2- Open the nggfunctions.php
3- Go to line 338.
4- There you have by default:
// choose link between imagebrowser or effect $link = ($ngg_options['galImgBrowser']) ? $nggRewrite->get_permalink(array('pid'=>$picture->pid)) : $folder_url.$picture->filename
Take a look at the end of the phrase.
$folder_url.$picture->filename
That will displays your thumbs, towards its full size. The code is telling the thumbnail that its final URL be the images path$folder_url.
plus thefilename
, which convokes the concrete image.Erase one and other and let just
$picture->
.5- now, add ”
alttext
” at the end:// choose link between imagebrowser or effect $link = ($ngg_options['galImgBrowser']) ? $nggRewrite->get_permalink(array('pid'=>$picture->pid)) : $picture->alttext;
That will display later in your Admin Panel whatever in the Alt & Title Text field be written, e.g. an URL. Maybe if you write ‘Andromeda’ a cosmic gate opens in your screen.
6- Save it.
7- To prevent later your thumbnail shows the typical alt text as a weird URL when you place your mouse over the image, go to line 348.
There you have:
$out .= '<img title="'.stripslashes($picture->alttext).'" alt="'.stripslashes($picture->alttext).'" src="'.$thumbnailURL.$thumb_prefix.$picture->filename.'" '.$thumbsize.' />';
Remove the code
'.stripslashes($picture->alttext).'
Be careful with every little comma.You must get that:
$out .= '<img title="" alt="'.stripslashes($picture->alttext).'" src="'.$thumbnailURL.$thumb_prefix.$picture->filename.'" '.$thumbsize.' />';
So nothing inside the
title=""
order.In IE the alt text just disappears. In Firefox, you’ll get your description showing up. Don’t ask me why. Maybe the browser search for the closer alternative.
8- Save it, close the editor, and open your FTP.
9- Upload just one file, this new and pretty modified nggfunctions.php, to your host, in the Next-Gen Gallery plugin directory, to overwrite the default file.
10- go to your Admin Panel. In Gallery – Options – Gallery, select ‘show thumb description = description text’ (Update.)
11- Go to any of your galleries. Assign like always a description for every thumbnail (its title, a paragraph, etc) and, in the alt & title field, THE URL YOU WANT TO BE LINKED.
Check for that purpose your own pages and posts.
Visit your site. Now it’s when all your CSS style it’s completly broken.
I don’t know an easier way to do it.
Tell me if that worked for you ??Can anybody please cool and reasonably polite ask me please about my idea ?
Hello everybody.
Well, I found the way ??If someone is interested in just drop some lines here.
As I’ve felt a little alone-in-the-dark yesterday night and today evening, wondering in the emptyness, I’d prefer to be sure I’m talking to someone. Cheers.