1,051

(4 replies, posted in PunBB 1.2 show off)

Like the style. smile

Use that first example I posted, along with one of those two lines above for the feed->set array. You don't need to mess with Simplepie, and if you needed to add anything else that I knew of, I would have already mentioned it.

Other than giving these a try, I've no further suggestions offhand:

$feed->set_feed_url(implode(', ', $feed_array));

or:

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

If not, you'll have to supply more info on the specifics of how Simplepie uses the info supplied.

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

No idea what the simplepie code does with that array, so that may or may not work.

Do a search on here. There was a topic specifically relating to this a while ago.

That one you're using should be fine for both null or empty, I believe. If not, I thing the following should cover both?

$query="SELECT rssfeed FROM users WHERE rssfeed!='' AND rssfeed IS NOT NULL";

1,057

(3 replies, posted in PunBB 1.2 discussion)

Did you not notice something at the top of each file whilst you were studying the code? big_smile

http://punbb.org/docs/dev.html#integration

hurry wrote:

I have uploaded all the files. It still gives the error for each of that code in echo.

I've uploaded a new version now, (with the files now having a .php extension instead of .xml), so your server won't try serving the files directly instead of actually executing them. smile

I've uploaded a newer version of those scripts now, btw. The main alterations are use of the Etag header for modified/not modified status codes to the browser, and some general code trimming/optimising. One thing to note. I've set these scripts up for mysql seeing as that seems to be the general db type in use, so any pgsql users will need to alter these two lines:

//pg_result_seek($result, 0);
mysql_data_seek($result, 0);

by commenting out the mysql line and removing the comments from the pgsql line. smile

The download is still at the same location:

http://forums.bauchan.org/unix/viewdownloads.php?dcid=1

hurry wrote:
echo '<?xml-stylesheet type="text/css" href="'.$forumuri.'style/feeds/rss.css"?>'."\n";

XML Parsing Error: not well-formed
Line Number 139, Column 8:

I don't have a feeds directory in my style folder or a rss.css file. sad

Just remove that line. I thought I had already done so. smile It's not required.

Edit: You may also need to change the file extension back to .php, rather than .xml. The server may try to serve it up as is rather than running it.

Cheers. smile

Would that then need to be:

$db->query('SELECT rssfeed FROM '.$db->prefix.'users WHERE IS NOT NULL rssfeed')

or

$db->query('SELECT rssfeed FROM '.$db->prefix.'users WHERE rssfeed IS NOT NULL')

or would either achieve the same result?

1,063

(3 replies, posted in PunBB 1.2 discussion)

if (!$pun_user['is_guest'])
{
     [your logged in user code here]
}

You will need to include include/common.php in your app to access the pun_user vars.

1,064

(11 replies, posted in General discussion)

Aye, that's correct. smile I thought I had forgotten to mention something. big_smile

1,065

(11 replies, posted in General discussion)

in admin_options.php:

                        </div>
                    </fieldset>
                </div>
-----------------start----------------------
                <div class="inform">
                    <fieldset>
                        <legend>Hot Topic Settings</legend>
                        <div class="infldset">
                            <table class="aligntop" cellspacing="0">
                                <tr>
                                    <th scope="row">Hot topic post count</th>
                                    <td>
                                        <input type="text" name="form[hot_count]" size="5" maxlength="5" value="<?php echo $pun_config['o_hot_count'] ?>"/>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </fieldset>
                </div>
----------------------end-------------------------
                <div class="inform">
                    <fieldset>

Start and end are so you know what tags to shimmy the code between. smile Placement exactly where in the admin_options file is upto you. Then, run this against the db:

INSERT INTO [db_prefix]config (conf_name, conf_value) VALUES ('o_hot_count', '50');

Make sure to exchange [db_prefix] for your db prefix. big_smile

Have just read past the first line or two of your first post. big_smile

You may need to change that query to either:

$db->query('SELECT rssfeed FROM '.$db->prefix."users WHERE rssfeed!=''")

or:

$db->query('SELECT rssfeed FROM '.$db->prefix.'users WHERE rssfeed!=NULL')
if ($db->num_rows($result))
{
   $feed_array = array();

   while ($cur_feed = $db->fetch_assoc($result))
   {
       $feed_array[] = $cur_feed['rssfeed'];
   }
}

Something like:

$result = $db->query('SELECT rssfeed FROM '.$db->prefix.'users') or error('Unable to fetch feed information', __FILE__, __LINE__,$db->error());

if ($db->num_rows($result))
{
   while ($cur_feed = $db->fetch_assoc($result))
   {
       simplepie command($cur_feed['rssfeed']);
   }
}

Untested, but should do the job.

1,069

(6 replies, posted in Programming)

big_smile big_smile

Thanks again. smile Just cross referenced that one to the pgsql variant:

pg_result_seek($result, 0);

and it works an absolute treat. smile

1,070

(6 replies, posted in Programming)

Just making sure I'm not missing the gist on that link. big_smile So effectively, calling:

$result->data_seek(0);

would reset the pointer back to zero so that a later fetch_assoc in a while loop would start from the beginning again?


Thanks again,

Matt

1,071

(6 replies, posted in Programming)

Cheers. smile Just one last question. How does one reset the pointer?


Thanks again,

Matt

1,072

(6 replies, posted in Programming)

If one has a db query/lookup which will return multiple rows, would the following just return the required item from the first row of the result all or rows?

list($lastpost) = $db->fetch_row($result);

Result is a lookup which is ordered by last post, so the first row has the last post info I require, but I'm not quite sure if the above will work as I think/expect. big_smile Plus, running that command would still leave all the info in result as is, to be used in a while loop later on?


Thanks again,

Matt

1,073

(8 replies, posted in PunBB 1.2 discussion)

Dr.Jeckyl wrote:

Like I mentioned in my first post; maybe Rickard wanted support centralized. But who knows... I'll take them at their word(in those 2 links) that they go by how many people have it listed in their profiles.

That's a weird way of working it though. The fact they don't have a PunBB specific section means that they probably attract less PunBB admins than they would if they created the section. Or, on the other hand, why would existing members bother to list it if they know it's irrelevant, to a degree, on that particualr board. Must admit, I could never understand why they don't have a PunBB section, when you look at what other forum softwares they have sections for, but that may just be my logic which thinks it's weird. big_smile

quaker wrote:

Mattf, me neither..haha

just that it seem a portal mod is designed for punbb ever day. and it seem to act like a cms.


Q

I do believe you're missing the point of the portal/C.M.S bit. smile A portal, in itself, is nothing more than a single page as such, which concentrates multiple areas of interest from around the site into that one place, i.e: the index page. The C.M.S, however, is the site as a whole. There is no such thing as a complete PunBB C.M.S. Every mod added to a Pun install creates a different variant. A complete C.M.S, to word it as such, doesn't exist. Each forum is generally adapted, via mods, to each sites requirements.

1,075

(11 replies, posted in Feature requests)

Smartys wrote:

Matt: He means putting a user in multiple groups rather than creating a group for every permutation of permissions.

Ah, right. I thought I might have misunderstood the intention. smile