[3.2][3.3][RC] Thanks for posts (and optional Tapatalk integration)

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)
User avatar
Naguissa
Registered User
Posts: 500
Joined: Thu Mar 02, 2017 6:55 am
Location: Barcelona
Name: Naguissa
Contact:

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Naguissa »

Lor@n wrote: Mon Jul 23, 2018 12:52 pm
Mahdi1944 wrote: Wed Jun 27, 2018 3:46 pm Hi, Thanks for your useful extension, but i have a problem in Thanks button, when click on, page will be refresh, but thanks not added and no any changes, Thanks button not working,
but it work when disable phpseo, anyone can help me to fix it?
Thanks
I have the same problem with this ext for SEO :

https://github.com/phpbb-seo

By emptying the cache, and the "production" folder in the cache via FTP, everything works well.

for this bug :

In Toplist, i Have this error at the top of de page :

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/pagination.php on line 144: A non-numeric value encountered
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/pagination.php on line 306: A non-numeric value encountered
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/pagination.php on line 306: A non-numeric value encountered
PHPbb3.2.2
PHP7.1
MySql 5.6

you have an idea?

You can try current development version. It's the same as last release but with some fixes and language improvements: https://github.com/Naguissa/thanks_for_ ... master.zip


I'm not able to see that debug messages in my production server and my development machine broke few time ago and I've still had no time to configure it, so I cannot check this issue. Nevertheless, development version is in my production and doesn't break anything.
Mahdi1944
Registered User
Posts: 9
Joined: Tue Jan 10, 2017 8:56 am

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Mahdi1944 »

Hi, Thanks for answers, download latest ver from githhub and problem fixed :)
Lor@n
Registered User
Posts: 31
Joined: Fri Nov 11, 2016 1:25 am

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Lor@n »

What bug did you fix with the latest version?
User avatar
Naguissa
Registered User
Posts: 500
Joined: Thu Mar 02, 2017 6:55 am
Location: Barcelona
Name: Naguissa
Contact:

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Naguissa »

Lor@n wrote: Tue Jul 24, 2018 7:18 pm What bug did you fix with the latest version?
It's still not a released version, it's current development version on repository, still pending few additions.

I fixed the Debug/Warning messages on boards with debug enabled. Just like this:

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/pagination.php on line 144: A non-numeric value encountered
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/pagination.php on line 306: A non-numeric value encountered
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/pagination.php on line 306: A non-numeric value encountered
Lor@n
Registered User
Posts: 31
Joined: Fri Nov 11, 2016 1:25 am

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Lor@n »

Mahdi1944 wrote: Wed Jun 27, 2018 3:46 pm Hi, Thanks for your useful extension, but i have a problem in Thanks button, when click on, page will be refresh, but thanks not added and no any changes, Thanks button not working,
but it work when disable phpseo, anyone can help me to fix it?
Thanks
I solved this bug:

In core/helper.php,

Find L564

Code: Select all

THANKS_LINK' => append_sid("{$this->phpbb_root_path}viewtopic.$this->php_ext", 'f=' . $forum_id . '&p=' . $row['post_id'] . '&' . $thank_mode . '=' . $row['post_id'] . '&to_id=' . $poster_id . '&from_id=' . $this->user->data['user_id']),
And replace by

Code: Select all

THANKS_LINK' => append_sid("{$this->phpbb_root_path}viewtopic.$this->php_ext", 'f=' . $forum_id . '&t=' . $row['topic_id'] . '&' . $thank_mode . '=' . $row['post_id'] . '&to_id=' . $poster_id . '&from_id=' . $this->user->data['user_id']),
User avatar
Naguissa
Registered User
Posts: 500
Joined: Thu Mar 02, 2017 6:55 am
Location: Barcelona
Name: Naguissa
Contact:

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Naguissa »

Lor@n wrote: Tue Jul 24, 2018 10:16 pm
Mahdi1944 wrote: Wed Jun 27, 2018 3:46 pm Hi, Thanks for your useful extension, but i have a problem in Thanks button, when click on, page will be refresh, but thanks not added and no any changes, Thanks button not working,
but it work when disable phpseo, anyone can help me to fix it?
Thanks
I solved this bug:

In core/helper.php,

Find L564

Code: Select all

THANKS_LINK' => append_sid("{$this->phpbb_root_path}viewtopic.$this->php_ext", 'f=' . $forum_id . '&p=' . $row['post_id'] . '&' . $thank_mode . '=' . $row['post_id'] . '&to_id=' . $poster_id . '&from_id=' . $this->user->data['user_id']),
And replace by

Code: Select all

THANKS_LINK' => append_sid("{$this->phpbb_root_path}viewtopic.$this->php_ext", 'f=' . $forum_id . '&t=' . $row['topic_id'] . '&' . $thank_mode . '=' . $row['post_id'] . '&to_id=' . $poster_id . '&from_id=' . $this->user->data['user_id']),


Thanks! I'll take a look ASAP. But it seems strange to me, the behavior.
Lor@n
Registered User
Posts: 31
Joined: Fri Nov 11, 2016 1:25 am

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Lor@n »

in fact, with the SEO extension,
topic URLs are automatically rewritten.
But on links other than those that are generated by directly clicking on the link topics (or messages) are not rewritten, but automatically redirected to the correct url via a 301 redirect.

The problem in generating the THNANK_LINK via the current code is that the url is not correctly interpreted by the SEO mode because there is the id of the post at the end of url.

Working rather with topic id solves the problem


here is the example with the url generated for thanks :

without url rewritten SEO :

Code: Select all

http://localhost/phpbb31/viewtopic.php?f=228&p=539537&&thanks=539537&to_id=16743&from_id=75


with url Rewritten SEO :

Code: Select all

http://localhost/phpbb31/post539537.html?thanks=539537&to_id=16743&from_id=75


We notice that the url generated is not correctly rewritten, which causes a 301 redirection by the extension and prevents the thank


Now with the change without url rewritten SEO:

Code: Select all

http://localhost/phpbb31/viewtopic.php?f=228&p=539537&&thanks=539537&to_id=16743&from_id=75
with url Rewritten SEO :

Code: Select all

http://localhost/phpbb31/nouvelle-bmw-x5-le-sav-equipe-des-technologies-les-plus-innovantes-t25220.html?thanks=539537&to_id=16743&from_id=75
it work ok

The URL is perfectly interpreted by the SEO mod and the thanks work perfectly


****EDIT****

The SEO Extension from come here :

http://www.phpbb-seo.org/community/
User avatar
Naguissa
Registered User
Posts: 500
Joined: Thu Mar 02, 2017 6:55 am
Location: Barcelona
Name: Naguissa
Contact:

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Naguissa »

Lor@n wrote: Wed Jul 25, 2018 9:13 am in fact, with the SEO extension,
topic URLs are automatically rewritten.
But on links other than those that are generated by directly clicking on the link topics (or messages) are not rewritten, but automatically redirected to the correct url via a 301 redirect.

The problem in generating the THNANK_LINK via the current code is that the url is not correctly interpreted by the SEO mode because there is the id of the post at the end of url.

Working rather with topic id solves the problem


here is the example with the url generated for thanks :

without url rewritten SEO :

Code: Select all

http://localhost/phpbb31/viewtopic.php?f=228&p=539537&&thanks=539537&to_id=16743&from_id=75


with url Rewritten SEO :

Code: Select all

http://localhost/phpbb31/post539537.html?thanks=539537&to_id=16743&from_id=75


We notice that the url generated is not correctly rewritten, which causes a 301 redirection by the extension and prevents the thank


Now with the change without url rewritten SEO:

Code: Select all

http://localhost/phpbb31/viewtopic.php?f=228&p=539537&&thanks=539537&to_id=16743&from_id=75
with url Rewritten SEO :

Code: Select all

http://localhost/phpbb31/nouvelle-bmw-x5-le-sav-equipe-des-technologies-les-plus-innovantes-t25220.html?thanks=539537&to_id=16743&from_id=75
it work ok

The URL is perfectly interpreted by the SEO mod and the thanks work perfectly


****EDIT****

The SEO Extension from come here :

http://www.phpbb-seo.org/community/

Thanks for the detailed explanation.


Then, to be able to work on both ways (with and without SEO extension) I think the URL should be:

Code: Select all

