SSI Multiple Board News (ssi_multiBoardNews)

Started by vbgamer45, December 25, 2009, 01:57:08 AM

Previous topic - Next topic

Deadfire

Quote from: Arantor on May 11, 2013, 11:52:34 PM
Then I see no reason for it to be failing. It's not like I left the limiter in it that was in the original ssi_boardNews that only took the last % of topics for a board.

But there's something definitely awry somewhere, but it's late and I can't see anything obviously wrong. If I remember and have time I'll look into it, but I wouldn't hold your breath. Revisiting my old mods is not my normal idea of fun.

Aye, I'll see what I can figure out in the meantime.

I agree with being tired, and looking at something you did years ago, sounds like spending time with an ex that you wish you never met :)

mark7144

Hello Runic,

Great mod. I have a question, does this support the 'Attachment Positioning' mod so that attachments can be positioned within the articles?

NIAB

Hey guys,

Was wondering if there is any way to use this ssi in order for it to show the topTopics from the desired boards. Reason for that is that ssi_topTopics doesnt show avatars, and I am yet to figure out a solution for this.

Thanks

Motorhed

Probably mentioned before, but the board link, after the category link, always goes to the same random thread on my site.

http://tangledwebbing.com - Click the board name links in the main news area and they all go to the same thread.

Oskar78Swe

Old topic but maybe someone has come to a solution to the problem that i quote below.
I also have the same problem, I am not able to choose a single board or categeory unless it is board 1. The rest of the boards (2,3,4,5 and so on) get's the foreach problem as Deadfire has/had.

Has someone come to a solution to this?

Quote from: Deadfire on May 11, 2013, 10:49:16 PM
I'm having a bit of a issue trying to show a single board, The code works just fine for more then 1 though....

I'm getting 'Invalid argument supplied for foreach()'

This is my code:

<?php
$parameters = array(
'limit' => 5,
'board' => 2,
'output_type' => 'array',
'length' => 500,
'attachments'=> 'thumbnail',
);
$return ssi_multiBoardNews($parameters);
foreach ($return['topics'] as $news)
{

echo'
<article>
<h2>'
$news['subject'], '</h2>
<p class="pubdate">written by '
$news['poster']['link'], ', <time datetime="2013-03-01T12:00:00-05:00">'$news['time'], '</time></p>
<p class="pubdate">posted in '
$news['board']['link'], '</p>
<hr />
<p>'
$news['body'], '</p>';
if (isset($news['attachments']))
                     echo 
'
            <br><p><a href="'
$news['attachments'][0]['href'], '"><img src="'$news['attachments'][0]['thumbnail']['href'], '"/></a></p>'
echo' <hr />
<p class="read">'
$news['link'], ' | '$news['new_comment'], '</p>
</article>
<hr class="article-divider" />'
;

if (!$news['is_last'])
echo '
<hr>
<br />'
;
}
echo'<div class="clear-fix"></div>';

echo '</div>';

echo '</div>';
?>



var_dump ($parameters); gives;

array(5) { ["limit"]=> int(5) ["board"]=> int(2) ["output_type"]=> string(5) "array" ["length"]=> int(500) ["attachments"]=> string(9) "thumbnail" }

cnywrestling

A little late to the game, but I just started using this mod. Can anyone give me a little direction on how to alter it to just return the sticky topics?  I tried adding "with t.is [nofollow]_sticky = 1" to the selections, but it just returns nothing then. Any guidance would be greatly appreciated.
Thanks.

vbgamer45

Does not look like it supports sticky topics it would need to be altered.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arantor

Correct, it was never one of the original design criteria.

cnywrestling

Thanks. So it's not as simple as just changing the sql statements in the function? I wasn't sure how sticky topics were selected.

Arantor



ittiphol


Arantor


ittiphol


ntfrance

hellos, I would like to run the option attached files, but I do not manage to activate the

someone could help me!

ormuz

This this mod allow you to do this:

Show one topic, from a specific defined list of topics in a random fashion?

Arantor

No, this just outputs news from boards as most recent topics per board.

Goten22

Is it possible to display the number of views? Like "echo $news['views'];" ?

vbgamer45

No out of the box would require edits
such as to this query

SELECT
m.icon, m.subject, m.body, IFNULL(mem.real_name, m.poster_name) AS poster_name, m.poster_time,
t.num_replies, t.id_topic, m.id_member, m.smileys_enabled, m.id_msg, t.locked, t.id_board, b.name AS board_name, c.id_cat, c.name AS cat_name
FROM {db_prefix}topics AS t
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Looking

I can confirm that this mod only works if you have 2 or more board IDs listed. In other words, it will not function if you only want posts pulled from one board.

A brief scan through the code I do not see anything jump out to cause this Is there an easy fix or do I have to begin hacking? ;)

Advertisement: