Support » Plugins » [Plugin: NextGEN Gallery] image link to URL solved!

  • After piecing together a few ideas from the forums, I finally got the NextGEN Gallery system to allow slideshow pictures to link to user-designated URLs.

    Requires a change to “nggextractXML.php” in the plugin folder.

    // Create XML output
    header("content-type:text/xml;charset=utf-8");
    
    echo "<playlist version='1' xmlns='http://xspf.org/ns/0/'>\n";
    echo "	<title>".stripslashes($thepictures[0]->name)."</title>\n";
    echo "	<trackList>\n";
    
    if (is_array ($thepictures)){
    	foreach ($thepictures as $picture) {
    		echo "		<track>\n";
    		if (!empty($picture->description))
    		echo "			<title>".strip_tags(stripslashes($picture->description))."</title>\n";
    		else
    		echo "			<title>".$picture->filename."</title>\n";
    		echo "			<location>".$siteurl."/".$picture->path."/".$picture->filename."</location>\n";
    //
    //populates the <info> tag with the contents of the "ALT"
    //field in NextGEN Gallery Manager
    //
    		if (!empty($picture->alttext))
    		echo "			<info>".($picture->alttext)."</info>\n";
    		echo "		</track>\n";
    	}
    }

    Then just enter the URL you want into the “ALT” area in the Manage Gallery page.

    Also in the SWFObject embed code for the JW Image Rotator, you must ensure that the “linkfromdisplay” variable is set to “true”.

    so.addVariable("linkfromdisplay", "true");

    cheers

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thanks! This is great! I’ve been searching for this for some time now! But unfortanetely I don’t really get it (I’m just a noob.) I changed the nggextractXML.php file but I don’t get what I have to do after that. I can’t find the ALT area in the manage gallery page and I don’t get what I have to do with the SWFObject file. Can you please explain it so that this noob understands it? thanks in advance!

    i have followed the directions but it does not seem to be working. http://www.creatingmarketingresults.com/wpcmr/?p=3 this is the page and i have the Hilton Garden Inn logo in the middle of the page at the bottom set up as you say. any help would be greatly appreciated!

    also what aobut doing this in the sidebar widget?

    hey i thanks for the solution, i have one question,
    “SWFObject embed code” i can modify it in the swfobject.php?
    thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: NextGEN Gallery] image link to URL solved!’ is closed to new replies.