MattF wrote:
Smartys wrote:

Matt:
1. That is a numerically indexed array, not an comma delineated list of URLs, which is what you are proposing.

The Simplepie array or the one we've created? Judging by their docs, the code for creating that array I posted earlier and then using the implode inside their array should give output which is similar to that in their documentation for the set_feed_url.

No. Your code is wrong. wink
Their code:

$feed->set_feed_url(array(
    'http://simplepie.org/blog/feed/',
    'http://digg.com'
));

That's an array with two elements. The array is numerically indexed, so the key 0 points to http://simplepie.org/blog/feed/ and key 1 points to http://digg.com.

Your code:

$feed->set_feed_url(array("'".implode("', '", $rss_feeds)."'"));

or:

$feed->set_feed_url(array(implode(', ', $rss_feeds)));

That's a numerically indexed array with one element. So key 0 points to a comma delineated list of URLs.

The two are NOT equivalent.

Matt:
1. That is a numerically indexed array, not an comma delineated list of URLs, which is what you are proposing. Or rather, an array with one entry which is a comma delineated list of URLs.
2. I wasn't saying that it doesn't allow you to use multiple URLs. We know that works since Peter has done it in this topic already. I was saying that I don't think it allows you to get the most recent post from each URL in the array. That example doesn't seem to do that.

1,528

(4 replies, posted in PunBB 1.2 bug reports)

http://punbb.org/forums/viewtopic.php?id=8846
http://punbb.org/forums/viewtopic.php?id=3852

Yeah, we're aware, there really just isn't a good way to re-enable the submit button wink

You don't want to implode. set_feed_url takes either a string, which is one URL, or an array, which is multiple URLs.
Now, you want to get the most recent entry from each feed and then order them by date, right? If so, I don't believe SimplePie allows you to do that just using its functions. Doing that involves doing what you were doing (calling each feed URL one by one), storing the results for each feed together in an array, and then sorting those results.

1,530

(7 replies, posted in PunBB 1.2 discussion)

Looks like it's back smile

You wouldn't echo, you would assign the values to an array and use that array elsewhere. You could do it within a function but you don't have to (and yes, you would have to return your array if you choose to use a function).

I think you would be better off asking people more familiar with SimplePie wink

The way to handle it may be to pass 1 URL per call (as you were doing), store all the data in an array, and then sort the data from there.

1,533

(1 replies, posted in PunBB 1.2 discussion)

Moved to PunBB Discussions
The server's timezone settings were incorrect for a few days and were changed to be correct recently (I'm surprised nobody else noticed). If you changed your timezone settings during that time, that would explain the change.

You're echoing data there, not storing strings in an array. Also, there's no query there.
If it's ordered by date as you say, why couldn't the first three most recent entries be from one feed?

It was handing an array before, when you were passing it one at a time as an array. It handles multiple URLs.
However, your code is getting one item total from all feeds (that's get_items(0, 1)).

Try this

<?php
// Include the SimplePie library
require_once 'simplepie.inc';
require 'shorten.php';
require_once 'idn/idna_convert.class.php';

mysql_connect(localhost,$db_username,$db_password);
@mysql_select_db($db_name) or die( "Unable to select database");

$query="SELECT id, firstname, rssfeed FROM members WHERE rssfeed!=''";
$result=mysql_query($query);

$rss_feeds = array();
while ($data = mysql_fetch_assoc($result))
{
    $rss_feeds[] = $data['rssfeed'];
}

// Initialize some feeds for use.
$feed = new SimplePie();
$feed->set_feed_url($rss_feeds);

// Initialize the feed object
$feed->init();
 
// This will work if all of the feeds accept the same settings.
$feed->handle_content_type();

?> 
    <?php if ($feed->error): ?>
        <p><?=$feed->error()?></p>
    <?php endif ?>

    <?php
// Let's loop through each item in the feed.
    foreach($feed->get_items(0,1) as $item):

    // Let's give ourselves a reference to the parent $feed object for this particular item.
    $feed = $item->get_feed();
?>

<h3><a href="<?php echo $item->get_permalink(); ?>" target="_blank"><?php echo html_entity_decode($item->get_title(), ENT_QUOTES, 'UTF-8'); ?></a></h3>

<!-- get_content() prefers full content over summaries -->
<?php echo $item->get_description();
?>
<p class="footnote"><a href="<?php echo $feed->get_permalink(); ?>" target="_blank"><?php echo $feed->get_title(); ?></a> | <?php echo $item->get_date('M j, Y | g:i a'); ?></p><br />

<?php endforeach;
$i++;
}

mysql_close();

?>

Paste the full code you're using

msibm: It's still worth trying. Depending upon how much the schema has changed, the converter might work or it might need a couple tweaks.
And no, attachments are not converted.

1,539

(1 replies, posted in PunBB 1.2 troubleshooting)

Change it directly in the database and delete the cache file

You should not use NULLs if you can avoid it wink

Feel free to try it. We can try to find a way to make it work if it doesn't.

1,542

(7 replies, posted in PunBB 1.2 discussion)

Just take the time to look up the stuff wink

secure

    Indicates that the cookie should only be transmitted over a secure HTTPS connection from the client. When set to TRUE, the cookie will only be set if a secure connection exists. The default is FALSE. On the server-side, it's on the programmer to send this kind of cookie only on secure connection (e.g. with respect to $_SERVER["HTTPS"]).

1,543

(7 replies, posted in PunBB 1.2 discussion)

I did. The domain, path, and secure are all cookie settings. You can find more about them by looking up PHP's setcookie function. The seed is a per-site salt. You'll have to be more specific if you want something else wink

1,544

(7 replies, posted in PunBB 1.2 discussion)

cookie domain, cookie path, and cookie_secure are all used in the PHP setcookie function. Take a look at it for more information on them.
The cookie seed is a per-site seed for hashing the data in the cookie.

1,545

(7 replies, posted in PunBB 1.2 discussion)

Moved to PunBB Discussion, since as you said this isn't a bug wink

The latter

You can't use = or != for comparing NULL
http://dev.mysql.com/doc/refman/5.0/en/ … -null.html

1,548

(8 replies, posted in PunBB 1.2 troubleshooting)

Modify the queries that use the users table to all point to the same database/table?

Not at all smile
You'll just have to tell me the forum ID of your one forum

Edit index.php to redirect to the forum