• Resolved flandero

    (@flandero)


    hi all,
    i need to know, when browsing pictures with imagebrowser, in which album they are.

    using <?php var_dump($image); ?> i can find a lot of infos but not the albumid

    i’m not skilled enough to make an hack by myself and i don’t want to use nextgen_customfields since i think writing everytime the album id manually it’s a waste of time.

    please HELP. i really need ” $image->albumid ” variable in imagebrowser
    ty ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter flandero

    (@flandero)

    maybe a trick would be use $image->galleryid to discover in which album is it, querying “sortorder” in nggalbum and making a comparation

    but it’s just an idea, i don’t know if it could work, i guess yes

    thanks in advance and…. sorry for my bitter english =)

    Thread Starter flandero

    (@flandero)

    another trick could be writing a field named “albumid” in the ngg_pictures database everytime i put a gallery into an album

    maybe it work ?

    i’m not interested to put a gallery in more than one album

    thaaanks !!!

    Thread Starter flandero

    (@flandero)

    solved by myself:

    <?php $connection= mysql_connect(DB_HOST,DB_USER,DB_PASSWORD); ?>
    <?php $aidquery = “SELECT id FROM wp_ngg_album WHERE sortorder like ‘%\””.$image->gid.”\”;%'”; ?>
    <?php mysql_select_db(DB_NAME, $connection) or die(errore()); ?>
    <?php $aidfetch = mysql_query($aidquery); ?>
    <?php $aid = mysql_fetch_array($aidfetch); ?>

    <?php echo $aid[0]; ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: NextGEN Gallery] how to find albumid in imagebrowser’ is closed to new replies.