ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

A couple of n00b Questions

October 30, 2007 8:37pm

Subscribe [2]
  • #1 / Oct 30, 2007 8:37pm

    mrchristian

    2 posts

    I am fairly new to customizing EE, but am a programmer, so have a basic understanding of CMS’s and coding.

    1. Where is the code for the publish page?  I’d like to change the size of the “summary” textbox as well as add some text labels to some areas of the screen.

    2. Is there a way to save a post in progress without it showing up on the site?  I used “Quick Save”, but it shows up as well.  I was thinking there should be a way to save a work in progress without it showing up.

    3. How can I test for the existence of summary text?  I would like to display the summary, if it exists, in the comment template, but if not, display the body of the post instead.

    Thanks in advance for any help you can provide.  I’ve learned a lot by trial and error and I’m sure these are not big deals, but will help me get beyond where I am now.

    Mr. C.

  • #2 / Oct 31, 2007 10:10am

    cshort

    59 posts

    1) I’d suggest changing the display of textareas with the control panel CSS.  You can find that information in the /themes/cp_themes/ directory.  As far as adding text labels, are you trying to add greater explanation to a form field or something else entirely?  For form fields, you should edit the information in the custom fields section of the control panel.  A little more explanation of what you’re trying to do would make it easier to make a suggestion.

    2) Change status to closed or change the post date to one in the future will also work in most situations.

    3) Use EE conditionals.  Something like this will work.

    {if field_name}
    
        {field_name}
    
    {/if}

    Replace field_name with summary or whatever other field you want to check for before displaying in the template.

  • #3 / Oct 31, 2007 10:48am

    mrchristian

    2 posts

    Thanks cshort.

    I inherited this site from a man who passed away, so there’s no way for me to ask him what custimization he’s done.  Attached is a screencap of how the publish page looks now.
    What I’d like to do is:
    1. Add “Upload Picture” next to the upload button
    2. Change the order of the text areas: summary, body, extended
    3. when you expand summary, it is only 1 line tall.  I’d like it to be a few more

    I looked through the cp theme and did not find what I think will accomplish these, but could have missed it.


    With the conditionals to check for the existence of the summary text, do I just do:
    {if ! summary}
      {body}
    {else}
      {summary}
    {/if}

  • #4 / Oct 31, 2007 11:09am

    cshort

    59 posts

    Items 2 & 3 you should be able to change on the field settings in the admin panel.  That’s under Admin->Weblog Admin->Custom Weblog Fields

    The fields the site is using is likely under the default group.  You can edit the height of the textarea from there.

    As far as item 1, unless they’re never going to use IE, you’re going to have to edit the panel controls.  The controls for this are in the cp.publish.php file.  Be careful and backup a copy of the file because messing with this can bork the system.

    The conditionals would be:

    {if summary}
    {summary}
    {if:else}
    {body}
    {/if}
  • #5 / Oct 31, 2007 11:16am

    mrchristian

    2 posts

    PERFECT!
    Thanks, that is exactly what I needed.  It’s always that last nugget of information that is the stumper.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases