1
Mamba
CBB Hack to have notification with message text and reply link
  • 2009/9/2 9:39

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


I would like to set up CBB in a way, that when I subscribe to a topic and receive an email with the notification, that would include the text of the message, and with two links: "View" and "Reply".

If I click on the Reply, XOOPS would open the original message in a "Reply" mode, i.e. I can start typing right away my response.

2
gtop00
Re: CBB Hack to have notification with message text and reply link
  • 2009/9/2 15:20

  • gtop00

  • Friend of XOOPS

  • Posts: 498

  • Since: 2004/11/13


Hi Mich.,
Quote:

Mamba wrote:
I would like to set up CBB in a way, that when I subscribe to a topic and receive an email with the notification, that would include the text of the message, and with two links: "View" and "Reply".

If I click on the Reply, XOOPS would open the original message in a "Reply" mode, i.e. I can start typing right away my response.


I Also would like that but if it sounds difficult, could we (at least) have the Topic Subject in the Notification?
This way we avoid to click on the PM and then to the Linked Topic. Also, we will be able to see immediately if there are many PMs from the same Topic...

3
Mamba
Re: CBB Hack to have notification with message text and reply link
  • 2009/9/2 17:31

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


We'll be going away from PM as a notification medium, at least here on XOOPS website, because it is cluttering our Database. If something is important for you to subscribe, then it should be important enough to get an email about it

4
ghia
Re: CBB Hack to have notification with message text and reply link
  • 2009/9/3 0:38

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
I would like to set up CBB in a way, that when I subscribe to a topic and receive an email with the notification, that would include the text of the message,
There is already an option to do that (See global_newfullpost_notify.tpl).
Quote:
and with two links: "View"

This link is provided
Quote:
and "Reply".

Add a second link (copy of view link) to the template with this modifier:
{POST_URL|replace:'viewtopic':'reply'}




5
Mamba
Re: CBB Hack to have notification with message text and reply link
  • 2009/9/3 8:21

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Thanks, Ghia!!! This was exactly what I was looking for!

There was a little bit more work involved (I had to add a new array for new full post in a thread), and define "POST_REPLY_URL" as your suggested solution

{POST_URL|replace:'viewtopic':'reply'}


didn't work, but now it is working here on XOOPS, as I wanted...

The beauty of this is that the forums will work the same as a mailing list, i.e. I receive an email with the content of the new message in the thread that I subscribe to, and with one click I can respond to that message if I want to. The same as I would hit "Reply" button on an email.

So thanks again!

6
gtop00
Re: CBB Hack to have notification with message text and reply link
  • 2009/9/3 15:46

  • gtop00

  • Friend of XOOPS

  • Posts: 498

  • Since: 2004/11/13


I Personally am very happy with the PM notification (here in XOOPS). I can have all that I am interested in one place.

Can we have an automation to delete PMs older than X months IF they have not moved to the savebox?

By the way: I got 10 notification PMs from the current topic instead of 5!

7
ghia
Re: CBB Hack to have notification with message text and reply link
  • 2009/9/3 17:02

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Mamba, was playing in this thread with his new feature, but the notified posts were deleted.

On this site no. On your site you could use SQL or PHP in a custom block.

8
xgarb
Re: CBB Hack to have notification with message text and reply link
  • 2009/9/3 19:47

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


if you want to mess about with the subject line in notification emails this might help.

In kernel\notification.php my code looks like this (around line 669)..

$subjectStart $event_info['mail_subject'];
        

        foreach (
$notifications as $notification) {
            if (empty(
$omit_user_id) || $notification->getVar('not_uid') != $omit_user_id) {
                
// user-specific tags
                //$tags['X_UNSUBSCRIBE_URL'] = 'TODO';
                // TODO: don't show unsubscribe link if it is 'one-time' ??
                
$tags['X_UNSUBSCRIBE_URL'] = XOOPS_URL '/notifications.php';
                
$tags array_merge ($tags$extra_tags);
                
$subject $subjectStart." : ".$tags['POST_NAME'];
                
$notification->notifyUser($template_dir$template$subject$tags);
            }


.$tags['POST_NAME']; adds the post title onto the subject - useful when you get a lot of emails.


9
Mamba
Re: CBB Hack to have notification with message text and reply link
  • 2009/9/4 7:24

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Good idea! Thanks for sharing!

Login

Who's Online

474 user(s) are online (339 user(s) are browsing Support Forums)


Members: 0


Guests: 474


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits