Advertisement:

Author Topic: Basic SSI FAQ  (Read 155470 times)

Offline codenaught

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 14,653
  • Gender: Male
  • Formerly Known As akabugeyes
Re: Basic SSI FAQ
« Reply #100 on: October 09, 2006, 08:56:18 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

Offline abney317

  • Newbie
  • *
  • Posts: 7
Re: Basic SSI FAQ
« Reply #101 on: October 09, 2006, 09:10:09 PM »
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??

Offline Gary

  • Sorceress's Knight
  • Customizer
  • SMF Super Hero
  • *
  • Posts: 18,205
  • Gender: Male
  • So this is the luck of the draw...
    • Gazmanafc on Facebook
    • garygadsdon on LinkedIn
    • @Gazmanafc on Twitter
    • The Bongo Comics Fan Forum
Re: Basic SSI FAQ
« Reply #102 on: October 09, 2006, 09:26:38 PM »
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.

Offline abney317

  • Newbie
  • *
  • Posts: 7
Re: Basic SSI FAQ
« Reply #103 on: October 09, 2006, 09:33:29 PM »
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  :)

Offline abney317

  • Newbie
  • *
  • Posts: 7
Re: Basic SSI FAQ
« Reply #104 on: October 10, 2006, 10:09:34 PM »
help soon please  ;D

Offline sectit

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
  • Sectit.com!
    • Video Eğitimli Grafik ve Tasarım Portalı Yarışmalar
Getting User's Mail Outside of SMF
« Reply #105 on: October 12, 2006, 01:17:39 PM »
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 ??...']

Offline Murray

  • Newbie
  • *
  • Posts: 8
Re: Basic SSI FAQ
« Reply #106 on: December 28, 2006, 07:28:50 PM »
Cheers Lamper, exactly what i was looking for!

Offline MothMan

  • Jr. Member
  • **
  • Posts: 212
Re: Basic SSI FAQ
« Reply #107 on: January 24, 2007, 01:06:58 PM »
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:

Code: [Select]
<?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?
« Last Edit: January 24, 2007, 06:51:25 PM by MothMan »

Offline MothMan

  • Jr. Member
  • **
  • Posts: 212
Re: Basic SSI FAQ
« Reply #108 on: January 24, 2007, 09:37:30 PM »
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

Code: [Select]
<?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.
« Last Edit: January 25, 2007, 10:44:26 AM by MothMan »

Offline MothMan

  • Jr. Member
  • **
  • Posts: 212
Re: Basic SSI FAQ
« Reply #109 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.
« Last Edit: February 02, 2007, 01:39:47 PM by MothMan »

Offline gregy

  • Jr. Member
  • **
  • Posts: 111
  • Gender: Male
  • I'm a llama!
Re: Basic SSI FAQ
« Reply #110 on: February 06, 2007, 05:34:54 AM »
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 ...

Offline gregy

  • Jr. Member
  • **
  • Posts: 111
  • Gender: Male
  • I'm a llama!
Re: Basic SSI FAQ
« Reply #111 on: February 07, 2007, 12:12:27 PM »
hmm .. i just found out that code

Code: [Select]
<?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

Offline hygron

  • Jr. Member
  • **
  • Posts: 186
  • Gender: Male
    • administrator
Re: Basic SSI FAQ
« Reply #112 on: February 13, 2007, 09:01:37 AM »
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

Code: [Select]
<?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

Offline MothMan

  • Jr. Member
  • **
  • Posts: 212
Re: Basic SSI FAQ
« Reply #113 on: February 14, 2007, 05:25:11 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. :(
« Last Edit: February 28, 2007, 02:22:54 PM by MothMan »

Offline Lastwebpage

  • Semi-Newbie
  • *
  • Posts: 33
Access the SSI with URLs
« Reply #114 on: March 08, 2007, 07:02:01 AM »
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)

Offline HRM

  • Jr. Member
  • **
  • Posts: 333
  • Gender: Male
  • Dutch & Belgium musicforum
    • Muziekforum.com
Re: Basic SSI FAQ
« Reply #115 on: March 26, 2007, 05:33:46 AM »
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

Offline romeoyankee

  • Semi-Newbie
  • *
  • Posts: 22
Re: Basic SSI FAQ
« Reply #116 on: May 19, 2007, 11:09:49 AM »
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.


Offline jonidfld

  • Semi-Newbie
  • *
  • Posts: 42
Re: Basic SSI FAQ
« Reply #117 on: June 24, 2007, 07:29:19 AM »
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.

Offline spottedhog

  • Sr. Member
  • ****
  • Posts: 782
  • Gender: Male
Re: Basic SSI FAQ
« Reply #118 on: June 24, 2007, 08:42:53 AM »
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(); ?>
« Last Edit: June 24, 2007, 09:08:18 AM by spottedhog »

Offline jonidfld

  • Semi-Newbie
  • *
  • Posts: 42
Re: Basic SSI FAQ
« Reply #119 on: June 24, 2007, 09:26:25 AM »
Yeah i do have the correct path.

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