Warning: The author of this contribution does not provide support for it anymore.

Prime Links

PHP 7 - Prime Links

PHP 7

by Sippan » Wed Dec 28, 2016 10:40 am

Hi!
Will there be a fix ...so it works with php7?
Sippan
Registered User
Posts: 177
Joined: Thu Jan 27, 2011 6:23 am

Re: PHP 7

by primehalo » Wed Dec 28, 2016 5:01 pm

I don't have php 7 installed so it would be difficult for me to do this.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
primehalo
Former Team Member
Posts: 2991
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: PHP 7

by Sippan » Wed Dec 28, 2016 6:07 pm

:( :(
Sippan
Registered User
Posts: 177
Joined: Thu Jan 27, 2011 6:23 am

Re: PHP 7

by spaceace » Tue Jan 17, 2017 12:11 am

i just updated my board to phpBB 3.2.0 as well as PHP 7.0.12 and had to make the following change to the Prime Links Extension...

open /ext/primehalo/primelinks/event/listener.php
find

Code: Select all

		$text = preg_replace('/&#(\d+);/me', 'chr($1)', $text);			 	// Decimal notation
		$text = preg_replace('/&#x([a-f0-9]+);/mei', 'chr(0x$1)', $text);	// Hex notation
replace with

Code: Select all

		$text = preg_replace_callback('/&#(\d+);/m', function($matches){	// Decimal notation
			return utf8_encode(chr($matches[1]));
		}, $text);
		$text = preg_replace_callback('/&#x([a-f0-9]+);/mi', function($matches){	// Hex notation
			return utf8_encode(chr($matches[1]));
		}, $text);
it now seems to work fine for me again ;)
User avatar
spaceace
Registered User
Posts: 1999
Joined: Wed Jan 30, 2008 8:50 pm

Re: PHP 7

by Sippan » Wed Jan 18, 2017 8:57 am

Great spaceace works perfect with that THX
Sippan
Registered User
Posts: 177
Joined: Thu Jan 27, 2011 6:23 am

Re: PHP 7

by gio73 » Sat Feb 11, 2017 9:13 pm

Thx alot M8 it works also for me ;)
Sorry for my bad English im using Google translate.
Styles
gio73
Registered User
Posts: 64
Joined: Thu May 12, 2016 4:10 pm

Re: PHP 7

by blogxkomo » Wed Mar 08, 2017 7:36 pm

Can you tell me, how to instal or mod this prime link to phpbb 3.2 ?
blogxkomo
Registered User
Posts: 5
Joined: Wed Mar 08, 2017 7:34 pm

Re: PHP 7

by blogxkomo » Wed Mar 08, 2017 8:09 pm

spaceace wrote:i just updated my board to phpBB 3.2.0 as well as PHP 7.0.12 and had to make the following change to the Prime Links Extension...

open /ext/primehalo/primelinks/event/listener.php
find

Code: Select all

		$text = preg_replace('/&#(\d+);/me', 'chr($1)', $text);			 	// Decimal notation
		$text = preg_replace('/&#x([a-f0-9]+);/mei', 'chr(0x$1)', $text);	// Hex notation
replace with

Code: Select all

		$text = preg_replace_callback('/&#(\d+);/m', function($matches){	// Decimal notation
			return utf8_encode(chr($matches[1]));
		}, $text);
		$text = preg_replace_callback('/&#x([a-f0-9]+);/mi', function($matches){	// Hex notation
			return utf8_encode(chr($matches[1]));
		}, $text);
it now seems to work fine for me again ;)
prime links must instal on event ?
i can't find directory /primelinks/event/listener.php
blogxkomo
Registered User
Posts: 5
Joined: Wed Mar 08, 2017 7:34 pm

Re: PHP 7

by spaceace » Thu Mar 09, 2017 11:13 am

blogxkomo wrote:prime links must instal on event ?
i can't find directory /primelinks/event/listener.php
you would need to download the Prime Links extension from primehalo's website. then you would have to apply the above fix that i added if you are running PHP 7 on your server
User avatar
spaceace
Registered User
Posts: 1999
Joined: Wed Jan 30, 2008 8:50 pm

Re: PHP 7

by maco8024 » Wed May 03, 2017 1:41 am

spaceace
Thanks, works on 3.2
maco8024
Registered User
Posts: 7
Joined: Tue Aug 09, 2016 2:44 pm
Location: Altay

Re: PHP 7

by primehalo » Mon Aug 13, 2018 7:47 pm

I have included this change into v1.1.4 which is available on my website.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
primehalo
Former Team Member
Posts: 2991
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: PHP 7

by WWu777 » Tue Apr 14, 2020 10:09 am

Will this extension work with 3.3?
WWu777
Registered User
Posts: 806
Joined: Tue Aug 14, 2007 12:40 pm

Re: PHP 7

by primehalo » Tue Apr 14, 2020 3:14 pm

WWu777 wrote:Will this extension work with 3.3?
Yes
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
primehalo
Former Team Member
Posts: 2991
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA