Hi; I'm using metatags quick right now to add cck fields for a couple of metatags on various types of content; one such field is for the description tag, but I noticed that when I add a normal textfield, the maxlength can be set to 155 characters and will count down normally as expected; but when I try to add in a meta field as a text field, it doesn't allow me to set the maxlength restriction (it doesn't even appear on the field configuration form).
Not sure if this is something that you can integrate or if I have to ask the maintainer of metatags quick to adjust to allow for this module to work with it, but I would like allow members to add a short description to their blog entries, but limit them to only using 155 characters (with the nice countdown).
Thank you
Comment | File | Size | Author |
---|---|---|---|
#5 | metatags_quick_integration-1256968-5.patch | 666 bytes | valderama |
Comments
Comment #1
dawehnerThe development is currently done in maxlength 7.x-3.x.
There the feature of supporting different kind of widgets is supported already. This should work out of the box there.
It would be great if you could take some time to try it out and report back whether it's work for your with this module.
Comment #2
Fanaile CreditAttribution: Fanaile commentedHi Dereine :)
I must have totally spaced because I didn't even think to look through the releases to see if there was another dev version available... But I have successfully installed and updated to the 7.x-3.x-dev version.
I do see now when I add a meta description cck field from the metatags quick module (which is a textfield), it leads me to configure the settings for that field and there is a space where I can edit the countdown message... but there doesn't seem to be a place where I can input the maxlength in characters anywhere.
When I add a normal textfield, there is a setting where it lets me place in the maximum characters (usually defaults to 255) - that appears to be missing from the metatags textfield area...
So I started thinking that maybe that was actually caused by a difference between the metatags quick textfields and the regular textfields... And upon looking at the modules I noticed this:
metatags_quick.module
text.module
So, I can't truly test anything out until I can get metatags quick to have an actual setting for maxlength; but from the looks of what I've seen so far, I think that this module is working as intended.
I am going to backup my metatags quick module and try adding in the needed settings; if it works then I will let you know that you're golden on this side and send this over to them so that maybe they can implement it as either a patch or commit (I don't know how to create a patch or I would do that).
Thanks again!
Comment #3
Fanaile CreditAttribution: Fanaile commentedWe're really close :)
Okie - so it looks as though I was right in that metatags quick does not have a maxlength setting in their textfields; so by editing that module file to place in a maxlength I was able to go in and configure it correctly.
Now my only issue is that the countdown is not showing up when I go to add content. I'm going to give it a couple days so I can go back and look with fresh eyes or possibly get some input from others who can point at me and tell me where I went wrong, LOL. That'll also give you some time to see this before I move the issue over to the metatags queue :)
Thanks!
Comment #4
kjl CreditAttribution: kjl commentedThe reason why it doesn't work with the meta tags quick is because the types of widgets that maxlength looks for is hardcoded to:
$fields = array('text_textarea_with_summary', 'text_textarea');
While metagtags_quick defines its own widget as 'metatags_quick_textarea'
You can get around that with this:
Comment #5
valderama CreditAttribution: valderama commentedhere is a patch, which adds support for metatags_quick directly to maxlength.
please review.
thx and best,
walter
Comment #6
Michèle CreditAttribution: Michèle commentedThank you, vaderama! Your patch works like a charm.
Comment #7
cedeweyWe are putting a feature freeze on the Drupal 7 version of the module, so I'm marking this Closed (works as designed). Thank you to each of you for working on this issue. If you do want to maintain the Drupal 7 version, do reach out. We'd be happy to bring you on board as a maintainer.