News:

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

Main Menu

SSI boardNews Default theme help

Started by Dumke, December 01, 2015, 01:00:25 PM

Previous topic - Next topic

Dumke

I've been attempting different things, basically all evening,
But i can't seem to get what i need, all samples close to what i'd like has been for core and not the default theme, which sorta has help but also confused me just as much

All i'm attempting to do is just display the url and name and post date.
I can't get my head around this, so any help would be appreciated.

margarett

You need to call the function with the "array" output parameter, which will just return an array of data instead of "echo'ing" it directly.
Then you just need to loop through the array and output the data you want ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Dumke

#2
Quote from: margarett on December 01, 2015, 03:27:13 PM
You need to call the function with the "array" output parameter, which will just return an array of data instead of "echo'ing" it directly.
Then you just need to loop through the array and output the data you want ;)

With that post, and this api doc, http://support.simplemachines.org/function_db/?action=view_function;id=535

I was able to figure it out, thanks! :D


<?php require_once('D:\xampp\htdocs\forums\SSI.php'); ?>

<?php 

$array 
ssi_boardNews(112.05nullnull'array');

 foreach (
$array as $news)
{
echo '<br>',
$news['subject'],'<br>'$news['href'], '<br>'$news['time'],'';

}
?>



EDIT: only issue,

Notice: Undefined index: minWordLen in D:\xampp\htdocs\forums\Sources\Load.php(2736) : eval()'d code on line 137


I'm not sure why this is happening..

Kindred

don't use the .0

as for the error... it appears that you may have a mod which has a string or value that is not defined
Сл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."

Dumke

Quote from: Kindred on December 02, 2015, 07:41:09 AM
don't use the .0

as for the error... it appears that you may have a mod which has a string or value that is not defined

I turned off evaluate template, and it showed the error to be,
from Minimum Characters/Words Per Post.

$txt['error_minWordLen'] = 'The message does not meet the minimum word requirements (' . //$modSettings['minWordLen'] . ' words).';

Since, I chose the MinChar option instead, this throws an error. ha.

thanks for the tip.

margarett

That's related to a mod (minimum words per post, I think...)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: