[CDB] Thanks for posts

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Suggested Hosts
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Locked
deadwood
Registered User
Posts: 5
Joined: Mon Jul 17, 2017 4:30 am

Re: [DEV] Thanks for posts

Post by deadwood »

Hippie459MN wrote: Mon Jul 17, 2017 1:02 pm
deadwood wrote: Mon Jul 17, 2017 4:31 am Hello and thanks for your hard work.

Does this work for 3.2.x? If not, how can i make it work?
Works just fine here. :)
I got it to work too ;) :mrgreen:
DWFII
Registered User
Posts: 386
Joined: Fri Oct 20, 2006 2:17 am
Name: D.W.
Contact:

Re: [DEV] Thanks for posts

Post by DWFII »

Working for me, as well.

The only problem (and an extremely annoying one) is that the subject line in email notifications is not specific to the topic or post...not specific to anything really.

if I didn't know better, I'd filter out all email with that subject line just on general principles (consider how a new user would react)
DWFII
In the High Desert of Central Oregon
rxu
Extensions Development Team
Posts: 3711
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Contact:

Re: [DEV] Thanks for posts

Post by rxu »

DWFII wrote: Wed Jul 19, 2017 3:47 pm email notifications is not specific to the topic or post...not specific to anything really.
No idea what are you talking about, as the email subject contains thanked post subject as well as email body does, the latter also contains the link to the thanked post.
DWFII
Registered User
Posts: 386
Joined: Fri Oct 20, 2006 2:17 am
Name: D.W.
Contact:

Re: [DEV] Thanks for posts

Post by DWFII »

rxu wrote: Wed Jul 19, 2017 4:19 pm
DWFII wrote: Wed Jul 19, 2017 3:47 pm email notifications is not specific to the topic or post...not specific to anything really.
No idea what are you talking about, as the email subject contains thanked post subject
['quote]

Not in my installation. I mentioned this before here

I am out of town at the moment, but I can send you a screen cap if you want.
as well as email body does, the latter also contains the link to the thanked post.
Yes, this works as advertised.
DWFII
In the High Desert of Central Oregon
rxu
Extensions Development Team
Posts: 3711
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Contact:

Re: [DEV] Thanks for posts

Post by rxu »

Original email template is this https://github.com/rxu/thanks_for_posts ... thanks.txt so what is yours?
It has Subject: {THANKS_SUBG} — "{POST_SUBJECT}" line, so "No email subject specified" case shouldn't be possible.
DWFII
Registered User
Posts: 386
Joined: Fri Oct 20, 2006 2:17 am
Name: D.W.
Contact:

Re: [DEV] Thanks for posts

Post by DWFII »

Thanks for writing this extension and thanks for responding here.

I dl'd the original extension from git hub and then changed some of the language files to convert the word "thanks" into "like."

I asked this question before...where is this "call" coming from?

Is the file that is malfunctioning a php fie? Where is it?

Is it "thanks.text"? In what directory is it to be found?

What am I looking for in the way of relevant text. What should it say?
DWFII
In the High Desert of Central Oregon
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53379
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [DEV] Thanks for posts

Post by Brf »

As rxu explained, it is language/en/email/user_thanks.txt
The first line of any of the email templates is used to make the email subject
DWFII
Registered User
Posts: 386
Joined: Fri Oct 20, 2006 2:17 am
Name: D.W.
Contact:

Re: [DEV] Thanks for posts

Post by DWFII »

OK, thanks....didn't see the entire text of the link.

I am out of town and don't have an ftp app on this laptop so I'll have to look at that on Saturday and get back to this topic then.
DWFII
In the High Desert of Central Oregon
User avatar
paulie
Registered User
Posts: 113
Joined: Thu Mar 30, 2017 3:41 pm
Location: Hull, East Yorkshire.

Re: [DEV] Thanks for posts

Post by paulie »

rxu wrote: Wed Jul 19, 2017 6:26 pm Original email template is this https://github.com/rxu/thanks_for_posts ... thanks.txt so what is yours?
It has Subject: {THANKS_SUBG} — "{POST_SUBJECT}" line, so "No email subject specified" case shouldn't be possible.
I can confirm that even with the correct Email template, "No Email subject specified" DOES happen.
'Life in the Air Age isn't all the brochures say ...'
DWFII
Registered User
Posts: 386
Joined: Fri Oct 20, 2006 2:17 am
Name: D.W.
Contact:

Re: [DEV] Thanks for posts

Post by DWFII »

paulie wrote: Thu Jul 20, 2017 10:52 am I can confirm that even with the correct Email template, "No Email subject specified" DOES happen.
Thank you.
DWFII
In the High Desert of Central Oregon
rxu
Extensions Development Team
Posts: 3711
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Contact:

Re: [DEV] Thanks for posts

Post by rxu »

in what circumstances does it happen? Always or from time to time? Do thanked posts actually has a subject or is it empty? The more details you provide the sooner I can isolate the issue, thanks.
User avatar
paulie
Registered User
Posts: 113
Joined: Thu Mar 30, 2017 3:41 pm
Location: Hull, East Yorkshire.

Re: [DEV] Thanks for posts

Post by paulie »

rxu wrote: Thu Jul 20, 2017 1:26 pm in what circumstances does it happen? Always or from time to time? Do thanked posts actually has a subject or is it empty? The more details you provide the sooner I can isolate the issue, thanks.
Hi rxu, it happens all the time every time.

The email content is fine, it's just the title or suject line line of the email that displays in your mail inbox list as 'No Email subject specified.

I was wondering if it's anything to do with this piece of code in notification/thanks.php:

Code: Select all

	public function get_email_template_variables()
	{
		$username = $this->user_loader->get_username($this->get_data('poster_id'), 'username');

		return array(
				'THANKS_SUBG'	=> htmlspecialchars_decode($this->language->lang('THANKS_PM_SUBJECT_'. $this->get_data('lang_act'))),
				'USERNAME'		=> htmlspecialchars_decode($this->user->data['username']),
				'POST_SUBJECT'	=> htmlspecialchars_decode(censor_text($this->get_data('post_subject'))),
				'POST_THANKS'	=> htmlspecialchars_decode($this->language->lang('THANKS_PM_MES_'. $this->get_data('lang_act'))),
				'POSTER_NAME'	=> htmlspecialchars_decode($username),
				'U_POST_THANKS'	=> generate_board_url() . '/viewtopic.' . $this->php_ext . "?p={$this->item_id}#p{$this->item_id}",
		);
	}

I might be wrong, but the 'THANKS_SUBG' line doesn't 'look' right?
'Life in the Air Age isn't all the brochures say ...'
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53379
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [DEV] Thanks for posts

Post by Brf »

paulie wrote: Thu Jul 20, 2017 1:35 pmI might be wrong, but the 'THANKS_SUBG' line doesn't 'look' right?
That is the name of the template token.
rxu wrote: Wed Jul 19, 2017 6:26 pm It has Subject: {THANKS_SUBG} — "{POST_SUBJECT}" line,
DWFII
Registered User
Posts: 386
Joined: Fri Oct 20, 2006 2:17 am
Name: D.W.
Contact:

Re: [DEV] Thanks for posts

Post by DWFII »

rxu wrote: Thu Jul 20, 2017 1:26 pm in what circumstances does it happen? Always or from time to time? Do thanked posts actually has a subject or is it empty? The more details you provide the sooner I can isolate the issue, thanks.
I've only been using the extension for a couple of weeks or so and mostly it's just me testing it...giving likes, not getting many...but it has happened every time I've received a notification.

On my forum the subject of the post is inherited from the topic...just like this forum where the subject is "Re: [DEV] Thanks for posts".
DWFII
In the High Desert of Central Oregon
User avatar
paulie
Registered User
Posts: 113
Joined: Thu Mar 30, 2017 3:41 pm
Location: Hull, East Yorkshire.

Re: [DEV] Thanks for posts

Post by paulie »

Brf wrote: Thu Jul 20, 2017 1:58 pm
paulie wrote: Thu Jul 20, 2017 1:35 pmI might be wrong, but the 'THANKS_SUBG' line doesn't 'look' right?
That is the name of the template token.
rxu wrote: Wed Jul 19, 2017 6:26 pm It has Subject: {THANKS_SUBG} — "{POST_SUBJECT}" line,
As I have already stated, that part that rxu mentioned is exactly as it should be and is correct and can therefore be eliminated from the problem. That is why I was wondering if the code I've highlighted - which looks as though it should insert the sent Email notification subject line - isn't correct.
'Life in the Air Age isn't all the brochures say ...'
Locked

Return to “Extensions in Development”