|
PreviewIn the home template, find these lines: <tr><th>Threads and Posts</th></tr> <tr><td>Total Threads: $[total_threads] Total Posts: $[total_posts]</td></tr> {if $[last_updated_thread]}<tr><td>Last Updated: $[last_updated_thread.recent_link] by $[last_updated_thread.last_post.created_by_user] ($[last_updated_thread.last_post.date])</td></tr>{/if} <tr><td>$[recent_threads_link] - $[recent_posts_link] - $[rss_feed_link]{if $[mark_boards_read_link]} - $[mark_boards_read_link]{/if}</td></tr> Replace them with this: <tr><th colspan="2">Threads and Posts</th></tr> <tr><td>Total Threads: $[total_threads]</td><td>Total Posts: $[total_posts]</td></tr> <tr><td>Total Categories: $[category.length]</td><td>Total Boards: <script type="text/Javascript">document.write($(".board").length);</script></td></tr> {if $[last_updated_thread]}<tr><td colspan="2">Last Updated: $[last_updated_thread.recent_link] by $[last_updated_thread.last_post.created_by_user] ($[last_updated_thread.last_post.date])</td></tr>{/if} <tr><td colspan="2">$[recent_threads_link] - $[recent_posts_link] - $[rss_feed_link]{if $[mark_boards_read_link]} - $[mark_boards_read_link]{/if}</td></tr>
Last Edit: Jan 11, 2013 5:59:35 GMT by Chris
|
|
|
|
|
I'm just going to steal the cat + board bits for my Info center from this, so thanks =D
|
|
|
|
I'm just going to steal the cat + board bits for my Info center from this, so thanks =D Go right ahead. These aren't copyrighted for a reason.... (that being that they're all rather simple.)
|
|
|
|
|
I'm just going to steal the cat + board bits for my Info center from this, so thanks =D Go right ahead. These aren't copyrighted for a reason.... (that being that they're all rather simple.) Do you know have any idea if there's a bit so you can have "total updated boards" total? (subboards would count as 'normal' boards)
|
|
|
|
Go right ahead. These aren't copyrighted for a reason.... (that being that they're all rather simple.) Do you know have any idea if there's a bit so you can have "total updated boards" total? (subboards would count as 'normal' boards) So, you want the number of boards that are "new"?
|
|
|
|
|
Do you know have any idea if there's a bit so you can have "total updated boards" total? (subboards would count as 'normal' boards) So, you want the number of boards that are "new"? Indeed. I know it was/is possible in V4.5, so surely it is v5?
Last Edit: Jan 11, 2013 22:11:07 GMT by Stinky666
|
|
|
|
So, you want the number of boards that are "new"? Indeed. I know it was/is possible in V4.5, so surely it is v5? Put this wherever you want to show it (on the main page, for now): <script type="text/javascript">document.write($(".board .icon img[title^='New']").length);</script>
Last Edit: Jan 13, 2013 19:17:06 GMT by Chris
|
|
|
|
|
Indeed. I know it was/is possible in V4.5, so surely it is v5? Put this wherever you want to show it (on the main page, for now): <script type="text/avascript">document.write($(".board .icon img[title^='New']").length);</script> Can't edit/save theme changes currently, it doesn't save. But when it is working again, does this go into Layout Templates?
|
|
|
|
Haven't looked at v5 yet, but Chris had a minor typo there.
<script type="text/javascript">document.write($(".board .icon img[title^='New']").length);</script>
|
|
|
|
Haven't looked at v5 yet, but Chris had a minor typo there. <script type="text/ javascript">document.write($(".board .icon img[title^='New']").length);</script> Updated. Thanks. (Tested the JS itself using console. )
|
|
|
|
|
Put this wherever you want to show it (on the main page, for now): <script type="text/avascript">document.write($(".board .icon img[title^='New']").length);</script> Can't edit/save theme changes currently, it doesn't save. But when it is working again, does this go into Layout Templates? Yes. Just has to go after the boards list to get the data. Please note that hitting preview will not always show the results. You have to save and reload the main page. (This is because it's XSS protection.)
|
|
|
|
|
These work perfectly, so thankies Edit: Any chance of more stats, for example "avg posts per topic" and "avg posts per board" ?
Last Edit: Jan 14, 2013 12:16:36 GMT by Stinky666
|
|
|
|
Hey chris. I'm using this <script type="text/javascript">document.write($(".board .icon img[title^='New']").length);</script> But since adding the below it has stopped working: <span class="moderators"> {if $[board.icon.title] == "New Posts"} <span style="color: #8f8c85; background-color: #1a1918; margin-left: -3px; margin-bottom: 5px;">new</span> {/if}
Edit: Got this fixed now =D
Last Edit: Feb 8, 2013 1:43:45 GMT by Stinky666
|
|
|
|
These work perfectly, so thankies Edit: Any chance of more stats, for example "avg posts per topic" and "avg posts per board" ? <script type="text/javascript">var posts = "$[total_posts]".replace(/,/g,"")-0; var threads = "$[total_threads]".replace(/,/g, "")-0; document.write((posts/threads).toPrecision(4)); </script> Wherever you want it to appear on the main page.
|
|
|
|
|
These work perfectly, so thankies Edit: Any chance of more stats, for example "avg posts per topic" and "avg posts per board" ? <script type="text/javascript">var posts = "$[total_posts]".replace(/,/g,"")-0; var threads = "$[total_threads]".replace(/,/g, "")-0; document.write((posts/threads).toPrecision(4)); </script> Wherever you want it to appear on the main page. You're awesome. Thanks
|
|
|