The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

NextGEN Gallery
If There is a Description show it, if not show file name (1 post)

  1. Chris
    Posted 4 years ago #

    So I am trying to get a little php to work but am just terrible when it comes to php. I would like to show the image description if there is one and if there isn't I would like the image filename to show. Here is what I have but I know it is wrong:

    			$f = $image->filename;
    			$d = $image->description;
    			if ($d) echo "$d";
    			else { echo "$f" ; } ?>

    Anyone know what I am doing wrong? Thanks!


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NextGEN Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic