SSI.php integration

Started by Kootch, November 21, 2018, 09:18:36 PM

Previous topic - Next topic

Kootch

I'm using Wordpress.  I'm trying to add Recent Topics or Recent Posts to my sidebar widgets.

I added this to the top of header.php in wordpress. <?php require("SSI.php"); ?>

In the siderbar widgets, I have a few instances where I'm calling stuff via SSI.php from my forums.

I need to get the Recent Topics or Recent Topics formatted properly.  I'm using <?php ssi_recentTopics(); ?> in the widget for topics, as an example.

Please see the sidebar at https://www.TMLfans.ca

Thoughts?

vbgamer45

You want to use the output method property
https://www.simplemachines.org/community/ssi_examples.php

Which you can set to return an array in php which you can then format how you wish.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Kootch

Unless I'm missing something (which is very possible), I was using that?!

vbgamer45

You were using the defaults you would do something like this

$data = ssi_recentTopics(8,null,null, 'return');
print_r($data);




That shows the contents of the array which you can then format as needed.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Kootch

Ahhh, thanks.  I'll try to figure that out.  Cheers!

Kootch

Thanks vbgamer45.

It's odd that the first four widgets on the TMLfans.ca sidebar that are using SSI.php have output formatted perfectly.  And they're just using standard calls:
<?php ssi_boardStats(); ?>
<?php ssi_whosOnline(); ?>
<?php ssi_topTopicsReplies(); ?>
<?php ssi_topBoards(); ?>

Sorry, I thought I understood this better than I obviously do ;)

vbgamer45

It does depend on theme and how it is display. Recent topics is normally very wide which is why it does not look good in your sidebar.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Kootch

Quote from: vbgamer45 on November 21, 2018, 10:18:35 PM
It does depend on theme and how it is display. Recent topics is normally very wide which is why it does not look good in your sidebar.

That makes sense.  It is really wide.


Advertisement: