SSI Single Message

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

Previous topic - Next topic

Atari

Quote from: Harro on September 12, 2006, 02:38:47 PM
I'm having a problem with this.
I want to return the value of this as an array, but it doesn't seem to return anything.
Am calling it like this:
$arrMessage = ssi_grabMessage($messageID, 'array');

Already verified that $messageID is not null.

And then display it like this:
echo '<b> '. $arrMessage['subject'] .'</b>';
But nothing is displayed...



i'd like to know about this also. Any answers yet?
I'd like to be able to show just the subject and body of message. No reply buttons or anything else

Thanks,


There are 10 kinds of people in this World.
Those who understand Binary and those who don't

IchBin™

Quote from: Atari on April 01, 2007, 12:10:47 PM
Quote from: Harro on September 12, 2006, 02:38:47 PM
I'm having a problem with this.
I want to return the value of this as an array, but it doesn't seem to return anything.
Am calling it like this:
$arrMessage = ssi_grabMessage($messageID, 'array');

Already verified that $messageID is not null.

And then display it like this:
echo '<b> '. $arrMessage['subject'] .'</b>';
But nothing is displayed...



i'd like to know about this also. Any answers yet?
I'd like to be able to show just the subject and body of message. No reply buttons or anything else

Thanks,
Can you give me more info on what you're trying to do? Perhaps post the code your using so I can see? Thanks.
IchBin™        TinyPortal

Vandaahl

Can this code/mod be modified to also display included attachments? That would absolutely make my day!

IchBin™

That isn't something that I have the time to look at. Sorry.
IchBin™        TinyPortal

Sarge

Quote from: Vandaahl on April 14, 2007, 11:06:42 AM
Can this code/mod be modified to also display included attachments? That would absolutely make my day!

+1. Also display images hotlinked with . In general, add BBC support.

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Sarge

#25
Quote from: AmaZulu on June 26, 2007, 11:25:11 AM
If you have a look at this page: http://www.thephotojournals.com/GeoffCronje/SeaPhoenix_4.php you will see that at the bottom of the page the topic being returned by the function is not number 3 as specified in the call, but another topic, namely topic number 2. I've checked and re-checked the code on the page and its written as follows:

<p align="left"><?php ssi_grabMessage(3); ?></p>

The message being returned seems to be here: http://thephotojournals.com/forum/index.php?topic=2.msg3#msg3

As you can see from the URL, the message ID is 3, whereas the topic ID is 2. You have to specify the message ID when calling ssi_grabMessage(), not topic ID. You can get the message ID from the link of the title at the start of each message.


Quote from: AmaZulu on June 26, 2007, 11:25:11 AM
Also, if I look on the SSI_examples.php page for my site (http://thephotojournals.com/forum/ssi_examples.php) the function is giving me an error on that page stating something about guests must be allowed to view the board? ??? Have checked the permissions for the board that topic is posted in and they are fine. Everyone can see, in fact even guests are allowed to post comments on those articles.

Where might I have gone wrong with this?

TIA

http://thephotojournals.com/forum/index.php?topic=1.msg1

There's nothing wrong, I think ssi_grabMessage() returns the message with ID_MESSAGE = 1 -- in other words, it's the same as ssi_grabMessage(1). Either this message doesn't exist or it is in a board guests do not have access to.

[edit]
You can modify ssi_examples.php to call, for example, ssi_grabMessage(3) instead of simplyssi_grabMessage().

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

AmaZulu

Yep, sorry, I goofed (again!) by misreading messages for topics. I have now directed the problem I originally had to the right mod author (which was the mod to return an entire topic with all replies.

Thought I was going nuts for minute...

IchBin™

THanks for clearing that up Sarge. I was a little confuzzled myself. :)
IchBin™        TinyPortal

pcbonez

Your example link is dead.

Sarge


    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

IchBin™

Quote from: pcbonez on July 20, 2007, 05:50:40 AM
Your example link is dead.
The example link is intended to show you how you would access the example after installing the mod on your site.
IchBin™        TinyPortal

littleone

does this mod not work with shtml?

Ive been missing with it for a while and cant get it to work.

<!--#include virtual="./SSI.php?ssi_function=ssi_grabMessage(100064)" -->

When i use that, its just blank

IchBin™

--wrong post--

Will look into this when I get a moment.
IchBin™        TinyPortal

backend

Guys two quick questions:

1-Does the page that is supposed to show these SSI functions, have to have a .PHP extension? can't we install it in a regular .html pages?

2-What if we want to put it in a page that is not in the forum directory?
How would this function be different?     <?php require("SSI.php"); ?>


Thanks a lot

IchBin™

Thats exactly what you need to do. Just include the file, then call the function. :)

I don't know anything about the shtml code the guy posted above.
IchBin™        TinyPortal


IchBin™

Sorry, I don't have one at this time. I thought there was one attached to the mod download page, but I guess not. Its a pretty simple mod which only modifies the SSI.php and ssi_examples files. If you don't like it you can just uninstall. :)
IchBin™        TinyPortal

digit

#37
Sorry it took a couple YEARS to try this mod and respond to it, but I am getting the error.... (straight from in SSI_examples.php)

Return a single post <?php ssi_grabMessage(); ?>

You cannot specify a board that doesn't allow guests. Please check the board ID before trying again.

and looking at the above example (a few posts up from here)  (http://thephotojournals.com/forum/ssi_examples.php) it's broken there too! - just scroll all the way to the bottom...

I have tried message ID's that I KNOW are visible to guests.

For example...   in SSI_examples.php I have....

<?php ssi_grabMessage(167181); ?>

which displays....

You cannot specify a board that doesn't allow guests. Please check the board ID before trying again.

This is my message.... (domain removed)

http://www.mysite.com/index.php/topic,167181.html

and it IS visible to guests - I logged out and tested it!

I could really use this mod, if I could just get it to work!  ;)

Thanks in advance....

Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

Sarge

Quote from: digit on July 07, 2008, 04:43:42 AM
Return a single post <?php ssi_grabMessage(); ?>

You cannot specify a board that doesn't allow guests. Please check the board ID before trying again.

Quote from: digit on July 07, 2008, 04:43:42 AM
<?php ssi_grabMessage(167181); ?>
http://www.mysite.com/index.php/topic,167181.html

These have already been answered in this topic. See reply #25.

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

digit

Voila!  Thanks!  Great mod! (sorry I didn't see that about message ID's vs. topic ID's!)
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

Advertisement: