Add ReplyNew Thread

 Recent Activity in Statistics, Jcink - cfs compatible
Neki
 Posted: April 27th, 2015, 10:54 AM
Quote
Member
Posts:10Group:MemberJoined:June 2nd, 2014
Send Message


This is NOT an original code. I DID NOT WRITE IT. This is simply a clarified way of making it work. I spent a good few hours reading through pages of how to get the recent topics to work WITH Black's CFS, since normally it completely breaks it. The original code was written by Jcink. It's also good to note that this ONLY shows up on the Index. There's no work around for that, it was originally coded to only show up on the index. So keep that in mind when clipping.

HOW TO:

So you have a custom statistics center and you want the most recent x-amount of posts to show up there. Here's how to do it.


1: - Go to ADMIN CP > SYSTEM SETTINGS > TOPICS POSTS AND POLL. Under the section marked "topics" you should see a section that looks like this
user posted image
Set your number of topics to whatever you want. Mine is set to 15 [which is the max]


2: Go to your board wrappers. THIS STEP IS VERY IMPORTANT. You need to separate your board statistics into its own div. It should look something like this
CODE

<div id="stats"><% STATS %></div><script>
           customStats.init({
           html: " YOUR CUSTOM HTML HERE "
           });
           </script>

Add in your custom html. If you already had that done, and you just separated out your statistics, it's probably broken looking right now, or has reverted to the default stats center.


3: Add the following code UNDER THE COPYRIGHT TAG. It's very important that it goes under the copyright. Or it won't work. Period. The end. Save yourself the hairpulling. [and read more carefully than I did because it says it RIGHT IN THIS BIT OF CODE that Jcink posted.]

CODE

<script>
/* Clip the Recent Topic Activity display to another location
Add to the footer below the copyright
*/
$("#recent-topics").appendTo("#recent-topics-clip");
</script>


4: Add this following bit of code where you want your topics to show up in your stats. You might have to tweak it a little depending of how your stats are written. [mine has \ in it because I am a n00b coder and had to ask Pierrot for help with my stats]

CODE

<div id='recent-topics-clip'></div>



Aaaaaand, you're done. Some other options are :

add this bit of code to get rid of the time/date stamp
CODE
.recent-topics-date { display: none; }


add this bit of code to get rid of the "recent topic activity" header
CODE
#recent-topics .maintitle { display: none; }




Email
Pierrot
 Posted: April 27th, 2015, 12:15 PM
Quote
you are not your skin.
Posts:494Group:StaffJoined:August 28th, 2013
Send Message


This is great. Thank you for the submission.
Email

Topic Options Add ReplyNew Thread


 


 

   Chatbox
's reputation