News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

mini question

Started by John Magdy Lotfy, May 25, 2017, 07:30:01 PM

Previous topic - Next topic

John Magdy Lotfy

hey all, do anyone know how to show the posts/threads of spefied category on my main Website Template using SSI.php like this website: sf-se.net [nofollow] if anyone can take a look at it please help


John Magdy Lotfy

got errors: The default theme's directory is wrong, please correct it by clicking this text.
Database Error
MySQL server has gone away
File: /home/u575324120/public_html/forums/Sources/ScheduledTasks.php
Line: 1203
Back


please help

John Magdy Lotfy

Quote from: John Magdy Lotfy on May 26, 2017, 01:46:52 PM
got errors: The default theme's directory is wrong, please correct it by clicking this text.
Database Error
MySQL server has gone away
File: /home/u575324120/public_html/forums/Sources/ScheduledTasks.php
Line: 1203
Back


please help
Bumb....... please i need help

Kindred

This is not a real time chat support site, you have to have patience. It is considered inappropriate to bump a post in less than 24 hours. In your case you would need to tell us specifically what code you are trying to use

please use the code BBC tags or attach your file with the call to SSI
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

John Magdy Lotfy

Quote from: Kindred on May 26, 2017, 06:44:39 PM
This is not a real time chat support site, you have to have patience. It is considered inappropriate to bump a post in less than 24 hours. In your case you would need to tell us specifically what code you are trying to use

please use the code BBC tags or attach your file with the call to SSI
<?php 
    $ssi_ban 
true;
    include 
"forums/SSI.php"// Warning: Simple Machines (SMF) is requried to be installed on 'forums' Directory
?>


<?php
if ($context['user']['is_guest'])
{
  echo '<center><div class="message-box">' .ssi_login(). '</div></center>';
}
else 
{
      echo '<div class="message-box">';
      $array ssi_boardNews(1.05null250'array');
          foreach ($array as $news)
          {
           echo '
          <table border="0" width="100%" align="center" class="ssi_table">
         <tr>
        <td>'
$news['icon'], ' <b>'$news['subject'], '</b><span class="smaller"><br />'$news['time'], ' '$txt[525], ' '$news['poster']['link'], '<br /><br /></span></td>
         </tr>
         <tr>
        <td>'
$news['body'], '<br /><br /></td>
         </tr>
         <tr>
        <td>'
$news['link'], ' | '$news['new_comment'], '</td>
         </tr>
          </table>    
          <br />'
;

           if (!$news['is_last'])
   {
          echo '
          <hr width="100%" />
          <br />'
;
   }
          }
  echo '</div>';
        }
   
?>



it always returns true for Guest check but iam already logged in and then it gets my forums bugged and i can't login to my forums again it always says Your session timed out while posting. Please go back and try again. what ever if the password and the username is correct or not


Kindred

You would need to globalize the context array before you use it
You also have to fix the ssi login function, the same way as the index.template.php login call was updated... which we missed during the 2.0.14 update.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Antes

#7
Code working properly for me. $txt[525] such strings does not exist in SMF 2.0.x (not even counting missing single quotes). $txt['by'] should be the string in there.

Try to full-path the SSI if you are having issues with forum/SSI.php.

I played on the snip little, this should be little bit better in general.

<?php 
$ssi_ban true;
include "smf2/SSI.php"// Warning: Simple Machines (SMF) is requried to be installed on 'forums' Directory

if ($context['user']['is_guest'])
{
echo '<center><div class="message-box">' ssi_login(), '</div></center>';
}
else 
{
$array ssi_boardNews(1.05null250'array');
echo '<div class="message-box">';

foreach ($array as $news)
{
echo '
<table border="0" width="100%" align="center" class="ssi_table">
<tr>
<td>'
$news['icon'], ' <b>'$news['subject'], '</b><span class="smaller"><br />'$news['time'], ' '$txt['by'], ' '$news['poster']['link'], '<br /><br /></span></td>
</tr>
<tr>
<td>'
$news['body'], '<br /><br /></td>
</tr>
<tr>
<td>'
$news['link'], ' | '$news['new_comment'], '</td>
</tr>
</table>    
<br />'
;

if (!$news['is_last'])
{
echo '
<hr width="100%" />
<br />'
;
}
}
echo '</div>';
}
?>

John Magdy Lotfy

thanks all but iam still getting a big proplem and iam not sure if its cuased by php.ini or what (the status check always returns true for Guest check but iam already logged in and then it gets my forums bugged and i can't login to my forums again it always says Your session timed out while posting. Please go back and try again. what ever if the password and the username is correct or not)

Antes

Quote from: John Magdy Lotfy on May 27, 2017, 03:47:23 PM
thanks all but iam still getting a big proplem and iam not sure if its cuased by php.ini or what (the status check always returns true for Guest check but iam already logged in and then it gets my forums bugged and i can't login to my forums again it always says Your session timed out while posting. Please go back and try again. what ever if the password and the username is correct or not)


You have to patch your SSI (ssi_login) with new login thing search around you'll find it.

John Magdy Lotfy

Quote from: Antes on May 27, 2017, 04:12:57 PM
Quote from: John Magdy Lotfy on May 27, 2017, 03:47:23 PM
thanks all but iam still getting a big proplem and iam not sure if its cuased by php.ini or what (the status check always returns true for Guest check but iam already logged in and then it gets my forums bugged and i can't login to my forums again it always says Your session timed out while posting. Please go back and try again. what ever if the password and the username is correct or not)


You have to patch your SSI (ssi_login) with new login thing search around you'll find it.

Session timeout proplem was cuased by my oudated Theme(Astonished) and mods(Simpleportal) fixed. thanks but still getting a MySQL errors The default theme's directory is wrong, please correct it by clicking this text.
Database Error
MySQL server has gone away
File: /home/u575324120/public_html/forums/Sources/ScheduledTasks.php
Line: 1201
Back
please help i don't know what is the proplem

John Magdy Lotfy

Bumb............. help Needed

Advertisement: