3066 Posts in 866 Topics by 648 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1935 Views |
-
Page $db array

13 March 2009 at 11:44am
Hi all, I'm still new with Silver Stripe (but loving its flexiblity soo much!).
I'm trying to build a module to intergrate with Slide Show Pro. The first draft is still in development. All I'm trying to do is supply a drop down with availible gallerys in my slide show pro page.
It's kind of there but keep getting errors when trying to do a DB build the cause seems to be in herestatic $db = array (
'Gallery' => 'Enum($this->getAlbumName())'
);I get the following
Warning: Cannot modify header information - headers already sent by /sapphire/core/Debug.php on line 151
I've been trying to resolve this on my own but frustration is building. Any pointers? I'm still very noob and don't quite have my head arround all the API
Here is the album func
public function getAlbumName() {
$result = $this->dbGet();
$tailValue = array_pop($result);
foreach($result as $value) {
$albumOptions .= $value.',';
}
$albumOptions .= $tailValue;
return $albumOptions;
} -
Re: Page $db array

13 March 2009 at 11:55am
Hi Bambii,
You can't call a method inside the enum values. Perhaps it would be better if you had a separate page type that listed your Galleries, and then did this:
class SlideShowProPage {
static $has_one = array(
"Gallery" => "Gallery"
);
}Then you can use $Gallery.Title to display the Title field of the related gallery object in your database.
-
Re: Page $db array

13 March 2009 at 3:31pm
Also, you might want to get in touch with Josh from Silverstripe. He's been working on the Slideshow Pro module for SS. Also, see my ImageDataObjectManager or ImageGallery module for robust management and uploading of image files. You can probably build off one of those and generate an XML feed for SSP.
-
Re: Page $db array

16 March 2009 at 4:53pm
Thanks for your reply Sam.
So that explains why I'm getting an error!
The easiest method would be to paste the gallery name into a custom page field. I was trying to make it a little simpler by creating a drop down of all availible albums. I just haven't sussed out the method yet. I will post back here once I crack it, should be too hard. -
Re: Page $db array

16 March 2009 at 4:58pm
Oh I didn't realise someone was already undertaking the SSP module, I'll try and contact him, cheers uncle cheese. I built a basic image gallery off the fileManager module. But there were issues with image stamping (shigh...) I just went for the sure win and brought a copy of Slide Show Pro. It's a very nice method to administrate images.
-
Re: Page $db array

16 March 2009 at 5:28pm
I've actually gone ahead and built an SSP module off the ImageGallery. Should be ready very soon.
http://www.silverstripe.org/all-other-modules/show/256209#post256209
-
Re: Page $db array

16 March 2009 at 8:52pm
Hi Uncle Cheese
I tried to catch you on another old topic, but I think I didn't catch you.
Can you please help me with http://silverstripe.org/customising-the-cms/show/253291?start=0#post255930Thanks in advance.
Best regards Trym
I'm sorry to disrupt this thread, but don't know how to get in touch in other ways.
| 1935 Views | ||
|
Page:
1
|
Go to Top |



