Captionator changing title and url

TimChuma

Joined: 2011-04-24
Posts: 21
Posted: Tue, 2012-10-30 23:39

Operating system: Linux 2.6.32.21-grsec
Apache: Unknown
PHP: 5.2.17
MySQL: 5.1.65-cll
Server load: 0.3 0.51 0.48
Graphics toolkit: gd

Is there any way of updating Captionator so it does not change the URL at the same time as the title?

I am happy with the URLs not changing and it makes it easier to navigate/update photos.

I had a look at the code for the module, but am not sure where it updates the URL property.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2012-10-31 02:35

In the view file of the module see if removing:

      $('form input[name^=title]').change(function() {
        var title = $(this).val();
        slug = title.replace(/^\'/, "");
        var slug = title.replace(/[^A-Za-z0-9-_]+/g, "-");
        slug = slug.replace(/^-/, "");
        slug = slug.replace(/-$/, "");
        $(this).parent().parent().find("input[name^=internetaddress]").val(slug);
      });

does the trick.
Not tested.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
TimChuma

Joined: 2011-04-24
Posts: 21
Posted: Wed, 2012-11-07 10:46

Thanks, that worked.

I wanted to keep the original name of the file in the URL as I use it for managing photos and it makes it easier to direct people to a certain photo.