Log in | Register | Lost password

Bottom
Displaying extra fields in Photoshare block
  • Posted: 22.06.2006, 04:59
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    Hello,

    Is there a way to display Photoshare's extra fields in the HTML of the random image block in Postnuke? I can see in the documentation how to display common fields like ${title}, ${folderTitle}, and ${imageURL}. However I can't find any documentation about displaying the contents of the extra fields which can be named in the Photoshare Admin interface.

    I have named one of my extra fields "Credit" in order to identify the photographer for each photo. I would like to display this photo credit information in the random image block if possible.

    Thanks in advance.

    -Todd



    edited by: toddviola, Jun 22, 2006 - 06:00 AM
  • Posted: 27.06.2006, 20:23
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    I figured out a solution myself. In ./modules/photoshare/pnblocks/random.php, I added more fields to the $substitutes array.

    Code

    $substitutes = array( 'imageURL' => $imageURL,



    'thumbnailURL' => $thumbnailURL,



    'folderURL' => $folderURL,



    'title' => $imageInfo['title'],

    'description' => $imageInfo['description'],

    'extra1' => $imageInfo['extra1'],

    'extra2' => $imageInfo['extra2'],

    'extra3' => $imageInfo['extra3'],



    'owner' => $imageInfo['ownername'],



    'folderTitle' => $folderInfo['title']);


    Once I did that, I could access the contents of these fields in my block. For example, ${extra1}.

    Regards,
    Todd

Template courtesy of Designs By Darren.