FAP CUSTOMIZATION - PM At New Comment »  Show posts from    to     

Icy Phoenix


Archived phpBB Topics (Styles, Mods, Support) - FAP CUSTOMIZATION - PM At New Comment



Anemia [ Sat 20 Jan, 2007 18:53 ]
Post subject: FAP CUSTOMIZATION - PM At New Comment
Hi ,

is there a way to get a PM for a new comment on a picture ? so that every user how has upload a pic in my album become a PM for every Comment that another user have post for this picture ?!

that would be so great


lefty74 [ Sat 20 Jan, 2007 21:10 ]
Post subject: Re: PM At New Comment
I agree, that would be a great feature!


Mighty Gorgon [ Tue 23 Jan, 2007 02:45 ]
Post subject: Re: PM At New Comment
I've started to code this once ago... but then I've stopped and dropped it...

The reason was because I didn't find a good solution for who should be the recipient of the notification... the pics author, who posted a comment for the pics or both? Or maybe all the users which have this option enabled in their profile?


Artie [ Tue 23 Jan, 2007 17:55 ]
Post subject: Re: PM At New Comment
Mighty Gorgon wrote: [View Post]
Or maybe all the users which have this option enabled in their profile?

xs_arrowu xs_arrowu xs_arrowu

I vote for this one


Vortex [ Tue 23 Jan, 2007 20:43 ]
Post subject: Re: PM At New Comment
Mighty Gorgon wrote: [View Post]
I've started to code this once ago... but then I've stopped and dropped it...

The reason was because I didn't find a good solution for who should be the recipient of the notification... the pics author, who posted a comment for the pics or both? Or maybe all the users which have this option enabled in their profile?




I think it could be fine to do like for normal posting in forums: You can choose whether to subscribe that picture (topic) or not...


lefty74 [ Wed 24 Jan, 2007 00:16 ]
Post subject: Re: PM At New Comment
Mighty Gorgon wrote: [View Post]
I've started to code this once ago... but then I've stopped and dropped it...

The reason was because I didn't find a good solution for who should be the recipient of the notification... the pics author, who posted a comment for the pics or both? Or maybe all the users which have this option enabled in their profile?


If possible, I would recommend, the pics author ought to get a msg by default (unless they unticked the button) but also users which have this option enabled for that pic.
(like in watching a topic).

For me, it does not have to be a PM, an email would be great too but there may not be a difference with regard to coding difficulties.
I found this when looking googling around, installed it on my test board but it didn't work. Have not had a chance to look at it closely why not...
but maybe thought it could give an idea or base.


lefty74 [ Sun 28 Jan, 2007 14:28 ]
Post subject: Re: PM At New Comment
Just for info and maybe interim solution.

The mod that I found in the above post does work, i just forgot to insert the sql

The only thing you need to change is any reference to album_comment should be album_showpage.


krisbfunk [ Sun 28 Jan, 2007 20:16 ]
Post subject: Re: PM At New Comment
i think this is a great mod, i also found it on smartor's site but it points to the same dead link

I get

Quote:
Fatal error: Maximum execution time of 30 seconds exceeded in D:InetpubADIDAPwp-contentpluginsfootnotes.php on line 71


can someone post the code for this mod?


lefty74 [ Sun 28 Jan, 2007 21:28 ]
Post subject: Re: PM At New Comment
um, I did not save it since I had the link

I can try to recreate the steps that were mentioned and put them down.


krisbfunk [ Sun 28 Jan, 2007 21:34 ]
Post subject: Re: PM At New Comment
if you have the time that would be cool, otherwise, i can try to contact the mod author or wait for a reply on smartor's site. no hurry, perhaps the site is just down at the moment as it's just a time-out error.


lefty74 [ Sun 28 Jan, 2007 21:40 ]
Post subject: Re: PM At New Comment
i might do it anyway. in case i want to uninstall it and the site is no longer there i would rather have something available ...


lefty74 [ Sun 28 Jan, 2007 22:27 ]
Post subject: Re: PM At New Comment
I used MOD-Studio for the first time, not bad at all to make it look pretty plus it saves time

Code: [Hide] [Select]
##############################################################
## MOD Title: Email notification when comments on pic
## MOD Author: adidap < invalid@invalid.invalid > (Not given) http://invalid.invalid/
## MOD Description: This will notify the poster of an image if a comment has been posted on his picture. Option to turn it off via the profile.
## MOD Version: 0.0.0
##
## Installation Level: Easy
## Installation Time: 11 minutes
## Files To Edit: includes/usercp_register.php
## language/lang_english/lang_main.php
## album_showpage.php
## templates/subSilver/profile_add_body.tpl
## Included Files:
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
## Generator: Phpbb.ModTeam.Tools
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes: http://www.adidap.com/projects/email-notification-on-comments-for-smartor-album/
##
## Above link was not working so in order for others to use it I recreated the steps and made it work for FAP as well
##############################################################
## MOD History:
##
## 2007-01-28 - Version 0.0.0
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ SQL ]------------------------------------------
#
ALTER TABLE phpbb_users ADD user_notify_co TINYINT(1) DEFAULT '1';
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
#
$notifypm = ( isset($HTTP_POST_VARS['notifypm']) ) ? ( ($HTTP_POST_VARS['notifypm']) ? TRUE : 0 ) : TRUE;

#
#-----[ AFTER, ADD ]------------------------------------------
#
$notifyco = ( isset($HTTP_POST_VARS['notifyco']) ) ? ( ($HTTP_POST_VARS['notifyco']) ? TRUE : 0 ) : TRUE;

#
#-----[ FIND ]------------------------------------------
#
SET " . $username_sql
#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_notify_pm = $notifypm
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_notify_co = $notifyco
#
#-----[ FIND ]------------------------------------------
#
$sql = "INSERT INTO " . USERS_TABLE . "
#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_notify_pm
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_notify_co
#
#-----[ FIND ]------------------------------------------
#
VALUES ($user_id, '" . str_replace("'", "''", $username)
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$notifypm
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, $notifyco
#
#-----[ FIND ]------------------------------------------
#
$notifypm = $userdata['user_notify_pm'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$notifyco = $userdata['user_notify_co'];
#
#-----[ FIND ]------------------------------------------
#
display_avatar_gallery($mode
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$notifypm
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, $notifyco
#
#-----[ FIND ]------------------------------------------
#
'NOTIFY_PM_NO' => ( !$notifypm ) ? 'checked="checked"' : '',
#
#-----[ AFTER, ADD ]------------------------------------------
#
'NOTIFY_CO_YES' => ( $notifyco ) ? 'checked="checked"' : '',
'NOTIFY_CO_NO' => ( !$notifyco ) ? 'checked="checked"' : '',

#
#-----[ FIND ]------------------------------------------
#
'L_NOTIFY_ON_PRIVMSG' => $lang['Notify_on_privmsg'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_NOTIFY_ON_COMMENT' => $lang['Notify_on_Comment'],
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Notify_on_privmsg'] =
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Notify_on_Comment'] = 'Notify on new Comment of own Pictures';
#
#-----[ OPEN ]------------------------------------------
#
album_showpage.php
#
#-----[ FIND ]------------------------------------------
#
// --------------------------------
// Complete... now send a message to user
// --------------------------------

#
#-----[ BEFORE, ADD ]------------------------------------------
#
//email the user who received a new comment
$pic = "SELECT * FROM ". ALBUM_TABLE ." WHERE pic_id = $pic_id";
$script_name = preg_replace('/^/?(.*?)/?$/', "1", trim($board_config['script_path']));
$script_name = ( $script_name != '' ) ? $script_name . '/album_showpage.'.$phpEx : 'album_showpage.'.$phpEx;
$server_name = trim($board_config['server_name']);
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
if ( !($result = $db->sql_query($pic)) )
{
$error = TRUE;
$error_msg = "error";
}
$pic_data = $db->sql_fetchrow($result);
$picuserid = $pic_data['pic_user_id'];
$to = "SELECT * FROM ". USERS_TABLE ." WHERE user_id = '$picuserid'";
if ( !($result = $db->sql_query($to)) )
{
$error = TRUE;
$error_msg = "error";
}
$to_data = $db->sql_fetchrow($result);

if (($comment_user_id != $picuserid) && ($to_data['user_notify_co']))
{
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
$emailer->use_template('comment_notify');
$emailer->email_address($to_data['user_email']);
$emailer->assign_vars(array(
'USERNAME' => $to_data['username'],
'C_NAME' => $comment_username,
'PIC_TITLE' => $pic_data['pic_title'],
'Comment_TEXT' => $comment_text,
'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "n", "-- n" . $board_config['board_email_sig']) : '',
'U_Comment' => $server_protocol . $server_name . $server_port . $script_name . '?pic_id='. $pic_id)
);
$emailer->send();
$emailer->reset();
}
//email the user who received a new comment

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_add_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_NOTIFY_ON_PRIVMSG}:</span></td>
<td class="row2">
<input type="radio" name="notifypm" value="1" {NOTIFY_PM_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="notifypm" value="0" {NOTIFY_PM_NO} />
<span class="gen">{L_NO}</span></td>
</tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_NOTIFY_ON_COMMENT}:</span></td>
<td class="row2">
<input type="radio" name="notifyco" value="1" {NOTIFY_CO_YES} />
<span class="gen">{L_YES}</span>
<input type="radio" name="notifyco" value="0" {NOTIFY_CO_NO} />
<span class="gen">{L_NO}</span></td>
</tr>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


Then create a file called comment_notify.tpl

and paste this in it

Code: [Hide] [Select]
Subject: New Comment on your picture: {PIC_TITLE}
Charset: iso-8859-1

Hello {USERNAME},

{C_NAME} has entered the following comment on your picture "{PIC_TITLE}".
--------------------------------------------------
{Comment_TEXT}
--------------------------------------------------

You can view the new comment by clicking on the following link:

{U_Comment}


{EMAIL_SIG}


and save it in language/lang_english/email.

You may wish to include this in the corresponding admin pages too so that an admin can change the settings of users (if necessary) as well rather than going directly into the DB.

NOTE: Please make a backup first in case I missed a line.


krisbfunk [ Sun 28 Jan, 2007 22:37 ]
Post subject: Re: PM At New Comment
thanks!

definitely going to try this out tonight.


Artie [ Mon 29 Jan, 2007 20:45 ]
Post subject: Re: PM At New Comment
Thank you lefty74, for the contribution


lefty74 [ Mon 29 Jan, 2007 21:54 ]
Post subject: Re: PM At New Comment
no problem, but the credit goes to the guy whose line seems to be on the limp at the moment all i did was trying to remember where I pasted stuff


krisbfunk [ Sun 04 Feb, 2007 21:55 ]
Post subject: Re: PM At New Comment
this worked like a charm btw, thanks for taking the time to filter through your changes and post for all to take advantage of it lefty74.


Mighty Gorgon [ Mon 05 Feb, 2007 01:46 ]
Post subject: Re: PM At New Comment
Thank you very much lefty74!


Anemia [ Sun 11 Feb, 2007 21:10 ]
Post subject: Re: PM At New Comment
hmmmm dont work ... but i dont know why ?!

can someone check my files ?! i dont know what to do


Artie [ Sun 11 Feb, 2007 22:38 ]
Post subject: Re: PM At New Comment
The instructions aren't exactly the best to follow ..... but I did see that you forgot this step


Code: [Hide] [Select]
#
#-----[ FIND ]------------------------------------------
#

VALUES ($user_id, '" . str_replace("'", "''", $username)
#

#-----[ IN-LINE FIND ]------------------------------------------
#

$notifypm,

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#

$notifyco,


Anemia [ Mon 12 Feb, 2007 20:00 ]
Post subject: Re: PM At New Comment
Uhm .... the problem is gone .. dont know why .. but it works ....


Artie [ Mon 12 Feb, 2007 21:11 ]
Post subject: Re: PM At New Comment
You should check what I showed above, or you may have problems with this feature for newly registered users.


felix968 [ Wed 14 Mar, 2007 17:36 ]
Post subject: Re: PM At New Comment
Mighty Gorgon wrote: [View Post]
I've started to code this once ago... but then I've stopped and dropped it...

The reason was because I didn't find a good solution for who should be the recipient of the notification... the pics author, who posted a comment for the pics or both? Or maybe all the users which have this option enabled in their profile?


Mighty, is there a way to notify new comment all posted a comment for the pic (and not only the pics author)?


felix968 [ Fri 30 Mar, 2007 19:10 ]
Post subject: Re: PM At New Comment
felix968 wrote: [View Post]

Mighty, is there a way to notify new comment all posted a comment for the pic (and not only the pics author)?


Maybe my real bad english is a problem...I re-post the question, I think it's very important: is there a way for notify the new comment in album to all add a comment (not only the author), like in the forum?
Thanks again for your job


Mighty Gorgon [ Mon 09 Apr, 2007 23:50 ]
Post subject: Re: PM At New Comment
felix968 wrote: [View Post]
felix968 wrote: [View Post]

Mighty, is there a way to notify new comment all posted a comment for the pic (and not only the pics author)?


Maybe my real bad english is a problem...I re-post the question, I think it's very important: is there a way for notify the new comment in album to all add a comment (not only the author), like in the forum?
Thanks again for your job

I don't have the time for this now.

I think you are keeping busy all the staff with your requests.


felix968 [ Tue 10 Apr, 2007 00:12 ]
Post subject: Re: PM At New Comment
I know...I want say thanks all the Staff for patience with me


Artie [ Fri 22 Jun, 2007 03:32 ]
Post subject: Re: PM At New Comment
Anemia wrote: [View Post]
Hi ,

is there a way to get a PM for a new comment on a picture ? so that every user how has upload a pic in my album become a PM for every Comment that another user have post for this picture ?!

that would be so great


Try the mod here http://www.icyphoenix.com/viewtopic.php?p=16711


Pete_Z [ Fri 15 Feb, 2008 03:30 ]
Post subject: Re: PM At New Comment
:edit> lol wait, I thought this was for PMs... wouldn't it be more convienant? members get emailed that they got pm'd anyway....








I like the PM on comment idea, especially since I do not have strict rules that a member MUST have a valid email.

I get members using fake emails




Powered by Icy Phoenix