Pages (2):    1 2
Member
Member
jphilbert   2013-04-11, 21:33
#21

@sbillard ... forget what I said ... I got it to work after nulling everything I did not need with "" adding null is a bad thing smh.
reference:
http://www.zenphoto.org/documentation/classes/ThemeObject.html#methodaddComment

Member
Member
sbillard   2013-04-11, 22:34
#22

Not sure I understand. The comment about NULL had to do with album instantiation. Nothing at all to do with the addComment method.

The album constructor totally ignores the gallery parameter since there is one and only one gallery object.

Member
Member
jphilbert   2013-04-12, 00:44
#23

hmmm something I posted is missing ... sorry ...must have been the spam filter ...anyway here it is again:


I tested this completely on Zenphoto and it works GREAT .as soon as I added it to the API for the plugin it returns user. any ideas as to why?


$id = "someid";
$row = query_single_row('SELECT '.prefix("images").'.id, '.prefix("images").'.filename, '.prefix("albums").'.folder FROM
'.prefix("images").' LEFT JOIN '.prefix("albums").' ON '.prefix("images").'.albumId = '.prefix("albums").'.id
WHERE
'.prefix("images").'.id='.$id, true);

    $albumobject = new Album(new Gallery(),$row['folder']);
    $imageobject = newImage($albumobject, $row['filename']);
    $username = 'Joh Doe';
$commentText = 'HELLO Blaster World';

$postcomment = $imageobject->addComment($username, 'fake-email.com', '', $commentText, '','' , '', '', '', '');
echo 'postcomment '. $postcomment;

Pages (2):    1 2
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.