TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 790
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 640
  • Total: 641
  • tino

SSI Functions

Started by Xarcell, October 30, 2005, 02:43:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Xarcell

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

Moocat

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.

bloc

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.

Nokonium

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();


?????????

bloc

:) 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();

:)

Nokonium

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 />';

Nokonium

Getting there, well near there anyway  ;D

Nokonium

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

gerrymo

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?

bloc

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.

This website is proudly hosted on Crocweb Cloud Website Hosting.