Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

Great Minimalist CMS! A Few Questions...

edited April 2013 in Miscellaneous

Hi all, after discovering Elefant last year I got busy with a bunch of other things. Just downloaded/installed the 1.3.4 beta on my Mac's localhost.

Really enjoying it, I think it has everything I want for my personal site. I love the functionality of Blocks and the available themes. I appreciate that it's a solid, speedy CMS/framework with MVC, unit testing, Composer, backups, and versioning.

A few questions:

  • Is Markdown or Textile available for page/blog posts? I see Markdown works here on the forum and in the wiki app.
  • Does versioning apply to theme/style elements? I see the choices on Version page for Blocks, Pages, and Blog Posts.
  • Are stylesheets editable outside the interface (as textfiles)?
  • Any thoughts of an IRC chat channel?
  • Is it possible to set # of blog posts displayed through admin, or is that in a config file?
  • Any way to control thumbnail creation/image defaults during upload?

Sorry, haven't gotten all the way through documentation yet.

Thanks again!

Comments

  • Good questions. The only one I know the answer to is editing stylesheets. Yes, you can edit them in any text editor. If you also want to edit them through the elefant/designer interface, make sure that the server user has write permissions on the files.

  • Thanks, I'm happy to hear you like it! :D

    To answer your questions:

    • Markdown would be fairly easy to add as an option, but isn't in the blog app yet. You could add a feature request on Github so we don't forget, or I can give you some pointers on adding it yourself.
    • Versioning doesn't apply to themes/stylesheets, but it's something I have thought about adding. The trouble is (to answer your next question) that those files can all be edited directly outside of the CMS, so the CMS won't necessarily have the full history. As ordinary text files, they may be a better candidate for Git than Elefant's versioning.
    • We had an IRC channel for a while, but it was pretty early on and I was often the only one there. And since my schedule can be all over the place, I was often logged out too. Might make sense to reintroduce though, the project is getting pretty active these days :)
    • The main /blog page shows 10 posts, which is currently hard-coded but could be made a setting under Tools > Blog Posts > Settings pretty easily. You can also use the Dynamic Objects menu in the wysiwyg editor and choose "Blog: Latest Posts" which lets you choose the number of posts shown.
    • Thumbnail creation isn't automatic on upload (unless an individual app implements it), but instead is done on the output of an image via the Image::resize filter. Say your view template has been passed a thumbnail parameter like this:

      <?php echo $tpl->render ( 'myapp/myview', array ( 'title' => 'My title', 'thumbnail' => 'files/homepage/photo1.jpg' ) ); ?>

    In the view template, you can resize the image like this:

    <h1>{{title}}</h1>
    
    <img src="/{{thumbnail|Image::resize (%s, 200, 150)}}" />
    

    There's some discussion about image handling in another thread right now too :)

  • Thanks for your thoughtful responses!

    I filed a Markdown feature request on Github (my very 1st, woohoo!)

    I'm a PHP beginner so not sure I could do it myself, but I poked around the Wiki app and have a sense of how it's done there.

    In /wiki/handlers/ I see "index.php" and "preview.php" include Markdown, and /wiki/lib/Functions.php" calls Markdown.

    In theory is it a matter of applying those similarly to Page and Blog posts or is it much more complicated than that?

    Thanks again!

  • It would be fairly similar, although you probably won't need the full wiki_parse_body() since the link processing is wiki-specific. Basically this ought to handle the rendering:

    if ($appconf['Blog']['markdown']) {
        require_once ('apps/blog/lib/Markdown.php');
        $post->body = $tpl->run_includes (Markdown ($post->body));
    } else {
        $post->body = $tpl->run_includes ($post->body);
    }
    

    From there, you'll need to add the Markdown library to the blog app, and add a markdown setting to the blog app's config.php file.

    You'll need to do some similar changes to the add/edit forms as well, and maybe add Markdown syntax highlighting via CodeMirror.

  • edited April 2013

    OK, I understand in theory what's involved.

    A few more questions :

    • How "safe" is it to use beta/latest Github master?
    • Submenu items I add in Tools-->Navigation don't show up on the site menu. The sub-item is a "Public" page. Am I misunderstanding something, or do I need to activate some kind of styling?
    • I went gung-ho and installed a bunch of apps to check 'em out. Now the "Tools" admin menu has more items than it can display...they don't wrap or scroll, the menu just gets cut off at the bottom of the window.
    • When not signed in to Elefant, pages using "default" template had "Members" twice in the sidebar Block.
      When signed in "Members" appeared only once.
      I saw /layouts/default.html contained:
      {! blocks/index?id=sidebar-[id]&fallback=members !}
      and grep -lri "members" /mysite
      found /apps/user/views/sidebar.html.
      Commenting out line 2:
      <h3>{"Members"}</h3>
      fixed it, but I don't know if that's duct tape or the actual solution.
      EDIT: Changing Edit Block --> Extra Options --> Display Title to 'No' solved the double-printed "Members" :-)

    Just a minor site suggestion: release dates for versions in Changelog would be nice.
    Thanks again, this a very sensible CMS that's fun to explore under the hood!

    • You can ask questions however you like. If they're bigger, it may be best to start a new thread for that question, but totally up to you :)
    • I've been using the master branch in production for a while, the core is very stable IMO. The main thing holding back a "2.0-stable" release is revamping the main pages of the website. Copywriting can be arduous work at times, haha
    • Submenus won't show up on the site unless you're using the right handlers. The default layout uses navigation/top which only shows the top-level pages. For example, try visiting /navigation/map at your site and you should see the full site map.
    • For the duplicate members sidebar title, if you edit that sidebar and look at the extra options, is Display title set to No?
    • There's definitely a limit to the number of usable apps in the Tools menu. There have been some ideas floating around here about improving the toolbar post-2.0, including a user-configurable mini dashboard that could slide down to provide widgets and links to common operations, and splitting the Tools menu into multiple columns.
    • Good suggestion! I've added dates to the past releases on the changelog now.

    Cheers!

  • Thanks for your response!

    OK, I tried navigation/top. Will take some styling but I see how it works.

    I figured out the duplicate member sidebar Display title = No in the middle of the night.

    A few other bits:

    • I can't seem to get the RSS Feed Block to display anything...I'm pasting in what I believe to be valid feeds but no dice.
    • I'm using an MP3 Audio Player Block in the sidebar. mejs-container inherits width: 400px; from somewhere. I've checked in Firebug, I've searched through all the theme CSS, as well as in:

      • /apps/filemanager/css/mediaelement/mediaelementplayer.css
      • ele134/apps/filemanager/js/mediaelement-and-player.min.js

      but can't find where it's coming from.

    • Also with Audio/Video Players - are they Flash by default? If I want to do HTML5 instead should I just paste HTML into text area? My SoundCloud & Vimeo players work fine for embedded HTML5, just figuring out how to do it natively with on-site files.
    • Would be great if future Elefant main site / demo site could showcase the full range of apps/features. Stuff like:
      • a Lemur lesson in how to do stuff using Elefant
      • Event calendar and Blog in action
      • I assume the Docs wiki uses the wiki module? Calling out things like that explicitly will demonstrate Elefant's power to first-time visitors.
  • edited April 2013
    • The RSS issue is probably related to this bug, which is fixed in the latest master branch on Github.
    • The audio player width looks like it's being set by the default MediaElement audioWidth setting. You can force it with a little CSS though:

      #sidebar .mejs-container { max-width: 300px !important; }

      #sidebar .mejs-time-rail { max-width: 175px !important; }

      #sidebar .mejs-time-total { max-width: 165px !important; }

    • The player should be using HTML5 by default. It is for me in Chrome on Mac.

    • Thanks for the suggestions for the site/demo. I'm slowly working on revamping the site for Elefant 2, so this is the stuff I'm currently sorting out :)
    • I like the idea of adding a couple additional apps into the demo plus content to show it (a couple blog posts, events calendar, contact form using the form builder, etc). And the docs are using the wiki app, as well as a custom app for the API docs too. Good thinking to highlight that!
Sign In or Register to comment.