Icy Phoenix

     
 


This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies. 
Page 1 of 1
 
 
Reply with quote Download Post 
Post FAP CUSTOMIZATION - [MOD] Pic comment notification 
 
Features of Mod Pic Comment Notification.

  • Provides pic poster, during pic upload,  the option to receive email notifications of comments made to pic.
  • Provides registered users the ability to start or stop comment notification when viewing pic.
  • Provides a URL in the email notification to stop watching the pic for comments.


I've done some preliminary testing of this mod, on both Icy Phoenix and the standard pbpBB w/FAP, and it appears to function without errors.

FAP_pic_comment_notify.rar
Description: Sends email notification of pic comments 
Download
Filename: FAP_pic_comment_notify.rar
Filesize: 6.65 KB
Downloaded: 235 Time(s)

 



 
ArtieSend private message  
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: [MOD] Pic Comment Notification 
 
That's a wonderful mod,
great shot from ARTIE.
I think 's the best mod for FAP.

Thank you Artie!
 



 
felix968Send private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] Pic Comment Notification 
 
That's excellent Artie,
thanks very much!

Will definitely install that one!
 



 
lefty74Send private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] Pic comment notification 
 
Another great shoot...

I've added it on FAP and on this site.
 




____________
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
Reply with quote Download Post 
Post Re: [MOD] Pic comment notification 
 
great work Artie. I love it. thx
 




____________

Play Games at GamesCampus!
 
KugeLSichASend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] Pic comment notification 
 
KugeLSichA wrote: [View Post]
great work Artie. I love it. thx


Me too, thanks Artie
 



 
TheSteffenSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] Pic Comment Notification 
 
