1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
    Dismiss Notice
  3. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Forum Rules (template edit)

Discussion in 'Template Modifications [Archive]' started by najaru, Oct 13, 2010.

  1. najaru

    najaru Active Member

    STEP1
    Make new template: forum_rules_001
    inside
    Code:
    <xen:edithint template="breadcrumb.css" />
    
            <div class="forum_rules_001">
            <span class="title"><b>Regole del Forum</b></span><br>
                    <span class"="text">Usare titoli corretti ed esprimere in modo completo il concetto in questione</span>
        </div>
    

    STEP2
    in breadcrumbs.css add:
    Code:
    .forum_rules_001 {
      -moz-border-radius:5px 5px 5px 5px;
      background: @secondaryLightest;
      border:1px solid @secondaryLight;
     text-color: @primaryLightest
      width: 80%;
      margin: auto;
      padding: 2px 5px 2px;
      overflow:hidden;
      }
    
      .forum_rules_001 .title
      {
      text-align: center;
      font-size:14pt;
      padding: 4px;
      }
    
      .forum_rules_001 .text
      {
      font-size: 11pt;
    }
    

    STEP3
    open forum_view and after
    Code:
    <xen:title>{$forum.title}{xen:helper pagenumber,  $page}</xen:title>
    <xen:h1>{$forum.title}</xen:h1>
    
    add
    Code:
    <xen:include template="forum_rules_001" />
    
    if you want different rules, you have to use conditional like this:
    Code:
    <xen:edithint template="breadcrumb.css" />
    
    <xen:if is="{$forum.node_id} == 1">
           <div class="forum_rules_001">
            <span class="title"><b>Regole del   Forum</b></span><br>
                    <span class"="text">Messagge for forum ID  1</span>
        </div>
    </xen:if>
    
    
    <xen:if is="{$forum.node_id} == 2">
    
           <div class="forum_rules_001">
            <span class="title"><b>Regole del   Forum</b></span><br>
                    <span class"="text">Messagge for forum ID 2</span>
         </div> </xen:if>
    
    
    <xen:if is="{$forum.node_id} == 3">
    
           <div class="forum_rules_001">
           <span class="title"> <b>Regole del   Forum</b></span><br>
                    <span class"="text">Messagge for forum ID 3</span>
         </div> </xen:if>
    
    
    see also: http://www.xfitalia.it/community/threads/inserire-le-regole-dei-forum.169

    forum_rules_prew.jpg

    Thanks for help at CFodder
     
    beduino, CFodder and Peggy like this.
  2. Peggy

    Peggy Well-Known Member

    Can this be done per forum, or the same rules show in every forum?
     
  3. najaru

    najaru Active Member

    the last block code explain how to put a conditional for display different forum rules for each forum ;)
     
  4. Peggy

    Peggy Well-Known Member

    VERY good!
     
  5. CFodder

    CFodder Well-Known Member

    Hey najaru, the Step 3 template edit should be done on forum_view, not forum_list :).
     
    najaru likes this.
  6. CFodder

    CFodder Well-Known Member

    Played around with the css a bit, if you like can use what's below, have shrunk the box to 80% of the forum width, made all of the colours the same as the alert for the forum being turned off and just made it so the title and text are a bit different. Of course you can change any of it that you want :).

     
    najaru likes this.
  7. najaru

    najaru Active Member

    BIG thanks to CFodder for help in CSS. All modified in first post
     
  8. whitetigergrowl

    whitetigergrowl Active Member

    This really is something that should be stock in Xenforo.
     

Share This Page