Imageset removal in 3.0.x

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
TIMDM
Registered User
Posts: 12
Joined: Mon Nov 05, 2018 10:06 pm

Imageset removal in 3.0.x

Post by TIMDM »

Forgive me if this is the wrong subforum, I couldn't post in the parent.

I am considering removing the imageset system in the 3.0.x board I administer. Due to a highly modified codebase, a phpbb upgrade is not possible so I am attempting to reverse engineer the changes made in 3.2 to decide if the task is too large to accomplish with the our codebase.

If I am understanding the 3.2 source code and what little documentation I could find, I simply need to move some files around and edit the $user->img function(). In 3.0.x this function was located in /includes/session.php. In the 3.2 and 3.1 codebase this file was moved and no longer contains the img function. Was this function moved and if so to where or was it removed and replaced?

EDIT: I just found the img function in /phpbb/user.php now my question is what is the purpose of the phpbb directory?

Also, for future reference is there any developer/techincal documentation that explains why something was moved/removed and what if anything replaces it?
User avatar
Raul [ThE KuKa]
Style Customisations
Style Customisations
Posts: 11073
Joined: Mon Dec 08, 2003 9:24 pm
Location: Spain
Name: Raul Arroyo
Contact:

Re: Imageset removal in 3.0.x

Post by Raul [ThE KuKa] »

I think your question is still related to this topic:
viewtopic.php?f=591&t=2499866

What I don't understand is that you want to "touch" the "core" code of phpBB for a style "modify", it is not necessary.

Best regards.
All unsolicited PMs will be ignored.
:warning: Knowledge Base | Documentation | Board rules | phpBB Styles Rules & Policies | Styles Queue Stats :warning:


If you like my styles, translations, etc. and want to show some appreciation, then feel free to Donate.
:flag_es: phpBB Spain - Online Since 2003 :heart:


User avatar
Lumpy Burgertushie
Registered User
Posts: 69224
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Imageset removal in 3.0.x

Post by Lumpy Burgertushie »

I wonder why you want to do this if you are not upgrading your board version.
if you upgrade then it will be done automatically for you as phpbb from 3.1 forward does not use the imageset system at all.

however, 3.1 creates a imageset.css file for the transition. you could download 3.1.0 and see how it is handled. it might give you some help in what you are trying to do.

as was said above, I can see no reason to edit any php files to accomplish this.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 18316
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Imageset removal in 3.0.x

Post by DavidIQ »

Moved to a more appropriate forum as there is no 3.2 style support being requested.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
TIMDM
Registered User
Posts: 12
Joined: Mon Nov 05, 2018 10:06 pm

Re: Imageset removal in 3.0.x

Post by TIMDM »

Raul [ThE KuKa] wrote: Mon Jan 21, 2019 4:38 pmWhat I don't understand is that you want to "touch" the "core" code of phpBB for a style "modify", it is not necessary.
I'm not trying to change a style, I'm trying to restructure the internal setup of phpbb. Specifically I want to remove the imageset functionality completely and switch to using the /themes/images/ directory like in 3.2