Hi Artie. I install this mod today.... and I obtain this error:
Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/golfplea/public_html/scrapperszone/Forum/album_showpage.php on line 1225
Can you help me please? Thanks in advance!
Code: [Download] [Hide]
  1. <?php  
  2. /***************************************************************************  
  3. *                             album_showpage.php  
  4. *                            -------------------  
  5. *   begin                : Wednesday, February 05, 2003  
  6. *   copyright            : (C) 2003 Smartor  
  7. *   email                : smartor_xp@hotmail.com  
  8. *  
  9. *   $Id: album_comment.php,v 2.0.8 2003/03/14 07:08:15 ngoctu Exp $  
  10. *  
  11. ***************************************************************************/  
  12.  
  13. /***************************************************************************  
  14. *  
  15. *   This program is free software; you can redistribute it and/or modify  
  16. *   it under the terms of the GNU General Public License as published by  
  17. *   the Free Software Foundation; either version 2 of the License, or  
  18. *   (at your option) any later version.  
  19. *  
  20. ***************************************************************************/  
  21.  
  22. // CTracker_Ignore: File Checked By Human  
  23. // Tell the Security Scanner that reachable code in this file is not a security issue  
  24.  
  25. define('IN_PHPBB', true);  
  26. $phpbb_root_path = './';  
  27. include($phpbb_root_path . 'extension.inc');  
  28. include($phpbb_root_path . 'common.' . $phpEx);  
  29. include($phpbb_root_path . 'includes/functions_validate.' . $phpEx);  
  30. include($phpbb_root_path . 'includes/functions_post.' . $phpEx);  
  31.  
  32. // Start session management  
  33. $userdata = session_pagestart($user_ip, PAGE_ALBUM_PICTURE);  
  34. init_userprefs($userdata);  
  35. // End session management  
  36.  
  37. // Get general album information  
  38. $album_root_path = $phpbb_root_path . ALBUM_MOD_PATH . '';  
  39. include($album_root_path . 'album_common.' . $phpEx);  
  40.  
  41. if ( defined('IS_PHPBBXS') )  
  42. {  
  43.     include_once($phpbb_root_path . 'includes/functions_color_groups.' . $phpEx);  
  44.     include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);  
  45.     if ( isset($_POST['message']) )  
  46.     {  
  47.         $_POST['comment'] = $_POST['message'];  
  48.     }  
  49. }  
  50. else  
  51. {  
  52.     if ($album_config['album_bbcode'] == 1)  
  53.     {  
  54.         include_once($album_root_path . 'album_bbcode.' . $phpEx);  
  55.     }  
  56. }  
  57.  
  58. if( isset($_GET['mode']) && $_GET['mode'] == 'smilies' )  
  59. {  
  60.     if ( defined('IS_PHPBBXS') )  
  61.     {  
  62.         generate_smilies('window', PAGE_ALBUM_PICTURE);  
  63.         exit;  
  64.     }  
  65.     else  
  66.     {  
  67.         generate_smilies_album('window', PAGE_ALBUM_PICTURE);  
  68.         exit;  
  69.     }  
  70. }  
  71.  
  72. // ------------------------------------  
  73. // Check the request  
  74. // ------------------------------------  
  75.  
  76. if( isset($_GET['pic_id']) )  
  77. {  
  78.     $pic_id = intval($_GET['pic_id']);  
  79. }  
  80. elseif( isset($_POST['pic_id']) )  
  81. {  
  82.     $pic_id = intval($_POST['pic_id']);  
  83. }  
  84. else  
  85. {  
  86.     if( isset($_GET['comment_id']) )  
  87.     {  
  88.         $comment_id = intval($_GET['comment_id']);  
  89.     }  
  90.     elseif( isset($_POST['comment_id']) )  
  91.     {  
  92.         $comment_id = intval($_POST['comment_id']);  
  93.     }  
  94.     else  
  95.     {  
  96.         message_die(GENERAL_ERROR, 'Bad request');  
  97.     }  
  98. }  
  99.  
  100. // Midthumb & Full Pic  
  101. if( isset($_GET['full']) || isset($_POST['full']) )  
  102. {  
  103.     $picm = false;  
  104.     $full_size_param = '&amp;full=true';  
  105. }  
  106. else  
  107. {  
  108.     if ($album_config['midthumb_use'] == 1)  
  109.     {  
  110.         $picm = true;  
  111.         $full_size_param = '';  
  112.     }  
  113.     else  
  114.     {  
  115.         $picm = false;  
  116.         $full_size_param = '&amp;full=true';  
  117.     }  
  118. }  
  119.  
  120. // ------------------------------------  
  121. // TEMPLATE ASSIGNEMENT  
  122. // ------------------------------------  
  123. if ((isset($_GET['slideshow']) && (intval($_GET['slideshow']) > 0)) || (isset($_POST['slideshow']) && (intval($_POST['slideshow']) > 0)))  
  124. {  
  125.     $gen_simple_header = true;  
  126.     $show_template = 'album_slideshow_body.tpl';  
  127.     $nuffimage_pic = ( $picm == false ) ? 'album_pic.' : 'album_picm.';  
  128. }  
  129. else  
  130. {  
  131.     //$show_template = 'album_showpage_body.tpl';  
  132.     if ( (isset($_GET['nuffimage']) || isset($_POST['nuffimage'])) & ($album_config['enable_nuffimage'] == 1) )  
  133.     {  
  134.         include($album_root_path . 'album_nuffimage_box.' . $phpEx);  
  135.         $template->assign_var_from_handle('NUFFIMAGE_BOX', 'nuffimage_box');  
  136.         $show_template = 'album_pic_nuffed_body.tpl';  
  137.         $nuffimage_vars = '&amp;nuffimage=true';  
  138.         $nuffimage_pic = 'album_pic_nuffed.';  
  139.         $nuff_http_full_string = $nuff_http['full_string'];  
  140.         $template->assign_block_vars('disable_pic_nuffed', array(  
  141.             'L_PIC_UNNUFFED_CLICK' => $lang['Nuff_UnClick'],  
  142.             'U_PIC_UNNUFFED_CLICK' => append_sid(album_append_uid('album_showpage.' . $phpEx . '?pic_id=' . $pic_id . $full_size_param)),  
  143.             )  
  144.         );  
  145.     }  
  146.     else  
  147.     {  
  148.         $show_template = 'album_showpage_body.tpl';  
  149.         $nuffimage_vars = '';  
  150.         $nuffimage_pic = ( $picm == false ) ? 'album_pic.' : 'album_picm.';  
  151.         $nuff_http_full_string = '';  
  152.     }  
  153. }  
  154.  
  155.  
  156. // ------------------------------------  
  157. // PREVIOUS & NEXT  
  158. // ------------------------------------  
  159. if( isset($_GET['mode']) )  
  160. {  
  161.     //if( ($_GET['mode'] == 'next') && ($no_next_pic == false) )  
  162.     if($_GET['mode'] == 'next')  
  163.     {  
  164.         //$pic_id = $next_pic_id[0];  
  165.         $sql_where = 'AND n.pic_id > c.pic_id';  
  166.         $sql_order = 'ORDER BY n.pic_id ASC LIMIT 1';  
  167.  
  168.     }  
  169.  
  170.     //if( ($_GET['mode'] == 'prev') && ($no_prev_pic == false) )  
  171.     if($_GET['mode'] == 'prev')  
  172.     {  
  173.         //$pic_id = $prev_pic_id[0];  
  174.         $sql_where = 'AND n.pic_id < c.pic_id';  
  175.         $sql_order = 'ORDER BY n.pic_id DESC LIMIT 1';  
  176.     }  
  177.  
  178.     $sql = "SELECT n.pic_id, n.pic_cat_id, n.pic_user_id, n.pic_time  
  179.             FROM ". ALBUM_TABLE ." as n, ". ALBUM_TABLE ." AS c  
  180.             WHERE c.pic_id = $pic_id  
  181.                 $sql_where  
  182.             AND n.pic_cat_id = c.pic_cat_id  
  183.                 $sql_order";  
  184. }  
  185. else  
  186. {  
  187.     $sql = "SELECT pic_id, pic_cat_id, pic_user_id, pic_time  
  188.             FROM ". ALBUM_TABLE ."  
  189.             WHERE pic_id = $pic_id";  
  190. }  
  191.  
  192. if( !($result = $db->sql_query($sql)) )  
  193. {  
  194.     message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql);  
  195. }  
  196.  
  197. $row = $db->sql_fetchrow($result);  
  198.  
  199. if( empty($row) )  
  200. {  
  201.     message_die(GENERAL_ERROR, $lang['Pic_not_exist']);  
  202. }  
  203.  
  204. $pic_id_old = $pic_id;  
  205. $pic_id_tmp = $row['pic_id'];  
  206. $pic_cat_id_tmp = $row['pic_cat_id'];  
  207. $pic_time_tmp = $row['pic_time'];  
  208. $pic_user_id_tmp = $row['pic_user_id'];  
  209. $db->sql_freeresult($result);  
  210.  
  211. if( isset($_GET['mode']) )  
  212. {  
  213.     if ( ($_GET['mode'] == 'next') || ($_GET['mode'] == 'prev') )  
  214.     {  
  215.         $pic_id = $pic_id_tmp;  
  216.     }  
  217. }  
  218.  
  219. if ($album_config['show_pics_nav'] == 1)  
  220. {  
  221.     $template->assign_block_vars('pics_nav', array(  
  222.         'L_PICS_NAV' => $lang['Pics_Nav'],  
  223.         'L_PICS_NAV_NEXT' => $lang['Pics_Nav_Next'],  
  224.         'L_PICS_NAV_PREV' => $lang['Pics_Nav_Prev'],  
  225.         )  
  226.     );  
  227. }  
  228. // NEXT  
  229. $sql = "SELECT a.*  
  230.         FROM " . ALBUM_TABLE . " AS a  
  231.         WHERE a.pic_id > " . $pic_id_tmp . "  
  232.             AND a.pic_cat_id = " . $pic_cat_id_tmp . "  
  233.             AND a.pic_approval = 1  
  234.         ORDER BY pic_id ASC LIMIT 2";  
  235.  
  236. if( !($result = $db->sql_query($sql)) )  
  237. {  
  238.     message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql);  
  239. }  
  240.  
  241. //$row = $db->sql_fetchrow($result);  
  242. $next_pic_count = $db->sql_numrows($result);  
  243. $next_pic_rows = $db->sql_fetchrowset($result);  
  244. $db->sql_freeresult($result);  
  245.  
  246. if ($next_pic_count == 0)  
  247. {  
  248.     $no_next_pic = true;  
  249.  
  250.     $sql = "SELECT a.*  
  251.             FROM " . ALBUM_TABLE . " AS a  
  252.             WHERE a.pic_cat_id = " . $pic_cat_id_tmp . "  
  253.                 AND a.pic_approval = 1  
  254.             ORDER BY pic_id ASC LIMIT 1";  
  255.  
  256.     if( !($result = $db->sql_query($sql)) )  
  257.     {  
  258.         message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql);  
  259.     }  
  260.  
  261.     $row = $db->sql_fetchrow($result);  
  262.     $first_pic_id = $row['pic_id'];  
  263.     $db->sql_freeresult($result);  
  264. }  
  265. else  
  266. {  
  267.     $no_next_pic = false;  
  268.     if ( $album_config['invert_nav_arrows'] == 0 )  
  269.     {  
  270.         for($i = $next_pic_count - 1; $i >= 0; $i--)  
  271.         {  
  272.             $next_pic_id[$i] = $next_pic_rows[$i]['pic_id'];  
  273.             $thumbnail_file = append_sid(album_append_uid('album_thumbnail.' . $phpEx . '?pic_id=' . $next_pic_id[$i]));  
  274.             if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )  
  275.             {  
  276.                 $pic_filename = $next_pic_rows[$i]['pic_filename'];  
  277.                 $pic_filetype = strtolower(substr($pic_filename, strlen($pic_filename) - 4, 4));  
  278.                 $pic_thumbnail = ( $next_pic_rows[$i]['pic_thumbnail'] == '' ) ? md5($pic_filename) . $pic_filetype : $next_pic_rows[$i]['pic_thumbnail'];  
  279.                 //$pic_thumbnail = ( $next_pic_rows[$i]['pic_thumbnail'] == '' ) ? $pic_filename : $next_pic_rows[$i]['pic_thumbnail'];  
  280.                 $pic_thumbnail_fullpath = ALBUM_CACHE_PATH . $pic_thumbnail;  
  281.                 if ( file_exists($pic_thumbnail_fullpath) )  
  282.                 {  
  283.                     $thumbnail_file = $pic_thumbnail_fullpath;  
  284.                 }  
  285.             }  
  286.             if ($album_config['lb_preview'] == 0)  
  287.             {  
  288.                 $pic_preview = '';  
  289.             }  
  290.             else  
  291.             {  
  292.                 $pic_preview = 'onmouseover="showtrail(''. append_sid(album_append_uid('album_picm.' . $phpEx . '?pic_id=' . $next_pic_rows[$i]['pic_id'])) . '','' . addslashes($next_pic_rows[$i]['pic_title']) . '', ' . $album_config['midthumb_width'] . ', ' . $album_config['midthumb_height'] . ')" onmouseout="hidetrail()"';  
  293.             }  
  294.             if ($album_config['show_pics_nav'] == 1)  
  295.             {  
  296.                 $template->assign_block_vars('pics_nav.next', array(  
  297.                     'U_PICS_THUMB' => $thumbnail_file,  
  298.                     'U_PICS_LINK' => append_sid(album_append_uid('album_showpage.' . $phpEx . '?pic_id=' . $next_pic_id[$i] . $full_size_param . $nuffimage_vars)),  
  299.                     'PIC_PREVIEW' => $pic_preview,  
  300.                     )  
  301.                 );  
  302.             }  
  303.         }  
  304.     }  
  305.     else  
  306.     {  
  307.         for($i = 0; $i < $next_pic_count; $i++)  
  308.         {  
  309.             $next_pic_id[$i] = $next_pic_rows[$i]['pic_id'];  
  310.             $thumbnail_file = append_sid(album_append_uid('album_thumbnail.' . $phpEx . '?pic_id=' . $next_pic_id[$i]));  
  311.             if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )  
  312.             {  
  313.                 $pic_filename = $next_pic_rows[$i]['pic_filename'];  
  314.                 $pic_filetype = strtolower(substr($pic_filename, strlen($pic_filename) - 4, 4));  
  315.                 $pic_thumbnail = ( $next_pic_rows[$i]['pic_thumbnail'] == '' ) ? md5($pic_filename) . $pic_filetype : $next_pic_rows[$i]['pic_thumbnail'];  
  316.                 //$pic_thumbnail = ( $next_pic_rows[$i]['pic_thumbnail'] == '' ) ? $pic_filename : $next_pic_rows[$i]['pic_thumbnail'];  
  317.                 $pic_thumbnail_fullpath = ALBUM_CACHE_PATH . $pic_thumbnail;  
  318.                 if ( file_exists($pic_thumbnail_fullpath) )  
  319.                 {  
  320.                     $thumbnail_file = $pic_thumbnail_fullpath;  
  321.                 }  
  322.             }  
  323.             if ($album_config['lb_preview'] == 0)  
  324.             {  
  325.                 $pic_preview = '';  
  326.             }  
  327.             else  
  328.             {  
  329.                 $pic_preview = 'onmouseover="showtrail(''. append_sid(album_append_uid('album_picm.' . $phpEx . '?pic_id=' . $next_pic_rows[$i]['pic_id'])) . '','' . addslashes($next_pic_rows[$i]['pic_title']) . '', ' . $album_config['midthumb_width'] . ', ' . $album_config['midthumb_height'] . ')" onmouseout="hidetrail()"';  
  330.             }  
  331.             if ($album_config['show_pics_nav'] == 1)  
  332.             {  
  333.                 $template->assign_block_vars('pics_nav.prev', array(  
  334.                     'U_PICS_THUMB' => $thumbnail_file,  
  335.                     'U_PICS_LINK' => append_sid(album_append_uid('album_showpage.' . $phpEx . '?pic_id=' . $next_pic_id[$i] . $full_size_param . $nuffimage_vars)),  
  336.                     'PIC_PREVIEW' => $pic_preview,  
  337.                     )  
  338.                 );  
  339.             }  
  340.         }  
  341.     }  
  342. }  
  343.  
  344. //PREV  
  345. $sql = "SELECT a.*  
  346.         FROM " . ALBUM_TABLE . " AS a  
  347.         WHERE a.pic_id < " . $pic_id_tmp . "  
  348.             AND a.pic_cat_id = " . $pic_cat_id_tmp . "  
  349.             AND a.pic_approval = 1  
  350.         ORDER BY pic_id DESC LIMIT 2";  
  351.  
  352. if( !($result = $db->sql_query($sql)) )  
  353. {  
  354.     message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql);  
  355. }  
  356.  
  357. //$row = $db->sql_fetchrow($result);  
  358. $prev_pic_count = $db->sql_numrows($result);  
  359. $prev_pic_rows = $db->sql_fetchrowset($result);  
  360. $db->sql_freeresult($result);  
  361.  
  362. if ($prev_pic_count == 0)  
  363. {  
  364.     $no_prev_pic = true;  
  365.  
  366.     $sql = "SELECT a.*  
  367.             FROM " . ALBUM_TABLE . " AS a  
  368.             WHERE a.pic_cat_id = " . $pic_cat_id_tmp . "  
  369.                 AND a.pic_approval = 1  
  370.             ORDER BY pic_id DESC LIMIT 1";  
  371.  
  372.     if( !($result = $db->sql_query($sql)) )  
  373.     {  
  374.         message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql);  
  375.     }  
  376.  
  377.     $row = $db->sql_fetchrow($result);  
  378.     $last_pic_id = $row['pic_id'];  
  379.     $db->sql_freeresult($result);  
  380. }  
  381. else  
  382. {  
  383.     $no_prev_pic = false;  
  384.     if ( $album_config['invert_nav_arrows'] == 0 )  
  385.     {  
  386.         for($i = 0; $i < $prev_pic_count; $i++)  
  387.         {  
  388.             $prev_pic_id[$i] = $prev_pic_rows[$i]['pic_id'];  
  389.             $thumbnail_file = append_sid(album_append_uid('album_thumbnail.' . $phpEx . '?pic_id=' . $prev_pic_id[$i]));  
  390.             if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )  
  391.             {  
  392.                 $pic_filename = $prev_pic_rows[$i]['pic_filename'];  
  393.                 $pic_filetype = strtolower(substr($pic_filename, strlen($pic_filename) - 4, 4));  
  394.                 $pic_thumbnail = ( $prev_pic_rows[$i]['pic_thumbnail'] == '' ) ? md5($pic_filename) . $pic_filetype : $prev_pic_rows[$i]['pic_thumbnail'];  
  395.                 //$pic_thumbnail = ( $prev_pic_rows[$i]['pic_thumbnail'] == '' ) ? $pic_filename : $prev_pic_rows[$i]['pic_thumbnail'];  
  396.                 $pic_thumbnail_fullpath = ALBUM_CACHE_PATH . $pic_thumbnail;  
  397.                 if ( file_exists($pic_thumbnail_fullpath) )  
  398.                 {  
  399.                     $thumbnail_file = $pic_thumbnail_fullpath;  
  400.                 }  
  401.             }  
  402.             if ($album_config['lb_preview'] == 0)  
  403.             {  
  404.                 $pic_preview = '';  
  405.             }  
  406.             else  
  407.             {  
  408.                 $pic_preview = 'onmouseover="showtrail(''. append_sid(album_append_uid('album_picm.' . $phpEx . '?pic_id=' . $prev_pic_rows[$i]['pic_id'])) . '','' . addslashes($prev_pic_rows[$i]['pic_title']) . '', ' . $album_config['midthumb_width'] . ', ' . $album_config['midthumb_height'] . ')" onmouseout="hidetrail()"';  
  409.             }  
  410.             if ($album_config['show_pics_nav'] == 1)  
  411.             {  
  412.                 $template->assign_block_vars('pics_nav.prev', array(  
  413.                     'U_PICS_THUMB' => $thumbnail_file,  
  414.                     'U_PICS_LINK' => append_sid(album_append_uid('album_showpage.' . $phpEx . '?pic_id=' . $prev_pic_id[$i] . $full_size_param . $nuffimage_vars)),  
  415.                     'PIC_PREVIEW' => $pic_preview,  
  416.                     )  
  417.                 );  
  418.             }  
  419.         }  
  420.     }  
  421.     else  
  422.     {  
  423.         for($i = $prev_pic_count - 1; $i >= 0; $i--)  
  424.         {  
  425.             $prev_pic_id[$i] = $prev_pic_rows[$i]['pic_id'];  
  426.             $thumbnail_file = append_sid(album_append_uid('album_thumbnail.' . $phpEx . '?pic_id=' . $prev_pic_id[$i]));  
  427.             if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )  
  428.             {  
  429.                 $pic_filename = $prev_pic_rows[$i]['pic_filename'];  
  430.                 $pic_filetype = strtolower(substr($pic_filename, strlen($pic_filename) - 4, 4));  
  431.                 $pic_thumbnail = ( $prev_pic_rows[$i]['pic_thumbnail'] == '' ) ? md5($pic_filename) . $pic_filetype : $prev_pic_rows[$i]['pic_thumbnail'];  
  432.                 //$pic_thumbnail = ( $prev_pic_rows[$i]['pic_thumbnail'] == '' ) ? $pic_filename : $prev_pic_rows[$i]['pic_thumbnail'];  
  433.                 $pic_thumbnail_fullpath = ALBUM_CACHE_PATH . $pic_thumbnail;  
  434.                 if ( file_exists($pic_thumbnail_fullpath) )  
  435.                 {  
  436.                     $thumbnail_file = $pic_thumbnail_fullpath;  
  437.                 }  
  438.             }  
  439.             if ($album_config['lb_preview'] == 0)  
  440.             {  
  441.                 $pic_preview = '';  
  442.             }  
  443.             else  
  444.             {  
  445.                 $pic_preview = 'onmouseover="showtrail(''. append_sid(album_append_uid('album_picm.' . $phpEx . '?pic_id=' . $prev_pic_rows[$i]['pic_id'])) . '','' . addslashes($prev_pic_rows[$i]['pic_title']) . '', ' . $album_config['midthumb_width'] . ', ' . $album_config['midthumb_height'] . ')" onmouseout="hidetrail()"';  
  446.             }  
  447.             if ($album_config['show_pics_nav'] == 1)  
  448.             {  
  449.                 $template->assign_block_vars('pics_nav.next', array(  
  450.                     'U_PICS_THUMB' => $thumbnail_file,  
  451.                     'U_PICS_LINK' => append_sid(album_append_uid('album_showpage.' . $phpEx . '?pic_id=' . $prev_pic_id[$i] . $full_size_param . $nuffimage_vars)),  
  452.                     'PIC_PREVIEW' => $pic_preview,  
  453.                     )  
  454.                 );  
  455.             }  
  456.         }  
  457.     }  
  458. }  
  459.  
  460.  
  461. // ------------------------------------  
  462. // IMAGES ARRAY  
  463. // SLIDESHOW SCRIPTS  
  464. // ------------------------------------  
  465. if ( $album_config['slideshow_script'] == 1 )  
  466. {  
  467.     $template->assign_block_vars('switch_slideshow_scripts', array());  
  468.  
  469.     $pic_link = ( $picm == false ) ? 'album_pic.' : 'album_picm.';  
  470.  
  471.     $sql = "SELECT *  
  472.             FROM " . ALBUM_TABLE . " AS a  
  473.             WHERE a.pic_cat_id = " . $pic_cat_id_tmp . "  
  474.                 AND a.pic_approval = 1  
  475.             ORDER BY pic_id ASC";  
  476.  
  477.     if( !($result = $db->sql_query($sql)) )  
  478.     {  
  479.         message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql);  
  480.     }  
  481.  
  482.     $total_pic_count = $db->sql_numrows($result);  
  483.     $total_pic_rows = $db->sql_fetchrowset($result);  
  484.     $db->sql_freeresult($result);  
  485.  
  486.     $pic_list = '';  
  487.     $tit_list = '';  
  488.     $des_list = '';  
  489.  
  490.     for($i = 0; $i < $total_pic_count; $i++)  
  491.     {  
  492.         $pic_list .= 'Pic[' . $i . '] = '' . append_sid(album_append_uid($pic_link . $phpEx . '?pic_id=' . $total_pic_rows[$i]['pic_id']), true) . ''; ' . "n";  
  493.         $tit_list .= 'Tit[' . $i . '] = '' . $total_pic_rows[$i]['pic_title'] . ''; ' . "n";  
  494.         $des_list .= 'Des[' . $i . '] = '' . $total_pic_rows[$i]['pic_desc'] . ''; ' . "n";  
  495.         /*  
  496.         $pic_list .= 'Pic[' . $i . '] = '' . ALBUM_UPLOAD_PATH . $total_pic_rows[$i]['pic_filename'] . ''; ' . "n";  
  497.         */  
  498.     }  
  499.  
  500.     $template->assign_vars(array(  
  501.         'PIC_LIST' => $pic_list,  
  502.         'TIT_LIST' => $tit_list,  
  503.         'DES_LIST' => $des_list,  
  504.         )  
  505.     );  
  506. }  
  507.  
  508.  
  509. // ------------------------------------  
  510. // SPECIAL FX  
  511. // ------------------------------------  
  512. if ($album_config['enable_nuffimage'] == 1)  
  513. {  
  514.     $template->assign_block_vars('pic_nuffed_enabled', array(  
  515.         'L_PIC_NUFFED_CLICK' => $lang['Nuff_Click'],  
  516.         'U_PIC_NUFFED_CLICK' => append_sid(album_append_uid('album_showpage.' . $phpEx . '?pic_id=' . $pic_id . $full_size_param . '&amp;nuffimage=true')),  
  517.         )  
  518.     );  
  519. }  
  520. else  
  521. {  
  522.     $template->assign_block_vars('switch_slideshow_no_scripts', array());  
  523. }  
  524.  
  525.  
  526. // ------------------------------------  
  527. // Get $pic_id from $comment_id  
  528. // ------------------------------------  
  529.  
  530. if( isset($comment_id) && $album_config['comment'] == 1 )  
  531. {  
  532.     $sql = "SELECT comment_id, comment_pic_id  
  533.             FROM ". ALBUM_COMMENT_TABLE ."  
  534.             WHERE comment_id = '$comment_id'";  
  535.  
  536.     if( !($result = $db->sql_query($sql)) )  
  537.     {  
  538.         message_die(GENERAL_ERROR, 'Could not query comment and pic information', '', __LINE__, __FILE__, $sql);  
  539.     }  
  540.  
  541.     $row = $db->sql_fetchrow($result);  
  542.  
  543.     if( empty($row) )  
  544.     {  
  545.         message_die(GENERAL_ERROR, 'This comment does not exist');  
  546.     }  
  547.  
  548.     $pic_id = $row['comment_pic_id'];  
  549. }  
  550.  
  551. // ------------------------------------  
  552. // Get this pic info and current category info  
  553. // ------------------------------------  
  554.  
  555. $sql = "SELECT p.*, ac.*, u.user_id, u.username, u.user_rank, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT( DISTINCT c.comment_id) AS comments_count  
  556.         FROM ". ALBUM_CAT_TABLE ." AS ac, ". ALBUM_TABLE ." AS p  
  557.             LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id  
  558.             LEFT JOIN ". ALBUM_COMMENT_TABLE ." AS c ON p.pic_id = c.comment_pic_id  
  559.             LEFT JOIN ". ALBUM_RATE_TABLE ." AS r ON p.pic_id = r.rate_pic_id  
  560.         WHERE pic_id = '$pic_id'  
  561.             AND ac.cat_id = p.pic_cat_id  
  562.         GROUP BY p.pic_id  
  563.         LIMIT 1";  
  564.  
  565. if( !($result = $db->sql_query($sql)) )  
  566. {  
  567.     message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql);  
  568. }  
  569. $thispic = $db->sql_fetchrow($result);  
  570.  
  571. $cat_id = ($thispic['pic_cat_id'] != 0) ? $thispic['pic_cat_id'] : $thispic['cat_id'];  
  572. $album_user_id = $thispic['cat_user_id'];  
  573.  
  574. $total_comments = $thispic['comments_count'];  
  575. $comments_per_page = $board_config['posts_per_page'];  
  576.  
  577. if( empty($thispic) )  
  578. {  
  579.     message_die(GENERAL_ERROR, $lang['Pic_not_exist'] . $lang['Nav_Separator'] . $pic_id);  
  580. }  
  581.  
  582. // ------------------------------------  
  583. // Check the permissions  
  584. // ------------------------------------  
  585. $check_permissions = ALBUM_AUTH_VIEW|ALBUM_AUTH_RATE|ALBUM_AUTH_COMMENT|ALBUM_AUTH_EDIT|ALBUM_AUTH_DELETE;  
  586. $auth_data = album_permissions($album_user_id, $cat_id, $check_permissions, $thispic);  
  587.  
  588. if ( $auth_data['view'] == 0 )  
  589. {  
  590.     if ( !$userdata['session_logged_in'] )  
  591.     {  
  592.         redirect(append_sid(LOGIN_MG . '?redirect=album_showpage.' . $phpEx . '&amp;pic_id=' . $pic_id));  
  593.         exit;  
  594.     }  
  595.     else  
  596.     {  
  597.         message_die(GENERAL_ERROR, $lang['Not_Authorised']);  
  598.     }  
  599. }  
  600. // ------------------------------------  
  601. //RATING:  Additional Check: if this user already rated  
  602. // ------------------------------------  
  603.  
  604. if( $userdata['session_logged_in'] )  
  605. {  
  606.     $sql = "SELECT *  
  607.             FROM ". ALBUM_RATE_TABLE ."  
  608.             WHERE rate_pic_id = '$pic_id'  
  609.                 AND rate_user_id = '". $userdata['user_id'] ."'  
  610.             LIMIT 1";  
  611.  
  612.     if( !$result = $db->sql_query($sql) )  
  613.     {  
  614.         message_die(GENERAL_ERROR, 'Could not query rating information', '', __LINE__, __FILE__, $sql);  
  615.     }  
  616.  
  617.     if ($db->sql_numrows($result) > 0)  
  618.     {  
  619.         $already_rated = true;  
  620.     }  
  621.     else  
  622.     {  
  623.         $already_rated = false;  
  624.     }  
  625. }  
  626. else  
  627. {  
  628.     $already_rated = false;  
  629. }  
  630.  
  631.  
  632.  
  633.  
  634. // Watch pic for comments - BEGIN  
  635.  
  636. if( $userdata['session_logged_in'] )  
  637. {  
  638.     //$can_watch_comment = TRUE;  
  639.  
  640.     $sql = "SELECT notify_status  
  641.         FROM " . ALBUM_COMMENT_WATCH_TABLE . "  
  642.         WHERE pic_id = $pic_id  
  643.             AND user_id = " . $userdata['user_id'];  
  644.     if ( !($result = $db->sql_query($sql)) )  
  645.     {  
  646.         message_die(GENERAL_ERROR, "Could not obtain comment watch information", '', __LINE__, __FILE__, $sql);  
  647.     }  
  648.  
  649.     if ( $row = $db->sql_fetchrow($result) )  
  650.     {  
  651.        $is_watching_comments = true;  
  652.         if ( isset($HTTP_GET_VARS['unwatch']) )  
  653.         {  
  654.             if ( $HTTP_GET_VARS['unwatch'] == 'comment' )  
  655.             {  
  656.                   
  657.                 $sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : '';  
  658.                 $sql = "DELETE $sql_priority FROM " . ALBUM_COMMENT_WATCH_TABLE . "  
  659.                     WHERE pic_id = $pic_id  
  660.                         AND user_id = " . $userdata['user_id'];  
  661.                 if ( !($result = $db->sql_query($sql)) )  
  662.                 {  
  663.                     message_die(GENERAL_ERROR, "Could not delete comment watch information", '', __LINE__, __FILE__, $sql);  
  664.                 }  
  665.                 $is_watching_comment = FALSE;  
  666.             }  
  667.  
  668.             $template->assign_vars(array(  
  669.                 'META' => '<meta http-equiv="refresh" content="5;url=' . append_sid("album." .$phpEx) . '">')  
  670.             );  
  671.  
  672.             $message = $lang['No_longer_watching_comment'] . '<br /><br />' . sprintf($lang['Click_return_pic'], '<a href="' . append_sid("album_showpage.".$phpEx."?pic_id=".$pic_id) . '">', '</a>');  
  673.             message_die(GENERAL_MESSAGE, $message);  
  674.         }  
  675.         else  
  676.         {  
  677.             $is_watching_comment = TRUE;  
  678.  
  679.             if ( $row['notify_status'] )  
  680.             {    
  681.           
  682.                 $sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : '';  
  683.                 $sql = "UPDATE $sql_priority " . ALBUM_COMMENT_WATCH_TABLE . "  
  684.                     SET notify_status = 0  
  685.                     WHERE pic_id = $pic_id  
  686.                         AND user_id = " . $userdata['user_id'];  
  687.                 if ( !($result = $db->sql_query($sql)) )  
  688.                 {  
  689.                     message_die(GENERAL_ERROR, "Could not update comment watch information", '', __LINE__, __FILE__, $sql);  
  690.                 }  
  691.             }  
  692.         }  
  693.     }  
  694.     // Set pic for watch request  
  695.         if ( isset($HTTP_GET_VARS['watch']) )  
  696.         {  
  697.             if ( $HTTP_GET_VARS['watch'] == 'comment' )  
  698.             {  
  699.         $sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : '';  
  700.                 $sql = "INSERT $sql_priority INTO " . ALBUM_COMMENT_WATCH_TABLE . " (pic_id, user_id, notify_status)  
  701.                     VALUES ($pic_id, " . $userdata['user_id'] . ", 0)";  
  702.                 if ( !($result = $db->sql_query($sql)) )  
  703.                 {  
  704.                     message_die(GENERAL_ERROR, "Could not insert comment watch information", '', __LINE__, __FILE__, $sql);  
  705.                 }  
  706.       }  
  707.         $template->assign_vars(array(  
  708.                 'META' => '<meta http-equiv="refresh" content="5;url=' . append_sid("album." .$phpEx) . '">')  
  709.             );  
  710.  
  711.             $message = $lang['Watching_comment'] . '<br /><br />' . sprintf($lang['Click_return_pic'], '<a href="' . append_sid("album_showpage.".$phpEx."?pic_id=".$pic_id) . '">', '</a>');  
  712.             message_die(GENERAL_MESSAGE, $message);  
  713.               
  714.         }  
  715. }  
  716.     // Watch pic for comments - END      
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726. /*  
  727. +----------------------------------------------------------  
  728. | Main work here...  
  729. +----------------------------------------------------------  
  730. */  
  731. album_read_tree($album_user_id);  
  732. $album_nav_cat_desc = album_make_nav_tree($cat_id, 'album_cat.' . $phpEx, 'nav' , $album_user_id);  
  733. if ($album_nav_cat_desc != '')  
  734. {  
  735.     $album_nav_cat_desc = ALBUM_NAV_ARROW . $album_nav_cat_desc;  
  736. }  
  737.  
  738. if( !isset($_POST['comment']) && !isset($_POST['rating']) )  
  739. {  
  740.  
  741.     /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
  742.                     Comments Screen  
  743.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */  
  744.  
  745.     // ------------------------------------  
  746.     // Get the comments thread  
  747.     // Beware: when this script was called with comment_id (without start)  
  748.     // ------------------------------------  
  749.     if ( $album_config['comment'] == 1 )  
  750.     {  
  751.         if( !isset($comment_id) )  
  752.         {  
  753.             if( isset($_GET['start']) )  
  754.             {  
  755.                 $start = intval($_GET['start']);  
  756.             }  
  757.             elseif( isset($_POST['start']) )  
  758.             {  
  759.                 $start = intval($_POST['start']);  
  760.             }  
  761.             else  
  762.             {  
  763.                 $start = 0;  
  764.             }  
  765.         }  
  766.         else  
  767.         {  
  768.             // We must do a query to co-ordinate this comment  
  769.             $sql = "SELECT COUNT(comment_id) AS count  
  770.                     FROM ". ALBUM_COMMENT_TABLE ."  
  771.                     WHERE comment_pic_id = $pic_id  
  772.                         AND comment_id < $comment_id";  
  773.  
  774.             if( !$result = $db->sql_query($sql) )  
  775.             {  
  776.                 message_die(GENERAL_ERROR, 'Could not obtain comments information from the database', '', __LINE__, __FILE__, $sql);  
  777.             }  
  778.  
  779.             $row = $db->sql_fetchrow($result);  
  780.  
  781.             if( !empty($row) )  
  782.             {  
  783.                 $start = floor( $row['count'] / $comments_per_page ) * $comments_per_page;  
  784.             }  
  785.             else  
  786.             {  
  787.                 $start = 0;  
  788.             }  
  789.         }  
  790.  
  791.         if( isset($_GET['sort_order']) )  
  792.         {  
  793.             switch ($_GET['sort_order'])  
  794.             {  
  795.                 case 'ASC':  
  796.                     $sort_order = 'ASC';  
  797.                     break;  
  798.                 default:  
  799.                     $sort_order = 'DESC';  
  800.             }  
  801.         }  
  802.         elseif( isset($_POST['sort_order']) )  
  803.         {  
  804.             switch ($_POST['sort_order'])  
  805.             {  
  806.                 case 'ASC':  
  807.                     $sort_order = 'ASC';  
  808.                     break;  
  809.                 default:  
  810.                     $sort_order = 'DESC';  
  811.             }  
  812.         }  
  813.         else  
  814.         {  
  815.             $sort_order = 'ASC';  
  816.         }  
  817.  
  818.         if ($total_comments > 0)  
  819.         {  
  820.             $template->assign_block_vars('coment_switcharo_top', array());  
  821.  
  822.             $limit_sql = ($start == 0) ? $comments_per_page : $start .','. $comments_per_page;  
  823.  
  824.             $sql = "SELECT c.*, u.*  
  825.                 FROM ". ALBUM_COMMENT_TABLE ." AS c  
  826.                     LEFT JOIN ". USERS_TABLE ." AS u ON c.comment_user_id = u.user_id  
  827.                 WHERE c.comment_pic_id = '$pic_id'  
  828.                 ORDER BY c.comment_id $sort_order  
  829.                 LIMIT $limit_sql";  
  830.  
  831.             if( !$result = $db->sql_query($sql) )  
  832.             {  
  833.                 message_die(GENERAL_ERROR, 'Could not obtain comments information from the database', '', __LINE__, __FILE__, $sql);  
  834.             }  
  835.  
  836.             $commentrow = array();  
  837.  
  838.             while( $row = $db->sql_fetchrow($result) )  
  839.             {  
  840.                 $commentrow[] = $row;  
  841.             }  
  842.             if ( defined('IS_PHPBBXS') )  
  843.             {  
  844.                 $orig_autolink = array();  
  845.                 $replacement_autolink = array();  
  846.                 obtain_autolink_list($orig_autolink, $replacement_autolink, 99999999);  
  847.                 if (!$userdata['user_allowswearywords'])  
  848.                 {  
  849.                     $orig_word = array();  
  850.                     $replacement_word = array();  
  851.                     obtain_word_list($orig_word, $replacement_word);  
  852.                 }  
  853.             }  
  854.  
  855.             for ($i = 0; $i < count($commentrow); $i++)  
  856.             {  
  857.                 if( ($commentrow[$i]['user_id'] == ALBUM_GUEST) || ($commentrow[$i]['username'] == '') )  
  858.                 {  
  859.                     if ( defined('IS_PHPBBXS') )  
  860.                     {  
  861.                         $poster = ($commentrow[$i]['comment_username'] == '') ? $lang['Guest'] : color_group_colorize_name($commentrow[$i]['user_id']);  
  862.                     }  
  863.                     else  
  864.                     {  
  865.                         $poster = ($commentrow[$i]['comment_username'] == '') ? $lang['Guest'] : $commentrow[$i]['comment_username'];  
  866.                     }  
  867.                 }  
  868.                 else  
  869.                 {  
  870.                     if ( defined('IS_PHPBBXS') )  
  871.                     {  
  872.                         $poster = color_group_colorize_name($commentrow[$i]['user_id']);  
  873.                     }  
  874.                     else  
  875.                     {  
  876.                         $poster = '<a href="' . append_sid('profile.' . $phpEx . '?mode=viewprofile&amp;' . POST_USERS_URL . '=' . $commentrow[$i]['user_id']) . '">' . $commentrow[$i]['username'] . '</a>';  
  877.                     }  
  878.                 }  
  879.  
  880.                 if ($commentrow[$i]['comment_edit_count'] > 0)  
  881.                 {  
  882.                     $sql = "SELECT c.comment_id, c.comment_edit_user_id, u.user_id, u.username  
  883.                             FROM ". ALBUM_COMMENT_TABLE ." AS c  
  884.                                 LEFT JOIN ". USERS_TABLE ." AS u ON c.comment_edit_user_id = u.user_id  
  885.                             WHERE c.comment_id = '".$commentrow[$i]['comment_id']."'  
  886.                             LIMIT 1";  
  887.  
  888.                     if( !$result = $db->sql_query($sql) )  
  889.                     {  
  890.                         message_die(GENERAL_ERROR, 'Could not obtain last edit information from the database', '', __LINE__, __FILE__, $sql);  
  891.                     }  
  892.  
  893.                     $lastedit_row = $db->sql_fetchrow($result);  
  894.  
  895.                     $edit_info = ($commentrow[$i]['comment_edit_count'] == 1) ? $lang['Edited_time_total'] : $lang['Edited_times_total'];  
  896.  
  897.                     if ( defined('IS_PHPBBXS') )  
  898.                     {  
  899.                         $edit_info = '<br /><br />&raquo;&nbsp;'. sprintf($edit_info, color_group_colorize_name($lastedit_row['user_id']), create_date2($board_config['default_dateformat'], $commentrow[$i]['comment_edit_time'], $board_config['board_timezone']), $commentrow[$i]['comment_edit_count']) .'<br />';  
  900.                     }  
  901.                     else  
  902.                     {  
  903.                         $edit_info = '<br /><br />&raquo;&nbsp;'. sprintf($edit_info, $lastedit_row['username'], create_date($board_config['default_dateformat'], $commentrow[$i]['comment_edit_time'], $board_config['board_timezone']), $commentrow[$i]['comment_edit_count']) .'<br />';  
  904.                     }  
  905.                 }  
  906.                 else  
  907.                 {  
  908.                     $edit_info = '';  
  909.                 }  
  910.  
  911.                 // Smilies  
  912.                 if ( defined('IS_PHPBBXS') )  
  913.                 {  
  914.                     global $bbcode;  
  915.                     $html_on = ( $userdata['user_allowhtml'] && $board_config['allow_html'] ) ? 1 : 0 ;  
  916.                     $bbcode_on = ( $userdata['user_allowbbcode'] && $board_config['allow_bbcode'] ) ? 1 : 0 ;  
  917.                     $smilies_on = ( $userdata['user_allowsmile'] && $board_config['allow_smilies'] ) ? 1 : 0 ;  
  918.                     $bbcode->allow_html = $html_on;  
  919.                     $bbcode->allow_bbcode = $bbcode_on;  
  920.                     $bbcode->allow_smilies = $smilies_on;  
  921.  
  922.                     $commentrow[$i]['comment_text'] = $bbcode->parse($commentrow[$i]['comment_text'], $bbcode_uid);  
  923.                     $commentrow[$i]['comment_text'] = strtr($commentrow[$i]['comment_text'], array_flip(get_html_translation_table(HTML_ENTITIES)));  
  924.  
  925.                     if( function_exists( 'acronym_pass' ) )  
  926.                     {  
  927.                         $commentrow[$i]['comment_text'] = acronym_pass( $commentrow[$i]['comment_text'] );  
  928.                     }  
  929.                     if( count($orig_autolink) )  
  930.                     {  
  931.                         $commentrow[$i]['comment_text'] = autolink_transform($commentrow[$i]['comment_text'], $orig_autolink, $replacement_autolink);  
  932.                     }  
  933.                     //$commentrow[$i]['comment_text'] = kb_word_wrap_pass ($commentrow[$i]['comment_text']);  
  934.                     $commentrow[$i]['comment_text'] = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $commentrow[$i]['comment_text']) : $commentrow[$i]['comment_text'];  
  935.  
  936.                     $user_sig = ( $board_config['allow_sig'] ) ? trim($commentrow[$i]['user_sig']) : '';  
  937.                     $user_sig_bbcode_uid = $commentrow[$i]['user_sig_bbcode_uid'];  
  938.                     if($user_sig != '')  
  939.                     {  
  940.                         $bbcode->is_sig = ( $config_mg['allow_all_bbcode'] == 0 ) ? true : false;  
  941.                         $user_sig = $bbcode->parse($user_sig, $user_sig_bbcode_uid);  
  942.                         $bbcode->is_sig = false;  
  943.                     }  
  944.  
  945.                 }  
  946.                 else  
  947.                 {  
  948.                     if ($album_config['album_bbcode'] == 1)  
  949.                     {  
  950.                         global $bbcode;  
  951.                         $html_on = ( $userdata['user_allowhtml'] && $board_config['allow_html'] ) ? 1 : 0 ;  
  952.                         $bbcode_on = ( $userdata['user_allowbbcode'] && $board_config['allow_bbcode'] ) ? 1 : 0 ;  
  953.                         $smilies_on = ( $userdata['user_allowsmile'] && $board_config['allow_smilies'] ) ? 1 : 0 ;  
  954.                         $bbcode->allow_html = $html_on;  
  955.                         $bbcode->allow_bbcode = $bbcode_on;  
  956.                         $bbcode->allow_smilies = $smilies_on;  
  957.  
  958.                         $commentrow[$i]['comment_text'] = $bbcode->parse($commentrow[$i]['comment_text'], $bbcode_uid);  
  959.                         $commentrow[$i]['comment_text'] = strtr($commentrow[$i]['comment_text'], array_flip(get_html_translation_table(HTML_ENTITIES)));  
  960.  
  961.                         $user_sig = ( $board_config['allow_sig'] ) ? trim($commentrow[$i]['user_sig']) : '';  
  962.                         $user_sig_bbcode_uid = $commentrow[$i]['user_sig_bbcode_uid'];  
  963.                         if($user_sig != '')  
  964.                         {  
  965.                             //$bbcode->is_sig = true;  
  966.                             $user_sig = $bbcode->parse($user_sig, $user_sig_bbcode_uid);  
  967.                             //$bbcode->is_sig = false;  
  968.                         }  
  969.                     }  
  970.                 }  
  971.  
  972.                 //email, profile, PM links  
  973.                 if ( ($commentrow[$i]['user_viewemail'] == true) || ($userdata['user_level'] == ADMIN) )  
  974.                 {  
  975.                     $email_uri = ( $board_config['board_email_form'] ) ? append_sid('profile.' . $phpEx . '?mode=email&amp;' . POST_USERS_URL .'=' . $commentrow[$i]['user_id']) : 'mailto:' . $commentrow[$i]['user_email'];  
  976.                 }  
  977.                 else  
  978.                 {  
  979.                     $email_uri = '';  
  980.                 }  
  981.                 $profile_url = append_sid('profile.' . $phpEx . '?mode=viewprofile&amp;' . POST_USERS_URL . '=' . $commentrow[$i]['user_id']);  
  982.                 $pm_url = append_sid('privmsg.' . $phpEx . '?mode=post&amp;' . POST_USERS_URL . '=' . $commentrow[$i]['user_id']);  
  983.  
  984.                 //avatar  
  985.                 $poster_avatar = '';  
  986.                 if ( $commentrow[$i]['user_avatar_type'] && $commentrow[$i]['user_id'] != ANONYMOUS && $commentrow[$i]['user_allowavatar'] )  
  987.                 {  
  988.                     switch( $commentrow[$i]['user_avatar_type'] )  
  989.                     {  
  990.                         case USER_AVATAR_UPLOAD:  
  991.                             $poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $commentrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';  
  992.                             break;  
  993.                         case USER_AVATAR_REMOTE:  
  994.                             $poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $commentrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';  
  995.                             break;  
  996.                         case USER_AVATAR_GALLERY:  
  997.                             $poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $commentrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';  
  998.                             break;  
  999.                         case USER_GRAVATAR:  
  1000.                             $poster_avatar = ( $board_config['enable_gravatars'] ) ? '<img src="' . get_gravatar($commentrow[$i]['user_avatar']) . '" alt="" border="0" />' : '';  
  1001.                             break;  
  1002.                     }  
  1003.                 }  
  1004.                 if ((!$poster_avatar) && ($board_config['default_avatar_set'] != 3))  
  1005.                 {  
  1006.                     if (($board_config['default_avatar_set'] == 0) && ($poster_id == -1) && ($board_config['default_avatar_guests_url']))  
  1007.                     {  
  1008.                         $poster_avatar = '<img src="' . $board_config['default_avatar_guests_url'] . '" alt="" border="0" />';  
  1009.                     }  
  1010.                     elseif (($board_config['default_avatar_set'] == 1) && ($poster_id != -1) && ($board_config['default_avatar_users_url']) )  
  1011.                     {  
  1012.                         $poster_avatar = '<img src="' . $board_config['default_avatar_users_url'] . '" alt="" border="0" />';  
  1013.                     }  
  1014.                     elseif ($board_config['default_avatar_set'] == 2)  
  1015.                     {  
  1016.                         if (($poster_id == -1) && ($board_config['default_avatar_guests_url']))  
  1017.                         {  
  1018.                             $poster_avatar = '<img src="' . $board_config['default_avatar_guests_url'] . '" alt="" border="0" />';  
  1019.                         }  
  1020.                         elseif (($poster_id != -1) && ($board_config['default_avatar_users_url']))  
  1021.                         {  
  1022.                             $poster_avatar = '<img src="' . $board_config['default_avatar_users_url'] . '" alt="" border="0" />';  
  1023.                         }  
  1024.                     }  
  1025.                 }  
  1026.  
  1027.                 //rank & rank image  
  1028.                 $sql = "SELECT *  
  1029.                     FROM " . RANKS_TABLE . "  
  1030.                     ORDER BY rank_special, rank_min";  
  1031.                 if ( !($result = $db->sql_query($sql)) )  
  1032.                 {  
  1033.                     message_die(GENERAL_ERROR, 'Could not obtain ranks information.', '', __LINE__, __FILE__, $sql);  
  1034.                 }  
  1035.  
  1036.                 $ranksrow = array();  
  1037.                 while ( $row = $db->sql_fetchrow($result) )  
  1038.                 {  
  1039.                     $ranksrow[] = $row;  
  1040.                 }  
  1041.                 $db->sql_freeresult($result);  
  1042.  
  1043.                 $poster_rank = '';  
  1044.                 $rank_image = '';  
  1045.                 if ($commentrow[$i]['user_id'] == ANONYMOUS)  
  1046.                 {  
  1047.                     $poster_rank = $lang['Guest'];  
  1048.                 }  
  1049.                 elseif ( $commentrow[$i]['user_rank'] )  
  1050.                 {  
  1051.                     for($j = 0; $j < count($ranksrow); $j++)  
  1052.                     {  
  1053.                         if ( $commentrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )  
  1054.                         {  
  1055.                             $poster_rank = $ranksrow[$j]['rank_title'];  
  1056.                             $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';  
  1057.                         }  
  1058.                     }  
  1059.                 }  
  1060.                 else  
  1061.                 {  
  1062.                     for($j = 0; $j < count($ranksrow); $j++)  
  1063.                     {  
  1064.                         if ( $commentrow[$i]['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )  
  1065.                         {  
  1066.                             $poster_rank = $ranksrow[$j]['rank_title'];  
  1067.                             $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';  
  1068.                         }  
  1069.                     }  
  1070.                 }  
  1071.  
  1072.                 // Handle anon users posting with usernames  
  1073.                 if ( $commentrow[$i]['user_id'] == ANONYMOUS && $commentrow[$i]['post_username'] != '' )  
  1074.                 {  
  1075.                     if ( defined('IS_PHPBBXS') )  
  1076.                     {  
  1077.                         $poster = color_group_colorize_name($commentrow[$i]['user_id']);  
  1078.                     }  
  1079.                     else  
  1080.                     {  
  1081.                         $poster = $commentrow[$i]['post_username'];  
  1082.                     }  
  1083.                     $poster_rank = $lang['Guest'];  
  1084.                 }  
  1085.  
  1086.                 if ( defined('IS_PHPBBXS') )  
  1087.                 {  
  1088.  
  1089.                 }  
  1090.                 else  
  1091.                 {  
  1092.                     $lang['JOINED_DATE_FORMAT'] = $lang['DATE_FORMAT'];  
  1093.                 }  
  1094.  
  1095.                 $template->assign_block_vars('commentrow', array(  
  1096.                     'ID' => $commentrow[$i]['comment_id'],  
  1097.                     'POSTER_NAME' => $poster,  
  1098.                     'TIME' => create_date2($board_config['default_dateformat'], $commentrow[$i]['comment_time'], $board_config['board_timezone']),  
  1099.                     'IP' => ($userdata['user_level'] == ADMIN) ? '<a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($commentrow[$i]['comment_user_ip']) . '" target="_blank">' . decode_ip($commentrow[$i]['comment_user_ip']) .'</a><br />' : '',  
  1100.  
  1101.                     //users mesangers, website, email  
  1102.                     'PROFILE_IMG' => ( $commentrow[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . $profile_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>' : '',  
  1103.                     'PM_IMG' => ( $commentrow[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . $pm_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>' : '',  
  1104.                     'AIM_IMG' => ( $commentrow[$i]['user_id'] != ANONYMOUS ) ? ( $commentrow[$i]['user_aim'] ) ? '<a href="aim:goim?screenname=' . $commentrow[$i]['user_aim'] . '&amp;message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '' : '',  
  1105.                     'YIM_IMG' => ( $commentrow[$i]['user_id'] != ANONYMOUS ) ? ( $commentrow[$i]['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $commentrow[$i]['user_yim'] . '&amp;.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '' : '',  
  1106.                     'MSNM_IMG' => ( $commentrow[$i]['user_id'] != ANONYMOUS ) ? ( $commentrow[$i]['user_msnm'] ) ? '<a href="' . $temp_url . '"><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : '' : '',  
  1107.                     'ICQ_IMG' =>  ( $commentrow[$i]['user_id'] != ANONYMOUS ) ? ( $commentrow[$i]['user_icq'] ) ? '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $commentrow[$i]['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>' : '' : '',  
  1108.                     'EMAIL_IMG' => ( ($commentrow[$i]['user_id'] != ANONYMOUS) && ($email_uri != '') ) ? '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>' : '',  
  1109.                     'WWW_IMG' => ( $commentrow[$i]['user_id'] != ANONYMOUS ) ? ( $commentrow[$i]['user_website'] ) ? '<a href="' . $commentrow[$i]['user_website'] . '" target="_blank"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : '' : '',  
  1110.  
  1111.                     'POSTER_AVATAR' => $poster_avatar,  
  1112.                     'POSTER_RANK' => $poster_rank,  
  1113.                     'POSTER_RANK_IMAGE' => $rank_image,  
  1114.                     'POSTER_JOINED' => ( $commentrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Joined'] . ': ' . create_date($lang['JOINED_DATE_FORMAT'], $commentrow[$i]['user_regdate'], $board_config['board_timezone']) : '',  
  1115.                     'POSTER_POSTS' => ( $commentrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Posts'] . ': ' . $commentrow[$i]['user_posts'] : '',  
  1116.                     'POSTER_FROM' => ( $commentrow[$i]['user_from'] && $commentrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Location'] . ': ' . $commentrow[$i]['user_from'] : '',  
  1117.                     'POSTER_SIGNATURE' => $user_sig,  
  1118.  
  1119.                     'TEXT' => $commentrow[$i]['comment_text'],  
  1120.                     'EDIT_INFO' => $edit_info,  
  1121.  
  1122.                     'EDIT' => ( ( $auth_data['edit'] && ($commentrow[$i]['comment_user_id'] == $userdata['user_id']) ) || ($auth_data['moderator'] && ($thispic['cat_edit_level'] != ALBUM_ADMIN) ) || ($userdata['user_level'] == ADMIN) ) ? '<a href="'. append_sid(album_append_uid('album_comment_edit.' . $phpEx . '?comment_id=' . $commentrow[$i]['comment_id'])) .'"><img src="' . $images['icon_edit'] . '" alt="' . $lang['Edit_delete_post'] . '" title="' . $lang['Edit_delete_post'] . '" border="0" /></a>' : '',  
  1123.  
  1124.                     'DELETE' => ( ( $auth_data['delete'] && ($commentrow[$i]['comment_user_id'] == $userdata['user_id']) ) || ($auth_data['moderator'] && ($thispic['cat_delete_level'] != ALBUM_ADMIN) ) || ($userdata['user_level'] == ADMIN) ) ? '<a href="'. append_sid(album_append_uid('album_comment_delete.' . $phpEx . '?comment_id=' . $commentrow[$i]['comment_id'])) .'"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" border="0" /></a>' : ''  
  1125.  
  1126.                     )  
  1127.                 );  
  1128.             }  
  1129.  
  1130.             $template->assign_block_vars('switch_comment', array());  
  1131.  
  1132.             $template->assign_vars(array(  
  1133.                 'PAGINATION' => generate_pagination(append_sid(album_append_uid('album_showpage.' . $phpEx . '?pic_id=' . $pic_id . '&amp;sort_order=' . $sort_order)), $total_comments, $comments_per_page, $start),  
  1134.                 'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $comments_per_page ) + 1 ), ceil( $total_comments / $comments_per_page ))  
  1135.                 )  
  1136.             );  
  1137.             $template->assign_block_vars('coment_switcharo_bottom', array());  
  1138.         }  
  1139.     }  
  1140.  
  1141.     // Start output of page  
  1142.     $page_title = $lang['Album'];  
  1143.  
  1144.     include($phpbb_root_path . 'includes/page_header.'.$phpEx);  
  1145.     $template->set_filenames(array('body' => $show_template));  
  1146.  
  1147.     if ( defined('IS_PHPBBXS') )  
  1148.     {  
  1149.         if( ($thispic['pic_user_id'] == ALBUM_GUEST) || ($thispic['username'] == '') )  
  1150.         {  
  1151.             $poster = ($thispic['pic_username'] == '') ? $lang['Guest'] : color_group_colorize_name($thispic['user_id']);  
  1152.         }  
  1153.         else  
  1154.         {  
  1155.             $poster = color_group_colorize_name($thispic['user_id']);  
  1156.         }  
  1157.     }  
  1158.     else  
  1159.     {  
  1160.         if( ($thispic['pic_user_id'] == ALBUM_GUEST) || ($thispic['username'] == '') )  
  1161.         {  
  1162.             $poster = ($thispic['pic_username'] == '') ? $lang['Guest'] : $thispic['pic_username'];  
  1163.         }  
  1164.         else  
  1165.         {  
  1166.             $poster = '<a href="' . append_sid('profile.' . $phpEx . '?mode=viewprofile&amp;'. POST_USERS_URL . '=' . $thispic['user_id']) . '">' . $thispic['username'] . '</a>';  
  1167.         }  
  1168.     }  
  1169.  
  1170.  
  1171.     //---------------------------------  
  1172.     // Comment Posting Form  
  1173.     //---------------------------------  
  1174.  
  1175.     if ( $auth_data['comment'] == 1 && $album_config['comment'] == 1 )  
  1176.     {  
  1177.         $template->assign_block_vars('switch_comment_post', array());  
  1178.  
  1179.         if( !$userdata['session_logged_in'] )  
  1180.         {  
  1181.             $template->assign_block_vars('switch_comment_post.logout', array());  
  1182.         }  
  1183.         if ( defined('IS_PHPBBXS') )  
  1184.         {  
  1185.         }  
  1186.         else  
  1187.         {  
  1188.             //begin shows smilies  
  1189.             $max_smilies = 20;  
  1190.  
  1191.             $sql = 'SELECT emoticon, code, smile_url  
  1192.                             FROM ' . SMILIES_TABLE . '  
  1193.                             GROUP BY smile_url  
  1194.                             ORDER BY smilies_id LIMIT ' . $max_smilies;  
  1195.  
  1196.             if (!$result = $db->sql_query($sql))  
  1197.             {  
  1198.                 message_die(GENERAL_ERROR, "Couldn't retrieve smilies list", '', __LINE__, __FILE__, $sql);  
  1199.             }  
  1200.             $smilies_count = $db->sql_numrows($result);  
  1201.             $smilies_data = $db->sql_fetchrowset($result);  
  1202.  
  1203.             for ($i = 1; $i < ($smilies_count + 1); $i++)  
  1204.             {  
  1205.                 $template->assign_block_vars('switch_comment_post.smilies', array(  
  1206.                         'CODE' => $smilies_data[$i - 1]['code'],  
  1207.                         'URL' => $board_config['smilies_path'] . '/' . $smilies_data[$i - 1]['smile_url'],  
  1208.                         'DESC' => $smilies_data[$i - 1]['emoticon']  
  1209.                     )  
  1210.                 );  
  1211.  
  1212.                 if ( is_integer($i / 5) )  
  1213.                 {  
  1214.                     $template->assign_block_vars('switch_comment_post.smilies.new_col', array());  
  1215.                 }  
  1216.             }  
  1217.         }  
  1218.     }  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224. // Comment Watch    
  1225.     'U_COMMENT_WATCH_LINK' =>($is_watching_comments) ? '<a href="' . append_sid("album_showpage.".$phpEx."?pic_id=".$pic_id."&unwatch=comment") . '">'.$lang['Unwatch_pic']. '</a>' : ($userdata['session_logged_in'] ? '<a href="' . append_sid("album_showpage.".$phpEx."?pic_id=".$pic_id."&watch=comment") . '">'.$lang['Watch_pic']. '</a>' : ''),        

 



 
mipavlukSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] Pic comment notification 
 
At the very least you didn't apply the code edits properly
Review the Mod's instructions.

This does not go where you put it.
Code: [Download] [Hide] [Select]
// Comment Watch  
    'U_COMMENT_WATCH_LINK' =>($is_watching_comments) ? '<a href="' . append_sid("album_showpage.".$phpEx."?pic_id=".$pic_id."&unwatch=comment") . '">'.$lang['Unwatch_pic']. '</a>' : ($userdata['session_logged_in'] ? '<a href="' . append_sid("album_showpage.".$phpEx."?pic_id=".$pic_id."&watch=comment") . '">'.$lang['Watch_pic']. '</a>' : ''),      

 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] Pic Comment Notification 
 
TY Artie!!!!!!!
           
 



 
mipavlukSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] Pic Comment Notification 
 
can create a link that give an option to subscribe a category?
 



 
Gianni PBSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] Pic Comment Notification 
 
Gianni PB wrote: [View Post]
can create a link that give an option to subscribe a category?

That would most likely require a significant amount of effort in recoding the mod.
These days, I do not have the time to spare for such a project.
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] Pic Comment Notification 
 
Will this mod be ever integrated with FAP perminently so on future upgrades of ICY I don't have to always keep these changes on hand?
 




____________
Check out my new website:
Adult Forums - A place where everyone can fit in.
Currently running v1.1.10.25 RC3
 
darkoneSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] Pic comment notification 
 
darkone wrote: [View Post]
Will this mod be ever integrated with FAP perminently so on future upgrades of ICY I don't have to always keep these changes on hand?

The mod is already included in the new beta.
 




____________
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
Reply with quote Download Post 
Post Re: [MOD] Pic Comment Notification 
 
is this included in Icy Phoenix 1.1.5.20?
 



 
Gianni PBSend private messageVisit poster's website  
Back to topPage bottom
This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies.  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