Hey Bloc, it I think it would be a good idea, if you created a sticky with a list of ssi functions we can use over in block snippets. Maybe even make a short tutorial....
-Xarcell
there is a list of ssi functions if you open ssi_examples.php.
you can go there from the root directory of your forum, for instance www.blahblah.com/forum/ssi_examples.php.
there are more ssi functions but those are the basics.
The ssi type block alreay support some of them, and a few other places also relies on SSI.php. I reckon the rest could just be added to the ssi-blocktype.
I know, I'm way out of my tree but how can you add an ssi function?
Being the fiddler that I am ........
elseif($context['TPortal']['ssifunction']=='recentposts')
ssi_recentPosts();
?????????
:) Thats a start..in the TPortalBlocks template. You need to add the options in TPortalAdmin.tempalte as well...
But it would be easier to call it in a phpblock, just like:
ssi_recentPosts();
:)
Quote from: Bloc on October 30, 2005, 07:15:47 PM
:) Thats a start..in the TPortalBlocks template. You need to add the options in TPortalAdmin.tempalte as well...
Like this?
// SSI block..which function?
if(!in_array($context['TPortal']['blockedit']['body'],array('recentpoll','toppoll','topposters','topboards','topreplies','topviews','calendar','recentposts')))
$context['TPortal']['blockedit']['body']='';
echo '<br />';
echo '<input name="blockbody' .$context['TPortal']['blockedit']['id']. '" type="radio" value="" ' , $context['TPortal']['blockedit']['body']=='' ? 'checked' : '' , '>' .$txt['tp-none-'];
echo '<br /><input name="blockbody' .$context['TPortal']['blockedit']['id']. '" type="radio" value="recentpoll" ' , $context['TPortal']['blockedit']['body']=='recentpoll' ? 'checked' : '' , '>'.$txt['tp-ssi-recentpoll'];
echo '<br /><input name="blockbody' .$context['TPortal']['blockedit']['id']. '" type="radio" value="toppoll" ' , $context['TPortal']['blockedit']['body']=='toppoll' ? 'checked' : '' , '>'.$txt['tp-ssi-toppoll'];
echo '<br /><input name="blockbody' .$context['TPortal']['blockedit']['id']. '" type="radio" value="topboards" ' , $context['TPortal']['blockedit']['body']=='topboards' ? 'checked' : '' , '>'.$txt['tp-ssi-topboards'];
echo '<br /><input name="blockbody' .$context['TPortal']['blockedit']['id']. '" type="radio" value="topposters" ' , $context['TPortal']['blockedit']['body']=='topposters' ? 'checked' : '' , '>'.$txt['tp-ssi-topposters'];
echo '<br /><input name="blockbody' .$context['TPortal']['blockedit']['id']. '" type="radio" value="topreplies" ' , $context['TPortal']['blockedit']['body']=='topreplies' ? 'checked' : '' , '>'.$txt['tp-ssi-topreplies'];
echo '<br /><input name="blockbody' .$context['TPortal']['blockedit']['id']. '" type="radio" value="topviews" ' , $context['TPortal']['blockedit']['body']=='topviews' ? 'checked' : '' , '>'.$txt['tp-ssi-topviews'];
echo '<br /><input name="blockbody' .$context['TPortal']['blockedit']['id']. '" type="radio" value="calendar" ' , $context['TPortal']['blockedit']['body']=='calendar' ? 'checked' : '' , '>'.$txt['tp-ssi-calendar'];
echo '<br /><input name="blockbody' .$context['TPortal']['blockedit']['id']. '" type="radio" value="recentposts" ' , $context['TPortal']['blockedit']['body']=='recentposts' ? 'checked' : '' , '>'.$txt['tp-ssi-recentposts'];
echo '<hr />';
Getting there, well near there anyway ;D
Drat
QuoteFatal error: Cannot redeclare recentposts() (previously declared in /homepages/6/d119724375/htdocs/sgr/Sources/Load.php(1600) : eval()'d code:430) in /homepages/6/d119724375/htdocs/sgr/Sources/Load.php(1600) : eval()'d code on line 455
In SSI examples, what is the difference between "Who's Online Function:" and "Log Online Presence + Who's Online Function:"? They both look the same to me.
Is there a way to show "Online Users Today" using SSI?
No, Online users today is a mod, and not included in SSI functions.
Log Online also records your presence, while Who's online don't. Otherwise its the same.
Thanks.