11
ajaxbr
Re: How do i change the maximum signature length??
  • 2003/12/5 13:41

  • ajaxbr

  • Quite a regular

  • Posts: 276

  • Since: 2003/10/25


Quote:
Changing from tinytext to medium text gives the user a lot more space to add stuff which might not be a good idea. Shame there isn't an inbetweenie.

TINYTEXT == 257 bytes
TEXT == 65538 bytes (64KB)
MEDIUMTEXT == 16777219 bytes (16MB!)
LONGTEXT == 4294967300 bytes (4GB!!!)
So... hmmm... TEXT is way too big, MEDIUMTEXT makes no sense at all. Perhaps a nice way to avoid nasty things (like someone using their 64KB to store random data instead of a sig) would be retrieving the sig with a SUBSTRING query, so that the admin can have a granular control of the amount of data retrieved (also, limiting the post operation seems worthy). I'd say we're talking about a max of 500 - 2k bytes here, right?

12
xgarb
Re: How do i change the maximum signature length??
  • 2003/12/5 13:56

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


Yeah I forgot that MEDIUMTEXT is bigger than TEXT .

Limiting the amount the user can type would be great. I think the only way to stop the cursor to show max input has been reached in a text area is javascript. Don't know how you'd integrate this with the XOOPS textarea function thing. Plus users could turn js off.

I gave up on this on my site, choose TEXT and left it at that!


13
fishspon
Re: How do i change the maximum signature length??
  • 2004/1/15 22:14

  • fishspon

  • Not too shy to talk

  • Posts: 164

  • Since: 2003/11/23


i guess for the time-being, i'll have have to warn or ban users who abuse the maximum valid signature length!

14
Dave_L
Re: How do i change the maximum signature length??
  • 2004/1/16 0:33

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


I think this would work, but I haven't tested it. It silently truncates the signature (to at most 1000 characters) without issuing any error message.

edituser.php

Change:
$edituser->setVar('user_sig'$user_sig);


To:
$edituser->setVar('user_sig'substr($user_sig01000));



15
fishspon
Re: How do i change the maximum signature length??
  • 2004/1/18 15:14

  • fishspon

  • Not too shy to talk

  • Posts: 164

  • Since: 2003/11/23


thanks... unfortunately, i can't test it on my live site, and i don't have a test site...

If anyone tests this successfully, could you please reply to this thread??

thanks in advamce

16
Dave_L
Re: How do i change the maximum signature length??
  • 2004/1/18 16:03

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


I just did a quick test, and it worked correctly. For the test, I used a limit of 50 characters, rather than 1000.

Note that non-displayed characters such as newlines and BB-Code-tags count towards the limit.

17
fishspon
Re: How do i change the maximum signature length??
  • 2004/1/18 16:26

  • fishspon

  • Not too shy to talk

  • Posts: 164

  • Since: 2003/11/23


ok, thanks i have now applied the fix to my site.

This won't change what's already in the database though, will it?? Am i right in saying that it truncates it to 1000 characters when you submit the form?

18
Dave_L
Re: How do i change the maximum signature length??
  • 2004/1/18 16:27

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Correct. The truncation is performed only when a user edits his profile.

Also, it doesn't affect an admin's editing another user's profile, since that's done in modules/system/admin/users/users.php, rather than edituser.php.

19
fishspon
Re: How do i change the maximum signature length??
  • 2004/1/28 17:05

  • fishspon

  • Not too shy to talk

  • Posts: 164

  • Since: 2003/11/23


so does that mean a standard user can only have up to 1000 characters, but an admin can edit his sig to include more?

that's very useful actually

20
attock
Howto edit varchan() ?
  • 2006/11/10 19:21

  • attock

  • Not too shy to talk

  • Posts: 138

  • Since: 2006/8/20


I am sowwie I am unable to find how to change the value of a table\type using phpmyadmin. I am using debaser and by default it creates a table with varchan(100). I tried editing the file to make it varchan(225), followed by a module update. But it didnt work, also I dont see anywhere on phpMyadmin to change this value.

Login

Who's Online

227 user(s) are online (163 user(s) are browsing Support Forums)


Members: 0


Guests: 227


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits