Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post Pic Comments Generation In The Album Stopped Working.... 
 
Hello

First of all this feature was working, I noticed that it stopped only yesterday when I uploaded a new picture (after one year...), received comments but nothing appeared in my mailbox. My users (staff included...   ) never warned me.

Anyway, I found that in the table "..._album_comment_watch" the pic_id field at a certain point began to write a straight "0", like this:

Code: [Download] [Hide] [Select]
INSERT INTO `phpbb_album_comment_watch` VALUES(0, 2382, 0);
`phpbb_album_comment_watch` VALUES(0, 712, 0);
`phpbb_album_comment_watch` VALUES(0, 4948, 0);
`phpbb_album_comment_watch` VALUES(0, 712, 0);
`phpbb_album_comment_watch` VALUES(4052, 5062, 0);
`phpbb_album_comment_watch` VALUES(0, 712, 0);
`phpbb_album_comment_watch` VALUES(0, 712, 0);
`phpbb_album_comment_watch` VALUES(0, 3009, 0);
`phpbb_album_comment_watch` VALUES(0, 712, 0);


pic_id is the first value. I found the function in album_upload.php, from the "FAP_pic_comment_notify" and the problem, for my site was here:

Code: [Download] [Hide] [Select]
           //Get the pic id for this pic
                  $sql = "SELECT pic_id FROM " . ALBUM_TABLE . "
                            WHERE pic_filename = '" . $pic_filename . "'
                            AND pic_time = '" . $pic_time . "'
                            LIMIT 1";


I don't know the reason why the "pic_filename" was no more a valid or recognizable value to be taken, I've not investigated further (I'm not a coder...), I thought the "proper case" function could interfere but it was set to off, it should be something that I can't find.
Anyway I changed the code to this

Code: [Download] [Hide] [Select]
//Get the pic id for this pic
                $sql = "SELECT pic_id FROM " . ALBUM_TABLE . "
                        WHERE pic_username = '" . $pic_username . "'
                        AND pic_time = '" . $pic_time . "'
                        LIMIT 1";


using the "user name" instead of the "pic title", with the pic time it should not generate a mess. It's working, but a more elegant should be found...

In the meanwhile I updated "album comment watch" with the notification turned on on all pictures (before it was working only for the pictures uploaded after the update) copying the "album" table, deleting all the fields but the pic id and the user id and then adding the notify status field, then generating the code to update the other table. It is now working even for the older pictures. I'm not able to write a script but maybe it could be done  

I hope that it can be useful...
 



 
tormentorSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Pic Comments Generation In The Album Stopped Working.... 
 
Thanks for reporting, I will check.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron