Mlix / nextgen-gallery

Automatically exported from code.google.com/p/nextgen-gallery
0 stars 0 forks source link

Nice permalinks #223

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
At the moment we get permalinks like this:
/nggallery/page-8/album-1/gallery-3/
where the page with id=8 is the page containing the album shortcode.

To get nice permalinks like
/nature/animals/birds/sparrow
 (1)     (2)    (3)   (4)
where (1) is an album
      (2) is a subalbum
      (3) is a gallery
      (4) is a specific picture
we have to create a page in wordpress for each album/subalbum/gallery, give
it a title corresponding to the album/subalbum/gallery title (which is
already in the DB), fill them with the appropriate shortcode (you have to
know the ID of the album/gallery for that!) and link the album/gallery to
that page. (4) is even not achieved by this.

What do you think is necessary to get nice permalinks with creating only a
single page containing the top album? Probably nggRewrite has to be
rewritten (sic!) and would have to incorporate a lot of dynamically
generated rewrite rules based on database content (gallery titles etc.).
Sounds complicated to me, as I do not know a thing about how wordpress
handles that...

What do you think about that, Alex?

Original issue reported on code.google.com by prollius@gmail.com on 26 Aug 2009 at 10:10

GoogleCodeExporter commented 9 years ago
I downloaded maidenfans version and found a few glitches/bugs.

1. Cant create albums in the admin area.
2. Page slugs for pagination revert back to non pretty permalinks ie. 
/nggallery/page-325/page-2/
3. Same as #2 for slideshow links.

Original comment by wizardin...@gmail.com on 1 Oct 2010 at 4:50

GoogleCodeExporter commented 9 years ago
Hi all. I suspect every other person in the universe is awaiting this! :D Would 
it be possible to have an update on the following..

- Were the issues resolved on the patch by maidenfan? and is there a final 
patch release? Has google begun to index your photos?

- Alex, I know you are very busy, and its a big ask, but could you please tell 
us the timeline for inclusion in the plugin?

I love nextgen but, after 2 years, not one of my photos have been indexed :(

Any updates on this seo issue would be greatly appreciated by all.

Best wishes. Julia

Original comment by enquir...@kittenlist.co.uk on 10 Oct 2010 at 9:36

GoogleCodeExporter commented 9 years ago
Hi Julia,
I haven't had the time to work on the patch recently due to starting a new job 
as systems administrator in London and having to immediately plan a complete 
office move!

I should hopefully be able to at least look at the work next weekend (16-17 
October) but obviously I can't make any guarantees at this stage, as I'm still 
getting used to 90 minutes of travelling to and from work!

As far as a timeline goes, Alex has marked the permalinks for inclusion into 
NextGEN v1.7, which as far as I know is due for release before WP 3.1 - when 
3.1 will be released is anyone's guess, I haven't been able to find any 
timeline from WP itself.

As this is a fairly big alteration to NextGEN, I would expect that the 
milestone won't be changed - but I will (hopefully!) have some test packages 
coming in the next few weeks.

Fear not - it's definitely still in the pipeline!

Craig (maidenfan)

Original comment by craig.watson@youdevise.com on 10 Oct 2010 at 10:12

GoogleCodeExporter commented 9 years ago
Thanks for responding so quickly Craig. :)

I understand completely. 

Btw, your SEO friendly titles plugin works nicely with All in one SEO. Will you 
be combining friendly urls with your friendly titles plugin? Read in post above 
that you are thinking about <titles> with this one. 

If you need another tester I'll be happy to help.

I, for one, will be happy to make a donation once this project is done :)

Best wishes

Julia

Original comment by enquir...@kittenlist.co.uk on 11 Oct 2010 at 7:52

GoogleCodeExporter commented 9 years ago
Hello Craig, Julia,
I will start to look into this in a the next 2-3 weeks. Version 1.6.X is now 
stable (no more big complains during upgrade) and I can work for the next 
release. 

As Craig mentioned, his changes has a deeper impact on the database structure 
and this needs to be done in a very carefully way as it always may causes 
troubles during upgrade...

I need first to look into the "unique slug process" and then we can decide what 
would the best way to achieve it.

Original comment by alex.cologne on 11 Oct 2010 at 9:59

GoogleCodeExporter commented 9 years ago
Looked a bit deeper into this changes, as I written above we need a unique slug 
for each gallery,album and image. I looked into wp core and found the function 
function wp_unique_post_slug (See included\post.php), I need to rebuild the 
same for NGG.

On the other hand I'm think of a easy way for parsing pretty permalinks:

Your idea has a fixed landing page, so it creates the "best" permalink. Sample :

domain.com/gallery/my-beauty-album/
domain.com/gallery/my-beauty-album/summer-photos/
domain.com/gallery/my-beauty-album/summer-photos/beach-image/

is the permalink really sooo ugly if we add still the id's ? Sample :

domain.com/gallery/1/my-beauty-album/
domain.com/gallery/1/my-beauty-album/222/summer-photos/
domain.com/gallery/1/my-beauty-album/222/summer-photos/5667/beach-image/

