Thank you UncleCheese,
I did the following.
1. Created a file -> MyImageGalleryPage.php in mysite/code with:
<?php
class MyImageGalleryPage extends ImageGalleryPage{
protected $itemClass = "MyImageGalleryItem";
}
class MyImageGalleryPage_Controller extends ImageGalleryPage_Controller {
}
?>
2. Created a file -> MyImageGalleryItem.php in mysite/code with:
<?php
class MyImageGalleryItem extends ImageGalleryItem {
static $has_one = array ('ABC' => 'File');
function getCMSFields_forPopup()
{
$f = parent::getCMSFields_forPopup();
$f->push(new FileIFrameField('ABC'));
return $f;
}
}
?>
I get some error the first time I upload a picture in the field where I should attach another file. But if I just ignore it, save the file, then open it up again, it seems to work fine.
The problem is it doesn't show up on the slideshow anywhere with any of the configuration. I tried the same thing but with just adding another caption-> same thing will not show up on the slideshow.
Is there anything else I should do? or did wrong?
THANKS UNCLECHEESE! =]
The error btw is:
[Notice] Undefined index: uploaded_files
GET /admin/EditForm/field/GalleryItems/EditUploadedForm/field/ABC/iframe?ctf[GalleryItems][start]=0&ctf[GalleryItems][per_page]=10&ctf[GalleryItems][showall]=0&ctf[GalleryItems][sort]=SortOrder&ctf[GalleryItems][sort_dir]=DESC&ctf[GalleryItems][search]=&ctf[GalleryItems][filter]=AlbumID_8&ctf[GalleryItems][view]=grid&ctf[GalleryItems][imagesize]=100
Line 393 in C:\wamp\www\dataobject_manager\code\FileDataObjectManager.php
....
393 $total = isset($_POST['totalsize']) ? $_POST['totalsize'] : sizeof($_POST['uploaded_files']);
....
Trace
* FileDataObjectManager->EditUploadedForm(SS_HTTPRequest)
Line 134 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 152 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 152 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
* Controller->handleRequest(SS_HTTPRequest)
Line 283 of Director.php
* Director::handleRequest(SS_HTTPRequest,Session)
Line 127 of Director.php
* Director::direct(/admin/EditForm/field/GalleryItems/EditUploadedForm/field/ABC/iframe)
Line 127 of main.php