(Mass Renaming) - Different navigation, NO filename in url, NO image-title

Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Mon, 2012-04-30 15:22

Hello there,

three questions, one background.

Is there a way to prevent including the filename in the url like
http://gallery/albumxyz/2012-04-15_XYZ
? In my case it would be sufficient, when the picture-id is placed.

AND

in the top-navigation (the "breadcrumbs"?) like
Gallery -> albumxyz -> 2012-04-15_XYZ
I would also like to replace the filename with the picture id.

AND

in my gallery I would like to replace the title in the html-title
with the tags I've set to this picture.

Info: My community-gallery is for a musicband with just three guys,
and their fans have the possibility to store their pictures
into it. So actually there is no need for a "title". The guys
are marked via the tags.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2012-04-30 23:01

Edit the photo and change the title, file-name and internet address to the ID# you desire.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Tue, 2012-05-01 06:12

That's not that easy ;-) It's a free community with a few hundred users and 2000+ pictures, I'm just importing from the 'old' 4images-cms. Every user has the possibility to upload photos and videos from concerts of this music band, and the band has a big tour startin in the mid of may til august. Sooo... that's not practical, I guess... Now for the thousands of pics (to edit each of them manually) and when the new tour ist starting.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Tue, 2012-05-01 14:13

I recall a module or script or something that did a batch renaming. Let me see if I can find something on it.

EDIT:

Hmmm, nothing that I see that will allow changing to the item # via a batch process. I'm sure a module could be written, but these are incredible unique circumstances, and I just don't have the time to invest.

 
Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Tue, 2012-05-01 14:40

Thx for your looking at a solution!

But I think, there is generelly a big drawback of a batch-process. It seems I have to start the batching manually, or? And this doesn't make sense in my free concert-gallery. Imagine a normal user: He's coming back from a concert, he is uploading the files and he wants to share his pictures immediately with his friends. The url is unique, and If I would to change it later manually, the "old" url is lost... and I have also the facebook-comments integrated, which is also pointed to the fix url.

So I need something, that changes automatically the pictures' title, file-name and internet address after the user has uploaded the files.

Sorry, for my ugly English, but I hope, you get it? :-)

Best regards from Berlin
Sebastian

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2012-05-01 14:48

I'm sure we understand what you are after, but it is such a small use-case and most people want it the other way around. I'm like jnash, don't have the time to invest. Perhaps another community member will find your requirements similar to theirs and will develop a module for themselves and share.
perhaps the captionator module will help?
http://codex.gallery2.org/Gallery3:Modules:captionator http://codex.gallery2.org/Gallery3:Modules:batchtag

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Tue, 2012-05-01 14:53

Rockbar, I'm also not quite sure I understand fully. If the album name is unique to the band member, then I don't see what the issue is, nor why renaming the item will help?

Perhaps there is a translation error we're not getting. versuchen in Deutsch?

 
Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Tue, 2012-05-01 15:00

@floridave, I'm looking in to these modules. Thank you!

@jnsash I just want to prevent the filename in the html-title like "IMG0515" (especially for SEO). Only the tag(s) shell appear there. That's the most important point, I think. The rest I could handle with the captionator.

 
Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Tue, 2012-05-01 15:05

Hmmm... the Captionator-module in a batch-version would be nice :-D Anyway, if you could find an easy solution to use the tags instead of the img-title in the html-title... I think, that will help me a lot. I think it's the page.html.php of the clean_canvas-theme, or?

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Tue, 2012-05-01 15:34

I see, but the tags could be multiple, how would you suggest to handle this? Unless you have just one tag per item. Again, this is rather specific. Also, from your OP, you mentioned you wanted the items named with the itemid, is this not the case?

So from what I gather:

You want:

Item Filename to equal ITEMID
Item Title to equal TAG for item (see above on multiple tags)

Is this correct?

 
Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Tue, 2012-05-01 15:54

@jnash Yes, that's what I want. There are 0 to max 3 tags on each item (so the multiple is not too heavy)... there are three musicians, but sometimes it's a picture of the audience or something like this.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Tue, 2012-05-01 15:49

So, how would you propose we handle the 'up to three tags' on an item for the title?

"Tag1 Tag2 Tag3" = new title?

??

 
Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Tue, 2012-05-01 15:53

seperated by a "|" like

tag1 | tag 2 | tag3

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Tue, 2012-05-01 15:56

gotcha.

I'll take a look at the captionator module and see if anything can be easily implemented. Don't get your hopes up though!

 
Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Tue, 2012-05-01 16:00

Awesome! :-)

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Tue, 2012-05-01 19:18

Rockbar, I may be able to whip this up from my prelimanary look... I'll let you know if I do come up with something you can test.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Tue, 2012-05-01 19:33

I'm envisioning something like this:

A form:

Rename all item's filename in album:
 ( ) to the item's ID
     ie: 12345.jpg
 ( ) to an incremented name with prefix of: [ prefix ]
     ie: prefix1, prefix2, prefix3
 ( ) don't change filename

Set title to:
 ( ) item's ID
     ie: 12345.jpg
 ( ) item's tags
     ie: "TAG1 | TAG2 | TAG3"
 ( ) don't change title

