|
Page 1 of 1
|
Artie 
Joined: January 2007
Posts: 833
Location:  Lone Star State
|
 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.
Description: |
Sends email notification of pic comments |
 Download |
Filename: |
FAP_pic_comment_notify.rar |
Filesize: |
6.65 KB |
Downloaded: |
235 Time(s) |
|
#1 Fri 22 Jun, 2007 03:27 |
|
Sponsors

|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
felix968 
Joined: February 2007
Posts: 122
Location:
|
 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!
|
#2 Fri 22 Jun, 2007 08:05 |
|
lefty74 
Joined: January 2007
Posts: 137
|
 Re: [MOD] Pic Comment Notification
That's excellent Artie,
thanks very much!
Will definitely install that one!
|
#3 Fri 22 Jun, 2007 18:11 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 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
|
#4 Wed 27 Jun, 2007 02:42 |
|
KugeLSichA 
Joined: August 2006
Posts: 803
Location:  Dresden
|
 Re: [MOD] Pic comment notification
great work Artie. I love it. thx
|
#5 Sat 30 Jun, 2007 10:21 |
|
TheSteffen 
Joined: August 2006
Posts: 1625
Location:  Magdeburg
|
 Re: [MOD] Pic comment notification
great work Artie. I love it. thx
Me too, thanks Artie
|
#6 Tue 03 Jul, 2007 13:18 |
|
mipavluk 
Joined: July 2007
Posts: 19
|
 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!
- <?php
- /***************************************************************************
- * album_showpage.php
- * -------------------
- * begin : Wednesday, February 05, 2003
- * copyright : (C) 2003 Smartor
- * email : smartor_xp@hotmail.com
- *
- * $Id: album_comment.php,v 2.0.8 2003/03/14 07:08:15 ngoctu Exp $
- *
- ***************************************************************************/
-
- /***************************************************************************
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- ***************************************************************************/
-
- // CTracker_Ignore: File Checked By Human
- // Tell the Security Scanner that reachable code in this file is not a security issue
-
- define('IN_PHPBB', true);
- $phpbb_root_path = './';
- include($phpbb_root_path . 'extension.inc');
- include($phpbb_root_path . 'common.' . $phpEx);
- include($phpbb_root_path . 'includes/functions_validate.' . $phpEx);
- include($phpbb_root_path . 'includes/functions_post.' . $phpEx);
-
- // Start session management
- $userdata = session_pagestart($user_ip, PAGE_ALBUM_PICTURE);
- init_userprefs($userdata);
- // End session management
-
- // Get general album information
- $album_root_path = $phpbb_root_path . ALBUM_MOD_PATH . '';
- include($album_root_path . 'album_common.' . $phpEx);
-
- if ( defined('IS_PHPBBXS') )
- {
- include_once($phpbb_root_path . 'includes/functions_color_groups.' . $phpEx);
- include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
- if ( isset($_POST['message']) )
- {
- $_POST['comment'] = $_POST['message'];
- }
- }
- else
- {
- if ($album_config['album_bbcode'] == 1)
- {
- include_once($album_root_path . 'album_bbcode.' . $phpEx);
- }
- }
-
- if( isset($_GET['mode']) && $_GET['mode'] == 'smilies' )
- {
- if ( defined('IS_PHPBBXS') )
- {
- generate_smilies('window', PAGE_ALBUM_PICTURE);
- exit;
- }
- else
- {
- generate_smilies_album('window', PAGE_ALBUM_PICTURE);
- exit;
- }
- }
-
- // ------------------------------------
- // Check the request
- // ------------------------------------
-
- if( isset($_GET['pic_id']) )
- {
- $pic_id = intval($_GET['pic_id']);
- }
- elseif( isset($_POST['pic_id']) )
- {
- $pic_id = intval($_POST['pic_id']);
- }
- else
- {
- if( isset($_GET['comment_id']) )
- {
- $comment_id = intval($_GET['comment_id']);
- }
- elseif( isset($_POST['comment_id']) )
- {
- $comment_id = intval($_POST['comment_id']);
- }
- else
- {
- message_die(GENERAL_ERROR, 'Bad request');
- }
- }
-
- // Midthumb & Full Pic
- if( isset($_GET['full']) || isset($_POST['full']) )
- {
- $picm = false;
- $full_size_param = '&full=true';
- }
- else
- {
- if ($album_config['midthumb_use'] == 1)
- {
- $picm = true;
- $full_size_param = '';
- }
- else
- {
- $picm = false;
- $full_size_param = '&full=true';
- }
- }
-
- // ------------------------------------
- // TEMPLATE ASSIGNEMENT
- // ------------------------------------
- if ((isset($_GET['slideshow']) && (intval($_GET['slideshow']) > 0)) || (isset($_POST['slideshow']) && (intval($_POST['slideshow']) > 0)))
- {
- $gen_simple_header = true;
- $show_template = 'album_slideshow_body.tpl';
- $nuffimage_pic = ( $picm == false ) ? 'album_pic.' : 'album_picm.';
- }
- else
- {
- //$show_template = 'album_showpage_body.tpl';
- if ( (isset($_GET['nuffimage']) || isset($_POST['nuffimage'])) & ($album_config['enable_nuffimage'] == 1) )
- {
- include($album_root_path . 'album_nuffimage_box.' . $phpEx);
- $template->assign_var_from_handle('NUFFIMAGE_BOX', 'nuffimage_box');
- $show_template = 'album_pic_nuffed_body.tpl';
- $nuffimage_vars = '&nuffimage=true';
- $nuffimage_pic = 'album_pic_nuffed.';
- $nuff_http_full_string = $nuff_http['full_string'];
- $template->assign_block_vars('disable_pic_nuffed', array(
- 'L_PIC_UNNUFFED_CLICK' => $lang['Nuff_UnClick'],
- 'U_PIC_UNNUFFED_CLICK' => append_sid(album_append_uid('album_showpage.' . $phpEx . '?pic_id=' . $pic_id . $full_size_param)),
- )
- );
- }
- else
- {
- $show_template = 'album_showpage_body.tpl';
- $nuffimage_vars = '';
- $nuffimage_pic = ( $picm == false ) ? 'album_pic.' : 'album_picm.';
- $nuff_http_full_string = '';
- }
- }
-
-
- // ------------------------------------
- // PREVIOUS & NEXT
- // ------------------------------------
- if( isset($_GET['mode']) )
- {
- //if( ($_GET['mode'] == 'next') && ($no_next_pic == false) )
- if($_GET['mode'] == 'next')
- {
- //$pic_id = $next_pic_id[0];
- $sql_where = 'AND n.pic_id > c.pic_id';
- $sql_order = 'ORDER BY n.pic_id ASC LIMIT 1';
-
- }
-
- //if( ($_GET['mode'] == 'prev') && ($no_prev_pic == false) )
- if($_GET['mode'] == 'prev')
- {
- //$pic_id = $prev_pic_id[0];
- $sql_where = 'AND n.pic_id < c.pic_id';
- $sql_order = 'ORDER BY n.pic_id DESC LIMIT 1';
- }
-
- $sql = "SELECT n.pic_id, n.pic_cat_id, n.pic_user_id, n.pic_time
- FROM ". ALBUM_TABLE ." as n, ". ALBUM_TABLE ." AS c
- WHERE c.pic_id = $pic_id
- $sql_where
- AND n.pic_cat_id = c.pic_cat_id
- $sql_order";
- }
- else
- {
- $sql = "SELECT pic_id, pic_cat_id, pic_user_id, pic_time
- FROM ". ALBUM_TABLE ."
- WHERE pic_id = $pic_id";
- }
-
- if( !($result = $db->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql);
- }
-
- $row = $db->sql_fetchrow($result);
-
- if( empty($row) )
- {
- message_die(GENERAL_ERROR, $lang['Pic_not_exist']);
- }
-
- $pic_id_old = $pic_id;
- $pic_id_tmp = $row['pic_id'];
- $pic_cat_id_tmp = $row['pic_cat_id'];
- $pic_time_tmp = $row['pic_time'];
- $pic_user_id_tmp = $row['pic_user_id'];
- $db->sql_freeresult($result);
-
- if( isset($_GET['mode']) )
- {
- if ( ($_GET['mode'] == 'next') || ($_GET['mode'] == 'prev') )
- {
- $pic_id = $pic_id_tmp;
- }
- }
-
- if ($album_config['show_pics_nav'] == 1)
- {
- $template->assign_block_vars('pics_nav', array(
- 'L_PICS_NAV' => $lang['Pics_Nav'],
- 'L_PICS_NAV_NEXT' => $lang['Pics_Nav_Next'],
- 'L_PICS_NAV_PREV' => $lang['Pics_Nav_Prev'],
- )
- );
- }
- // NEXT
- $sql = "SELECT a.*
- FROM " . ALBUM_TABLE . " AS a
- WHERE a.pic_id > " . $pic_id_tmp . "
- AND a.pic_cat_id = " . $pic_cat_id_tmp . "
- AND a.pic_approval = 1
- ORDER BY pic_id ASC LIMIT 2";
-
- if( !($result = $db->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql);
- }
-
- //$row = $db->sql_fetchrow($result);
- $next_pic_count = $db->sql_numrows($result);
- $next_pic_rows = $db->sql_fetchrowset($result);
- $db->sql_freeresult($result);
-
- if ($next_pic_count == 0)
- {
- $no_next_pic = true;
-
- $sql = "SELECT a.*
- FROM " . ALBUM_TABLE . " AS a
- WHERE a.pic_cat_id = " . $pic_cat_id_tmp . "
- AND a.pic_approval = 1
- ORDER BY pic_id ASC LIMIT 1";
-
- if( !($result = $db->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql);
- }
-
- $row = $db->sql_fetchrow($result);
- $first_pic_id = $row['pic_id'];
- $db->sql_freeresult($result);
- }
- else
- {
- $no_next_pic = false;
- if ( $album_config['invert_nav_arrows'] == 0 )
- {
- for($i = $next_pic_count - 1; $i >= 0; $i--)
- {
- $next_pic_id[$i] = $next_pic_rows[$i]['pic_id'];
- $thumbnail_file = append_sid(album_append_uid('album_thumbnail.' . $phpEx . '?pic_id=' . $next_pic_id[$i]));
- if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )
- {
- $pic_filename = $next_pic_rows[$i]['pic_filename'];
- $pic_filetype = strtolower(substr($pic_filename, strlen($pic_filename) - 4, 4));
- $pic_thumbnail = ( $next_pic_rows[$i]['pic_thumbnail'] == '' ) ? md5($pic_filename) . $pic_filetype : $next_pic_rows[$i]['pic_thumbnail'];
- //$pic_thumbnail = ( $next_pic_rows[$i]['pic_thumbnail'] == '' ) ? $pic_filename : $next_pic_rows[$i]['pic_thumbnail'];
- $pic_thumbnail_fullpath = ALBUM_CACHE_PATH . $pic_thumbnail;
- if ( file_exists($pic_thumbnail_fullpath) )
- {
- $thumbnail_file = $pic_thumbnail_fullpath;
- }
- }
- if ($album_config['lb_preview'] == 0)
- {
- $pic_preview = '';
- }
- else
- {
- $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()"';
- }
- if ($album_config['show_pics_nav'] == 1)
- {
- $template->assign_block_vars('pics_nav.next', array(
- 'U_PICS_THUMB' => $thumbnail_file,
- 'U_PICS_LINK' => append_sid(album_append_uid('album_showpage.' . $phpEx . '?pic_id=' . $next_pic_id[$i] . $full_size_param . $nuffimage_vars)),
- 'PIC_PREVIEW' => $pic_preview,
- )
- );
- }
- }
- }
- else
- {
- for($i = 0; $i < $next_pic_count; $i++)
- {
- $next_pic_id[$i] = $next_pic_rows[$i]['pic_id'];
- $thumbnail_file = append_sid(album_append_uid('album_thumbnail.' . $phpEx . '?pic_id=' . $next_pic_id[$i]));
- if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )
- {
- $pic_filename = $next_pic_rows[$i]['pic_filename'];
- $pic_filetype = strtolower(substr($pic_filename, strlen($pic_filename) - 4, 4));
- $pic_thumbnail = ( $next_pic_rows[$i]['pic_thumbnail'] == '' ) ? md5($pic_filename) . $pic_filetype : $next_pic_rows[$i]['pic_thumbnail'];
- //$pic_thumbnail = ( $next_pic_rows[$i]['pic_thumbnail'] == '' ) ? $pic_filename : $next_pic_rows[$i]['pic_thumbnail'];
- $pic_thumbnail_fullpath = ALBUM_CACHE_PATH . $pic_thumbnail;
- if ( file_exists($pic_thumbnail_fullpath) )
- {
- $thumbnail_file = $pic_thumbnail_fullpath;
- }
- }
- if ($album_config['lb_preview'] == 0)
- {
- $pic_preview = '';
- }
- else
- {
- $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()"';
- }
- if ($album_config['show_pics_nav'] == 1)
- {
- $template->assign_block_vars('pics_nav.prev', array(
- 'U_PICS_THUMB' => $thumbnail_file,
- 'U_PICS_LINK' => append_sid(album_append_uid('album_showpage.' . $phpEx . '?pic_id=' . $next_pic_id[$i] . $full_size_param . $nuffimage_vars)),
- 'PIC_PREVIEW' => $pic_preview,
- )
- );
- }
- }
- }
- }
-
- //PREV
- $sql = "SELECT a.*
- FROM " . ALBUM_TABLE . " AS a
- WHERE a.pic_id < " . $pic_id_tmp . "
- AND a.pic_cat_id = " . $pic_cat_id_tmp . "
- AND a.pic_approval = 1
- ORDER BY pic_id DESC LIMIT 2";
-
- if( !($result = $db->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql);
- }
-
- //$row = $db->sql_fetchrow($result);
- $prev_pic_count = $db->sql_numrows($result);
- $prev_pic_rows = $db->sql_fetchrowset($result);
- $db->sql_freeresult($result);
-
- if ($prev_pic_count == 0)
- {
- $no_prev_pic = true;
-
- $sql = "SELECT a.*
- FROM " . ALBUM_TABLE . " AS a
- WHERE a.pic_cat_id = " . $pic_cat_id_tmp . "
- AND a.pic_approval = 1
- ORDER BY pic_id DESC LIMIT 1";
-
- if( !($result = $db->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql);
- }
-
- $row = $db->sql_fetchrow($result);
- $last_pic_id = $row['pic_id'];
- $db->sql_freeresult($result);
- }
- else
- {
- $no_prev_pic = false;
- if ( $album_config['invert_nav_arrows'] == 0 )
- {
- for($i = 0; $i < $prev_pic_count; $i++)
- {
- $prev_pic_id[$i] = $prev_pic_rows[$i]['pic_id'];
- $thumbnail_file = append_sid(album_append_uid('album_thumbnail.' . $phpEx . '?pic_id=' . $prev_pic_id[$i]));
- if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )
- {
- $pic_filename = $prev_pic_rows[$i]['pic_filename'];
- $pic_filetype = strtolower(substr($pic_filename, strlen($pic_filename) - 4, 4));
- $pic_thumbnail = ( $prev_pic_rows[$i]['pic_thumbnail'] == '' ) ? md5($pic_filename) . $pic_filetype : $prev_pic_rows[$i]['pic_thumbnail'];
- //$pic_thumbnail = ( $prev_pic_rows[$i]['pic_thumbnail'] == '' ) ? $pic_filename : $prev_pic_rows[$i]['pic_thumbnail'];
- $pic_thumbnail_fullpath = ALBUM_CACHE_PATH . $pic_thumbnail;
- if ( file_exists($pic_thumbnail_fullpath) )
- {
- $thumbnail_file = $pic_thumbnail_fullpath;
- }
- }
- if ($album_config['lb_preview'] == 0)
- {
- $pic_preview = '';
- }
- else
- {
- $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()"';
- }
- if ($album_config['show_pics_nav'] == 1)
- {
- $template->assign_block_vars('pics_nav.prev', array(
- 'U_PICS_THUMB' => $thumbnail_file,
- 'U_PICS_LINK' => append_sid(album_append_uid('album_showpage.' . $phpEx . '?pic_id=' . $prev_pic_id[$i] . $full_size_param . $nuffimage_vars)),
- 'PIC_PREVIEW' => $pic_preview,
- )
- );
- }
- }
- }
- else
- {
- for($i = $prev_pic_count - 1; $i >= 0; $i--)
- {
- $prev_pic_id[$i] = $prev_pic_rows[$i]['pic_id'];
- $thumbnail_file = append_sid(album_append_uid('album_thumbnail.' . $phpEx . '?pic_id=' . $prev_pic_id[$i]));
- if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )
- {
- $pic_filename = $prev_pic_rows[$i]['pic_filename'];
- $pic_filetype = strtolower(substr($pic_filename, strlen($pic_filename) - 4, 4));
- $pic_thumbnail = ( $prev_pic_rows[$i]['pic_thumbnail'] == '' ) ? md5($pic_filename) . $pic_filetype : $prev_pic_rows[$i]['pic_thumbnail'];
- //$pic_thumbnail = ( $prev_pic_rows[$i]['pic_thumbnail'] == '' ) ? $pic_filename : $prev_pic_rows[$i]['pic_thumbnail'];
- $pic_thumbnail_fullpath = ALBUM_CACHE_PATH . $pic_thumbnail;
- if ( file_exists($pic_thumbnail_fullpath) )
- {
- $thumbnail_file = $pic_thumbnail_fullpath;
- }
- }
- if ($album_config['lb_preview'] == 0)
- {
- $pic_preview = '';
- }
- else
- {
- $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()"';
- }
- if ($album_config['show_pics_nav'] == 1)
- {
- $template->assign_block_vars('pics_nav.next', array(
- 'U_PICS_THUMB' => $thumbnail_file,
- 'U_PICS_LINK' => append_sid(album_append_uid('album_showpage.' . $phpEx . '?pic_id=' . $prev_pic_id[$i] . $full_size_param . $nuffimage_vars)),
- 'PIC_PREVIEW' => $pic_preview,
- )
- );
- }
- }
- }
- }
-
-
- // ------------------------------------
- // IMAGES ARRAY
- // SLIDESHOW SCRIPTS
- // ------------------------------------
- if ( $album_config['slideshow_script'] == 1 )
- {
- $template->assign_block_vars('switch_slideshow_scripts', array());
-
- $pic_link = ( $picm == false ) ? 'album_pic.' : 'album_picm.';
-
- $sql = "SELECT *
- FROM " . ALBUM_TABLE . " AS a
- WHERE a.pic_cat_id = " . $pic_cat_id_tmp . "
- AND a.pic_approval = 1
- ORDER BY pic_id ASC";
-
- if( !($result = $db->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql);
- }
-
- $total_pic_count = $db->sql_numrows($result);
- $total_pic_rows = $db->sql_fetchrowset($result);
- $db->sql_freeresult($result);
-
- $pic_list = '';
- $tit_list = '';
- $des_list = '';
-
- for($i = 0; $i < $total_pic_count; $i++)
- {
- $pic_list .= 'Pic[' . $i . '] = '' . append_sid(album_append_uid($pic_link . $phpEx . '?pic_id=' . $total_pic_rows[$i]['pic_id']), true) . ''; ' . "n";
- $tit_list .= 'Tit[' . $i . '] = '' . $total_pic_rows[$i]['pic_title'] . ''; ' . "n";
- $des_list .= 'Des[' . $i . '] = '' . $total_pic_rows[$i]['pic_desc'] . ''; ' . "n";
- /*
- $pic_list .= 'Pic[' . $i . '] = '' . ALBUM_UPLOAD_PATH . $total_pic_rows[$i]['pic_filename'] . ''; ' . "n";
- */
- }
-
- $template->assign_vars(array(
- 'PIC_LIST' => $pic_list,
- 'TIT_LIST' => $tit_list,
- 'DES_LIST' => $des_list,
- )
- );
- }
-
-
- // ------------------------------------
- // SPECIAL FX
- // ------------------------------------
- if ($album_config['enable_nuffimage'] == 1)
- {
- $template->assign_block_vars('pic_nuffed_enabled', array(
- 'L_PIC_NUFFED_CLICK' => $lang['Nuff_Click'],
- 'U_PIC_NUFFED_CLICK' => append_sid(album_append_uid('album_showpage.' . $phpEx . '?pic_id=' . $pic_id . $full_size_param . '&nuffimage=true')),
- )
- );
- }
- else
- {
- $template->assign_block_vars('switch_slideshow_no_scripts', array());
- }
-
-
- // ------------------------------------
- // Get $pic_id from $comment_id
- // ------------------------------------
-
- if( isset($comment_id) && $album_config['comment'] == 1 )
- {
- $sql = "SELECT comment_id, comment_pic_id
- FROM ". ALBUM_COMMENT_TABLE ."
- WHERE comment_id = '$comment_id'";
-
- if( !($result = $db->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, 'Could not query comment and pic information', '', __LINE__, __FILE__, $sql);
- }
-
- $row = $db->sql_fetchrow($result);
-
- if( empty($row) )
- {
- message_die(GENERAL_ERROR, 'This comment does not exist');
- }
-
- $pic_id = $row['comment_pic_id'];
- }
-
- // ------------------------------------
- // Get this pic info and current category info
- // ------------------------------------
-
- $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
- FROM ". ALBUM_CAT_TABLE ." AS ac, ". ALBUM_TABLE ." AS p
- LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id
- LEFT JOIN ". ALBUM_COMMENT_TABLE ." AS c ON p.pic_id = c.comment_pic_id
- LEFT JOIN ". ALBUM_RATE_TABLE ." AS r ON p.pic_id = r.rate_pic_id
- WHERE pic_id = '$pic_id'
- AND ac.cat_id = p.pic_cat_id
- GROUP BY p.pic_id
- LIMIT 1";
-
- if( !($result = $db->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql);
- }
- $thispic = $db->sql_fetchrow($result);
-
- $cat_id = ($thispic['pic_cat_id'] != 0) ? $thispic['pic_cat_id'] : $thispic['cat_id'];
- $album_user_id = $thispic['cat_user_id'];
-
- $total_comments = $thispic['comments_count'];
- $comments_per_page = $board_config['posts_per_page'];
-
- if( empty($thispic) )
- {
- message_die(GENERAL_ERROR, $lang['Pic_not_exist'] . $lang['Nav_Separator'] . $pic_id);
- }
-
- // ------------------------------------
- // Check the permissions
- // ------------------------------------
- $check_permissions = ALBUM_AUTH_VIEW|ALBUM_AUTH_RATE|ALBUM_AUTH_COMMENT|ALBUM_AUTH_EDIT|ALBUM_AUTH_DELETE;
- $auth_data = album_permissions($album_user_id, $cat_id, $check_permissions, $thispic);
-
- if ( $auth_data['view'] == 0 )
- {
- if ( !$userdata['session_logged_in'] )
- {
- redirect(append_sid(LOGIN_MG . '?redirect=album_showpage.' . $phpEx . '&pic_id=' . $pic_id));
- exit;
- }
- else
- {
- message_die(GENERAL_ERROR, $lang['Not_Authorised']);
- }
- }
- // ------------------------------------
- //RATING: Additional Check: if this user already rated
- // ------------------------------------
-
- if( $userdata['session_logged_in'] )
- {
- $sql = "SELECT *
- FROM ". ALBUM_RATE_TABLE ."
- WHERE rate_pic_id = '$pic_id'
- AND rate_user_id = '". $userdata['user_id'] ."'
- LIMIT 1";
-
- if( !$result = $db->sql_query($sql) )
- {
- message_die(GENERAL_ERROR, 'Could not query rating information', '', __LINE__, __FILE__, $sql);
- }
-
- if ($db->sql_numrows($result) > 0)
- {
- $already_rated = true;
- }
- else
- {
- $already_rated = false;
- }
- }
- else
- {
- $already_rated = false;
- }
-
-
-
-
- // Watch pic for comments - BEGIN
-
- if( $userdata['session_logged_in'] )
- {
- //$can_watch_comment = TRUE;
-
- $sql = "SELECT notify_status
- FROM " . ALBUM_COMMENT_WATCH_TABLE . "
- WHERE pic_id = $pic_id
- AND user_id = " . $userdata['user_id'];
- if ( !($result = $db->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, "Could not obtain comment watch information", '', __LINE__, __FILE__, $sql);
- }
-
- if ( $row = $db->sql_fetchrow($result) )
- {
- $is_watching_comments = true;
- if ( isset($HTTP_GET_VARS['unwatch']) )
- {
- if ( $HTTP_GET_VARS['unwatch'] == 'comment' )
- {
-
- $sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : '';
- $sql = "DELETE $sql_priority FROM " . ALBUM_COMMENT_WATCH_TABLE . "
- WHERE pic_id = $pic_id
- AND user_id = " . $userdata['user_id'];
- if ( !($result = $db->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, "Could not delete comment watch information", '', __LINE__, __FILE__, $sql);
- }
- $is_watching_comment = FALSE;
- }
-
- $template->assign_vars(array(
- 'META' => '<meta http-equiv="refresh" content="5;url=' . append_sid("album." .$phpEx) . '">')
- );
-
- $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>');
- message_die(GENERAL_MESSAGE, $message);
- }
- else
- {
- $is_watching_comment = TRUE;
-
- if ( $row['notify_status'] )
- {
-
- $sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : '';
- $sql = "UPDATE $sql_priority " . ALBUM_COMMENT_WATCH_TABLE . "
- SET notify_status = 0
- WHERE pic_id = $pic_id
- AND user_id = " . $userdata['user_id'];
- if ( !($result = $db->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, "Could not update comment watch information", '', __LINE__, __FILE__, $sql);
- }
- }
- }
- }
- // Set pic for watch request
- if ( isset($HTTP_GET_VARS['watch']) )
- {
- if ( $HTTP_GET_VARS['watch'] == 'comment' )
- {
- $sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : '';
- $sql = "INSERT $sql_priority INTO " . ALBUM_COMMENT_WATCH_TABLE . " (pic_id, user_id, notify_status)
- VALUES ($pic_id, " . $userdata['user_id'] . ", 0)";
- if ( !($result = $db->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, "Could not insert comment watch information", '', __LINE__, __FILE__, $sql);
- }
- }
- $template->assign_vars(array(
- 'META' => '<meta http-equiv="refresh" content="5;url=' . append_sid("album." .$phpEx) . '">')
- );
-
- $message = $lang['Watching_comment'] . '<br /><br />' . sprintf($lang['Click_return_pic'], '<a href="' . append_sid("album_showpage.".$phpEx."?pic_id=".$pic_id) . '">', '</a>');
- message_die(GENERAL_MESSAGE, $message);
-
- }
- }
- // Watch pic for comments - END
-
-
-
-
-
-
-
-
-
- /*
- +----------------------------------------------------------
- | Main work here...
- +----------------------------------------------------------
- */
- album_read_tree($album_user_id);
- $album_nav_cat_desc = album_make_nav_tree($cat_id, 'album_cat.' . $phpEx, 'nav' , $album_user_id);
- if ($album_nav_cat_desc != '')
- {
- $album_nav_cat_desc = ALBUM_NAV_ARROW . $album_nav_cat_desc;
- }
-
- if( !isset($_POST['comment']) && !isset($_POST['rating']) )
- {
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Comments Screen
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-
- // ------------------------------------
- // Get the comments thread
- // Beware: when this script was called with comment_id (without start)
- // ------------------------------------
- if ( $album_config['comment'] == 1 )
- {
- if( !isset($comment_id) )
- {
- if( isset($_GET['start']) )
- {
- $start = intval($_GET['start']);
- }
- elseif( isset($_POST['start']) )
- {
- $start = intval($_POST['start']);
- }
- else
- {
- $start = 0;
- }
- }
- else
- {
- // We must do a query to co-ordinate this comment
- $sql = "SELECT COUNT(comment_id) AS count
- FROM ". ALBUM_COMMENT_TABLE ."
- WHERE comment_pic_id = $pic_id
- AND comment_id < $comment_id";
-
- if( !$result = $db->sql_query($sql) )
- {
- message_die(GENERAL_ERROR, 'Could not obtain comments information from the database', '', __LINE__, __FILE__, $sql);
- }
-
- $row = $db->sql_fetchrow($result);
-
- if( !empty($row) )
- {
- $start = floor( $row['count'] / $comments_per_page ) * $comments_per_page;
- }
- else
- {
- $start = 0;
- }
- }
-
- if( isset($_GET['sort_order']) )
- {
- switch ($_GET['sort_order'])
- {
- case 'ASC':
- $sort_order = 'ASC';
- break;
- default:
- $sort_order = 'DESC';
- }
- }
- elseif( isset($_POST['sort_order']) )
- {
- switch ($_POST['sort_order'])
- {
- case 'ASC':
- $sort_order = 'ASC';
- break;
- default:
- $sort_order = 'DESC';
- }
- }
- else
- {
- $sort_order = 'ASC';
- }
-
- if ($total_comments > 0)
- {
- $template->assign_block_vars('coment_switcharo_top', array());
-
- $limit_sql = ($start == 0) ? $comments_per_page : $start .','. $comments_per_page;
-
- $sql = "SELECT c.*, u.*
- FROM ". ALBUM_COMMENT_TABLE ." AS c
- LEFT JOIN ". USERS_TABLE ." AS u ON c.comment_user_id = u.user_id
- WHERE c.comment_pic_id = '$pic_id'
- ORDER BY c.comment_id $sort_order
- LIMIT $limit_sql";
-
- if( !$result = $db->sql_query($sql) )
- {
- message_die(GENERAL_ERROR, 'Could not obtain comments information from the database', '', __LINE__, __FILE__, $sql);
- }
-
- $commentrow = array();
-
- while( $row = $db->sql_fetchrow($result) )
- {
- $commentrow[] = $row;
- }
- if ( defined('IS_PHPBBXS') )
- {
- $orig_autolink = array();
- $replacement_autolink = array();
- obtain_autolink_list($orig_autolink, $replacement_autolink, 99999999);
- if (!$userdata['user_allowswearywords'])
- {
- $orig_word = array();
- $replacement_word = array();
- obtain_word_list($orig_word, $replacement_word);
- }
- }
-
- for ($i = 0; $i < count($commentrow); $i++)
- {
- if( ($commentrow[$i]['user_id'] == ALBUM_GUEST) || ($commentrow[$i]['username'] == '') )
- {
- if ( defined('IS_PHPBBXS') )
- {
- $poster = ($commentrow[$i]['comment_username'] == '') ? $lang['Guest'] : color_group_colorize_name($commentrow[$i]['user_id']);
- }
- else
- {
- $poster = ($commentrow[$i]['comment_username'] == '') ? $lang['Guest'] : $commentrow[$i]['comment_username'];
- }
- }
- else
- {
- if ( defined('IS_PHPBBXS') )
- {
- $poster = color_group_colorize_name($commentrow[$i]['user_id']);
- }
- else
- {
- $poster = '<a href="' . append_sid('profile.' . $phpEx . '?mode=viewprofile&' . POST_USERS_URL . '=' . $commentrow[$i]['user_id']) . '">' . $commentrow[$i]['username'] . '</a>';
- }
- }
-
- if ($commentrow[$i]['comment_edit_count'] > 0)
- {
- $sql = "SELECT c.comment_id, c.comment_edit_user_id, u.user_id, u.username
- FROM ". ALBUM_COMMENT_TABLE ." AS c
- LEFT JOIN ". USERS_TABLE ." AS u ON c.comment_edit_user_id = u.user_id
- WHERE c.comment_id = '".$commentrow[$i]['comment_id']."'
- LIMIT 1";
-
- if( !$result = $db->sql_query($sql) )
- {
- message_die(GENERAL_ERROR, 'Could not obtain last edit information from the database', '', __LINE__, __FILE__, $sql);
- }
-
- $lastedit_row = $db->sql_fetchrow($result);
-
- $edit_info = ($commentrow[$i]['comment_edit_count'] == 1) ? $lang['Edited_time_total'] : $lang['Edited_times_total'];
-
- if ( defined('IS_PHPBBXS') )
- {
- $edit_info = '<br /><br />» '. 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 />';
- }
- else
- {
- $edit_info = '<br /><br />» '. 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 />';
- }
- }
- else
- {
- $edit_info = '';
- }
-
- // Smilies
- if ( defined('IS_PHPBBXS') )
- {
- global $bbcode;
- $html_on = ( $userdata['user_allowhtml'] && $board_config['allow_html'] ) ? 1 : 0 ;
- $bbcode_on = ( $userdata['user_allowbbcode'] && $board_config['allow_bbcode'] ) ? 1 : 0 ;
- $smilies_on = ( $userdata['user_allowsmile'] && $board_config['allow_smilies'] ) ? 1 : 0 ;
- $bbcode->allow_html = $html_on;
- $bbcode->allow_bbcode = $bbcode_on;
- $bbcode->allow_smilies = $smilies_on;
-
- $commentrow[$i]['comment_text'] = $bbcode->parse($commentrow[$i]['comment_text'], $bbcode_uid);
- $commentrow[$i]['comment_text'] = strtr($commentrow[$i]['comment_text'], array_flip(get_html_translation_table(HTML_ENTITIES)));
-
- if( function_exists( 'acronym_pass' ) )
- {
- $commentrow[$i]['comment_text'] = acronym_pass( $commentrow[$i]['comment_text'] );
- }
- if( count($orig_autolink) )
- {
- $commentrow[$i]['comment_text'] = autolink_transform($commentrow[$i]['comment_text'], $orig_autolink, $replacement_autolink);
- }
- //$commentrow[$i]['comment_text'] = kb_word_wrap_pass ($commentrow[$i]['comment_text']);
- $commentrow[$i]['comment_text'] = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $commentrow[$i]['comment_text']) : $commentrow[$i]['comment_text'];
-
- $user_sig = ( $board_config['allow_sig'] ) ? trim($commentrow[$i]['user_sig']) : '';
- $user_sig_bbcode_uid = $commentrow[$i]['user_sig_bbcode_uid'];
- if($user_sig != '')
- {
- $bbcode->is_sig = ( $config_mg['allow_all_bbcode'] == 0 ) ? true : false;
- $user_sig = $bbcode->parse($user_sig, $user_sig_bbcode_uid);
- $bbcode->is_sig = false;
- }
-
- }
- else
- {
- if ($album_config['album_bbcode'] == 1)
- {
- global $bbcode;
- $html_on = ( $userdata['user_allowhtml'] && $board_config['allow_html'] ) ? 1 : 0 ;
- $bbcode_on = ( $userdata['user_allowbbcode'] && $board_config['allow_bbcode'] ) ? 1 : 0 ;
- $smilies_on = ( $userdata['user_allowsmile'] && $board_config['allow_smilies'] ) ? 1 : 0 ;
- $bbcode->allow_html = $html_on;
- $bbcode->allow_bbcode = $bbcode_on;
- $bbcode->allow_smilies = $smilies_on;
-
- $commentrow[$i]['comment_text'] = $bbcode->parse($commentrow[$i]['comment_text'], $bbcode_uid);
- $commentrow[$i]['comment_text'] = strtr($commentrow[$i]['comment_text'], array_flip(get_html_translation_table(HTML_ENTITIES)));
-
- $user_sig = ( $board_config['allow_sig'] ) ? trim($commentrow[$i]['user_sig']) : '';
- $user_sig_bbcode_uid = $commentrow[$i]['user_sig_bbcode_uid'];
- if($user_sig != '')
- {
- //$bbcode->is_sig = true;
- $user_sig = $bbcode->parse($user_sig, $user_sig_bbcode_uid);
- //$bbcode->is_sig = false;
- }
- }
- }
-
- //email, profile, PM links
- if ( ($commentrow[$i]['user_viewemail'] == true) || ($userdata['user_level'] == ADMIN) )
- {
- $email_uri = ( $board_config['board_email_form'] ) ? append_sid('profile.' . $phpEx . '?mode=email&' . POST_USERS_URL .'=' . $commentrow[$i]['user_id']) : 'mailto:' . $commentrow[$i]['user_email'];
- }
- else
- {
- $email_uri = '';
- }
- $profile_url = append_sid('profile.' . $phpEx . '?mode=viewprofile&' . POST_USERS_URL . '=' . $commentrow[$i]['user_id']);
- $pm_url = append_sid('privmsg.' . $phpEx . '?mode=post&' . POST_USERS_URL . '=' . $commentrow[$i]['user_id']);
-
- //avatar
- $poster_avatar = '';
- if ( $commentrow[$i]['user_avatar_type'] && $commentrow[$i]['user_id'] != ANONYMOUS && $commentrow[$i]['user_allowavatar'] )
- {
- switch( $commentrow[$i]['user_avatar_type'] )
- {
- case USER_AVATAR_UPLOAD:
- $poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $commentrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
- break;
- case USER_AVATAR_REMOTE:
- $poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $commentrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
- break;
- case USER_AVATAR_GALLERY:
- $poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $commentrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
- break;
- case USER_GRAVATAR:
- $poster_avatar = ( $board_config['enable_gravatars'] ) ? '<img src="' . get_gravatar($commentrow[$i]['user_avatar']) . '" alt="" border="0" />' : '';
- break;
- }
- }
- if ((!$poster_avatar) && ($board_config['default_avatar_set'] != 3))
- {
- if (($board_config['default_avatar_set'] == 0) && ($poster_id == -1) && ($board_config['default_avatar_guests_url']))
- {
- $poster_avatar = '<img src="' . $board_config['default_avatar_guests_url'] . '" alt="" border="0" />';
- }
- elseif (($board_config['default_avatar_set'] == 1) && ($poster_id != -1) && ($board_config['default_avatar_users_url']) )
- {
- $poster_avatar = '<img src="' . $board_config['default_avatar_users_url'] . '" alt="" border="0" />';
- }
- elseif ($board_config['default_avatar_set'] == 2)
- {
- if (($poster_id == -1) && ($board_config['default_avatar_guests_url']))
- {
- $poster_avatar = '<img src="' . $board_config['default_avatar_guests_url'] . '" alt="" border="0" />';
- }
- elseif (($poster_id != -1) && ($board_config['default_avatar_users_url']))
- {
- $poster_avatar = '<img src="' . $board_config['default_avatar_users_url'] . '" alt="" border="0" />';
- }
- }
- }
-
- //rank & rank image
- $sql = "SELECT *
- FROM " . RANKS_TABLE . "
- ORDER BY rank_special, rank_min";
- if ( !($result = $db->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, 'Could not obtain ranks information.', '', __LINE__, __FILE__, $sql);
- }
-
- $ranksrow = array();
- while ( $row = $db->sql_fetchrow($result) )
- {
- $ranksrow[] = $row;
- }
- $db->sql_freeresult($result);
-
- $poster_rank = '';
- $rank_image = '';
- if ($commentrow[$i]['user_id'] == ANONYMOUS)
- {
- $poster_rank = $lang['Guest'];
- }
- elseif ( $commentrow[$i]['user_rank'] )
- {
- for($j = 0; $j < count($ranksrow); $j++)
- {
- if ( $commentrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
- {
- $poster_rank = $ranksrow[$j]['rank_title'];
- $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
- }
- }
- }
- else
- {
- for($j = 0; $j < count($ranksrow); $j++)
- {
- if ( $commentrow[$i]['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )
- {
- $poster_rank = $ranksrow[$j]['rank_title'];
- $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
- }
- }
- }
-
- // Handle anon users posting with usernames
- if ( $commentrow[$i]['user_id'] == ANONYMOUS && $commentrow[$i]['post_username'] != '' )
- {
- if ( defined('IS_PHPBBXS') )
- {
- $poster = color_group_colorize_name($commentrow[$i]['user_id']);
- }
- else
- {
- $poster = $commentrow[$i]['post_username'];
- }
- $poster_rank = $lang['Guest'];
- }
-
- if ( defined('IS_PHPBBXS') )
- {
-
- }
- else
- {
- $lang['JOINED_DATE_FORMAT'] = $lang['DATE_FORMAT'];
- }
-
- $template->assign_block_vars('commentrow', array(
- 'ID' => $commentrow[$i]['comment_id'],
- 'POSTER_NAME' => $poster,
- 'TIME' => create_date2($board_config['default_dateformat'], $commentrow[$i]['comment_time'], $board_config['board_timezone']),
- '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 />' : '',
-
- //users mesangers, website, email
- '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>' : '',
- '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>' : '',
- 'AIM_IMG' => ( $commentrow[$i]['user_id'] != ANONYMOUS ) ? ( $commentrow[$i]['user_aim'] ) ? '<a href="aim:goim?screenname=' . $commentrow[$i]['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '' : '',
- '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'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '' : '',
- '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>' : '' : '',
- '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>' : '' : '',
- '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>' : '',
- '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>' : '' : '',
-
- 'POSTER_AVATAR' => $poster_avatar,
- 'POSTER_RANK' => $poster_rank,
- 'POSTER_RANK_IMAGE' => $rank_image,
- 'POSTER_JOINED' => ( $commentrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Joined'] . ': ' . create_date($lang['JOINED_DATE_FORMAT'], $commentrow[$i]['user_regdate'], $board_config['board_timezone']) : '',
- 'POSTER_POSTS' => ( $commentrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Posts'] . ': ' . $commentrow[$i]['user_posts'] : '',
- 'POSTER_FROM' => ( $commentrow[$i]['user_from'] && $commentrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Location'] . ': ' . $commentrow[$i]['user_from'] : '',
- 'POSTER_SIGNATURE' => $user_sig,
-
- 'TEXT' => $commentrow[$i]['comment_text'],
- 'EDIT_INFO' => $edit_info,
-
- '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>' : '',
-
- '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>' : ''
-
- )
- );
- }
-
- $template->assign_block_vars('switch_comment', array());
-
- $template->assign_vars(array(
- 'PAGINATION' => generate_pagination(append_sid(album_append_uid('album_showpage.' . $phpEx . '?pic_id=' . $pic_id . '&sort_order=' . $sort_order)), $total_comments, $comments_per_page, $start),
- 'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $comments_per_page ) + 1 ), ceil( $total_comments / $comments_per_page ))
- )
- );
- $template->assign_block_vars('coment_switcharo_bottom', array());
- }
- }
-
- // Start output of page
- $page_title = $lang['Album'];
-
- include($phpbb_root_path . 'includes/page_header.'.$phpEx);
- $template->set_filenames(array('body' => $show_template));
-
- if ( defined('IS_PHPBBXS') )
- {
- if( ($thispic['pic_user_id'] == ALBUM_GUEST) || ($thispic['username'] == '') )
- {
- $poster = ($thispic['pic_username'] == '') ? $lang['Guest'] : color_group_colorize_name($thispic['user_id']);
- }
- else
- {
- $poster = color_group_colorize_name($thispic['user_id']);
- }
- }
- else
- {
- if( ($thispic['pic_user_id'] == ALBUM_GUEST) || ($thispic['username'] == '') )
- {
- $poster = ($thispic['pic_username'] == '') ? $lang['Guest'] : $thispic['pic_username'];
- }
- else
- {
- $poster = '<a href="' . append_sid('profile.' . $phpEx . '?mode=viewprofile&'. POST_USERS_URL . '=' . $thispic['user_id']) . '">' . $thispic['username'] . '</a>';
- }
- }
-
-
- //---------------------------------
- // Comment Posting Form
- //---------------------------------
-
- if ( $auth_data['comment'] == 1 && $album_config['comment'] == 1 )
- {
- $template->assign_block_vars('switch_comment_post', array());
-
- if( !$userdata['session_logged_in'] )
- {
- $template->assign_block_vars('switch_comment_post.logout', array());
- }
- if ( defined('IS_PHPBBXS') )
- {
- }
- else
- {
- //begin shows smilies
- $max_smilies = 20;
-
- $sql = 'SELECT emoticon, code, smile_url
- FROM ' . SMILIES_TABLE . '
- GROUP BY smile_url
- ORDER BY smilies_id LIMIT ' . $max_smilies;
-
- if (!$result = $db->sql_query($sql))
- {
- message_die(GENERAL_ERROR, "Couldn't retrieve smilies list", '', __LINE__, __FILE__, $sql);
- }
- $smilies_count = $db->sql_numrows($result);
- $smilies_data = $db->sql_fetchrowset($result);
-
- for ($i = 1; $i < ($smilies_count + 1); $i++)
- {
- $template->assign_block_vars('switch_comment_post.smilies', array(
- 'CODE' => $smilies_data[$i - 1]['code'],
- 'URL' => $board_config['smilies_path'] . '/' . $smilies_data[$i - 1]['smile_url'],
- 'DESC' => $smilies_data[$i - 1]['emoticon']
- )
- );
-
- if ( is_integer($i / 5) )
- {
- $template->assign_block_vars('switch_comment_post.smilies.new_col', array());
- }
- }
- }
- }
-
-
-
-
-
- // 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>' : ''),
|
#7 Tue 11 Sep, 2007 16:46 |
|
Artie 
Joined: January 2007
Posts: 833
Location:  Lone Star State
|
 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.
// 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>' : ''),
|
#8 Wed 12 Sep, 2007 00:19 |
|
mipavluk 
Joined: July 2007
Posts: 19
|
 Re: [MOD] Pic Comment Notification
|
#9 Wed 12 Sep, 2007 17:17 |
|
Gianni PB 
Joined: December 2006
Posts: 242
Location:  New York
|
 Re: [MOD] Pic Comment Notification
can create a link that give an option to subscribe a category?
|
#10 Fri 14 Sep, 2007 13:37 |
|
Artie 
Joined: January 2007
Posts: 833
Location:  Lone Star State
|
 Re: [MOD] Pic Comment Notification
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.
|
#11 Wed 19 Sep, 2007 16:59 |
|
darkone 
Joined: February 2007
Posts: 168
Location:
|
 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
|
#12 Fri 21 Sep, 2007 22:18 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 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? 
The mod is already included in the new beta.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#13 Sat 22 Sep, 2007 09:50 |
|
Gianni PB 
Joined: December 2006
Posts: 242
Location:  New York
|
 Re: [MOD] Pic Comment Notification
is this included in Icy Phoenix 1.1.5.20?
|
#14 Sun 07 Oct, 2007 21:29 |
|
|
Page 1 of 1
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
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
|
|
|
|