I think both permalinks a google friendly, what your opinion ?

Original comment by alex.cologne on 14 Oct 2010 at 7:05

GoogleCodeExporter commented 9 years ago
I think the ideal solution would be to use plain names, as the SEO 
functionality is really also about helping memorability as well as readabilty - 
most people remember words rather than numbers so having to remember both isn't 
as bad as only numbers but still not ideal. Obviously if words only is going to 
be a problem then we can look at words and numbers though.

Re the WordPress function, I haven't had a changce to have a look at the code 
but it looks promising - we'd definitely need to replicate it for NextGEN.

Hopefully I can properly look at the code in the next week and make some 
progress, starting a new job us proving to be more daunting than I first 
thought!

Original comment by craig.watson@youdevise.com on 15 Oct 2010 at 6:14

GoogleCodeExporter commented 9 years ago
Ok, let's roll the ball. In r830 I introduce the first pass to get the new 
permalinks :

Please note it's not very well tested ! During I alter the database I came 
across various problems which I need to consider, otherwise it will break a lot 
of blogs :

1) Can't use the gallery & album "name" field. In the beginning I allow in 
shortcodes to use the name instead the id. If I alter now the name to a unique 
slug it may break a lot of existing blogs

2) The upgrade scenario is more worse : Consider we have users with 100k+ 
images, the current solution introduce a new function 
ngg_rebuild_unique_slugs() which will produce many, many queries. Need to test 
the deeper

Anyway the current trunk has now a unique slug function get_unique_slug (see 
ngg-db.php), now it's time for me to test,test,test until I get to the next step

Original comment by alex.cologne on 16 Oct 2010 at 2:01

GoogleCodeExporter commented 9 years ago
Hi Alex.

Thank you for beginning the project! It does sound difficult. Have you had any 
thoughts about a slug conversion file - So the user could upgrade slugs in the 
database manually? I suppose this SEO feature could be added as an 'optional' 
plugin patch too? I'll be happy to run some tests on my site - I have regular 
backups done :) http://www.juliaodell.co.uk/gallery/oil-acrylic-paintings/

Rgds

Julia

Original comment by enquir...@kittenlist.co.uk on 27 Oct 2010 at 8:06

GoogleCodeExporter commented 9 years ago
I'm already implement a upgrade routine for existing blogs, i just need to 
rework the process for a huge number of images. I will introduce here a ajax 
process

Original comment by alex.cologne on 28 Oct 2010 at 11:40

GoogleCodeExporter commented 9 years ago
I've just discovered WordPress and this great plugin. I am switching from a 
Flash site so the need to have search engine friendly urls would be brilliant. 
Thanks for your work Alex.

Original comment by elyeb...@gmail.com on 29 Oct 2010 at 12:49

GoogleCodeExporter commented 9 years ago
In r865 rework build unique slug routine as ajax request. This will be the 
final step to ensure a proper upgrade without db troubles (hopefully). 

This should now the proper base for the permalinks structure, I will release 
V1.7.0 first without touching the permalinks, if all went well, we can take the 
next step

Original comment by alex.cologne on 15 Nov 2010 at 10:07

GoogleCodeExporter commented 9 years ago
Alex,
Sorry for going quiet for the last four months, things have been extremely busy!

Great to hear that the sanitisation is going well, how complete are the 
changes? If you need any testing (alpha or beta) then let me know.

If there's any code work that needs to be done, I'll try and make time for it, 
though my free time is now limited to evenings and weekends due to work!

Thanks,
Craig

Original comment by craig.watson@youdevise.com on 8 Jan 2011 at 9:27

GoogleCodeExporter commented 9 years ago
Is there a status on this?
or is this a planned update?

Original comment by Enlighte...@gmail.com on 21 Mar 2011 at 8:09

