TinyPortal

Development => Block Codes => Topic started by: ontap on September 04, 2005, 04:42:44 PM

Title: Stats Block
Post by: ontap on September 04, 2005, 04:42:44 PM

i know theres allready a statsbox for tinyportal, but it dosent show Categories Or Total Boards,

so heres another ssi code you could add for a block

ssi_boardStats();

Title: Re: Stats Block
Post by: Racenut on September 04, 2005, 04:51:53 PM
This is something we can add or Bloc will have to add?
Title: Re: Stats Block
Post by: bloc on September 04, 2005, 04:57:51 PM
You can simply use it in a php block.
Title: Re: Stats Block
Post by: Racenut on September 04, 2005, 04:59:10 PM
I tried. it didnt work
Title: Re: Stats Block
Post by: Racenut on September 04, 2005, 05:05:35 PM
oops, yes it did.  :idiot2:
Title: Re: Stats Block
Post by: borgBOB on September 11, 2005, 07:18:43 PM
Can you link that to the /index.php?action=stats like the other SMF stats box?
Title: Re: Stats Block
Post by: bloc on September 12, 2005, 10:44:57 AM
i suppose just adding the link in the title for the block will do it.
Title: Re: Stats Block
Post by: borgBOB on September 12, 2005, 10:46:22 AM
I will try that.
Title: Re: Stats Block
Post by: scotte44 on October 28, 2005, 12:38:32 AM
I like that, are there any other simple ssi calls we can put into a php block?
Title: Re: Stats Block
Post by: bloc on October 28, 2005, 07:34:23 PM
Lots really...some of them:

ssi_menubar();
ssi_topPoster(xx);  ...where xx is number of posters
ssi_topBoards(xx);  ....same here
ssi_topTopicsReplies();
ssi_topTopicsViews();
ssi_topPoll();
ssi_todaysBirthdays();
ssi_todaysHolidays();
ssi_todaysEvents();

There are more..but these are the ones not covered by TP functions.
Title: Re: Stats Block
Post by: scotte44 on October 28, 2005, 08:01:37 PM
Thanks Bloc. Events and Birthdays are nice to have. How could I make the text smaller to match the rest of the portal?
Title: Re: Stats Block
Post by: bloc on October 28, 2005, 08:06:38 PM
Try something like this:

echo '<span class="smalltext">';

ssi_topPoster();

echo '</span>';
Title: Re: Stats Block
Post by: Skhilled on November 01, 2005, 01:14:33 PM
Bloc, will the birthday ssi not show if there is no b-day on a particular day? What I mean is will it say "today's birthdays...(blank)" or nothing at all...
Title: Re: Stats Block
Post by: scotte44 on November 01, 2005, 01:55:26 PM
It says nothing at all for events and birthdays if there arent any. How can I make it say None if there arent any?
Title: Re: Stats Block
Post by: Skhilled on November 01, 2005, 02:57:45 PM
Thanks, scotte44. BTW, your suggestion would be a neat trick...
Title: Re: Stats Block
Post by: Puchu on October 21, 2006, 04:19:09 AM
I am messing with birthdays...  I'm not using the title just the frame...

echo '<span class="smalltext">';
echo "Today's Birthday(s)<br />";
ssi_todaysBirthdays();
echo '</span>';



That works well... but I would like to know if its possible to use if else...  perferrably if there are not any birthdays to show nothing at all,  or just to say None would work too but I still perfer the other...
Title: Re: Stats Block
Post by: SRaven on December 17, 2006, 12:09:17 AM
Is it possible to use ssi_boardStats(); in HTML somehow?
Title: Re: Stats Block
Post by: Thurnok on December 17, 2006, 12:21:19 AM
If you mean in a static HTML page, you just need to make sure you put in the php start and end tags around the ssi_boardStats() function since it is a php function.

If you mean in a TinyPortal HTML Block, then no.  It is php code.  You would need a php block.
Title: Re: Stats Block
Post by: SRaven on December 17, 2006, 12:41:04 AM
heh no, I was trying to put it in the news part that only allows html and BBC tags...However it doesn't look like I'll be able to, but thanks :)
Title: Re: Stats Block
Post by: Chriso on March 20, 2007, 02:34:52 AM
TP should support, total download count, total files count
Title: Re: Stats Block
Post by: Porky on March 20, 2007, 02:45:31 AM
Quote from: SRaven on December 17, 2006, 12:09:17 AM
Is it possible to use ssi_boardStats(); in HTML somehow?
SSI can only be used in Shtml and PHP..
Title: Re: Stats Block
Post by: babjusi on May 15, 2007, 03:07:31 AM
Quote from: Bloc on October 28, 2005, 08:06:38 PM
Try something like this:

echo '<span class="smalltext">';

ssi_topPoster();

echo '</span>';



Thanks for this Bloc, now I figured out how to fit the stats in the Stats Block, cause before thay couldn''t fit in properly