Forum Moderators: coopster
The original submit and reset buttons are supposed look like "::Submit" and "::Reset" and the code for them looked like value="<?=_SHOUT?> so I just removed the underscore and it took away the :: and that shrunk them a little bit, but they're still too big.
Here's what the code for them looks like now...
<input type="submit" name="Submit" value="<?=shout?>" class="button" onSubmit="submitonce(this)"> <input type="reset" name="Submit2" value="<?=reset?>" class="button"> In the tagboard where you put in your nickname, the box says "Your Nick/Name" until you type your nickname in there, I want to edit what it says but I can't find anywhere to change it and I've looked on all of the pages I believe.
Here's what it looks like...
<input type="text" name="nick" size="18" maxlength="30" <?=$onfocusnick?>value="<?=$nick?>" class="editbox" title="<?=_FORM_NAME?>"> can you tell just by looking at that where it's pulling that text from so it can be edited?
so I just removed the underscore and it took away the ::
Not knowing what package you're using, I can only guess, but I'm pretty sure what's happening is this.
1. variables with names that begin with underscores (like $_SHOUT) are basic variable that the package uses. There is probably somewhere (admin interface, settings file) where you can set the value.
2. When you change $_SHOUT to $shout, all you are doing is changing from a defined variable to an undefined variable. PHP usually plays nice and tries to give some value to undefined variable, like a zero-length string or a 0. So what you are getting is the same as if you just left out the
<?=$shout?>
altogether. That is, the same as typing in
value=""
in just plain HTML, which is better than having undefined variables in your script. As it is, it's just defaulting to the value of a submit button with no value specified.
Tom
the _SHOUT and _FORM_NAME constants are defined in the language packs like
shoutbox_langpack_english.php
Grasshopper, when you learn to use grep, you can go.
The problem with the way you are doing it is that you are throwing in random variables that are, luckily, undefined, but which could crash you application. For example, perhaps $shout is only defined under some conditions. Your shoutobx will start crashing under those conditions becuase it's not expecting that value in the form field.
If you are going to replace it with a variable, make sure it has no chance of being a variable defined elsewhere like
$ergophobe_param = "";
Tom
Thanks for the help. I probably would have never figured it out.
Oh, don't use v2.32 as there are security flaws in it. Line 49 of shoutbox.php is commented out and allows for directory traversal which is not good. You do a search for it or go to the forum on their site and read all about it. I think there are some other changes as well.