Since I'm using Maxlength instead of ed_classified integrated counter is there a way to set text length to unlimited? Does -0 or empty or 0 do it?

Comments

fgm’s picture

Not at this point. This is one of the reasons why a future version will stop including this counter and depend on Maxlength instead.

System Lord’s picture

Thanks fgm

For anyone wanting to use Maxlength I think the best solution, unless you want to get into the code and remove this function, is to set your ed_classified max to at least double what you want it to be (because it counts HTML markup as characters...if you're using any wysiwyg editors.). This way it wont interfere with the Maxlength count. I believe you can then hide the display with CSS. I commented out the code that displays it in the module. If I knew how to do it I would post a patch. My approach is tedious, but it works :)

fgm’s picture

Status: Active » Fixed

In the meantime, I fixed it in today's version : just set the max length to 0 to disable the check.

  • fgm committed 113667f on 7.x-3.x
    Issue #2248565 by fgm: removed JS logging information.
    

  • fgm committed bb950f1 on 6.x-3.x
    Issue #2248565: support setting body max length to 0 to disable length...
System Lord’s picture

Thanks fgm.

Can the 113667f commit be provided in patch form as well? I've made a lot of custom changes to this module. I realize it should be my responsibility to put my own changes into patch form, however I still have not learned it. No big deal if you can't, but if the commit was minor or small then I could code the changes manually.

Thanks again!

fgm’s picture

I suppose you know you shouldn't be modifying contrib code ? ;-)

Anyway, here is the relevant patch. To create it you could just have done:

git format-patch HEAD~

Note there are other changes in current HEAD, including a bug fix which you will be missing.

  • fgm committed 5825d72 on 7.x-3.x
    Issue #2248565 by fgm: support unlimited length, not only in JS.
    
fgm’s picture

StatusFileSize
new3.04 KB

Previous patch only fixed length 0 in JS : supporting length 0 in PHP too.

System Lord’s picture

Thanks fgm!

I may have over stated my comment. But, since this module is a major feature in my site I want to make sure I'm following the license correctly. As you may remember I made clones of this module to be able to produce multiple content types. To do this I changed "ed_classifed" in all the clones (and their files) to "ed_(newtype)". Other than these changes I "commented" out code. Such as commenting out the character count display. My understanding of the license (which admittedly I may not read the same way) is that the intent is to prevent distributing modified code and re-branding. I'm not doing this nor do I intend to.

You have me nervous now! :) I spent a lot of time and money on a module to work with ed_classified and the clones: https://github.com/barraponto/classified_tweaks

My site is live. If I've done this incorrectly I need to know.

Mark

fgm’s picture

As long as you distribute your derivative module under the same GPL-2.0+ license as Drupal and credit the original, there is no problem legally (AIUI). The issue is with the extra work you will end up having to do when the module is updated. I just pushed several changes today and you will have to port them, which would not be necessary if you used the module unmodified (which may not be a solution to your multiple types issue, of course).

In such cases, the safest/simplest course of action is probably to keep your changes as patches over the current version of the module, so you can reapply them any time the upstream code changes.

BTW, if you have been doing an interesting public facing site with the module, it would be nice to have it listed in the module showcase #601428: Find live or demo site for a module showcase, to replace navigator61.ru which is getting old, and not many people can read russian.

System Lord’s picture

Thanks fgm...I feel better :)

Yes, that's what my custom "classified_tweaks" module is for as far as general customizing goes. I'll have to mark this gist as private so it wont distribute until i get the GPL added in.

I have four clones and the original (ed_classified). Anything you push I can easily apply to the original, but it wont work against my clones. Yes, it is a pain but seeing/using a "patch" is easier for me to apply to the clones versus renaming ed_classified four times.

My site works this way. I'd be honored if you walked through it and see how well your module works for me. www.kramslist.com

At "create account" you'll see account types: standard, business, dealer, and realtor. "Standard" uses ed_classified. The other three represent the clones. (four different content types).

Mark

fgm’s picture

Hmm, I don't see any ads in the existing categories : is it launched already ?

System Lord’s picture

It's been live for only a few days. You wont find anything quite yet. You would have to create an account and fake ads.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.