-
You don't need to use 'if' statement, you should use only my code line
I forgot to mention: you need to edit this file: includes/classes/rlListings.class.php > find public function create
replace:
PHP Code:
Only registered members can view the code.
with:
PHP Code:
Only registered members can view the code.
then in public function edit
replace:
PHP Code:
Only registered members can view the code.
with:
PHP Code:
Only registered members can view the code.
-
Thanks! Now it is working; however it does need a conditional, at least for my use case (and I think many)
I want to transform
ITEM SOMETHING to Item something
However I do not want to transform
Item Something to Item something
(I only want to override what someone enters in terms of Capitalization if they have their CAPS LOCK on, especially when applying to a text area where I don't want to lose all the capitalization, just override if the person has typed the whole paragraph in ALL CAPS)
-
In this case, it will require a customization to check every text word for ALLCAPS
-
Was just about to post after playing with this all night. I'm wondering about combining your instruction with the example if statement in post 3. Something like:
Code:
Only registered members can view the code.
-
It seems to work in practice but I'm not sure if the
Code:
Only registered members can view the code.
is safe/correct to use in that context.
In limited testing so far,
ALL CAPS changes to All caps
no caps stays no caps
Some Caps stays Some Caps
(I only have one language on my site so I didn't apply to the multilingual section)
P.S. thanks again for taking all the time tonight to look at this!
-
I think the above post 14 works for text and textarea if it's safe to use.
The above does seem to work to prevent 100% ALL CAPS in a field, but it won't do anything if it's 99% all caps.
Reading again what you posted, I see your point too now. The ideal would probably be a more complex customization that calculates the percentage of all caps in a field and forces lower case if it's over 90% all caps if it's over x-number of characters to allow a few cases where a field will be all caps like a three letter all caps model name, but prevent cases where someone is typing a whole sentence unnecessarily in ALL CAPS.
The above seems to at least have limited functionality for me though so I like that. I have a number of more important customizations that I'm going to have you do first, so I'll use this for now and then come back to it once I have everything rolling and request a customization with more functions probably!
Thanks again for all your time tonight and taking the time to look at this!