I'we been struggling with some code in script I am trying to modify, so far changed lot of things but there's one thing I dont know.
I have almost no experience in php. Been doing some php long time ago, butforgot it all.
Its not that hard and its small change, but I just cant do it due to my lack of basic php knowledge.
Under that is author(I changed that to title)
line 147
</td></tr><tr><th class='prompt' align='right' valign='top'>$[Title] </th>
<td><input class='inputbox commentauthorbox' type='text' name='author' value='' size='32' />".
Usually, each time you open a page there is author name being restored:
<td><input class='inputbox commentauthorbox' type='text' name='author' value=' INPUT WAS HERE AND I REMOVED IT' size='32' />".
Now I want this input into another field.
There is checkup on line 105.
if (form.text && form.text.value == \"\") { window.alert( '$NoCommentMessage' ); form.text.focus(); return false; }
If there is no input inside that field, comment box, it will trigger another action:
SDV($NoCommentMessage, '$[Please enter a description]');
Instead of that I want input in that fields.
Understand ? I tried few things, I managed to change a lot. But I still lack of knowlede and I am unable to do more complex things like this. Still looks quite easy, but not without basic knowledge.
Or, optional, someone can just disable option where is a must to input something into description field.
Either that or input "No Description" on checkout.
if(form.text&&form.text.value==\"\") { form.text.value='NoDescription';//Added this line, commented out the other//window.alert( '$NoCommentMessage' ); //form.text.focus(); returnfalse;}
The code is really hard to read. Might be nice if you could space it out and tab it a little here and there.
Maybe EtherPad is causing code alligment: check if its a bit different here or still messy.
There is a lot of additional code inside the script that isnt needed at all. Some that I disabled.
And there are also some actions that are not needed.
Like, there is an action that disables posting links in description. Cant find it tho.
And title field is storing value in $author field. Can this be disabled ?
Starting to learn php, bit by bit. Googling things around...
I'we been struggling with some code in script I am trying to modify, so far changed lot of things but there's one thing I dont know. I have almost no experience in php. Been doing some php long time ago, butforgot it all.
Its not that hard and its small change, but I just cant do it due to my lack of basic php knowledge.
Anyone can help me with this ?
Might help If you say what you need help with...
Or just post the code.
Yeap.. We can't help you if we can't see it.
http://www.pmwiki.org/wiki/Cookbook/CommentBoxPlus
Took this script and changed few fields; contains garbage of things I changed and that are now not necesary; basically I stripped few actions.
You have 3 fields. Description, Title and Website, that was changed from 2 fields, Description and Author.
All three fields require you to input some value inside them. I want that optional for description(text) field.
Full modified code: http://typewith.me/jQqf5mjtJ6
You can also change it there.
line 145
<th class='prompt' align='right' valign='top'>$[Description] </th> <td><textarea class='inputtext commenttext' name='text' id='text' rows=6 cols=40></textarea>
Is where text(comment) box is being made.
Under that is author(I changed that to title)
line 147
</td></tr><tr><th class='prompt' align='right' valign='top'>$[Title] </th> <td><input class='inputbox commentauthorbox' type='text' name='author' value='' size='32' />".
Usually, each time you open a page there is author name being restored:
<td><input class='inputbox commentauthorbox' type='text' name='author' value=' INPUT WAS HERE AND I REMOVED IT' size='32' />".
Now I want this input into another field.
There is checkup on line 105.
if (form.text && form.text.value == \"\") { window.alert( '$NoCommentMessage' ); form.text.focus(); return false; }
If there is no input inside that field, comment box, it will trigger another action:
SDV($NoCommentMessage, '$[Please enter a description]');
Instead of that I want input in that fields.
Understand ? I tried few things, I managed to change a lot. But I still lack of knowlede and I am unable to do more complex things like this. Still looks quite easy, but not without basic knowledge.
Pic: http://img707.imageshack.us/img707/2986/picytd.png
Tnx.
Or, optional, someone can just disable option where is a must to input something into description field. Either that or input "No Description" on checkout.
The code is really hard to read. Might be nice if you could space it out and tab it a little here and there.
The code isnt mine... I'll attach the file here also. Its the one with you changes; that is working.
Link Removed: http://www.mediafire.com/?xitgksafn8qkvrq
Maybe EtherPad is causing code alligment: check if its a bit different here or still messy.
There is a lot of additional code inside the script that isnt needed at all. Some that I disabled.
And there are also some actions that are not needed.
Like, there is an action that disables posting links in description. Cant find it tho.
And title field is storing value in $author field. Can this be disabled ?
Starting to learn php, bit by bit. Googling things around...