Board Notification Mod - 1.2.2 released

Started by SabreOfParadise, May 28, 2009, 12:36:25 PM

Previous topic - Next topic

SabreOfParadise

The code I have posted is from my Mod and describes how the package manager should change the SMF code and how these changes can be reverted. So I won't recommend to change anything manually in the SMF code.

Quote from: valmiki on May 11, 2012, 02:57:36 AMThis morning I have changed the admin language to English and tried to write a reply

Are you sure the user you are using also has English as his selected language?

If you are sure please check this:


  • Open the file Themes/default/languages/EmailTemplates.english.php in a text editor.
  • Search for 'notify_boards_body_reply' => array(

The text editor should take to this part of the code:

'notify_boards_body_reply' => array(
/*
@additional_params: notify_boards_body_reply
TOPICSUBJECT: The subject of the topic causing the notification
TOPICLINK: A link to the topic.
MESSAGE: This is the body of the message.
UNSUBSCRIBELINK: Link to unsubscribe from notifications.
@description:
*/
'subject' => 'New Reply: {TOPICSUBJECT}',
'body' => 'A new reply, \'{TOPICSUBJECT}\', by {POSTERNAME} has been made on a topic on a board you are watching.

You can see it at
{TOPICLINK}

The text of the reply is shown below:
{MESSAGE}

Unsubscribe to new topics and replies from this board by using this link:
{UNSUBSCRIBELINK}

{REGARDS}',
),


If this part is not in the file something went wrong during your installation of the Board Notification Mod.
If you can't find this file you don't have the English package installed or maybe a different one like british English or the UTF-8 version.

valmiki

... well, something went wrong during the installation coz that string ain't there ...  :o

What to do now?

Maybe I just have to uninstall and install again but somehow I fear that might not work ... mh!

SabreOfParadise

Are you sure your package manager works?
It may be that it cannot modify the files. At least that's what's happening on the Linux server I'm running my main SMF system on. In my Win test system the package manager works so I'm cheating by just copying the changed files from the test system to the main system.  :-[

valmiki

it seems like it is working coz when it does the checks all works except those for the french and German language.
The server I am working on is Linux so it might as well be what is happening to you that doesn't copy properly the files over.
Should I modify some permissions for files and folders during the installation?
Is there a way to copy things manually?
It feels like I am this close to fix this thing ... thank you!

SabreOfParadise

The checks are not the problem but the files aren't changed. There is also no error message. The error messages for German and French are because you don't have these languages installed and can therefore be ignored.

To make sure your package isn't you can check the file ManagePermissions.php and search for mark_notify_more. If that is not there I'd say your package manager doesn't work (given your FTP settings are correct). Then your SMF updates will also not work by using the package manager which sucks.

valmiki

#105
Yeah! I half guessed that those errors were due to the lack of the languages so I just didn't worry but it was better to report since I wasn't 100% sure.
I searched for the file you indicated but I only have ManagePermissions.english.php and the italian file of course ... I guess it is ok, let me know if otherwise. Moreover, I have to say unfortunately that the string you asked to search for isn't present ... :(
So far I didn't have any time to do updates, nor I thought that would be the necessity since I have installed SMF less than 2 months ago. But if what you think is right for my case, I will have more than a problem soon enough.
What to do now?

valmiki

:(
I tried a couple of things I found around to see if the package would install and start to work correctly but so far I didn't have any luck.
The package is in the folder Packages and SMF says it is installed but the problem still exists: the Mod doesn't work and I also get this ugly message when a reply is created.
Anybody could help me how to figure out this problem?
If I am the only one having this problem there must be a problem with my installation but since I am a newbie I have no idea how to fix it ... :(
Thank you anyway for at least trying...

Wilo

Hi,

I'm using SMF 2.0.2, trying to add the mod but getting an Error in Package installation error.


The error comes in ./Sources/Post.php

See below, can anyone help?


Thanks


W.


Code: (Find) [Select]sendmail($rowmember['email_address'], $emaildata['subject'], $emaildata['body'], null, null, false, 3);



Code: (Add After) [Select][/size]            $notifiedMembers[] = $rowmember['id_member'];

Shambles

Quote from: Wilo on June 26, 2012, 07:43:57 AM
I'm using SMF 2.0.2, trying to add the mod but getting an Error in Package installation error.

The error comes in ./Sources/Post.php
If you attach a copy of the Post.php file to your next post here we can have a look at it.

Wilo

Hi,

Thanks for the fast response.

Please see attached.

Shambles

Quote from: Wilo on June 26, 2012, 10:38:29 AM
Hi,

Thanks for the fast response.

Please see attached.
Hi, well you didn't need to attach the .php~ file as that is a backup, created by the last mod applied to the post.php file.

Looking at your supplied source file, it appears you have a mailing list mod installed (see here). That mod has transformed the "search for" string:

sendmail($rowmember['email_address'], $emaildata['subject'], $emaildata['body'], null, null, false, 3);

.. into it's own mailing list version:

(line 2699)
sendmail($rowmember['email_address'], ($modSettings['mailinglist_encodesubject']? '=?UTF-8?B?'.base64_encode($replacements['TOPICSUBJECT']).'?=':$replacements['TOPICSUBJECT']), $replacements['MESSAGE'], un_htmlspecialchars($sendername['real_name']), 't'.$topicData[$key]['topic'], true, 3);

.. which is why this mod won't apply cleanly.

Wilo

Hi,

Thanks for your help.  I removed the mailing list mod which enabled me to install the Board notification mod. 

Unfortunately a new error appears now when creating new posts

- An error has occurred!  The email template "notify_boards_reply" could not be found.

Any idea why this is happening?  The error goes when i install the board notification mod.

Shambles

Quote from: Wilo on June 28, 2012, 05:53:59 AM
- An error has occurred!  The email template "notify_boards_reply" could not be found.

Any idea why this is happening?  The error goes when i install the board notification mod.
I guess you mean the error goes when you reinstall the mailing list mod.

Could you possibly try uninstalling that mod [again] then attaching file EmailTemplates.english.php (from the Languages folder) to your next post? Looking at the installation file for the mailing list it might not be completely reverting the enhancements it made to that file.

Wilo

Hi,

I've installed the mod and noticed it'snot wokring at all now.  The options are in the permissions,

I've attached the EmailTemplates as suggested.

Thanks

W.


Wilo

Hi,

I've been testing the mod, i may have misunderstood it's usage.

I was under the impression that by clicking notify on a board all posts within that board have notify turned on and any new posts have notification emails sent out.  By clicking unnotify at board level all notifications for new posts, and individual post notifications are turned off.

Is this correct?

Wilo

Hi,

I can't get the Board notification mod working any more.  I've setup a new, clean test instance of SMF with only the Board Notification mod installed.

I've done the following test in the test environment.  Am i correct in thinking if i click notify at board level notifications for topics will be turned on too?

When I turn Notify on at Board level the topics below still show notify.

I've check all the permissions and made sure the test account has the the permissions profile assigned to them

Can anyone explain where I'm going wrong, or if I've misunderstood anything?

Many thanks,

W.

SabreOfParadise

#116
Strangely enough I didn't get a notification for new postings in this thread since May.

Quote from: valmiki on May 11, 2012, 09:14:44 AM
I have to say unfortunately that the string you asked to search for isn't present ... :(

Then you have a problem with the package manager and I can't help you with that. You have to ask somewhere else in this forum for help. I guess here:
http://www.simplemachines.org/community/index.php?board=147.0

Or you simply make the necessary changes yourself as describes in the mod files. But you need to read the package manager description to make this correctly.

SabreOfParadise

Quote from: Wilo on July 11, 2012, 05:17:53 AM
I was under the impression that by clicking notify on a board all posts within that board have notify turned on and any new posts have notification emails sent out.  By clicking unnotify at board level all notifications for new posts, and individual post notifications are turned off.

No. It just adds the possibility to monitor a whole board without turning the notifications on for each thread in the board.  The individual notifications still exist. You should use either the notifications on the board or the individual ones but not both with the same user in the same board which would also not really make sense but they are not turned off by the mod as I didn't have the time to make it foolproof. If you use both notification methods I guess you'll also get doubled notifications if you subscribed a board and individual threads in the same board. In my forum I therefore deleted all individual notification settings from previous subcriptions of my own user to have a clean state.

Wilo

Hi,

QuoteIn my forum I therefore deleted all individual notification settings from previous subcriptions of my own user to have a clean state.

How did you delete all individual notifications?

And...

QuoteStrangely enough I didn't get a notification for new postings in this thread since May.
Quote

Are you saying the mod is not working for you either?  If so can you please advise on how to get the mod working?

Thanks,

W.

SabreOfParadise

Quote from: Wilo on July 16, 2012, 08:12:51 AM
How did you delete all individual notifications?

Via
Modify profile => Notifications
As an admin you can do that for other users, too.

Quote from: Wilo on July 16, 2012, 08:12:51 AM
Are you saying the mod is not working for you either?  If so can you please advise on how to get the mod working?

No, I was talking about this forum (simplemachines.org) and the notifications for this thread you are currently reading. This has nothing to do with my mod (and seems to work now anyway).

Advertisement: