Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Upload via Content page

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

Page: 1
Go to End
Author Topic: 1063 Views
  • Marlie511
    Avatar
    Community Member
    36 Posts

    Upload via Content page Link to this post

    I am trying to figure out a way for users to upload straight from the content page when they link. This way they don't have to switch tabs. I know other CMS systems use with the FCKeditor and TinyMCE. What would I need to do to get this in Silverstripe? Can it be done?

    Also, if we have users set with LDAP and logged in, is there a way to script their user account straight to a folder in assets with their name on it?
    (I am going to have lots and lots of users who will be using the subsites.)

  • theAlien
    Avatar
    Community Member
    131 Posts

    Re: Upload via Content page Link to this post

    Hi,

    On the first one: TinyMCE comes bundled with SilverStripe (it's the actual editor you see in the backend).
    If you would like to modify the functionality of TinyMCE these links might help:
    http://doc.silverstripe.com/doku.php?id=htmleditorconfig
    http://silverstripe.org/general-questions/show/259503?start=0#post259582
    http://ssbits.com/customising-the-wysywig-editor-in-v2-3-2-tinymce/

    If you need a separate upload-field, you can simply add it with:

    $fields->addFieldsToTab("Root.Content.Main", array(
    new ImageField("myImage","My Image Field")
    ));

    This will add the field below the editor.

    On the second one: I don't exactly know; I have no experience with this.
    But after reading this article: http://doc.silverstripe.com/doku.php?id=modules:external-authentication
    I guess you have to get the username from the member-table.
    Next digg into onBeforeWrite to learn how to automatically create a folder with their name on it
    Then you have to figure out a way to link all ImageFields/FileFields automatically to the folder of the logged in-user - you might have to extend FileField and/or it's subclasses for that.
    Please look into UncleCheese's ImageGallery-module to get a clue about automatically creating and opening specific assets-folders.
    Finally: post back to the forums to tell us what you did (or even better: write a recipe, post it here: http://doc.silverstripe.com/doku.php?id=modules:external-authentication and/or here: http://ssbits.com/ and of course tell us about your post on the forums)

    I hope I provided some usefull hints ;-)

    1063 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.