News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Help me edit my SSI.php

Started by bugzy, July 16, 2009, 10:56:05 PM

Previous topic - Next topic

Arantor

Without using CSS the only option is the now-deprecated (obselete, not supposed to be used) <u> tag around the thread name.

bugzy

Hello I'm having problem putting it on my other page which is outside wordpress

here's the error:

Fatal error: Call to undefined function ssi_recentposts() in /home/sample/public_html/mywebsite.com/playerslounge/index.php on line 164



I don't have problem getting the recent post on wordpress page but when I tried to put it on the page outside wordpress I got the error.

Any idea? Thanks!

Arantor

The function is ssi_recentPosts() (with a capital P) and will only be available a call to SSI.php. If SSI.php hasn't been included by the time line 164 executes, this will be the cause.

So in playerslounge/index.php, is SSI.php included?

bugzy

Arantor what do you mean the code? or the file ssi.php?

I put the code that you gave to me on playerslounge.php here

<?php

$posts 
ssi_recentPosts($num_recent 8$exclude_boards null$include_boards null$output_method 'array');
echo 
'
   <table border="0" class="ssi_table">'
;
foreach (
$posts as $post)
   echo 
'
      <tr>
         <td valign="top">
            <b><span style="color:blue;">'
$post['poster']['name'], '</span></b> :   <a href="'$post['href'], '">'$post['subject'], '</a> - '$post['time'], '
         </td>
      </tr>'
;
echo 
'
   </table>'
;

?>



It's working on my wordpress homepage. But this playerlounge.php is not a wordpress page I just created it and put it in different folder which is "playerslounge" and I got the error. Or do I need to put the ssi.php file also on the "playerslounge" folder?

Thanks!
     

Arantor

So is this file loaded on its own, or included somewhere else?

bugzy

Hello Arantor what do you mean by it's loaded on it's own? It's part of my wordpress website but this page is manually created by me on folder "playerslounge"

Arantor

When you go to the page where the content should be displayed, do you visit playerslounge/index.php or do you visit another URL?

bugzy

The code is on the page(playerslounge/index.php) and I won't be seeing that error message if I didn't went to playerslounge/index.php...

Thanks for helping... Hope we'll fix this

Arantor

Which answers my question about being included.

The very first line of playerslounge/index.php needs to be a require() line to SSI.php, using the relevant path:

Quote from: Arantor on July 17, 2009, 03:55:19 AM
Judging by your error message, I think you want to add:

require('/home/sample/public_html/mywebsite.com/forum/SSI.php');


bugzy

It's working now! Thanks! Arantor!

Advertisement: