I've seen the post before, and I have the code that Lummox Jr (page output that generates a .dms file to a live game, written in php) put up. The problem I have, is I'm trying to figure out to get it to intergrate w/ php and am having some problems with that (ok..alot, i'm trying to figure out where to start amongst other things)
[was unsure of where this post belonged]
ID:153725
![]() Mar 28 2003, 9:47 am
|
|
Warning: file("http://www.byond.com/hub/ hub.cgi?qd=hub;hub=MyName.MyGame;format=text;content=|worlds |users|") - Success in /home/r/rokugononline/public_html/phpBB2/games_live.php on line 7
Warning: Variable passed to each() is not an array or object in /home/r/rokugononline/public_html/phpBB2/games_live.php on line 10 I also trying to figure out how to intergrate it into the template my site is using (well..just template usage period) I hadn't changed the hub settings yet because I was trying to see if it would just work...guess I'll change those and see if the output page will work [edit] I was trying to make a mod with this (for phpBB) , but i really dunno where to start..and than release the mod to the public(free of course) and it would prolly encourage game devs to create websites for their games(by that i mean, people could just bookmark their home page and look for the "game live" link instad of scanning the HUB for games)i'm always looking for more info on games aside from hub entries[/edit] [edit]I changed hub entry and that part works fine now, I just need to figure out template integration and a quick link[/edit] |
Cryptic wrote:
Warning: file("http://www.byond.com/hub/ hub.cgi?qd=hub;hub=MyName.MyGame;format=text;content=|worlds |users|") - Success in /home/r/rokugononline/public_html/phpBB2/games_live.php on line 7 You haven't filled in your hub entry yet; one of the vars in the script has the entry, which right now is set to "MyName.MyGame". You need to replace that with your game. I think it's possible that the result you're getting isn't valid because the hub doesn't recognize it. It's also possible that your distro of PHP isn't set to automatically read from files given as URLs. You'd have to use some kind of workaround for that, though I don't have any offhand. You can find more information at php.net. I also trying to figure out how to intergrate it into the template my site is using (well..just template usage period) You should be able to just stick the PHP section into the .php file for your site. I don't know what you mean by a template, unless you're saying that you're using a so-called WYSIWYG editor to make it. If you are, don't! Those things are unreliable and spit out crappy HTML. Lummox JR |
with what i have, it works, I fixed the problem and defined my game..what I mean by template, is phpBB uses "template" files, basic a set array of how the page is viewed (goto my website http://rokugon.cjb.net the main page is actually a combination of 3 templates...overall_header.tpl, portal_body.tpl and overall_footer.tpl) The template is more or less to add some visual flare to the site (much like what you see in the BYOND hub) my only problem is is that I am not fluent enough in php to figure out exactly how I could do this.
One problem I encountered (i tested out the whole thing after i got it to work) when there are no games available, the page just outputs a blank white page. and than it didn't execute the program, but thats prolly because of my own doing, so I can fix that (obj didn't exist, so i prolly just put in a wrong address, i can fix that though :P ) I'm not using the WYSIWYG portion of my editor to mess with the code (i'm using Dreamweaver MX) ...I just lost my train of thought (blast it!) I'm sorry about that, so if the post seems incomplete thats why. ~Cryptic to get an example of templates and phpBB it self, check out http://www.phpbb.com |
Ok, Ive cut it down to this....
How would I change this portion if(count($worlds)) { //assign template each portion of the 'blah' => $blah['bleh'] is insterted into the template file, defined as such: <tr> |
Okay, I've checked this out, and I think the answer is to use assign_block_vars().
if(count($worlds)) { <DIV><TABLE> Lummox JR |
:D thanx Lummox, I'll take it from there ^_^, when I'm done i'll release a mod to the community..so as anyone can have "game status" page :)
|
I took a look last night and it looked like you had it working; I didn't click the link because I was in another game, but the world.php script is simple enough so I doubt you had trouble with that one. Is everything working out for you?
Lummox JR |
What are the problems you're having, specifically? The PHP section should plug in nicely; I'm not sure if there are compatability issues with older versions but I don't think that's likely. If you could specify any errors you get, it'd help.
This'll do.
Lummox JR