News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Need help with SSI.php Examples

Started by kraziek, March 22, 2007, 07:42:32 AM

Previous topic - Next topic

kraziek

I understand that you can look up all those examples using sis.php file. But the one that I'm looking for is not there.   I mean, all I want my forum to do is to display the topic information and that's it.  For example: when I used the example to show recent topics, it displayed a big long line of all the details ( name of category, topic, who posted, date/time) All I wanted to do is to display the topic name only and nothing else. Is it possible to make that change? Because it is taking a lot of space on my main page.

Any help will be greatly appreciated.

SenSa

Also i dont know and im follow this topic for learn it :)
ιƒ ι'м кιℓℓє∂ ву тнє qυєѕтισηѕ ℓιкє α ¢αη¢єя.. тнєη ι'ℓℓ вє вυяιє∂ ιη тнє ѕιℓєη¢є σƒ тнє αηѕωєя..

Harro

Instead of just display it you can use it to return an array and then create your own output.
I'll post the exact code this evening once I'm home.
Unless somebody does it before me :P

dmacdonald111

If you are looking for a way to get something more specific out of ssi, you can try the following topic which will show you how to retreive individual information. You may be able to gather your topic information from what's there;



or another topic on SMF helper is;

[url=http://www.smfhelper.info/index.php?topic=951.0


Hope you get it working.

kraziek

thanks alot for the info. I'll try tthat and see if it works!!

metallica48423

you can also edit the actual function in SSI.php, but i don't suggest that, outputting it as an array and then using the variables to output your own custom display.

http://support.simplemachines.org/function_db/index.php?action=view_function;function=590
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

kraziek

Jesus, I am getting more lost into all this....I am just ready to tear my hair off....I didnt know it was this complicated....all I wanted to do is to be able to display nice simple links of updated topics on my main page, Just like hxxp:www.discovervancouver.com [nonactive]  

Harro

Try this:

$array = ssi_recentTopics(10, null, 'array');
foreach ($array as $topic){
echo $topic['link'] . '<br />';
}


Change the 10 to the amount of topics you want to show.
Also make sure you include SSI.php :)

kraziek

I forgot to mention....I am using .Shtml ... would it make any difference?

Harro

I'm not familiar with shtml.
But I don't think it's possible to change it then.
Perhaps somebody else can give more information about that.

And in reply to your PM,
You should add that code on the place you want to display those recent topics.
Just make sure you put it between <?php and ?> and that you include your SSI file.
If you browse to http://yourdomain/folder/ssi_examples.php you can see how to include it.

But everything I'm saying now is for php pages. I don't know exactly how it works for shtml.

Advertisement: