1,401

(2 replies, posted in PunBB 1.2 troubleshooting)

If you do a search of the forum, I posted all the details not too long ago regarding how to convert everything to UTF-8.

1,402

(15 replies, posted in PunBB 1.2 troubleshooting)

With regards to the title, what character encoding are you using? Is it consistent throughout?

1,403

(9 replies, posted in PunBB 1.2 show off)

Just more difference between areas would work wonders. Make it so that you can see where one part begins and the other ends. I like the darker end of the spectrum, (my eyes are crap where bright/light stuff is concerned), but you need, for example, the table headers and data rows to have enough space between them, (colour scale wise), so that they dont literally meld into each other. The blue text is also a tad harsh on such a dark background.

Some relation to cookies, yes. I'd still suggest checking if they have any of that Norton crap on the go. That gave me three days of grief with one of my users with the same problem.

1,405

(15 replies, posted in PunBB 1.2 troubleshooting)

The misc.php?action=rules page. As Smarty's said, you have something before the doctype declaration.

I'd be tempted to check they haven't, (your problem users), got an AV software like McAfee/Norton screwing around with their cookies/security.

Peter wrote:

Does 'db->escape' have advantages?

Not advantages, as such. It merely preps input for the db.

reviewum.com wrote:

Any way I can clean up the above processes to create a macro / script to automatically do everything I've listed above?

It's obviously running on a *nix based system, so just write a shell script. and then pop an entry in cron for it. It's a doddle.

$username = '\''.$db->escape($firstname.' '.$lastname).'\'';

The exact same way as in the answer you were given last time you asked this question.

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

1,411

(2 replies, posted in PunBB 1.2 discussion)

Smartys wrote:

Those aren't subdomains, those are subfolders wink

One day, my mind and fingers will work in sync instead of conspiring against me. big_smile I knew that, honest. http://outgoing.bauchan.org/gifs/nonchwhistle.gif


Smartys wrote:

You have two options, you can either keep the same cookie name and set the cookie path or keep the cookie path and set different cookie names. I would set the path for security reasons.

Cheers. smile I'll go for the path as you advise. Thanks again.

1,412

(2 replies, posted in PunBB 1.2 discussion)

Just a quickie. big_smile If one has forums in several sub domains, i.e:

http://example.com/forum1
http://example.com/forum2

is it merely a case of adding the subdomain name to the cookie path in config.php to stop one getting logged out of one forum, (as far as the browser is concerned), if you browse one of the other forums on that parent domain, or is something else required?


Cheers,

Matt

1,413

(124 replies, posted in News)

Why? Have you ever created or wrote a minor mod even, for PunBB? Do you have any idea how much time coding even the simplest of scripts can consume? The fact that this software ever became available at all is payment in itself for whatever donation people made. I can understand your opinion to a degree, but seriously, good intentions don't put food on the table. Dev's have families to support too. smile

Any questions can be answered quite well on here too.

1,415

(124 replies, posted in News)

pingme wrote:

yes its end of free punbb...now it may sound too harsh....but punbb asked donations to support the project...they developed it based on those donations and now selling it off for $$$ thats too bad...why dont you refund money of those who supported the script and donated for "development"

Yes, that does sound bitter, and also wrong. I doubt anyone ever asked for donations. Accepting and asking are two very different things. As with all open source software, one should be grateful for the fact that the author and devs ever created and open sourced the software in the first place. There is no obligation. If someone donates, that is of their own volition, not due to some pre-requisite.

How tardy of the author and devs to actually wish to earn a living. How could they.............


Yes, btw, that was sarcasm.

AndyDeacon wrote:

And who's trying this? What's about results?

If you want to know if it works, it's only a few minutes job to test it yourself.

1,417

(13 replies, posted in Programming)

guardian34 wrote:

What was wrong with the first piece of code you posted?

As far as I know, he merely hadn't managed to integrate the separate parts, rather than there being a problem as such.

1,418

(13 replies, posted in Programming)

guardian34 wrote:

Why not use strpos?

I find it easier to keep to a true/false setup for checks like that, than having to remember that certain functions return a number. Strpos gets used if I need a position. Stristr if I need a match. Plus, it removes the need to call strtolower, as stristr is case insensitive. What you lose one way, you gain another. big_smile

1,419

(13 replies, posted in Programming)

Oops. big_smile Change this line:

if (stristr($uri, 'http://'))

to:

if (!stristr($uri, 'http://'))

1,420

(13 replies, posted in Programming)

Peter wrote:
<?php

if (isset($_POST['txturl']) && $_POST['txturl'] != null)
{
    $uri = $_POST['txturl'];

    if (stristr($uri, 'http://'))
    {
       $txturl = '\''.$db->escape('http://'.$uri).'\'';
    }
    else
    {
        $txturl = '\''.$db->escape($uri).'\'';
    }
}
else
{
    $txturl = 'null';
}

// Update the database if form posted
if (!empty($_POST['cmdUpdate']))
{
$sql = 'UPDATE members SET url='.$txturl.' WHERE id = '.$pun_user['id'];

$result = mysql_query($sql) or die("SQL Update failed");
echo "Your information has been updated. Thanks.";
}

$result = $db->query('SELECT * FROM members WHERE id = '.$pun_user['id']) or error('Unable to fetch user data', __FILE__, __LINE__, $db->error());
$row = $db->fetch_assoc($result);

?>
<form method="post" action="<?php echo $PHP_SELF;?>">
<p>Website:<input type="text" name="txturl" size="30" value="<?php echo $row['url']; ?>" />
<p><input type="Submit" value="Update" name="cmdUpdate" />
</form>

Try that code above.

1,421

(13 replies, posted in Programming)

Apologies. Slight spelling error on my part there. smile

It's not updating because the var you are setting is $uri, but you're entering your unparsed $txturl var into the db. big_smile Change $uri to $txturl or vice versa.

1,422

(13 replies, posted in Programming)

You need something similar in your submitting form too. (Borrowed and altered slightly from profile.php).

<label><?php echo $lang_profile['Website'] ?><br/><input type="text" name="user_uri" value="<?php echo pun_htmlspecialchars($user['url']) ?>" size="50" maxlength="80"/><br/></label>

The $user['url'] is the users website address from their db account. You would then need to get that HTTP var:

if (isset($_POST['user_uri']) && $_POST['user_uri'] != null)
{
    $uri = $_POST['user_uri'];

    if (stristr($uri, 'http://'))
    {
       $uri = 'http://'.$uri;
    }
    else
    {
        $uri = $uri;
    }
}
else
{
    $uri = null;
}

Untested.

1,423

(25 replies, posted in General discussion)

What was causing it?

1,424

(25 replies, posted in General discussion)

Try adding this just below the include/common line at the top of the script:

require PUN_ROOT.'include/functions.php';

Edit: It doesn't need that line adding. Just checked that script with a virgin install of a standard PunBB and it works fine. The problem is at your end somewhere. Check your logs to see what they say.

1,425

(25 replies, posted in General discussion)

quaker wrote:

does it have anything to do with the admin mod for the verification mod?

??


This is that same script on the test server. Just catted it from the download server file to make sure it's an exact copy:

http://forums.bauchan.org/testforum1/contact.php