News:

Wondering if this will always be free?  See why free is better.

Main Menu

Basic SSI FAQ

Started by Tomer, June 23, 2004, 05:06:24 AM

Previous topic - Next topic

codenaught

Quote from: abney317 on October 09, 2006, 08:34:13 PM
how do I import the forum news??
Can you be more specific?

There are two news functions.

ssi_boardNews(ID_BOARD) shows the posts made in the defined board.
ssi_news() outputs your forum news from Admin / News and Newsletters
Dev Consultant
Former SMF Doc Coordinator

abney317

I just need a full out code/tutorial on how to have simple machine's forum (MY FORUMS) news on a page of my site

help??

Gary

Yeah, but which  news function. Please be specific to what you need.

ssi_boardNews(ID_BOARD) allows you make a thread work as an update to your site.
ssi_news() gives you the News from the News & Newsletters section of your admin center.

-AwwLilMaggie
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

abney317

ssi_boardNews(ID_BOARD) allows you make a thread work as an update to your site.

I guess this... because I want the NEWS TOPICS... on the homepage  :)

abney317


sectit

HElo ,

How can i get user's mail outside of smf forum ? is there any variable or array  like $context['user'][..mail or email etc ??...']

Murray

Cheers Lamper, exactly what i was looking for!

MothMan

#107
Hi all.

I need some help with basic ssi...

All I'm trying to do is bring in my forum menu bar into another page, and I'm obviously doing something wrong.

To test it out I've created a super-basic php page ....

Just a table with a logo in the top row, and the menubar in the row below.

What I'm getting is this:

http://www.othersi.com/rss/test.php

It's bringing in the links, but not the menu-bar itself.

The code for this test page is:


<?php require("/**path as indicated in ssi_examples**/SSI.php"); ?>

<html>

<body>

<table>
<tr>
<td>
<img src="http://othersi.com/Themes/default/images/silogo.jpg">
</td>
</tr>
<tr>
<td>
<?php ssi_menubar(); ?>
</td>
</tr>
</table>

</body>
</html>


What am I missing?

MothMan

#108
Update:

I found related info earlier in this thread about an identical problem...  as per this post:

http://www.simplemachines.org/community/index.php?topic=12936.msg699237#msg699237

I added


<?php

echo 
'
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/style.css" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js"></script>
<style type="text/css">
body
{
margin: 1ex;
}'
;

if ($context['browser']['needs_size_fix'])
echo '
@import('
$settings['default_theme_url'], '/fonts-compat.css);';

echo '
</style>'
;

?>



between the body tags.

The menu now appears properly in my pages.

But... on one of the pages, the menu shows as though I am logged out.

I've added the same ssi coding to 3 different pages, and on 2 of them it works properly... on the other (http://www.othersi.com/rss/sirssnews.php) it always shows as though I'm logged out.

I think it's due to the way the page is working... as this page is actually the RSS2HTML script (http://www.rss2html.com/) , edited and renamed to parse an rss feed via a template php file (that template file being http://www.othersi.com/rss/rss_newspage_template.php)

I've set the ssi code in the rss_newspage_template.php file, as that is the file that is actually displaying the page content. On an off-chance, I also put the ssi "require" statement in the sirssnews.php file, but it didn't make a difference.

Interestingly, if you browse to the template file (click the link above to rss_newspage_template.php), the menu bar appears properly, showing the user as being logged in.

But because that is just the template file, it doesn't actually display the RSS content... to do that, you have to get to the template "through" the script page (sirssnews.php)


I imagine this sounds very confusing lol, but any assistance would be appreciated... any further info required of me to help troubleshoot, please let me know.

MothMan

#109
Any ideas?

You can see for yourself what is happening, here:

http://www.othersi.com

You can login as :
u: testuser
p: testuser

From the front page, if you go to the forum, or to the contact page (contact link is on the top menu), you'll see the SMF menu header works fine... although, I did just notice that the FORUM link disapperas while in the contact page.... so that's not right.

But, if, from the front page, you go to the News page (link is in the left-side navigation block), the SMF menu header doesn't work right... it always shows as if you are logged out.   And, again, the FORUM link is missing.

gregy

Hi

After upgrading my SSi is not working as it should :)

this code

Quote
<?php require('/home/web/domain.com/www/SSI.php'); ?>
<table border="0">
   <tr>
      <td><?php ssi_recentPosts(10,array(113,114,115,116,13)); flush(); ?></td>
</tr>
<tr>
      <td valign="bottom"><?php include("http://www.domain.com/SSI.php?ssi_function=boardStats"); ?> <br>Trenutno online: <?php include("http://www.domain.com/SSI.php?ssi_function=logOnline"); ?></font></td>
   </tr>
</table>

this code should pull out only boards 113 114 115 116 13 .. but it displays new posts in all boards ..

any idea why?

In previous version this code worked like a charm ..

P.s. this code is called on other domain as SMF installed is ...

