Jump to:

10993 Posts in 2727 Topics by 1818 members

All other Modules

SilverStripe Forums » All other Modules » Nivo slider does not save images

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1254 Views
  • neografik
    Avatar
    Community Member
    7 Posts

    Nivo slider does not save images Link to this post

    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
  • Mrfixer
    Avatar
    Community Member
    49 Posts

    Re: Nivo slider does not save images Link to this post

    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.

  • jaspervandenham
    Avatar
    Community Member
    2 Posts

    Re: Nivo slider does not save images Link to this post

    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?

    1254 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.