Advertisement:

Author Topic: SSI.php integration  (Read 644 times)

Offline Kootch

  • Semi-Newbie
  • *
  • Posts: 43
  • Gender: Male
    • Leafs News & Views
SSI.php integration
« on: November 21, 2018, 09:18:36 PM »
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?

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,227
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SSI.php integration
« Reply #1 on: November 21, 2018, 09:21:44 PM »
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

Offline Kootch

  • Semi-Newbie
  • *
  • Posts: 43
  • Gender: Male
    • Leafs News & Views
Re: SSI.php integration
« Reply #2 on: November 21, 2018, 09:37:35 PM »
Unless I'm missing something (which is very possible), I was using that?!

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,227
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SSI.php integration
« Reply #3 on: November 21, 2018, 09:45:07 PM »
You were using the defaults you would do something like this
Code: [Select]
$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

Offline Kootch

  • Semi-Newbie
  • *
  • Posts: 43
  • Gender: Male
    • Leafs News & Views
Re: SSI.php integration
« Reply #4 on: November 21, 2018, 09:52:43 PM »
Ahhh, thanks.  I'll try to figure that out.  Cheers!

Offline Kootch

  • Semi-Newbie
  • *
  • Posts: 43
  • Gender: Male
    • Leafs News & Views
Re: SSI.php integration
« Reply #5 on: November 21, 2018, 10:04:07 PM »
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 ;)

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,227
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SSI.php integration
« Reply #6 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.
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

Offline Kootch

  • Semi-Newbie
  • *
  • Posts: 43
  • Gender: Male
    • Leafs News & Views
Re: SSI.php integration
« Reply #7 on: November 21, 2018, 10:25:04 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.