• Resolved hs1972

    (@hs1972)


    How would I edit the title to get rid of ‘-‘ and replace with space and cap the first letter of each word? Is that possible with this plugin? So if I had a-great-day it would be converted to A Great Day

    Thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your question, which is a variation on these earlier topics:

    Find and Replace Character in Title Name

    Couple of Questions

    You can adapt the “MLA File Name Mapping Hooks Example” plugin to edit the Title values in any way you want. Removing the dashes is already shown in the example, and you can use the ucwords() function provided by PHP to capitalize the first letter of each word.

    To access the example plugin, navigate to the Settings/Media library Assistant Documentation tab and click the “Example Plugins” button. Type “file” in the text box and click “Search Plugins” to filter the table.

    You are looking for the “MLA File Name Mapping Hooks Example” plugin. Find that plugin and hover over the title in the left-most column. Click the “View” rollover action to look at the source code and/or the “Download” action to get a copy you can edit to suit your needs. Consider changing the name of the plugin so you can distinguish your variation from the example MLA provides.

    After you modify the plugin, add it to a compressed (ZIP) archive and use the Plugins/Add New admin submenu to upload and activate your new plugin.

    Once you install and activate the plugin the Title cleanup will be applied any time the IPTC/EXIF mapping rules are run. You can apply run the rules for a single image, multiple images or all images:

    1. To map a single image, go to the Media/Assistant submenu and click the thumbnail of the image you want (or click the “Edit” rollover action) to get the Media/Edit Media screen. You can click the “Map IPTC/EXIF metadata” link to run your rules on this image, then look at the Title box to inspect the results.
    2. To map two or more images, go to the Media/Assistant submenu and click the checkbox next to the images you want. Then, select “Edit” from the “Bulk Actions” dropdown above the checkboxes and click “Apply” to open the Bulk Edit area. Click the “Map IPTC/EXIF metadata” button to run your rules on the selected images.
    3. To map all of your images, navigate to the Settings/Media Library Assistant IPTC/EXIF tab and click the “Map All Attachments, Standard Fields Now” button. This may take a while.

    If this is a one-time project, don’t forget to disable your plugin when you’re done.

    As noted, you will have to modify the code in the example plugin to get the results you want. If you do not feel comfortable doing that I can send you a complete custom plugin with the modifications required. Give me your contact information using the “Contact Us” page at our web site:

    Fair Trade Judaica/Contact Us

    I will leave this topic unresolved until I hear back from you. Thanks for your interest in the plugin.

    Thread Starter hs1972

    (@hs1972)

    Thank you for getting back to me.

    I’ve replaced the function within the example file, zipped and uploaded to my site (I’ve not done the upper case yet, just want to get the basic function to work). However, I’ve tested it on a single image and it deletes the title so it’s left blank.

    Is there anything else that I’m supposed to set up, e.g. in the settings?

    Thanks in advance.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update and for making the effort to adapt the example plugin.

    There is no other explicit setup required – the plugin should just do its thing. The best way for me to help you would be to have a look at your code. If you send me your contact information at the “Contact Us” link I can respond with an email address to which you can send your code. I look forward to working with you.

    Thread Starter hs1972

    (@hs1972)

    Thank you David, but I persevered. Although I can’t say what was wrong. In the end I wanted to apply it to the ALT as well so I just tweaked the original file and it works perfectly. Thank you for your patience!

    Plugin Author David Lingren

    (@dglingren)

    Thanks for the good news! I am marking this topic resolved, but please update it if there’s anything more I can do to help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Edit titles’ is closed to new replies.