Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Nivo slider does not save images


Reply


3 Posts   1329 Views

Avatar
neografik

Community Member, 7 Posts

6 January 2011 at 2:26am

Hey!

I installed SS 2.4.4, new DOM uploadify and Nivo slider
when I load the image into slider, uploadify not save the file and not in the list, but writes a file on the server

there is a blank entry in the file list (blank.jpg)

save files on the server can be used without any problem

Attached Files
Avatar
Mrfixer

Community Member, 49 Posts

5 July 2011 at 11:33pm

Edited: 06/07/2011 12:34am

I had the same issue myself, even using the latest version from Github, i decided to do a bit of rewriting to get around this changing NivoSliderPanel.php to this:

NivoSliderPanel.php:

<?php
class NivoSliderPanel extends DataObject {

static $db = array (
'Title' => 'Text',
'Tagline' => 'HTMLText'
);

static $has_one = array(
'NivoSliderPage' => 'NivoSliderPage',
'PanelImage' => 'Image',
'PanelLink' => 'SiteTree'
);

public function getCMSFields_forPopup(){

$tree=class_exists('SimpleTreeDropdownField')?'SimpleTreeDropdownField':'HTMLDropdownField';

return new FieldSet(
new TextField('Title',_t('SiteTree.METATITLE')),
new ImageField('PanelImage'),
new SimpleTinyMCEField('Tagline',_t('SiteTree.METADESC')),
new $tree("PanelLinkID",_t('RedirectorPage.REDIRECTTOPAGE'),"SiteTree")
);
}

function Thumbnail() {
if ($Image = $this->PanelImage()) {
return $Image->CMSThumbnail();
} else {
return null;
}
}
public function canCreate() {
$member = Member::currentUser();
if($member->inGroup(1)) return true;
else return false;
}

public function canEdit() {
$member = Member::currentUser();
if($member->inGroup(1) || $member->inGroup(2)) return true;
else return false;
}
public function canDelete() {
$member = Member::currentUser();
if($member->inGroup(1)) return true;
else return false;
}
}

Thats cured the issue of uploading, but it will just do one image at a time, which aint so bad in my opinion as you can add your text at the same then move on to adding the next image.

Avatar
jaspervandenham

Community Member, 2 Posts

2 November 2011 at 9:19pm

When i try to add a panel i get the following error:

Fatal error: Class 'SimpleTinyMCEField' not found in
code/NivoSliderPanel.php on line 22

Can anyone help me out with this?