News:

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

Main Menu

SSI Single Message

Started by jerm, June 01, 2006, 11:54:40 PM

Previous topic - Next topic

Garou

Loving this mod. It works great with Tiny portal articles.

Two functions I wish it had...

A way around the "You cannot specify a board that doesn't allow guests." That it would instead would preform a check on the member group and respond with "You do not have permission to access this board." instead and if you do belong to the member group of the board that it would work just fine.

Also that  it showed views and replies like the topTopicsViews and Replies functions do, where the view and post comments line is. Even better if it would show exactly like they do but just the one link and views, instead of the several "top" ones.

Garou

#41
Quote from: Garou on October 29, 2008, 01:14:09 AM
Also that  it showed views and replies like the topTopicsViews and Replies functions do, where the view and post comments line is. Even better if it would show exactly like they do but just the one link and views, instead of the several "top" ones.

Actually I just fixed that myself.

Find:
m.posterTime, m.ID_MSG, t.ID_TOPIC, m.ID_MEMBER, m.smileysEnabled, b.name

Replace with:
m.posterTime, m.ID_MSG, t.ID_TOPIC, m.ID_MEMBER, m.smileysEnabled, b.name,
t.numViews, t.numReplies

Find:
'subject' => $row['subject'],

Add After:
'num_replies' => $row['numReplies'],
'num_views' => $row['numViews'],

Find:
<td>', $news['link'], ' | ', $news['new_comment'], '
Replace with:
<td>', $news['link'], ' | ', $news['new_comment'], ' | ', $txt[301], ': ' , $news['num_views'], ' | ', $txt[110], ': ' , $news['num_replies'], '


At the end of the the grabbed message it will now look like...
View Comments | Post Comment | Views: 1 | Replies: 0

Forgot to mention that the changes are all made in the SSI.php.

Also this works for me because I always link to topic starter messages, Im not sure if this will work for messages that are not or if it will just break things.

Klozi

As I expected it's a ssi_boardnews clone. How I can use the $length variable to 'cutoff' posts after for example 100 words? I tried a cupple of ways and pasted pieces of the boardnews function, but it still don't work.

Can you help me to solve this problem, please?

IchBin™

You can use the php substr() function to cut a string off.

www.php.net/substr
IchBin™        TinyPortal

Vandaahl

Is somebody able to modify this to work with SMF 2.0? I tried it but it won't work...

Özgür

We are already have in 2.0.
Try this
function ssi_fetchPosts($post_id)
So Long

IchBin™

You should post for help on that in the code help board, and not in this mods topic.
IchBin™        TinyPortal

mark7144

1) Is there anyway to cache an SSI message grab? My SSI home page grabs a couple of posts but they are only updated each week, so would be good to cache it so to lower resources.

2) Is there a way to do it so only one query is done but it fetches several posts with one inclusion, so basically have one SSI grab but maybe have the post IDs as arrays?

bryan_49ers

Is there a way to do this for the most recent post?

IchBin™

If you want the most recent post you should use ssi_recentPosts(1); Specify that you only want 1 topic and you'll get exactly what you want.
IchBin™        TinyPortal

Advertisement: