Fork me on GitHub

Help Needed to Open Gallery Template in Popup Window without Postnuke Frames from Thumbnail Gallery  Bottom

  • Update: This is for the Photoshare module by Jørn Wildt at http://www.elfisk.dk/index.php?module=Pagesetter&func=viewpub&tid=10&pid=2

    CROSS-POSTED AT:

    http://www.elfisk.dk/index.php?module=pnForum&func=viewtopic&topic=3318&start=0#pid12175

    Hi Jorn and others!

    I would be very appreciative if someone can help me figure this - what appears to be a simple modification - out. I assure you I searched high and low for this fix here and at postnuke forums, and have spent needless hours hacking at what is an excellent module. Here it goes, and thanks in advance!

    I have an album set as a flat thumbnail template (without the hide postnuke frames option checked) working in postnuke 7.2.6 ion linux, but would like to click a thumbnail and pop up a new window (I can do the javascript part), in which I would use the gallery module. I have changed the following code in the /templates/thumbnails/template.php file from:


    Quote

    function getThumbnailHTML($title, $id, $pos, $folderID, $templateHelper)
    {
    $imageURL = $templateHelper->thumbnailURL($folderID, $id);
    $largerURL = $templateHelper->folderURL($folderID, 'slideshow') . "&iid=$id";



    to:


    Quote

    function getThumbnailHTML($title, $id, $pos, $folderID, $templateHelper)
    {
    $imageURL = $templateHelper->thumbnailURL($folderID, $id);
    $largerURL = $templateHelper->folderURL($folderID, 'gallery') . "&iid=$id";



    The gallery template is perfect for what I need and I can't wait to customize it and add some CSS image magnification! Here's where I ask for your assistance:

    The popup would need to have the Hide Postnuke Frames option checked, so I tried to create an "If Then" statement within the "photoshare_user_showimages" function and was playing with the "allowframeremove" and "hidepnframe" variables, such as:

    Update: This was in the /modules/photoshare/pnuser.php file:

    Quote

    if ($templateData['folder']['hidepnframe'] | $templateName=='gallery')


    but nothing I have tried has worked. I understand that the hidepnframe is associated with each folder and not by template type. Does anyone have any idea how I could accomplish this? Thanks in advance for your help!

    -Eric



    edited by: ewoodlore, Mar 04, 2007 - 06:03 AM
  • I'd be glad to pay for someone's time if they can get this done ASAP? Takers?
  • RESOLVED!!!

    I was able to fix this with a simple tweak of the code, associating the 'hidepnframe' variable to a template rather than a folder, by an if statement in the "function photoshare_user_showimages()" function at about line 2864, just above this line:

    Quote

    $templateData['initialImageID'] = $imageID;


    And here is the code I inserted:

    Quote

    if ($templateName === 'gallery')
    $templateData['folder']['hidepnframe'] = 1;


    Thanks Jorn for the great module!

This list is based on users active over the last 60 minutes.