THANKS_LINK' => append_sid("{$this->phpbb_root_path}viewtopic.$this->php_ext", 'f=' . $forum_id . '&p=' . $row['post_id'] . '&t=' . $row['topic_id'] . '&' . $thank_mode . '=' . $row['post_id'] . '&to_id=' . $poster_id . '&from_id=' . $this->user->data['user_id']),
Adding both parameters, "t" for SEO extension and "p" for boards without extension...
Lor@n
Registered User
Posts: 31
Joined: Fri Nov 11, 2016 1:25 am

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Lor@n »

I will test your solution.
But the proposed one works perfectly with or without SEO extension (tested on my local server)

I'm not sure that specify the post_id is necessary for the proper functioning of the extension in this case

But maybe I'm wrong
EFe1343
Registered User
Posts: 10
Joined: Thu Apr 12, 2018 1:20 pm

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by EFe1343 »

Hello

I have translated your extension into Turkish. Do you remember ?

I use your plugin, but another error occurs when the pagination error is solved.

This mistake is on your site ...

This is how the debug error above.

[phpBB Debug] PHP Warning: in file [ROOT]/ext/phpbb/ads/ad/manager.php on line 103: array_filter() expects parameter 1 to be array, boolean given
[phpBB Debug] PHP Warning: in file [ROOT]/ext/phpbb/ads/event/main_listener.php on line 133: Invalid argument supplied for foreach()

Below is the error code.

Information

Unexpected token "punctuation" of value ".".

Is there a solution to this? will an update come?
User avatar
Naguissa
Registered User
Posts: 500
Joined: Thu Mar 02, 2017 6:55 am
Location: Barcelona
Name: Naguissa
Contact:

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Naguissa »

Hello!

Yes, I remember, phpbbturkey.

If you read carefully the DEBUG messages you can see that offending extension is "Ads manager" (ext/phpbb/ads).

I also use that extension (or one similar). It is handy and works well with debug disabled. I suggest you to disable debug on production server and ignore that.


Cheers!


EFe1343 wrote: Tue Aug 21, 2018 6:52 am Hello

I have translated your extension into Turkish. Do you remember ?

I use your plugin, but another error occurs when the pagination error is solved.

This mistake is on your site ...

This is how the debug error above.

[phpBB Debug] PHP Warning: in file [ROOT]/ext/phpbb/ads/ad/manager.php on line 103: array_filter() expects parameter 1 to be array, boolean given
[phpBB Debug] PHP Warning: in file [ROOT]/ext/phpbb/ads/event/main_listener.php on line 133: Invalid argument supplied for foreach()

Below is the error code.

Information

Unexpected token "punctuation" of value ".".

Is there a solution to this? will an update come?
EFe1343
Registered User
Posts: 10
Joined: Thu Apr 12, 2018 1:20 pm

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by EFe1343 »

Thank you for the answer ...

I have an error message in the information section, how can I fix it?

Unexpected token "punctuation" of value ".".

He's writing a message like this.
User avatar
Naguissa
Registered User
Posts: 500
Joined: Thu Mar 02, 2017 6:55 am
Location: Barcelona
Name: Naguissa
Contact:

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Naguissa »

Is any place where I can see it in action?
EFe1343 wrote: Tue Aug 21, 2018 7:08 am Thank you for the answer ...

I have an error message in the information section, how can I fix it?

Unexpected token "punctuation" of value ".".

He's writing a message like this.
EFe1343
Registered User
Posts: 10
Joined: Thu Apr 12, 2018 1:20 pm

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by EFe1343 »

Naguissa wrote: Tue Aug 21, 2018 7:22 am Is any place where I can see it in action?
EFe1343 wrote: Tue Aug 21, 2018 7:08 am Thank you for the answer ...

I have an error message in the information section, how can I fix it?

Unexpected token "punctuation" of value ".".

He's writing a message like this.

I was talking about the error in the box.

Image
User avatar
Naguissa
Registered User
Posts: 500
Joined: Thu Mar 02, 2017 6:55 am
Location: Barcelona
Name: Naguissa
Contact:

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Naguissa »

Found the issue and solved on local. In about 2~3 hours I'll upload it to repo and post a message here.
Post Reply

Return to “Extensions in Development”