Photo of the Month

All times are UTC [ DST ]




Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: A more user friendly gallery editor
PostPosted: Thu Mar 28, 2013 23:36 
Offline
Member
User avatar

Joined: Tue May 20, 2003 20:40
Posts: 7317
Location: Ashford, Kent
I started writing this quite a while ago, the "last modified date" before this evening was (iirc) just before I started writing SABRE Maps!

Anyway, editing wiki gallery pages has suddenly got a little bit easier. If you now click on "Edit" on a picture (such as one submitted to POTM), instead of an impenetrable page of text, you get more or less the same user interface as the upload page.

There are two main flaws as present. One, the full UI to select galleries is not there yet. Two - saving an image is two steps. You have to click "Confirm", to confirm your changes, which changes the actual edit window beneath. Then you can click on "Save". Both of these issues will be fixed in due course!

In the mean time - have a play and see what you think.

_________________
--
SABRE Maps - all the best maps in one place....


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Thu Apr 18, 2013 10:53 
Offline
Member
User avatar

Joined: Tue May 20, 2003 20:40
Posts: 7317
Location: Ashford, Kent
Now I'm happy the editor is working, I have got rid of the cumbersome and irritating two step process.

When you now edit a gallery image, you get a straightforward "Save" button. Click on that, and the changes to the image are saved, exactly as you'd expect.

There is a "Cancel" button to abandon changes, but it's hidden - I'll fix this probably when I get round to putting in selectable galleries.

_________________
--
SABRE Maps - all the best maps in one place....


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Thu Apr 18, 2013 11:29 
Offline
Member
User avatar

Joined: Sun May 27, 2007 12:23
Posts: 2382
Location: Banchory
Looks good. I tried to add co-ordinates to one image though (here), making no other changes, and the change disappeared into the ether. :(

EDIT: Tried it again this time and it worked. Odd.

_________________
Owen Rudge
http://www.owenrudge.net/


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Thu Apr 18, 2013 11:31 
Offline
Member
User avatar

Joined: Tue May 20, 2003 20:40
Posts: 7317
Location: Ashford, Kent
That'll be that session data bug. I'll have a serious look into that one of these evenings.

_________________
--
SABRE Maps - all the best maps in one place....


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Thu Apr 18, 2013 14:30 
Offline
Member
User avatar

Joined: Tue May 20, 2003 20:40
Posts: 7317
Location: Ashford, Kent
Now that this feature is up and running, I've started to look at the Category:Pictures without coords category, which shows every image that hasn't got a location added to it. There's lots of them!

_________________
--
SABRE Maps - all the best maps in one place....


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Thu Apr 18, 2013 14:36 
Offline
Member

Joined: Sun Nov 28, 2004 23:28
Posts: 4694
Any chance we can have the map as a Google map, as in the upload form? It's difficult to correctly position an image without the satellite option!


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Thu Apr 18, 2013 14:37 
Offline
Member
User avatar

Joined: Tue May 20, 2003 20:40
Posts: 7317
Location: Ashford, Kent
Jeni wrote:
Any chance we can have the map as a Google map, as in the upload form? It's difficult to correctly position an image without the satellite option!

Sure, as long as you can find a developer who knows how to use the Google Maps control API. :P

Actually, I quite like the OpenStreetMap interface - so ideally I will change everything to allow a choice of either.

_________________
--
SABRE Maps - all the best maps in one place....


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Thu Apr 18, 2013 14:40 
Offline
Member

Joined: Sun Nov 28, 2004 23:28
Posts: 4694
Ritchie333 wrote:
Sure, as long as you can find a developer who knows how to use the Google Maps control API. :P


Not as simple as re-using the code from the upload form?


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Thu Apr 18, 2013 15:07 
Offline
Member

Joined: Sun Nov 28, 2004 23:28
Posts: 4694
Spotted a slight bug, see this diff...

http://www.sabre-roads.org.uk/wiki/inde ... did=158953

The code you're using to extract the information from the template seems to take "|photographer = [[User:Aandy|Aandy]]" and turn it into "|photographer = [[User:Aandy".

<Trying to be useful>Could it be that you haven't accounted for legitimate pipe's within the information template?


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Thu Apr 18, 2013 15:28 
Offline
Member
User avatar

Joined: Tue May 20, 2003 20:40
Posts: 7317
Location: Ashford, Kent
Yes, that's a bug, for exactly the reasons you describe. What regular expression would trap that correctly?

_________________
--
SABRE Maps - all the best maps in one place....


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Thu Apr 18, 2013 15:37 
Offline
Member

Joined: Sun Nov 28, 2004 23:28
Posts: 4694
Ritchie333 wrote:
Yes, that's a bug, for exactly the reasons you describe. What regular expression would trap that correctly?


If I'm honest, I'm not 100% sure... regex has never been my strong point.

It's more complicated than it seems too, obviously links can be piped, but it's also possible for templates to be nested within templates, as well as the wiki syntax for a table, which could in theory be included.


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Thu Apr 18, 2013 15:45 
Offline
Member

Joined: Sun Nov 28, 2004 23:28
Posts: 4694
Here are a couple of formats that the template could appear in, which are both valid wiki markup. The first one is more likely than the second, however.

Code:
{{Information
|description = {{TestTemplate|Paramater1|[[File:Parameter2|Just because]]}}
Description over two lines
|day   =   18
|month   =   10
|year   =   2008
|photographer   =   [[User:Aandy|Aandy]]
|user   =   
|source   =   [http://www.sabre-roads.org.uk/gallery/displayimage.php?pos=-20494 Coppermine]
|licence   =   none
|road   =   A40
|road2   =   
|road3   =   
|lat   =   51.842906
|lng   =   -2.682285
|gallery1   =   
|gallery2   =   
|gallery3   =   
|gallery4   =   
}}


Code:
{{Information|description=desc|day=18|month=10|year=2008|photographer=[[User:Aandy|Aandy]]|user=|source=[http://www.sabre-roads.org.uk/gallery/displayimage.php?pos=-20494 Coppermine]|licence=none|road=A40|road2=|road3=|lat=51.842906|lng=-2.682285|gallery1=}}


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Thu Apr 18, 2013 15:47 
Offline
Member
User avatar

Joined: Tue May 20, 2003 20:40
Posts: 7317
Location: Ashford, Kent
I'll have a good look tonight and see what I can do. Thanks for the help in testing!

_________________
--
SABRE Maps - all the best maps in one place....


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Thu Apr 18, 2013 15:54 
Offline
Member

Joined: Sun Nov 28, 2004 23:28
Posts: 4694
Just to clarify, it doesn't appear that a table would actually be valid within a template, so at least that's one less thing to worry about.

I think the way I'd consider doing it is as thus:

Isolate the links, [[Link]] or [[Piped|Link]], temporarily replace the pipe in those instances with something else.

Then isolate the templates, {{Template}} or {{Template|With|parameters=StupidAnnoyingWikiMarkup}}, again replacing the pipe with something else.

You won't find any templates within links, but you may find links within templates, so it's fairly important to do it in that order, and also bear in mind that the templates may themselves appear on multiple lines.

Then run whatever regex you're currently running, I suspect it would then work fine. When you're redisplaying the fields in the input boxes, put the previously replaced pipes back in.

I know it's a bit of a dirty way of doing it in the grand scheme of things, but it's perhaps the simplest solution in this situation without you pulling your hair out too much!


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Thu Apr 18, 2013 20:54 
Online
Member
User avatar

Joined: Fri Mar 01, 2002 20:06
Posts: 681
Location: Llan-giwg
Ritchie333 wrote:
Now that this feature is up and running, I've started to look at the Category:Pictures without coords category, which shows every image that hasn't got a location added to it. There's lots of them!
That's a page I visit every now and then because I find "sleuthing" for the exact locations is fun (whatever turns you on, as they say!) and the search often throws up many other serendipitous discoveries.


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Fri Apr 19, 2013 22:24 
Offline
Member
User avatar

Joined: Tue May 20, 2003 20:40
Posts: 7317
Location: Ashford, Kent
I think I've fixed the issue Jeni reported - can you try it with one that would have broken before?

_________________
--
SABRE Maps - all the best maps in one place....


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Mon May 13, 2013 16:01 
Offline
Assistant Site Manager

Joined: Sat May 23, 2009 09:18
Posts: 1824
Location: Lochaber
Can't find where you mentioned it before, Ritchie, but thanks for the new {{Picture gallery}} editor, it makes things a lot easier, especially when you can't remember if it's Picture gallery, Picture Gallery, or what!

_________________
Rob.
My mission is to travel every road and visit every town, village and hamlet in the British Isles.
I don't like thinking about how badly I am doing.


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Mon May 13, 2013 17:28 
Offline
Member
User avatar

Joined: Tue May 20, 2003 20:40
Posts: 7317
Location: Ashford, Kent
I hadn't got round to documenting it yet, because I wanted to test it a bit more, but it looks like you've done that for me, so cheers. :D

_________________
--
SABRE Maps - all the best maps in one place....


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Mon May 13, 2013 17:42 
Offline
Assistant Site Manager

Joined: Sat May 23, 2009 09:18
Posts: 1824
Location: Lochaber
Not a problem :) Just one thing, though, where does/will the description text appear as it seems to disappear into the ether at the moment.

_________________
Rob.
My mission is to travel every road and visit every town, village and hamlet in the British Isles.
I don't like thinking about how badly I am doing.


Top
 Profile  
 
 Post subject: Re: A more user friendly gallery editor
PostPosted: Mon May 13, 2013 17:54 
Offline
Member
User avatar

Joined: Tue May 20, 2003 20:40
Posts: 7317
Location: Ashford, Kent
Coppermine had descriptions, so I decided it would be good to have them here too. Just haven't made a decision yet where to put them. Probably at the top of the gallery and in small for the list in its parent.

Its major flaw at the moment is that it doesn't create the hidden category you need for stuff to work.

_________________
--
SABRE Maps - all the best maps in one place....


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group