systeminfo and statsonindex hide info
Posted: Sun Oct 07, 2018 9:19 pm
I added a function to hide the info in these two extensions. Then added code to the html templates.
statsonindex/styles/prosilver/template/event/overall_footer_after.html
statsonindex/styles/prosilver/template/event/index_body_stat_blocks_after.html
systeminfo/styles/prosilver/template/event/overall_footer_after.html
systeminfo/styles/prosilver/template/event/index_body_stat_blocks_after.html
Check it out on the index page...
statsonindex/styles/prosilver/template/event/overall_footer_after.html
Code: Select all
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
<script>function toggle_stat_display() { var x = document.getElementById('stat-display'); if (x.style.display === 'none') { x.style.display = 'block';document.getElementById('stat-display-toggle').title = '{L_COLLAPSE_VIEW}'; } else { x.style.display = 'none';document.getElementById('stat-display-toggle').title = '{L_EXPAND_VIEW}'; } }</script>
<!-- ENDIF -->
Code: Select all
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN and NEWEST_USER -->
<div class="stat-block statisticsonindex">
<h3><a id="stat-display-toggle" onclick="toggle_stat_display();" style="cursor: pointer" title="{L_EXPAND_VIEW}"><i class="icon fa-bar-chart fa-fw" aria-hidden="true"></i>{L_STATISTICS}</a></h3>
<p id="stat-display" style="display: none">
<!-- EVENT index_body_block_stats_prepend -->
{TOTAL_POSTS} • {POSTS_PER_YEAR} • {POSTS_PER_DAY} • {POSTS_PER_TOPIC} • {POSTS_PER_USER}<br />
{TOTAL_TOPICS} • {TOPICS_PER_YEAR} • {TOPICS_PER_DAY} • {TOPICS_PER_USER}<br />
{TOTAL_FILES} • {FILES_PER_YEAR} • {FILES_PER_DAY} • {FILES_PER_USER}<br />
{TOTAL_USERS} • {USERS_PER_YEAR} • {USERS_PER_DAY} • {NEWEST_USER}<br />
{L_START_DATE} <strong>{START_DATE}</strong>
<!-- EVENT index_body_block_stats_append -->
</p>
</div>
<!-- ENDIF -->
Code: Select all
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
<script>function toggle_system_display() { var x = document.getElementById('system-display'); if (x.style.display === 'none') { x.style.display = 'block';document.getElementById('system-display-toggle').title = '{L_COLLAPSE_VIEW}'; } else { x.style.display = 'none';document.getElementById('system-display-toggle').title = '{L_EXPAND_VIEW}'; } }</script>
<!-- ENDIF -->
Code: Select all
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
<div id="system-info" class="stat-block">
<h3><a id="system-display-toggle" onclick="toggle_system_display();" style="cursor: pointer" title="{L_EXPAND_VIEW}"><i class="icon fa-info-circle fa-fw" aria-hidden="true"></i>{L_SYSTEM_INFO}</a></h3>
<p id="system-display" style="display: none">
{L_SYSTEM_NAME}{L_COLON} <strong>{PHP_OS}-Debian 9-streatch</strong><br />{L_PHP_VERSION}: <strong>7.2.9</strong> • {L_SYSTEM_SQL}{L_COLON} <strong>10.1.26</strong> • {L_BOARD_VERSION}{L_COLON} <strong>phpBB {BOARD_VERSION}</strong><br />
{L_SYSTEM_UPTIME}{L_COLON} <strong>{UPTIME_DAYS}</strong> {L_SYSTEM_DAYS} <strong>{UPTIME_HOURS}</strong> {L_SYSTEM_HOURS} <strong>{UPTIME_MINS}</strong> {L_SYSTEM_MIN} <strong>{UPTIME_SECS}</strong> {L_SYSTEM_SECS} • {L_SYSTEM_LOAD} <strong>{AVG_LOAD0}</strong> ~ <strong>{AVG_LOAD1}</strong> ~ <strong>{AVG_LOAD2}</strong>
</p>
</div>
<!-- ENDIF -->
