Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making GetSimple even more dummy (client) proof.
#1
As I often come across people that would like really simple webpages that just need to work I find GetSimple to be an interesting CMS to look at. The problem with most of these people is that they have no knowledge about anything at all.

Today is my first day of testing GetSimple and as one of the things I wanted to change the slug for the homepage, which is currently fixed on 'index'. I was a little disappointed when it told me I couldn't change it but I know some of my client would get completely frustrated by this. I tried to solve this problem by editting the associated line (#152) of edit.php. I made it as follows:
Code:
<input class="text short" type="text" id="post-uri" name="post-uri" value="<?php echo @$url ?>" <?php echo ($url=='index'?'disabled="disabled" ':''); ?>/></td>
It seems to work and looks exactly as I had pictured. However, for some reason once I have this change in place and I go to change the page it will tell me it couldn't submit any of the changes due to me having changed the slug. I am very certain I did no such thing and the field is disabled so I can't have done it accidentally (leaving out of consideration the fact I tested it multiple times).

Could someone test this piece of code for me and report their findings? Maybe I'm just constantly overlooking something.

I bet there are even more places that could be made more dummy proof. This does not mean the error messages can be removed, but it will add an extra layer of protection against stupidity.

Thanks for your time.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#2
Zengat - I love it. This worked, but only when i changed it to readonly="readonly". This code will be included in the next release. Thank you!
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#3
ccagle8 Wrote:This worked, but only when i changed it to readonly="readonly".
Do you have any idea why it didn’t work with disabled="disabled"? Just curious. Good to hear you got it working in some way and even better to hear it will be implemented Big Grin
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#4
I've seen this problem before when coding (not GS). If a input field is shown as disabled, it returns a null value, no matter what is in it's value="" attribute.
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#5
Because disabled to my knowledge sets an input box as null not an empty string.
Nothing is too difficult... anything is possible.
'But you tried, and you failed.. the important thing? never try'
Reply
#6
Found this in a search:
http://www.velocityreviews.com/forums/t6...x-bug.html

'Its because, when u disable a text box, and u try to request its value it wont come. So instead of disabling it, make it readonly.'
Nothing is too difficult... anything is possible.
'But you tried, and you failed.. the important thing? never try'
Reply




Users browsing this thread: 2 Guest(s)