Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

images.php and fork 07 Oct 2013 07:54 #11308

Hi all,

I noticed one of the classes for which there is no fork yet is the images.php class. I tried to do it myself by adding the following lines in the images.php file:
JLoader::register('WpfImagesFork', JPATH_ADMIN_WPF .DS. 'fork' .DS. 'classes' .DS. 'images.php');
JLoader::load('WpfImagesFork');
// Fallback if no fork has been found
if (!class_exists('WpfImagesFork')){ class WpfImagesFork extends WpfImages{} }

This does load the forked class, but however when (in my case), I want to override the get() function, it does not seem to work. It will still call the get of the parent images.php class. I think in my case I can workaround this by calling my forked class in the forked class of the file.php, but just wondering why the first approach does not work.

FYI - what I am trying to accomplish is to override the define constant for 'allowed image sizes'. I want to merge this with a number of extra sizes which will be passed in from my component configuration parameters.

Any one any ideas?

Misha

Please Log in or Create an account to join the conversation.

images.php and fork 07 Oct 2013 10:38 #11309

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
For the moment not forkable.
Images.php will be rewrited and will work with JImages natives from (Joomla 3.0 native)
Coding is now a piece of cake
The following user(s) said Thank You: blue-canoe

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.081 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started