JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Oct 29, 2014 17:40
I'm just completely stuck at it right now.
Oct 29, 2014 17:39
@JanDvorak Ha! Yahoo Pipes is actually really awesome though.
Oct 29, 2014 17:37
Hey all, I have a question involving JSON/Yahoo Pipes—anyone mind helping out? I'm basically trying to grab data from Yahoo Pipes and display it on a web page.
 

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
May 27, 2011 20:51
thanks for your help @gms8994
May 27, 2011 20:51
Well time to go
May 27, 2011 20:42
haha :')
May 27, 2011 20:42
				} else if($playTime->totalplaytime > 9000) {
					echo "<p>WHAT NINE THOUSAND?!</p>";
					echo "<iframe width=\"960\" height=\"750\" src=\"http://www.youtube.com/embed/TBtpyeLxVkI?rel=0\" frameborder=\"0\" allowfullscreen></iframe>";
				}
May 27, 2011 20:22
it'll show you the bit it's asking for
May 27, 2011 20:22
if you click on the underlined text on the website, "Enter your Steam URL ID into the box below and hit enter"
May 27, 2011 20:21
it's a bit misleading on the xml doc.
May 27, 2011 20:21
Steam ID is your Steam persona
May 27, 2011 20:20
I might try and use the playfire API, they've probably got something like this.
May 27, 2011 20:20
hahah :) I may do at some point. does xbox have an API like that?
May 27, 2011 20:20
doesn't exist?
May 27, 2011 20:17
thank you
May 27, 2011 20:17
YESSS
May 27, 2011 20:15
Like that?
May 27, 2011 20:15
				echo "<h2>" . $gameObject->gamename . "</h2>";
				echo "<p>You've only played it for <em>" . $playTime->totalplaytime . "</em> hours afterall!</p>";
May 27, 2011 20:13
Did I do that right?
May 27, 2011 20:13
			} else {
				echo "<p class=\"letsplay\">Why don't you try playing...</p>";

				$randomGame = array_rand($gameArray);
				$gameObject = $gameArray[$randomGame];

				if($gameObject->gamename) {
					$playTime = $gameArray[$randomGame+1];
				} else {
					$playTime = $gameArray[$randomGame];
					$gameObject = $gameArray[$randomGame-1];
				}

				echo "<h2>" . $gameArray[$randomGame]->gamename . "</h2>";
				echo "<p>You've only played it for <em>" . $playTime . "</em> hours afterall!</p>";
May 27, 2011 20:13
Okay I got this:
May 27, 2011 20:11
Just implementing it
May 27, 2011 20:08
But I got it anyway :)
May 27, 2011 20:08
If you paste it in without the `'s, there should be a fixed font button next to the send button.
May 27, 2011 20:04
and could you help me fix it because I'm still a little confused how
May 27, 2011 20:04
How has it become a seperate portion though?
May 27, 2011 20:03
Sort of
May 27, 2011 19:56
May 27, 2011 19:56
There's a lot, one sec I'll put it in a pastebin
May 27, 2011 19:53
@gms8994 I tried a var_dump like you suggested and got this: object(stdClass)#98 (1) { ["totalplaytime"]=> string(3) "0.6" }
May 27, 2011 19:48
I prefer double quotes, it's just what I'm used to. I'm not really a PHP developer.
May 27, 2011 19:48
@Robik @gms8994 sorry about that, I went down for a drink and ended up going up the chip shop
May 27, 2011 18:48
For some reason it either displays the title or the time, never both.
May 27, 2011 18:47
May 27, 2011 18:46
@Robik I just asked for those two because they were helping me with this earlier and already know what it is
May 27, 2011 18:46
I'm working on this (grtoutdrs.com/steamgamepicker). I'm trying to get it to display the game AND the time but for some reason it doesn't want to display both.
May 27, 2011 18:45
Could anyone help me with something?
May 27, 2011 18:39
Are @JohnP or @Gordon around?
May 27, 2011 18:39
Hey all, I'm back with more problems ;)
May 27, 2011 16:36
Thanks for your help @Gordon and @JohnP
May 27, 2011 16:35
I'll keep it in mind :)
May 27, 2011 16:34
			$randomGame = array_rand($gameArray);
			echo $gameArray[$randomGame]->gamename;
			echo $gameArray[$randomGame]->appid;
May 27, 2011 16:33
To do that, would I simply do something like...
May 27, 2011 16:33
I want to include other information I'll be pulling from the xml file, for example the app ID
May 27, 2011 16:32
Sweet. You're right it works :)
May 27, 2011 16:31
:779833 so like this?
		<?php
			$randomGame = array_rand($gameArray);
			echo $gameArray[$randomGame]->gamename;
		?>
May 27, 2011 16:28
I'd rather not re-write it if it can be helped