1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Showing Red Color in Reports Count always

Discussion in 'Styling and Customization Questions' started by gginni, May 4, 2014.

  1. gginni

    gginni Active Member

    I want Report count > 0 to be in red color always...

    This feature was available in 1.x but was not available in subsequent releases.

    Can anyone let me know which css/template to change for showing Report Count > 0 in red color always

    Currently, it shows red color until we click on that... once we click on that report count then color changes
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Edit the moderator_bar template.

    Replace this:
    Code:
                <xen:if is="{$visitor.is_moderator} && !{$xenOptions.reportIntoForumId}">
                    <a href="{xen:link reports}" class="reportedItems modLink">
                        <span class="itemLabel">{xen:phrase reported_items_short}:</span>
                        <span class="itemCount {xen:if '({$session.reportCounts.total} AND {$session.reportCounts.lastUpdate} > {$session.reportLastRead}) OR {$session.reportCounts.assigned}', 'alert'}" title="{xen:if $session.reportCounts.lastUpdate, '{xen:phrase last_report_update}: {xen:datetime $session.reportCounts.lastUpdate}'}"><xen:if is="{$session.reportCounts.assigned}">{$session.reportCounts.assigned} / {$session.reportCounts.total}<xen:else />{$session.reportCounts.total}</xen:if></span>
                    </a>
                </xen:if>
    
    With this:
    Code:
                <xen:if is="{$visitor.is_moderator} && !{$xenOptions.reportIntoForumId}">
                    <a href="{xen:link reports}" class="reportedItems modLink">
                        <span class="itemLabel">{xen:phrase reported_items_short}:</span>
                        <span class="itemCount alert" title="{xen:if $session.reportCounts.lastUpdate, '{xen:phrase last_report_update}: {xen:datetime $session.reportCounts.lastUpdate}'}"><xen:if is="{$session.reportCounts.assigned}">{$session.reportCounts.assigned} / {$session.reportCounts.total}<xen:else />{$session.reportCounts.total}</xen:if></span>
                    </a>
                </xen:if>
    
     
  3. gginni

    gginni Active Member

    @Brogan - Now even 0 is showing in red...

    I only want count > 0 to be shown in red always...

    count = 0 should be in blue color (default color only)...
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Add the count conditional back in.
     
  5. gginni

    gginni Active Member

    Done ;)

    Below is the code:-

    Code:
    <xen:if is="{$visitor.is_moderator} && !{$xenOptions.reportIntoForumId}">
                    <a href="{xen:link reports}" class="reportedItems modLink">
                        <span class="itemLabel">{xen:phrase reported_items_short}:</span>
                        <span class="itemCount {xen:if '({$session.reportCounts.total} > 0)', 'alert'}" title="{xen:if $session.reportCounts.lastUpdate, '{xen:phrase last_report_update}: {xen:datetime $session.reportCounts.lastUpdate}'}"><xen:if is="{$session.reportCounts.assigned}">{$session.reportCounts.assigned} / {$session.reportCounts.total}<xen:else />{$session.reportCounts.total}</xen:if></span>
                    </a>
                </xen:if>
    
     

Share This Page