GoogleCodeExporter commented 9 years ago
Is there any update on this? I really need it and I'm afraid to mess up my 
current version (I'm on 1.7.4).

Thanks,
Danny

Original comment by dbanks.d...@gmail.com on 29 Mar 2011 at 6:41

GoogleCodeExporter commented 9 years ago
I'm working on it...

Original comment by alex.cologne on 29 Mar 2011 at 8:40

GoogleCodeExporter commented 9 years ago
Alex, I've just checked out the latest version. I can work on this issue, just 
shortly advice me about what's left and what to test so I start immediately. 

Original comment by simone.f...@gmail.com on 29 Mar 2011 at 3:30

GoogleCodeExporter commented 9 years ago
Thanks Simone for the offer ! I'm alreay started on this topic, I just had not 
every evening time to work on it. It must be a smooth transition from the 
existing permalink structure to the neww one , without getting much 404 errors.

So when I release the next update it's time for testing in depth, then it would 
be great if you can have a look into it.

Original comment by alex.cologne on 29 Mar 2011 at 7:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
in r929 adding first part of rework. Attention ! Nothing for production site as 
post links not working. This first patch implements the most work of Craig, but 
in a bit different way :

I finally decided not to implement a landing page as done in Craig's patch, so 
it's not "so" nice result, but hopefully not so far away. Example :

domain.com/the-pagename/nggallery/summer-album/people-gallery

Biggest problem is now custom permalink structure, I need to rebuild the 
rewrite rules dynamically like in wp-includes/rewrites.php.

@Simone if you have any good idea, just let me know

Original comment by alex.cologne on 3 Apr 2011 at 7:18

GoogleCodeExporter commented 9 years ago
In r930 rework as well for posts, are way to get this working. Currently 
untested , so beware of side effects !

Original comment by alex.cologne on 9 Apr 2011 at 9:37

GoogleCodeExporter commented 9 years ago
In r931 some bugfix. Now this version is live at nextgen-gallery.com
When all tests are fine I will finally implement a option that the slug 
"nggallery" can be changed via the options

Download of test version  here : 
http://nextgen-gallery.googlecode.com/files/nextgen-gallery-1.8.0a.zip . You 
need one time refresh (save) your permalinks to get the changes live. Report 
bug here again... Thanks !

Original comment by alex.cologne on 16 Apr 2011 at 6:39

GoogleCodeExporter commented 9 years ago
Have installed 1.8.0a and the page just hangs when loading if permalinks are 
enabled.

If they're not enabled, or if I roll back to 1.7.x it's fine, but there seems 
to be a (different) bug in 1.7 where two-level nested albums don't work, see: 
http://www.cwatson.org/nggallery/page-642/album-6/

I have 11 days free from Thursday this week, so I can look at the code in two 
or three days. There are also some smaller bugfixes for 1.7.x that I can submit 
:)

Original comment by craig.watson@youdevise.com on 18 Apr 2011 at 8:42

GoogleCodeExporter commented 9 years ago
OK, I will look as well during easter into this... let me know if you fin any 
issue

Original comment by alex.cologne on 22 Apr 2011 at 6:17

GoogleCodeExporter commented 9 years ago
Have testest 1.8.0a and got a 404 error with the enabled new permalinks.

The old permalink was for example 
"domain.com/nggallery/page-87/album-1/gallery-30"

The new "domain.com/reportagennggallery/reportagen-2/die-erfundene-welt-3" 
but i thought it should be 
"domain.com/nggallery/reportagen-2/die-erfundene-welt-3" 

so i tested that link but both just ended in a 404 error. I would apreciate it 
really so much if we get nice permalinks on Nextgen thanks a lot for your great 
work!

Original comment by 72quad...@gmail.com on 1 May 2011 at 12:55

GoogleCodeExporter commented 9 years ago
ok, thanks should be fixed in r933

Original comment by alex.cologne on 6 May 2011 at 6:07

GoogleCodeExporter commented 9 years ago
with r935 if've added now the slug setting, so you can change it from 
"nggallery" to any other slug

Original comment by alex.cologne on 6 May 2011 at 7:33

GoogleCodeExporter commented 9 years ago
Great it works for now on my Testserver, but i can't really understand the 
folder-rewrite structure. 
For example i get  
"domain.com/reportagen/nggallery/reportagen-2/die-erfundene-welt-2"
of "domain.com/nggallery/page-87/album-1/gallery-30" 

I don't know if it would be possible not to use the Subfolders "nggallery" and 
"reportagen-2" for a short and clean Url – Of course there are a lot of 
different possible ways out there to use NGG – but for us the best way would 
be just "domain.com/reportagen/die-erfundene-welt-2"

Thank's a lot – Of course it would take some time before we will use it live 
on kollektiv25.de and some hand made URL Rewriting for Google and external 
links from the old URI – but that of course must be done by hand in our 
.htaccess... 

Original comment by 72quad...@gmail.com on 8 May 2011 at 5:59

GoogleCodeExporter commented 9 years ago
Beta is out... please test it now, I hope you all are happy with the solution, 
let me know if there are any problems 

Original comment by alex.cologne on 17 May 2011 at 12:28

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
i have got error 

Fatal error: Function name must be a string in 
/home/xxxxx/public_html/wp-content/plugins/nextgen-gallery/nggfunctions.php on 
line 677

after upgrade to nextgen-gallery-1.8.0B2.zip

Original comment by sendypu...@gmail.com on 25 May 2011 at 12:23

GoogleCodeExporter commented 9 years ago
Same problem.
Fatal error: Function name must be a string in /home/xxx/xxx.com/docs/wp-content
/plugins/nextgen-gallery-new/nggfunctions.php on line 677

Is there any solution?

Original comment by nymph...@gmail.com on 30 May 2011 at 10:34

GoogleCodeExporter commented 9 years ago
Should be fixed here : r947

Original comment by alex.cologne on 3 Jun 2011 at 1:39

GoogleCodeExporter commented 9 years ago
There is a problem:
http://jinnbaskoff.com/index.php?callback=ngg-ajax&p=920&galleryid=39&nggpage=2&
type=gallery&pid=4022

Don't know how to solve this.
And what is the reason?

Original comment by svetl...@planeta-tour.ru on 5 Aug 2011 at 5:36