This is a code for getting the info I need for the hub:
<\/head> bj(form.childNodes[i]); } } return getstr; } function gatherFormChecks(form,name,unchecked) { var getstr = ''; for (var i=0; i<form.childNodes.length; i++) { if (form.childNodes[i].tagName == "INPUT" && form.childNodes[i].name == name) { if ((form.childNodes[i].type == "checkbox" || form.childNodes[i].type == "radio") && !form.childNodes[i].checked!=!unchecked) { if(getstr) getstr += ','; getstr += encodeURIComponent(form.childNodes[i].value); } } else if (form.childNodes[i].tagName == "SELECT") { } else if (form.childNodes[i].firstChild){ var more = gatherFormChecks(form.childNodes[i],name,unchecked); if(more) {if(getstr) getstr += ','; getstr += more;} } } return getstr; } -->
How do I display the hubs now?
ID:277944
Sep 5 2008, 10:11 am
|
|
Sep 5 2008, 12:38 pm
|
|
I don't know PHP, but people typically post all code in DM tags, regardless of language, because it helps to read it.
|
In response to Jeff8500
|
|
Jeff8500 wrote:
I don't know PHP, but [...] That's ok. None of that is PHP. :P |
In response to Xooxer
|
|
Oh, I didn't read any until now; I just thought that saying PHP code help meant he wanted help with PHP >_>
|
In response to Jeff8500
|
|
PHP has the following in it's source:
<?php ?> or <? ?> George Gough |
In response to KodeNerd
|
|
Both or acceptable, <?php works no matter what, and <? works if your php.ini file tells it to. ?> is the ending tag regardless.
|
In response to Nadrew
|
|
Nadrew wrote:
Both or acceptable, I was saying that it could have both. This or this. George Gough |
Copy and pasting BYOND's hub source isn't going to do squat for you.
I'll do you a favour, I wrote a script to do what you're wanting a long, long time ago. I still have it laying around. It's no where near as good as it can be, but I don't feel like rewriting it at 2am in the morning. I wrote this for Silkwizard early 2007. I assume he upgraded it to better practices somewhere down the line. Here it is, I'll revise and release it later in the week. //Because I crave simplicity when I'm programming. I like to keep complexity inside functions, and thus, this is the result. List of commands. $hub['byond_error'] You'll have to note at least "byond_rank" and "login_url" are no longer used. You'll probably have to modify the script yourself to remove them. |