Recent Topics

1 Dec 14, 2003 16:59    

Howdy all,

I'm working on a BlogStats class that will return basic statistical information about the blog. The main purpose for this is to generate a number of posts so a random blog entry can be displayed. (example: random quotes, images, links, etc.)

I am looking for input on what would be used if it was included. Currently, I have the ability to determine the number of posts in a given blog and am working on a function that will return a random number based on the number of posts. Other ideas would be:

  • Number of contributing authors

  • Total comments received

  • Total trackbacks & pingbacks[/list:u]

  • Any input would be appreciated,
    Travis S

    2 Dec 16, 2003 16:10

    How about

      Total posts blogged Total referrals from external sites Average posts per day (sort of like an activity indicator) Average comments per day[/list:u] If you made a hack so I could get these values plus the ones you added, I'd sure like to use it for a ?disp=blogstats :) -Vegar

    3 Dec 16, 2003 18:42

    Hey Vegar,

    Hack? This is going to go straight into the CVS code! :) I'm one of the evo developers... :)

    Those are some good ideas. I'll see if I can't incorporate them. As far as setting it as one of the "disp" settings, I'm not sure how that'd be setup, but I'm sure it wouldn't be that hard.

    4 Dec 16, 2003 18:50

    Oops, sorry, I didn't know. :oops:

    The ?disp part should be pretty easy, though, if you're planning on making something like <?php echo $blogstats['totalcmnts']; ?> for displaying it. (You get the point, even if my example is shitty code. :p)Wouldn't that be just adding another case to the disp switch? (take a look at the fplanque2002 skin, for example)

    Oh, and since this is the feature request section, I'm going to suggest some more stats items :P

      Average posts per day, per author (displayed on the profile or something - like in this forum) Author's percent of total posts (also like in this forum)[/list:u] -Vegar

    5 Dec 17, 2003 22:03

    Oh, and another suggestion:

      Average words per post[/list:u] -Vegar

    6 Jan 04, 2004 18:12

    How are things moving along? Just curious...


    7 Jan 04, 2004 19:31

    Slowly right now... I've been working on an eCommerce site for a client, and I have two other coming up that are going to require setting up a CMS, so I'm a bit swamped :)

    I've got a basic part of it done, but it's still not enough to release it.

    8 Jan 04, 2004 21:12

    Okay, good to hear you are making progress (if slow). I'm looking forward to getting that code. :)

    I made a box for it on my [url=]stats page[/url] called "other facts". I tried to make it count the number of posts/comments and such myself, but I haven't been able to get it to work. In that box, that's where I'd put the statistical information you're working on. :)


    9 Jan 04, 2004 22:04

    Ask and ye shall be given...

    I just added the file /b2evocore/_class_blogstats.php to the CVS and updated the _main.php file in the same directory. All it does right now is check to see the number of posts, but it's a start. :) You can download those two files from the [url=] CVS[/url].

    It hasn't been tested much by me, so go ahead and try to break it! Here is how I call it:

    Total blog entries: 
    $BlogStats = new 
    		BlogStats( 	2,						// Blog
    					'', 					// year/month/(day)
    					'', 					// Week
    					'', 					// Category(s): 1,2,3
    					array( ), 				// Same as above except array
    					'', 					// Author
    					'', 					// Number of posts to display per page
    					'', 					// Start results @
    					'', 					// End results @
    					'', 					// Search string
    					'', 					// Search for sentence or words
    					'', 					// Require exact match?
    					'posts', 				// Type of display
    					'', 					// Start of display (age)
    					'now' );				// End of display
    echo $BlogStats->total_posts;	

    Of course, all of those variables should change the total # of posts around, so go ahead and change 'em to see what you get.

    Let me know if you come across any unexpected results...

    11 Jan 25, 2004 02:29


    b2evo has referer stats built in already

    Form is loading...