Please login or register. Welcome to the Studio, guest!


Quick Links:



JD

JD Avatar



1,032


June 2008
Good to see that people are still alive, after all these years.

Hope you're all well!

JD

JD Avatar



1,032


June 2008
Chris Avatar
JD Avatar
Not a massive fan of the winter Olympics, but I think the fact that it is held in Russia is finally making people talk about things that need to be talked about.

Channel 4 (British mainstream channel) did well to do this ;)
www.youtube.com/watch?v=-6RID82Ru-k
That's awesome.  Was the DJ supposed to be Putin?

Anyways, so far the only thing to really catch my attention was USA beating Russia in hockey.



Putin the one and only :P

JD

JD Avatar



1,032


June 2008
Not a massive fan of the winter Olympics, but I think the fact that it is held in Russia is finally making people talk about things that need to be talked about.

Channel 4 (British mainstream channel) did well to do this ;)
www.youtube.com/watch?v=-6RID82Ru-k


JD

JD Avatar



1,032


June 2008
Hey guys,

I don't know how many people are familiar with Chrome Extension dev, but does anybody know if chrome.idle.queryState is broken? It's not a permissions issue because chrome.idle.onStateChanged.addListener fires just fine.

E.g.
chrome.idle.queryState(60, function(state) {
alert(state);
});


doesn't fire at all.

It's driving me crazy, and I can't complete this extension (part of my job, fail) until I resolve this. It's probably a stupid syntax error, but I've now got tunnel vision!

Thanks!

Edit: On a side note, I'm getting completely wound up by Chrome Extension documentation... or lack of. They seem to be advocates for developer trial and error since manifest 2.


Last Edit: Aug 13, 2013 14:03:16 GMT by JD

JD

JD Avatar



1,032


June 2008
Could it not just be the <br /> here?


{foreach $[post]}
<div class="container">
<br />
<div class="title-bar">
<h1>$[post.subject]</h1>
</div>
...



Last Edit: Feb 24, 2013 11:48:07 GMT by JD

JD

JD Avatar



1,032


June 2008
It can be done in a few lines of code if you put the onerror attribute on the avatar. Then it's just image.onerror = ""; image.src = "default image"; return true;

Seems like it's worth doing just to save you manually doing it to every user that posts without a working link.

JD

JD Avatar



1,032


June 2008
New years resolution should be to blow the dust off of this place and bring it back. I miss the old times :D

JD

JD Avatar



1,032


June 2008
Happy New Years guys!

I hope you're living it up in style ^^

JD

JD Avatar



1,032


June 2008
I got it. Finally.

class MySQL {
private $_host;
private $_username;
private $_password;
private $_database;
private $_conn;

public function __Construct($host, $username, $password){
// DO THE CONNECTING BUSINESS
}

public function load_database($set_database)
{
// LOAD DATABASE
}

public function Fetch_User($username)
{
return $mysqli->query("SELECT * FROM `registered_users` WHERE `user_name`='$username'", $this->conn);
}

}



Cut the long bits out just to give you a general idea how I went about it...

Thanks for the help though!

JD

JD Avatar



1,032


June 2008
Yeah - it doesn't error. The page itself returns

User Object
(
[_display:User:private] =>
)


And yeah, I just removed the username and password from here for security ;)

I'm honestly perplexed. Without more source code, this should still work -- it just... doesn't.



Last Edit: Jul 14, 2012 10:33:41 GMT by JD

JD

JD Avatar



1,032


June 2008
I've set it to private public when debugging and the issue remained.

I also used the above code to test it away from any other errors, but the issue remained. I'm trying a different method now.


Last Edit: Jul 13, 2012 15:18:34 GMT by JD

JD

JD Avatar



1,032


June 2008
Hey guys...

I'm a little confused as to why this isn't working. I've stripped it back to the bare minimum to make it simple to discuss here. So don't worry about SQL injection risks etc, and assume that all the connections and references are correct.

Other than that then, is this just an error with using queries inside functions inside classes or am I just being a total noob again?

class User
{

private $_display;

public function __construct($username)
{

$mysqli = new mysqli("localhost", "username", "password", "database");
$fetch_user = $mysqli->query("SELECT * FROM `registered_users` WHERE `user_name`='$username'");
$row = $fetch_user->fetch_assoc();

$this->_display = $row['user_display'];

}

}
$show1 = new User('username');


If I call $show1->_display, it returns nothing. Testing the query etc outside of the function returns A-OK.

I remember coming across something like this before, but can't remember what I found.

Thanks!



JD

JD Avatar



1,032


June 2008
I'm English... and watched. We played a good game - should have got Milner off sooner though >:(

JD

JD Avatar



1,032


June 2008
There is a sequel? Will Smith wants nothing to do with it apparently.

Also, Memzak, got me.

JD

JD Avatar



1,032


June 2008
Quacker Jack Avatar
I'm aware Chris. But I meant that I don't think a release is coming anytime too soon. After all, 3-4 years and they can show a preview of it. w00t. I bet it will be next year when it is actually released, tbh.


But credit to them if they're spending this time smoothing out bugs - it would be an extremely laborious task to rewrite ProBoards.. especially with the features v5 promises.

I'd rather have it late but polished, than early and buggy.