1
GPboarder
CBB 3.08 - How do I edit the content of e-mail notifications?
  • 2009/6/19 3:44

  • GPboarder

  • Friend of XOOPS

  • Posts: 248

  • Since: 2006/10/6


I have a lot of users taking advantage of the notifications of new posts in CBB 3.08.

They would like the poster's name and a link to their e-mail address put into the post so they can send information directly without having to go to the site and look it up.

What file needs to be edited for this, and in what way?

Thanks.
Optimism is the mother of disappointment.

2
ghia
Re: CBB 3.08 - How do I edit the content of e-mail notifications?
  • 2009/6/19 7:53

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


The templates are in /modules/newbb/language/yourlanguage/mail_template, but you may need to add variables for it in /modules/newbb/post.php.

Be cautious: Not everyone will appreciate that his email address gets redistributed to third parties (especially the ones who hide their address in their profile!).

And while most people try to attract traffic and visitors to their site, you are looking on measures to short circuit it. An idea for that is to send also the full text of the postings in the notification, so there is no need to visit the site again.

3
GPboarder
Re: CBB 3.08 - How do I edit the content of e-mail notifications?
  • 2009/6/19 13:51

  • GPboarder

  • Friend of XOOPS

  • Posts: 248

  • Since: 2006/10/6


Thanks for the info. This particular site is a closed, professional community so the e-mail isn't an issue.

Members can receive the full text of the posting but that often doesn't include the member's signature.

Another question is with regard to the subject line. Even on XOOPS.org, the subject line is really of no value. My inbox is filled with
[XOOPS Project!] Support Forums auto-notify : New post in thread

It would be really nice to have the subject of the private message or e-mail actually have useful information.

As far as adding variables, can you point me in the direction to learn what that is and how to do it? Sounds like something beyond my skills.
Optimism is the mother of disappointment.

4
barryc
Re: CBB 3.08 - How do I edit the content of e-mail notifications?
  • 2009/6/23 19:00

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


I have a related question. The templates for the notification email message includes codes for the forum name and the thread. Is there a code to insert the user name, such that the message could include the name of the person who posted the message? On our site this would be valuable because certain users post more interesting messages than others.

Barry
Barry Cooper
Sweet Home, Oregon

5
ghia
Re: CBB 3.08 - How do I edit the content of e-mail notifications?
  • 2009/6/23 19:26

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


You have to add the variables yourself in post.php (look for notify).

6
barryc
Re: CBB 3.08 - How do I edit the content of e-mail notifications?
  • 2009/6/23 23:03

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


Thanks. I looked at post.php and see where some of the variables are defined. I imagine I have to add a line something like:

$tags['POSTER_NAME'] = $forum_info['poster_name'];

However, I am unsure what that second variable should be. I'm also not sure whether I am even on the right track. So far digging around in CBB files I haven't been able to find where the name of the user posting the message is defined. If anyone knows, that would help me out. Remember, I;m a non-programmer, although I do admit trying to figure these things out helps me understand XOOPS better.

Barry
Barry Cooper
Sweet Home, Oregon

7
ghia
Re: CBB 3.08 - How do I edit the content of e-mail notifications?
  • 2009/6/24 2:12

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


For the username start the look up with the variable name used in the templates.

8
barryc
Re: CBB 3.08 - How do I edit the content of e-mail notifications?
  • 2009/6/24 6:30

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


Thanks. I found that in the templates (newbb_viewforum) the user ID of the last poster is called by a variable {$topic.topic_last_poster}.

I can create the code in the email template with no problem but I'm struggling to work out the syntax to call topic_last_poster in post.php

I'll have to give up for tonight and do some more on it tomorrow.

BC
Barry Cooper
Sweet Home, Oregon

9
barryc
Re: CBB 3.08 - How do I edit the content of e-mail notifications?
  • 2009/8/20 19:43

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


I apologize, but I still need some help on this. I'm beginning to try to learn some php programming but haven't got very far yet.

To insert the name of the poster into the notification message, I understand that I have to put an identifier in the email template. I have used POSTER_NAME. If I just leave that like that, POSTER_NAME appears in the notification. So far so good.

Now I have to work out how to replace POSTER_NAME with the actual name of the person posting. In the newbb templates (e.g. newbb_viewforum.html) the name of the last poster is called by the variable {$topic.topic_last_poster}

I understand that I have to put a tag into post.php to populate LAST_POSTER. This is the step that I cannot figure out. I see that $tags is an array. Am I correct in assuming that I have to add an additional value in that array, something like:

$tags['POSTER_NAME'] =??

If so, can you help me by telling me what the code to add that tag should be? Conversely, if I'm wrong about that, can you still help me with the code?

These challenges are learning opportunities for me. It would be really helpful if you could also explain in ordinary English, just what is being done. Perhaps I'll be able to do better next time.

Ghia, or someone else?

I appreciate any help you can give.

barryC

Login

Who's Online

328 user(s) are online (265 user(s) are browsing Support Forums)


Members: 0


Guests: 328


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