Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Edit_Case... New Plugin.

(Page 2 of 3)
> > > >
Quote Reply
Re: [marker] Edit_Case... New Plugin. In reply to
Not sure if webmaster33 fixed this up; but you shouldn't need a space in your settings. i.e;

Title:ALL, Description:FIRST

..should really be;

Title:ALL,Description:FIRST

i.e no space between ALL , and Description.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Edit_Case... New Plugin. In reply to
Andy,

Yes, I fixed this, so now it's allowed to have space between command items. In v1.8 there will be more freedom, allowing to have commands in different lines. V1.8 will be released today, likely.

So
Title:ALL, Description:FIRST
format, having space between items, is allowed.

Thanks for being so vigilant.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Sep 13, 2004, 4:14 AM
Quote Reply
Re: [marker] Edit_Case... New Plugin. In reply to
In Reply To:
The Description seems to be fine, but the on the tests I did, the Title was returned preceeded by a single space each time.
Thanks for reporting this bug!

Well, this may come from the core of the plugin, from the case changing part, which was not touched in the rewrite. But since this part is also needed to rewrite completely for v2.0, it will be fixed for sure in v2.0.
I may fix it in v1.8, but that would defer its release a bit.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [Jarrod] Edit_Case plugin v1.8 beta3 release In reply to
I just finished Edit_Case plugin v1.8 beta3 Cool

Features of Edit_Case plugin v1.8 beta3:
  • Plugin can change the case of specific field texts. You can specify which fields to check, to uppercase ALL or just First case of whole paragraph.
  • Specific field texts can be changed even conditionally, for example you can lowercase a Description if there are more than 80% UPPERCASE letters.
  • Flexible, through simple admin config interface.
  • Seamless integration with LinksSQL
  • Debugging available (2 level)
  • Add page & Modify page now both are supported

Changes in Edit_Case plugin v1.8 beta3:
  • Improvement: code reworked to make it more modular
  • Improvement: option FieldsToChangeCase in admin config now has Textarea to fill the rules, making more user editing space
  • Improvement: option FieldsToChangeCase Textarea in admin config now can understand commands separated into multiple lines (comma still required)
  • Improvement: introduced debug level 2 to display actual command list
  • Improvement (beta2): added support for Modify page, too
  • BUGFIX (beta3): "The Description seems to be fine, but the on the tests I did, the Title was returned preceeded by a single space each time." FIXED.

Commands listed in the FieldsToChangeCase option can be used like this:
Normal usage:
Title:ALL, Description:FIRST, Accomodation_Name:ALL, Resort:FIRST,Country
Conditional usage:
Title:ALL:IFUPPERCASE:70%, Description:FIRST:IFUPPERCASE:70%, etc...

1. part: Field can be like:
Title, Description, Accomodation_Name, Resort, Country, etc...
2. part: you can use :ALL or :FIRST to decide how the value is formatted.
3. part: (optional) - you can use :IFUPPERCASE to create conditional action
4. part: (optional, but required if 3. part is used) - this is a number (70) or percent number (70%)

Known bug: - BUG: (well, not really a bug, it works like this since v1.0) FIRST command
makes UCfirst the first char of the string, not by sentence. Sentence 2nd
and above thus start with lowercase.


Enjoy this fine release.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Edit_Case plugin v1.8 beta3 release In reply to
Works great Sly

And the bug is certainly fixed... great job.

If you are planning on adding some extra features... can I suggest one Wink

I have the plugin set to normal use ie.... Title:ALL,Description:FIRST

But there are a handful of words/acronyms that are regularly used in submissions that I would like to be able to have specific case settings for.

How hard would it be to have an editable list of words that can have there own settings... for example something like:

Title:ALL,
Description:FIRST,
IBM:SPECIFIC,
BMW:SPECIFIC,
PHP:SPECIFIC,
SQL:SPECIFIC,
MySQL:SPECIFIC,
etc.

Maybe in a seperate list of specific requests... anyway... just a thought Wink

Thanks again for your great work

Cheers
Mark
Quote Reply
Re: [marker] Edit_Case plugin v1.8 beta3 release In reply to
Glad that works fine & that you like it!
I hope others will also like it.

Well, the idea is not bad to have word exclusions, which should have specific case.
It could be solved by adding a list of word which should be ALL UPPERCASED.
But I can't estimate when will I have free time to work on it.

Unfortunately I have to go back to work on other projects, and can not afford more freeware work now.
If somebody needs customization or urgent new features, I can do it as paid work.


Sometime later I may continue to work on v2.0 release.
Until that time, Suggestions are welcome for the v2.0 release.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Edit_Case plugin v1.8 beta3 release In reply to
Konrad,

It seems that there may be an issue with this plugin Unsure
As I reported yesterday the plugin does its job well and titles and descriptions of submitted links were all being formatted (case wise) correctly.
However when I tried to validate the links that were submitted over the last day I found that for each link that was being accepted I recieved the error meassage:

Unable to validate link: 50295. Reason: Column Title cannot be left blank.

As soon as I uninstall the plugin I can validate all the links without an issue.

It seems as if the plugin is also being called on validation

Any ideas

Cheers
Mark
Quote Reply
Re: [marker] Edit_Case plugin v1.8 beta3 release In reply to
Checking the problem soon.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Edit_Case plugin v1.8 beta3 release In reply to
Thanks Smile
Quote Reply
Edit_Case plugin v1.8 beta4 release In reply to
In Reply To:
marker: However when I tried to validate the links that were submitted over the last day I found that for each link that was being accepted I recieved the error meassage:
Unable to validate link: 50295. Reason: Column Title cannot be left blank.
It seems as if the plugin is also being called on validation
Thanks for reporting the bug. Bug fixed now.
It was a feature I carried toward from v1.2. It was based on input from the forms parameters, while the admin validation feature gets the parameters from the admin validation form in a different way. Therefore at the validation point it didn't find the form values, resulting error.

I fixed it, so hopefully now will work fine.

Edit_Case plugin v1.8 beta4 release attached.
Please test it, and let me know if you still find any bugs.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Edit_Case plugin v1.8 beta4 release In reply to
Hi Konrad,

Unfortunately it doesnt appear to have fixed the bug.
When validating I still get the following error for approved sites:

Unable to validate link: 49453. Reason: Column Title cannot be left blank. Column Description cannot be left blank.

And as before if I uninstall the plugin validation works fine.

I have tested it on 2 different installations... 1 running 2.1.2 and the other running 2.2.0, and both show the same error.

Cheers
Mark
Quote Reply
Re: [marker] Edit_Case plugin v1.8 beta4 release In reply to
Well I just checked the plugin. It works correctly.
I tested the plugin in the debug way, and tested by actually validating unvalidated links. The errors like "Column Title cannot be left blank" went away & validated the links correctly.

Are you sure your version is v1.8 beta4 ?
The v1.8 beta3 still had the bug. You should download the v1.8 beta4.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Edit_Case plugin v1.8 beta4 release In reply to
Hi Konrad,

I apologize mate... I guess I didnt test it well enough Blush

I restarted my mod_perl server and all seems to be fine... I can only assume the previous version was still loaded after I updated to v1.8 beta4.

All seems to be working well... great job Smile

Cheers
Mark
Quote Reply
Re: [marker] Edit_Case plugin v1.8 beta4 release In reply to
Ah, so mod_perl was causing to use the old version Smile
That's the second time when mod_perl caused false bug reporting, because it needs restarted.
I should remember next time to ask bug reporters if they use mod_perl or not.

Anyway, I'm glad it works. Cool

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Edit_Case plugin v1.8 beta4 release In reply to
In Reply To:
In Reply To:
marker: However when I tried to validate the links that were submitted over the last day I found that for each link that was being accepted I recieved the error meassage:
Unable to validate link: 50295. Reason: Column Title cannot be left blank.
It seems as if the plugin is also being called on validation
Thanks for reporting the bug. Bug fixed now.
It was a feature I carried toward from v1.2. It was based on input from the forms parameters, while the admin validation feature gets the parameters from the admin validation form in a different way. Therefore at the validation point it didn't find the form values, resulting error.

I fixed it, so hopefully now will work fine.

Edit_Case plugin v1.8 beta4 release attached.
Please test it, and let me know if you still find any bugs.


Everything is well, nevertheless I can do so that pluggin does not work from admin panel?

There are phrases or words that necessarily must be in Capital Letters, for example: personal name, name of county, etc

Regards,

Jose Balza
Quote Reply
Re: [venezuelasite] Edit_Case plugin v1.8 beta4 release In reply to
What do you want to do with this plugin on admin panel?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Edit_Case plugin v1.8 beta4 release In reply to
Hello,

I use your script and I have two question.

1. How to obtain all the characters into tiny ?

For example :
NAME@DOMAIN.COM
will give
name@domain.com

With ALL the first letter is in capital letter.

