adding an album code modification question

Shemo725

Joined: 2008-04-18
Posts: 424
Posted: Wed, 2011-03-16 06:40

what code would need to be edited so when I add a new album to my gallery the directory name and internet address are automatically lower case rather than currently being upper case. I know it's silly, but I like having my gallery structure uniform.

for example:

if I create an album called Test Photos, I want it to create the directory name and internet address as test-photos as opposed to Test-Photos.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2011-03-16 15:53

I believe you'd need to edit /modules/gallery/controllers/albums.php I think...

name = "directory name"
slug = "internet address"

/modules/gallery/helpers/album.php appears to help do some of the form validation, but I think controllers/albums.php is where you can take the input of "Test-Photos" and change the string to lower case.

____________________________________________
Like Gallery? Like the support? Donate now!

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Wed, 2011-03-16 17:34

I'm going to (eventually) do the same thing. Let me know if you get it working.
http://gallery.menalto.com/node/99325

 
Shemo725

Joined: 2008-04-18
Posts: 424
Posted: Wed, 2011-03-16 18:05
nivekiam wrote:
I believe you'd need to edit /modules/gallery/controllers/albums.php I think...

name = "directory name"
slug = "internet address"

/modules/gallery/helpers/album.php appears to help do some of the form validation, but I think controllers/albums.php is where you can take the input of "Test-Photos" and change the string to lower case.

____________________________________________
Like Gallery? Like the support? Donate now!

I see the code you're referring to, but I have 0 clue as to what to change in the code to make it lower case. I'm php dumb!

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2011-03-16 18:22

Perhaps tempg can provide more guidance, especially if he creates a module for it, but it's not a change I'm all the interested in making so I'm not all the interested in spending a lot of time using my method of "coding by trial and error" as it's time consuming.

http://www.google.com/search?q=php+lowercase

If you know any programming at all in any language that should help get you started. I'd start throwing that php function at a few variables to see what happens. Always keep a backup of the unmodified, original file :)
____________________________________________
Like Gallery? Like the support? Donate now!