Please improve function and global var namespacing

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.2/Rhea followed by 3.3.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.1. If you need support for phpBB 3.1 please visit the 3.1.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1731
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: Please improve function and global var namespacing

Post by DavidIQ » Fri Oct 24, 2014 12:45 pm

3.1 is almost out and this topic is 4 years old yet some thought it to still be applicable even though the architecture and code of 3.1 is much different now from when this discussion was started. Is there still something to do here where a WP bridge or any bridge for that matter wouldn't work? Interested in hearing from someone that has actually looked at the latest code and tried to do their bridge with it. If those attempts failed then we'd like to hear about why.
Image

Danielx64
Registered User
Posts: 304
Joined: Mon Feb 08, 2010 3:42 am

Re: Please improve function and global var namespacing

Post by Danielx64 » Fri Oct 24, 2014 11:10 pm

Unless they have been renamed/removed those 2 functions will needs to be fixed up (as stated in the first post of this topic).

validate_username();
make_clickable();

I will need to double check to see if WordPress will blow up due to Symfony (it did on the first betas).

User avatar
DionDesigns
Registered User
Posts: 51
Joined: Sat Apr 21, 2012 4:29 am
Location: Uncertain due to momentum
Contact:

Re: Please improve function and global var namespacing

Post by DionDesigns » Fri Oct 24, 2014 11:19 pm

:roll:

I have "actually looked at the latest code". My WP-phpBB bridge will be released after I test it with the released version of 3.1 (it works with RC6). It must do core edits until the function/variable conflicts are resolved and the necessary hooks have been added to the core (the latter is not relevant to this discussion). They are the same conflicts raised in the post from four years ago. The ones you don't think apply...yet they do, and you are apparently too arrogant to recognize that.

It was possible to "enclose" phpBB 3.0 in a class to eliminate those conflicts. (That's a stupid way to do a bridge, but again, it is not relevant to this discussion.) That is no longer possible with phpBB 3.1, so we are back to the issue of conflicts in the global namespace. WordPress is used by orders of magnitude more people than phpBB, so the onus of change is on phpBB.

You want specifics? The two functions mentioned must be renamed. The $user and $db objects must be renamed. The $table_prefix variable must be renamed. There are a couple others as well. Note that I'm including conflicts with Joomla as well as those with WordPress.

Here's another one for you. The Mediawiki single-sign-on plugins for phpBB 3.0 do not work with 3.1. I think it would be a great idea for your team to make a Mediawiki-phpBB SSO plugin that works with 3.1. After all, Mediawiki is used on phpbb.com. It's a natural fit. Based on the 3.0 plugin code, it shouldn't be a lot of work given the superior architecture of 3.1. Show us how it's done.

I stopped viewing the support board after making my post there which triggered the (snarky) post that revived this topic. It's time for me to stop viewing this site as well. I hope 3.1 regains some of the ground phpBB has lost to other board solutions in the past five years.

Here's a tip for UI development: http://fontello.com

Peace. Have a nice life.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1731
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: Please improve function and global var namespacing

Post by DavidIQ » Sat Oct 25, 2014 12:13 am

DionDesigns wrote::roll:

I have "actually looked at the latest code". My WP-phpBB bridge will be released after I test it with the released version of 3.1 (it works with RC6). It must do core edits until the function/variable conflicts are resolved and the necessary hooks have been added to the core (the latter is not relevant to this discussion). They are the same conflicts raised in the post from four years ago. The ones you don't think apply...yet they do, and you are apparently too arrogant to recognize that.

It was possible to "enclose" phpBB 3.0 in a class to eliminate those conflicts. (That's a stupid way to do a bridge, but again, it is not relevant to this discussion.) That is no longer possible with phpBB 3.1, so we are back to the issue of conflicts in the global namespace. WordPress is used by orders of magnitude more people than phpBB, so the onus of change is on phpBB.

You want specifics? The two functions mentioned must be renamed. The $user and $db objects must be renamed. The $table_prefix variable must be renamed. There are a couple others as well. Note that I'm including conflicts with Joomla as well as those with WordPress.

Here's another one for you. The Mediawiki single-sign-on plugins for phpBB 3.0 do not work with 3.1. I think it would be a great idea for your team to make a Mediawiki-phpBB SSO plugin that works with 3.1. After all, Mediawiki is used on phpbb.com. It's a natural fit. Based on the 3.0 plugin code, it shouldn't be a lot of work given the superior architecture of 3.1. Show us how it's done.

I stopped viewing the support board after making my post there which triggered the (snarky) post that revived this topic. It's time for me to stop viewing this site as well. I hope 3.1 regains some of the ground phpBB has lost to other board solutions in the past five years.

Here's a tip for UI development: http://fontello.com

Peace. Have a nice life.
Despite you being a total douchebag about it, thanks for the info. You should have however brought this up sooner not decide to bring it up mere days before we were planning to release. You being vocal about so many other things yet you didn't think this was important other than to talk about how 3.1 is not adequate for this or that. Did you save this for a special occasion? :roll: This had been sitting dormant for 4 years and over 35 pages deep into this forum. So really if me supposedly having come off as arrogant finally got you to actually say something then mission accomplished, although that's not how we want to bring about needed changes. :-P

So now that we have that out of the way there will need to be at least a ticket created in the tracker. Otherwise this will risk getting forgotten again. Developers don't patrol this forum looking for things to fix or implement. They do so through the tracker for the most part.

P.S. that fontello site doesn't load on my mobile, where I'm replying on here from so not sure what I'm supposed to get out of that.
Image

Post Reply