2. You think that it can be used to transform the character ( / ) with ( - ) ?

Thank you for your answer.

Mick
Quote Reply
Re: [mick31] Edit_Case plugin v1.8 beta4 release In reply to
 
Quote:
1. How to obtain all the characters into tiny ?

For example :
NAME@DOMAIN.COM
will give
name@domain.com

With ALL the first letter is in capital letter.

Strange, but this very easy feature is not supported yet in the plugin.
However you can easily do this using a global.

Code:
sub {
return lc(shift);
}

<%lowercase(Email)%>


Quote:
2. You think that it can be used to transform the character ( / ) with ( - ) ?

You can easily do this using a global.
Code:
sub {
my $input = shift;
my $from = shift;
my $to = shift;
return $input =~ s|$from|$to|;
}

<%replace(Description, 'from', 'to')%>
<%replace(Description, '/', '-')%>


Let me know how the globals work. Not tested.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Edit_Case plugin v1.8 beta4 release In reply to
Hi,

Thank you for your answer.

But, that does not correspond to my need.

I would wish that script carry out conversion.
Thus, conversion would be made before the recording in the data base.
It is the advantage offered by script.

But, perhaps I did not understand the use of your global ?
It would be possible to use them in include_form.html ?

Thank you for your assistance.
Mick
Quote Reply
Edit_Case plugin v1.9.0 release In reply to
Just finished Edit_Case plugin v1.9.0 Cool


Features of Edit_Case plugin v1.9.0:
  • Plugin can change the case of specific input field texts. You can specify which fields to check, to uppercase ALL or just First case of whole paragraph, or lowercase all the field text.
  • Specific field texts can be changed even conditionally, for example you can lowercase a Description if there are more than 80% UPPERCASE letters.
  • Flexible, through simple admin config interface.
  • Seamless integration with LinksSQL
  • Debugging available (2 level)
  • Add page & Modify page now both are supported


Changes in Edit_Case plugin v1.9.0 (2006-01-30):
  • Improvement: added LOWERCASE command to be able to lowercase all input field text
    It should be able to work together with IFUPPERCASE conditional command.
  • Improvement: commands now can be also lowercase, too.


Commands listed in the FieldsToChangeCase option can be used like this:
  • Normal usage:
    Title:ALL, Description:FIRST, Accomodation_Name:ALL, Resort:FIRST,Country
  • Conditional usage:
    Title:ALL:IFUPPERCASE:70%, Description:FIRST:IFUPPERCASE:70%, etc...

    1. part: Field can be like:
    Title, Description, Accomodation_Name, Resort, Country, etc...
    2. part: you can use :ALL or :FIRST or :LOWERCASE to decide how the value is formatted.
    3. part: (optional) - you can use :IFUPPERCASE to create conditional action
    4. part: (optional, but required if 3. part is used) - this is a number (70) or percent number (70%)


    Known bug: - BUG: (well, not really a bug, it works like this since v1.0) FIRST command
    makes UCfirst the first char of the string, not by sentence. Sentence 2nd
    and above thus start with lowercase.


    Enjoy this fine release.

    Best regards,
    Webmaster33


    Paid Support
    from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
    Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
  • Last edited by:

    webmaster33: Jan 30, 2006, 6:48 AM
    Quote Reply
    Re: [webmaster33] Edit_Case plugin v1.8 beta4 release In reply to
    Hello Webmaster33,

    The update works correctly, thank you.

    But, I worked a long time with your global and impossible to obtain a result.
    There is no error message.
    It does not display description.

    You have an idea ?

    Thank you for your assistance.

    Mick
    Quote Reply
    Re: [mick31] Edit_Case plugin v1.8 beta4 release In reply to
    Which global?

    Best regards,
    Webmaster33


    Paid Support
    from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
    Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
    Quote Reply
    Re: [mick31] Edit_Case plugin v1.8 beta4 release In reply to
    Oh, there is a bug in it:
    Code:
    sub {
    my $input = shift;
    my $from = shift;
    my $to = shift;
    $input =~ s|$from|$to|;
    return $input;
    }
    This should now work. Not tested tough.

    Best regards,
    Webmaster33


    Paid Support
    from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
    Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

    Last edited by:

    webmaster33: Feb 1, 2006, 5:08 PM
    Post deleted by mick31 In reply to
    Quote Reply
    Re: [webmaster33] Edit_Case plugin v1.8 beta4 release In reply to
    That does not give anything.

    It gives : DescriptionDescription.

    An idea ?
    > > > >