Questions re old Slideshow block

I'm running a website on Concrete5 On the homepage there is a Slideshow block, showing images from a Fileset. I have hacked the code in this block a few times, to get it to look/behave as I want it, and that's all fine. But during the last mods I made, I realised that I don't understand something about how the block mechanism works.

In this block, everything happens in the view.php file. It essentially outputs a lot of javascript, including an array containing information about the images. The javascript does the actual work of displaying the images. There are 2 things I don't get:

1. The controller.php file is essentially empty - all it does is define an empty class which extends a class called Concrete5_Controller_Block_Slideshow. But I can't see where the class Concrete5_Controller_Block_Slideshow is defined - it is certainly not in any of the files belonging to the Slideshow block. So, where is class Concrete5_Controller_Block_Slideshow defined?

2. In view.php, the PHP code generates an array of javascript objects, from the data it has read from the database for this specific slideshow. The data from the database ends up in a PHP variable called $images. BUT - I can see nowhere in any of the code for the block where it reads this data from the database.

I have attached the code for view.php. In the PHP code where it iterates through the image data (line 81), the code is:

foreach($images as $imgInfo) {

This is the only place where I can see the variable called $images being used. So how/where does the data get put into it?

This is not stopping me from doing anything, but I just like to know how things work.

1 Attachment

View Replies:
marshallarts replied on at Permalink Reply
My apologies - further investigation has clarified the situation. I updated my website recently, so there is now a folder named "concrete5.6.3.5_remote_updater" under the updates folder. I have been looking at code in the concrete/blocks/slideshow folder under there, and making changes to the view.php in there. I assumed that all of the required files were there, but it appears that Concrete5 is still using some of the older versions in the concrete/blocks/slideshow folder under the website root. In there is a controller.php which DOES define the slideshow class, and one of the things the controller does is read the data from the database. So that clarifies both of the questions.

I was thrown by the fact that files for the slideshow block now seem to be in two different places - not what I expected. Matter closed.