gregy

hmm .. i just found out that code

<?php ssi_recentPosts(10,array(113,114,115,116,13)); flush(); ?>

is EXCLUDING these boards .. not including only these ...

but this is happening now after upgrade  :o

hygron

would this work for say, permissions on category/s. in regards to only allowing a certain user group to see one private category in the smfgallery, while allowing all the other member groups to see all, but the private category?

i.e.  I set up 5 categories for images...I would like one of the categories to be private...only viewable to a private member group.  Am I correct in thinking I can do something like this

<?php
require("YOUR_PATH_TO_SSI.php"); 

if (
$context['user']['is_all other member groups except private'])
 {
   echo 
   
'<h5>Access Denied</h5>
   We are sorry all other member groups except private, it seems you don'
t have permission to view this category.';
 }
else
 {
   echo
   '
<h5>Welcome ', $context['user']['name'], '!</h5>
   
Here is your private category:';
 }
?>



This is the 1st time I have even tried anything involving SSI_but your tutorial made it seem pretty simple.  Can this work, or did I misunderstand the article?  Thanks H

come join me at: http://www.Hygronomics.com/forum1
My newest site: http://myvirtualworld.org Virtual Domain Hosting

MothMan

#113
Quote from: MothMan on February 02, 2007, 01:38:04 PM
Any ideas?

You can see for yourself what is happening, here:

http://www.othersi.com

You can login as :
u: testuser
p: testuser

From the front page, if you go to the forum, or to the contact page (contact link is on the top menu), you'll see the SMF menu header works fine... although, I did just notice that the FORUM link disapperas while in the contact page.... so that's not right.

But, if, from the front page, you go to the News page (link is in the left-side navigation block), the SMF menu header doesn't work right... it always shows as if you are logged out.   And, again, the FORUM link is missing.

Final plea for help on this one. :p  Anyone?

Edit:  Sadness. :(

Lastwebpage

I am not sure about the using of "direct" URLs, for example:
OK:
http://forum.miranda-im.de/SSI.php?ssi_function=boardNews;board=2;limit=2;length=30
Wrong:
http://forum.miranda-im.de/SSI.php?ssi_function=recentPosts;num_recent=5
http://forum.miranda-im.de/SSI.php?ssi_function=topBoards;num_top=5

I see no really differents in the function calls, but in the first link the numbers works, in the other two examples not. What are the differents? If the _ is the problem, why it was used?

(Before someone ask, no I can't access my forum with PHP)

HRM

I have a little problem that I didn't notice before since my last update.
My ssi_examples page remains totally blank.

http://www.muziek4um.nl/ssi_examples.php

ssi.php is just working as all the functions do work. It just the examples page that doesn 't sho up.
Any idea??

If mentioned before somewhere else please warn me as I've not been around for a while.

Thanks in advance.

Ed.
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

romeoyankee

hey guys.. just wondering if anybody knows about the php include function?  The posts in this topic all have to do with starting a brand new index page and naming it index.php

What I have done is this..

I have created little php files on my server.. something like this.

name: login.php

code:

<?php
require("SSI.php");

if ($context['user']['is_guest'])
   {
      ssi_login('http://www.domain.com [nofollow]');
   }
else
   {
      ssi_logout('http://www.domain.com [nofollow]');
   }

?>


After making that, I have a php file on my server called login.php with the login script.  if you go to www.domain.com/smf/login.php [nofollow] you will see that it works and that it functions normally.  now what I do is this.  I go back to my index.html file and use this function

<?php include("http://www.domain.com/smf/login.php [nofollow]"); ?>

and stick that little bit of code wherever i want the login box to appear on the page.  You can put it in a table.. just on the page wherever.. you can format it.. you can do whatever you want.

when you then go to www.domain.com/index.html [nofollow]  the login box will get included on the main page.


jonidfld

This is actually realy frustrating.

I can't get this to work and you all seem to think it's most straight forward thing ever.

I've followed all variations of instructions in this post with no effect whatsoever.

I have the path correct at the top of my page etc.... can anyone actual write out what to do 'exactly' in point to point simple terms?

Please. I've geiven my self square eyes this morning tryin ti get this to work.

spottedhog

#118
jonidfld,

My guess here is that your issue is probably with the "Path" to the SSI.php file. Look in your Settings.php file at the $boarddir. This is your "Path". Your "Path" is NOT something like: http://www.yourdomain.com

Your "Path" should look something like this: /home/accountname/www/ or something similar.

To place a ssi function, in a php extention file:

ssi_welcome();

Please note that this is NOT put into an echo statement. In other words, this is WRONG:

echo 'ssi_welcome();'; <-----VERY WRONG AND WILL NOT WORK!

To place a ssi function in a html extention file:

<? ssi_welcome(); ?>

jonidfld

Yeah i do have the correct path.

But ill change the other to see - ill let you know! Thanks for your reply!  ;D

Advertisement: