Change title

Koberz

Joined: 2010-06-08
Posts: 6
Posted: Tue, 2010-06-08 15:40

How can I change the url filename part from having "+" symbols that replace spaces to use "-" instead? Example "Video+three+-+Scene+From+Movie.jpg" to "Video-three---Scene-From-Movie.jpg". With a possibility to filter the "---" part to just one "-"?

How about total removal of the ".jpg" part, is that possible?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2010-06-08 20:43

I thought it uses underscores.
Anyway....
gallery2/modules/core/classes/GalleryPlatform.class search for legalizePathComponent function and make your changes

you might want to enable the rewrite plugin.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Koberz

Joined: 2010-06-08
Posts: 6
Posted: Sat, 2010-10-02 06:20

Thanks that worked

 
Koberz

Joined: 2010-06-08
Posts: 6
Posted: Sat, 2010-10-02 06:55

Another question, I'm also getting videos from a remote server and what I want to do is strip the start of the filename before it is added to my gallery. I thought I might be able to use something like this somewhere -

$arrayname = explode('-', $newFilename, 2);
$newFilename = $arrayname[1];

...which is supposed to strip everything from the start of the filename up to the first "-". So blahblah-video1.avi would be changed to video1.avi

Am I on the right path using that? Where do I put it if so?

 
Koberz

Joined: 2010-06-08
Posts: 6
Posted: Sat, 2010-10-02 08:50

solved, found where to put it in GalleryItemHelper_medium.class. Cheers