Announcement

Collapse
No announcement yet.

Change defaults for new article

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [CMS] Change defaults for new article

    I just want to change the defaults in the new CMS when creating a new article so I don't have to manually change them every time I create a new one (and often forget to change them). How?

    Defaults like these:

    Published: No
    Comments: Yes
    Permission Preview: Yes
    Display Title: Yes
    Display Author: Yes
    Display Published Date: Yes
    Full Section in Display Page: No
    Display Updated Date: No
    Display Pageviews: No
    Show Ratings: No
    Use settings for: Content page and section page
    HTML: On, convert linebreaks
    Show on Section Page: Yes
    Make available for Subnav: no
    Searchable: Yes

    etc.

    TIA

  • #2
    You need to edit the template vbcms_edit_publisher all should be controlled from there. Lets say you want to change the setting for "Display Author" to No instead of Yes. The fasted way to see what your going to edit is lookup its raw phrase so "Display Author" you search in the language manager, the raw phrase "show_user_link" appears you look that up in the vbcms_edit_publisher template and you will see the following:

    Code:
    <div class="blockrow" >
            <label class="half">{vb:rawphrase show_user_link}</label>
            <div class="half">
                <ul class="multifield group floatcontainer">
                    <li><input type="radio" name="showuser" id="showuser0" value="2" <vb:if condition="$showuser"> checked="checked"</vb:if> tabindex="1" /> <label for="showuser0" class="secondary">{vb:rawphrase yes}</label>&nbsp;&nbsp;{vb:stylevar dirmark}</li>
                    <li><input type="radio" name="showuser" id="showuser1" value="0" <vb:if condition="!$showuser"> checked="checked"</vb:if> tabindex="1" /> <label for="showuser1" class="secondary">{vb:rawphrase no}</label></li>            </ul>
            </div>
        </div>
    Now to change the default value you need to reverse these to lines:

    Code:
      <li><input type="radio" name="showuser" id="showuser0"  value="2" <vb:if condition="$showuser">  checked="checked"</vb:if> tabindex="1" /> <label  for="showuser0" class="secondary">{vb:rawphrase  yes}</label>&nbsp;&nbsp;{vb:stylevar dirmark}</li>
                    <li><input type="radio" name="showuser"  id="showuser1" value="0" <vb:if condition="!$showuser">  checked="checked"</vb:if> tabindex="1" /> <label  for="showuser1" class="secondary">{vb:rawphrase  no}</label></li>
    So that it reads:

    Code:
                    <li><input type="radio" name="showuser"  id="showuser1" value="0" <vb:if condition="!$showuser">  checked="checked"</vb:if> tabindex="1" /> <label  for="showuser1" class="secondary">{vb:rawphrase  no}</label></li>   
      <li><input type="radio" name="showuser" id="showuser0"  value="2" <vb:if condition="$showuser">  checked="checked"</vb:if> tabindex="1" /> <label  for="showuser0" class="secondary">{vb:rawphrase  yes}</label>&nbsp;&nbsp;{vb:stylevar dirmark}</li>
    The default value of Yes will now be No if you make a new article.

    Comment


    • #3
      Originally posted by we_are_borg View Post
      You need to edit the template vbcms_edit_publisher all should be controlled from there. Lets say you want to change the setting for "Display Author" to No instead of Yes. The fasted way to see what your going to edit is lookup its raw phrase so "Display Author" you search in the language manager, the raw phrase "show_user_link" appears you look that up in the vbcms_edit_publisher template and you will see the following:
      Cool, that's what I was looking for, thanks.
      B.t.w. vote for default publishing options here.
      .......

      Comment


      • #4
        Originally posted by Ramsesx View Post
        Cool, that's what I was looking for, thanks.
        B.t.w. vote for default publishing options here.
        No Problem

        Voted thats what we need asap.

        Comment


        • #5
          Just had the time to check this we_are_borg, it is wrong the way you did it. If you invert the two lines you just invert the yes and no position. Means, yes was left and now it's right, but the check box is the same.
          So I tried to invert the $showuser and !$showuser, this works if you create a new article but seems not to save the checkboxes, if I try to edit an article the check-boxes are not where they should.
          .......

          Comment


          • #6
            Originally posted by Ramsesx View Post
            Just had the time to check this we_are_borg, it is wrong the way you did it. If you invert the two lines you just invert the yes and no position. Means, yes was left and now it's right, but the check box is the same.
            So I tried to invert the $showuser and !$showuser, this works if you create a new article but seems not to save the checkboxes, if I try to edit an article the check-boxes are not where they should.
            Can't remember what i did last time i thought it was that.

            Comment


            • #7
              Sorted it out finally. Example author set default to no instead yes

              Original code:
              Code:
              <li><input type="radio" name="showuser" id="showuser0" value="2" <vb:if condition="$showuser"> checked="checked"</vb:if> tabindex="1" /> <label for="showuser0" class="secondary">{vb:rawphrase yes}</label>&nbsp;&nbsp;{vb:stylevar dirmark}</li>                 
              <li><input type="radio" name="showuser" id="showuser1" value="0" <vb:if condition="!$showuser"> checked="checked"</vb:if> tabindex="1" /> <label for="showuser1" class="secondary">{vb:rawphrase no}</label></li>
              Custom code:
              Code:
              <li><input type="radio" name="showuser" id="showuser1" value="2" <vb:if condition="!$showuser"> checked="checked"</vb:if> tabindex="1" /> <label for="showuser1" class="secondary">{vb:rawphrase yes}</label>&nbsp;&nbsp;{vb:stylevar dirmark}</li>
              <li><input type="radio" name="showuser" id="showuser0" value="0" <vb:if condition="$showuser"> checked="checked"</vb:if> tabindex="1" /> <label for="showuser0" class="secondary">{vb:rawphrase no}</label></li>
              Only switched what is in red around tested it and it work for me on a fresh vBulletin install.

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...
              X