Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Public Forum / Main Forum / [RESOLVED] Max Length: 500 text area is character?

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

× OLD Forum post could be checked here : forum.joomprod.com

[RESOLVED] Max Length: 500 text area is character?

More
11 years 5 months ago #11606 by hungvivunet
Replied by hungvivunet on topic Max Length: 500 text area is character or other?
I see, when I copy text more than 500 character (ex: 800 character) in box textarea, not type button 'enter' or button 'space' -> my ads show all text 800 character
-> not as in title headline: if I setup max length 50 character -> extra characters will delete auto when save ads.

But when I copy text 800 character in box textarea, and I type button 'enter' or 'space' at the end of paragraph, -> 300 character at the end of text will be delete
The following user(s) said Thank You: adarr
More
11 years 5 months ago #11621 by loic
Hello,

I will make some test, I come back to you.

Best regards.
The following user(s) said Thank You: adarr
More
11 years 5 months ago #11704 by loic
Hello,

Something is missing in the code of the textarea.

The characters are checked each time you press a key of your keyboard in the textarea, there where not checked whan you do a copy-paste.

I will add some code to correct this.

Best regards.
The following user(s) said Thank You: adarr, hungvivunet
More
11 years 5 months ago #11706 by hungvivunet
Replied by hungvivunet on topic Max Length: 500 text area is character or other?
Tks,
If you have code, could you attach file code on forum for me.
The following user(s) said Thank You: adarr
More
11 years 5 months ago #11713 by loic
Hello,

In the file 'components/com_adsmanager/helper/field.php' find the lines 498 to 501:
if ($field->required == 1)
					$return .= "<textarea class='adsmanager_required form-control' required  id='$name' name='$name' cols='".$field->cols."' rows='".$field->rows."' wrap='VIRTUAL' placeholder=\"$placeholder\" onkeypress='CaracMax(this, $field->maxlength) ;' $read_only>".htmlspecialchars($value)."</textarea>\n"; 
				else
					$return .= "<textarea class='adsmanager form-control' id='$name'  name='$name' cols='".$field->cols."' rows='".$field->rows."' wrap='VIRTUAL' placeholder=\"$placeholder\" onkeypress='CaracMax(this, $field->maxlength) ;' $read_only>".htmlspecialchars($value)."</textarea>\n";

And replace them by this ones:
if ($field->required == 1)
					$return .= "<textarea class='adsmanager_required form-control' required  id='$name' name='$name' cols='".$field->cols."' rows='".$field->rows."' wrap='VIRTUAL' placeholder=\"$placeholder\" onkeypress='CaracMax(this, $field->maxlength) ;' onBlur='CaracMax(this, $field->maxlength) ;' $read_only>".htmlspecialchars($value)."</textarea>\n"; 
				else
					$return .= "<textarea class='adsmanager form-control' id='$name'  name='$name' cols='".$field->cols."' rows='".$field->rows."' wrap='VIRTUAL' placeholder=\"$placeholder\" onkeypress='CaracMax(this, $field->maxlength) ;' onBlur='CaracMax(this, $field->maxlength) ;' $read_only>".htmlspecialchars($value)."</textarea>\n";

Best regards.
The following user(s) said Thank You: adarr, hungvivunet
More
11 years 5 months ago #11720 by hungvivunet
Replied by hungvivunet on topic Max Length: 500 text area is character or other?
Thanks a lot,
It ok with field textarea, but not ok with field type 'editor'

I set max length to type 'editor' = 3000 characters, I try copy text to box editor, but not as textarea -> help me pls.
The following user(s) said Thank You: adarr
Moderators: perry
Time to create page: 0.075 seconds
Powered by Kunena Forum