[DOIT] button

Your thoughts?

 
Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Tue, 2012-05-01 20:20

Absolutely! :-)

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Wed, 2012-05-02 16:00

Catchin' hell with the form... almost done though. Anyone who is very familiar with the Forge form and g-dialog-link css, I'd be grateful if you chimed in...

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2012-05-03 00:47

All the advice I can give is give up on radio buttons. Use checkboxes and some JavaScript to make the checkboxes behave like radio buttons if that is what you are after.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Thu, 2012-05-03 02:03

I've figured out to do the checkboxes properly...

I was trying to use the g-dialog-link to pop-up a form, but couldn't get it to render properly, and I am absolutely TERRIBLE with CSS.

So, now I've gone to an Admin view for the form, and am touching it up a bit.

My only concern now is if there are a lot of items, it may take a while, so I'm going to look at the maintenance tasks functionality for this... (Any pointers?)

Other than that, the logic is done, tested, and good to go. Now just to put it all together...

floridave wrote:
All the advice I can give is give up on radio buttons. Use checkboxes and some JavaScript to make the checkboxes behave like radio buttons if that is what you are after.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Thu, 2012-05-03 02:06

working screenshot...

[img]http://codex.gallery2.org/images/5/5a/Mrtfu.jpg[/img]

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2012-05-03 02:52

I have never made a module that required long running tasks & I specifically avoided that in one module that could have used it (rebuild items).
I'm sure that there is a module or 2 from core that could be copied. It gets complex adding counts and callback and time to the equation that I have not spent much time looking into.
The screenshot look like you have it all under control.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Thu, 2012-05-03 15:07

Rockbär: Going through my logic, I'm not sure if a title rename by the item's tags is such a great idea. There can be a lot of tags to an item, (I know in your case, there are max of 3), but for others, there may be a lot more, or less...

Plus, it would be a major pain to account for items that may not have tags.

Why would you want this capability again? (I think this is a portion that may be too unique to you.)

 
Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Thu, 2012-05-03 15:13

Maybe you could restrict it to max 3 tags each item?

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Thu, 2012-05-03 15:17

See above... too much logic involved.

 
Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Thu, 2012-05-03 17:03

It depdends... I guess, the best is, that you don't have to work for weeks on this script, which only I and a few members will use. What do you think?

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Fri, 2012-05-04 02:05

I'm going to take a look at the logic tomorrow... it -may- not be that bad, and it does add another option... I'll let you know what I come up with. I guess I'm just having trouble understanding the reasoning for this, if there are tags assigned, why does the title need to change? Is it for SEO? I'm just curious, cause I don't understand why?

I've got everything else done now, just trying to run through all the testing before an initial release.

 
Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Fri, 2012-05-04 07:58

Yes, for SEO! Let me explain you why: The members come back from a concert and upload 20, 50 or more Pictures. In the multiple Upload-Menue there is no field for the title... and I think the most of them don't know, how to edit the title of each item, OR they are just too lazy. So, in 95% the title is equal to the file name. That's all ;-) For SEO, but also for useres who wanna search (e.g. in the adressbar of their webbrowser) a title like DCIM45678341 is not appropriate.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Fri, 2012-05-04 17:03

Understood... and if there are no tags associated with the item, then I'll leave the title alone and not modify it.

I'm not making any promises, but I'll take a look if it can be easily enough implemented.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Fri, 2012-05-04 19:03

Much Closer Now! I think I have the tags covered as well... with an option to say how many tags you want in the title :)

I don't really like the way the form is rendered, but that's what I get with the Forge capabilities in Kohana, which I believe the rendering is done with CSS...

Anyone any good at perhaps making a style sheet for this, or a better way to go about it? I could manually do the form if need be for the CSS to take effect.

Screenshot :)

[img]http://codex.gallery2.org/images/thumb/8/89/Mrtfu1.jpg/339px-Mrtfu1.jpg[/img]

 
Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Fri, 2012-05-04 19:56

That looks awesome!

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Fri, 2012-05-04 20:30

Looks like I got the 'tags to title' working perfectly.

I'm going to be running this through a gamut of testing, and will follow up shortly.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Sat, 2012-05-05 14:04

Rockbar, attached is a version that I've tested on my gallery without issues.

(This is not for release as a public module yet) If anyone else wishes to 'test' it, they do so at their own risk.

Disclaimer:

Please ensure that you have a GOOD, FULL BACKUP of your gallery and it's images.
This module does a LOT to your database/files/structures.
I take no liability in it's operation or it's fit for use.

With that being said,
Let me know how it works out for you.

EDIT: v2 posted in: http://gallery.menalto.com/node/106370

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Sat, 2012-05-05 18:28

Note: The 'MRTFU album' will show in the 'Album Options' menu when an album has photos in it. If you're at the main (root) album, it will NOT show, and if an album only has other albums in it, it will not show. Hope this makes sense.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Sun, 2012-05-06 03:58

LOCKED - See new thread:

http://gallery.menalto.com/node/106370

Thanks!

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Sun, 2012-05-06 03:59

Comments are now locked for this topic.