But before I decide whether or not to do it, I wanted to understand why this change was made in 3.2. I wanted to understand why the imageset was removed, why the img function was removed from session.php and instead moved into a new file called user.php and what the purpose of the php directory is (I mean I know it holds core files but it doesn't exist in old versions so what prompted this change).
Lumpy Burgertushie wrote: Mon Jan 21, 2019 5:02 pm I wonder why you want to do this if you are not upgrading your board version.
The phpbb installation has been modified with 10 years worth of mods, custom code and bits from newer versions. Our phpbb install no longer knows what version it is. In order to upgrade we would basically have to start from scratch. We cannot afford to do that at this time so I am porting over features and improvements from 3.2.
Lumpy Burgertushie wrote: Mon Jan 21, 2019 5:02 pmphpbb from 3.1 forward does not use the imageset system at all.
Exactly, and I don't want my board to use the imageset system either as I assume there was a good reason for removing it and from what I've been able to piece together, it's performance related.
Lumpy Burgertushie wrote: Mon Jan 21, 2019 5:02 pmas was said above, I can see no reason to edit any php files to accomplish this.
I attempted to reverse engineer the system 3.1+ uses and it looks like in order to remove the imageset I would only need to replace what $user->img outputs and then move my images into /themes/images/. Since $user->img is a php function in session.php I would need to replace that function with the one in user.php in 3.1.
User avatar
warmweer
Jr. Extension Validator
Posts: 11284
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Imageset removal in 3.0.x

Post by warmweer »

TIMDM wrote: Mon Jan 21, 2019 8:05 pm The phpbb installation has been modified with 10 years worth of mods, custom code and bits from newer versions. Our phpbb install no longer knows what version it is. In order to upgrade we would basically have to start from scratch. We cannot afford to do that at this time so I am porting over features and improvements from 3.2.
You're really opening a can of worms here. Noone here has a clue what was changed in your files (which is relatively unimportant), nor in your database (and that can be very important).
Support for a modified installation is almost impossible from here, and if you're planning on continuing to follow that path, you can't really expect phpBB to sort out problems you created.
You'll be better off getting your board back in line with the official versions and using extensions (and possibly some custom coding which you should then document) to keep the extra functionalities you require.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
TIMDM
Registered User
Posts: 12
Joined: Mon Nov 05, 2018 10:06 pm

Re: Imageset removal in 3.0.x

Post by TIMDM »

warmweer wrote: Mon Jan 21, 2019 9:14 pm You're really opening a can of worms here. Noone here has a clue what was changed in your files (which is relatively unimportant), nor in your database (and that can be very important).
Support for a modified installation is almost impossible from here, and if you're planning on continuing to follow that path, you can't really expect phpBB to sort out problems you created.
You'll be better off getting your board back in line with the official versions and using extensions (and possibly some custom coding which you should then document) to keep the extra functionalities you require.
I agree but right now that is not an option. The core parts of the board are mostly the same, like the imageset system for example. We haven't touched that. The core database tables are also largely the same. The main issue with our codebase is we have installed about 50 mods and some of them we rely on for day to day operation. Not only would removing them be ni impossible as they are intertwined with core systems but finding replacements in the form of extensions also might be impossible so we'd have to write our own. As nice as it would be, I cannot convince our staff to shut the site down for an unknown amount of time and lose out on income just to replace stuff that's working fine as is. There have been talks of buying a second server to rebuild the site from scratch on but that's just a dream right now for the same reasons as I mentioned above (the amount of effort isn't worth the result in their eyes).
warmweer wrote: Mon Jan 21, 2019 9:14 pmSupport for a modified installation is almost impossible from here ~snip~ you can't really expect phpBB to sort out problems you created.
I may not be doing a good job of explaining what I'm looking for though. I'm not really asking for help removing the imageset, I'm more asking for help understanding why the imageset was removed in 3.1 and why some files/folders were created. With that understanding, I can then make the changes needed myself.
Last edited by TIMDM on Mon Jan 21, 2019 9:41 pm, edited 1 time in total.
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: Imageset removal in 3.0.x

Post by GanstaZ »

Refactoring, organizing, modifying, new coding/styling rules and so on. And it will change even more with/after 3.3 branch.
Why not set up a dev server on local comp and start converting those mods into extensions?
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 18316
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Imageset removal in 3.0.x

Post by DavidIQ »

Imagesets were removed because they aren't needed. It is now properly handled by css.

The phpbb folder is basically our namespace with (almost) all classes related to phpBB. This avoids clashing with other libraries and systems. We do still have the includes directory for some things that haven't been moved over, but anything new is mostly done in the phpbb directory.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
User avatar
warmweer
Jr. Extension Validator
Posts: 11284
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Imageset removal in 3.0.x

Post by warmweer »

TIMDM wrote: Mon Jan 21, 2019 9:32 pm
warmweer wrote: Mon Jan 21, 2019 9:14 pmSupport for a modified installation is almost impossible from here
I may not be doing a good job of explaining what I'm looking for though. I'm not really asking for help removing the imageset, I'm more asking for help understanding why the imageset was removed in 3.1 and why some files/folders were created. With that understanding, I can then make the changes needed myself.
I understood that, but my point is not that you should upgrade immediately, but that you should look for a way to get back in line (more or less) with the current version(s) so that it will be upgradable in the future. I'm not stating that you won't receive any support but I am emphasising that you are actually 2 major versions behind and are adapting your 3.0 with 3.1 code/features. There will come a point where getting back to the current php database will be almost impossible.
I hope for you that you'll get the info you need. If you haven't done so already - have a look at https://area51.phpbb.com/docs/dev/3.1.x/index.html (maybe not exactly what you need, but it's perhaps a starting point).
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
TIMDM
Registered User
Posts: 12
Joined: Mon Nov 05, 2018 10:06 pm

Re: Imageset removal in 3.0.x

Post by TIMDM »

GanstaZ wrote: Mon Jan 21, 2019 9:40 pm Refactoring, organizing, modifying, new coding/styling rules and so on. And it will change even more with/after 3.3 branch.
Why not set up a dev server on local comp and start converting those mods into extensions?
The simplest answer is I don't have the time to learn how to write extensions. On top of that we'd have to re create the site from scratch to be able to use them anyway, which leads back to the same problem I mentioned above.
warmweer wrote: Mon Jan 21, 2019 9:54 pmmy point is not that you should upgrade immediately, but that you should look for a way to get back in line (more or less) with the current version(s) so that it will be upgradable in the future. I'm not stating that you won't receive any support but I am emphasising that you are actually 2 major versions behind and are adapting your 3.0 with 3.1 code/features. There will come a point where getting back to the current php database will be almost impossible.
That's sort of what I am doing with porting over features from newer versions. The more changes I make, the closer our codebase comes to being inline with the official version. I realize it will never be a 1:1 ratio and eventually I'll reach a point where the only option is to upgrade but for now this is the best I can do.
DavidIQ wrote: Mon Jan 21, 2019 9:43 pm Imagesets were removed because they aren't needed. It is now properly handled by css.

The phpbb folder is basically our namespace with (almost) all classes related to phpBB. This avoids clashing with other libraries and systems. We do still have the includes directory for some things that haven't been moved over, but anything new is mostly done in the phpbb directory.
That makes perfect sense, thank you.
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3738
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: Imageset removal in 3.0.x

Post by Kailey »

TIMDM wrote: Mon Jan 21, 2019 10:07 pm The simplest answer is I don't have the time to learn how to write extensions
In the amount of time you're taking to backport features/functionality, you could teach yourself how to write one. It's really not that hard. ;)
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
My little corner of the world, where I sometimes post things documented from my job.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26551
Joined: Fri Aug 29, 2008 9:49 am

Re: Imageset removal in 3.0.x

Post by Mick »

Also don't forget that if your installation blows up for whatever reason there is no longer any support here for 3.0.x or 3.1.x.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
Post Reply

Return to “phpBB Custom Coding”