breadcrumb navigation in usergallery

Creating and modifying plugins.
Post Reply
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

breadcrumb navigation in usergallery

Post by stm999999999 »

hello,

in the usergallery on an image page I get a breadcrumb navigation with

Code: Select all

 	<div class="serendipity_entry">
      	<div class="serendipity_gallery_navigation">
	   		<!-- navigation -->
			<a href="{$plugin_usergallery_httppath}">{$plugin_usergallery_title}</a> »
			{foreach name="gallery" from=$plugin_usergallery_gallery_breadcrumb item="gallery"}
			<a href="{$plugin_usergallery_httppath_extend}gallery={$gallery.path}">{$gallery.name}</a> »
			{/foreach}
But on the pages with image overview I do not see, where I am, at all!

Is there a way to get a broadcrumb navigation here, too?

And BTW:

There is no browser-window-title according to the choosen image directory or choosen image.
Ciao, Stephan
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

But on the pages with image overview I do not see, where I am, at all!

Is there a way to get a broadcrumb navigation here, too?
I think something like what you are looking for is turned on with the "Show a directory listing " configuration setting under the plugin configuration. (Sorry, I'm not sure what it would be in German.)

Once that is enabled you can also play with the "Display the whole directory tree" option.
There is no browser-window-title according to the choosen image directory or choosen image.
You are correct, I have never added code to this. Does it make sense to use the "Title" setting in front of the site name?
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

But on the pages with image overview I do not see, where I am, at all!

Is there a way to get a broadcrumb navigation here, too?
I think something like what you are looking for is turned on with the "Show a directory listing " configuration setting under the plugin configuration. (Sorry, I'm not sure what it would be in German.)
no, this is unfortunality not like a navigatin: where am I?

e.g. I am in "gallery::2006::hobby"

I can do two listing-versions:

a)

one level up
+hobby 1
+hobby 2

b)
gallery
+2006
++hobby
+++hobby 1
+++hobby 2
++work
+2005
++hobby

but in both cases I do not see that I am in hobby in 2006!


There is no browser-window-title according to the choosen image directory or choosen image.
You are correct, I have never added code to this. Does it make sense to use the "Title" setting in front of the site name?
It would be nice to be compatible to the rest of s9y: there you have the title of the categorie or article in the windows header. This is very comfortable when opening many browser-windows/tabs: You can identify the tab better!

and btw: there is a title before the site name - allways the same: the name of the default directory
Ciao, Stephan
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

no, this is unfortunality not like a navigatin: where am I?
Ok, I see the difference. Does it make sense to add "breadcrumb" as a different way to show the directories?
and btw: there is a title before the site name - allways the same: the name of the default directory
*grin* You are right, I didn't notice that for some reason...
So does the "Display name" setting in the plugin options make sense, or should it be something else?
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Ok, I see the difference. Does it make sense to add "breadcrumb" as a different way to show the directories?
I think no. Because IMHO the breadcrumb is a navigation to see "where I am" and the dir listing is to see "what is under me or in my neighborhood or what is the whole side structure".

Both should be independent from each other.

I think the breadcrumb should be shown the same as in the "show-single-image-view". like the code I post in the opening post.
So does the "Display name" setting in the plugin options make sense, or should it be something else?
I think this is important, because in the breadcrumb navigation on single this is shown and e.g. someone can use the plugin more then one time, so each gallery should have a name.

Aeh, do you mean, if this could be the text to show in the browser-title?
I do not think so: It could be, but it would be better to use the name of the shown directory or the shown image.


And, btw "more than one gallery": should it be a good idea to have a plugin to list all used galleries?
Ciao, Stephan
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Ok, there is a new version of user gallery in CVS. It is version 2.1 and it should show a breadcrumb in the gallery view.

Let me know if that works.
I do not think so: It could be, but it would be better to use the name of the shown directory or the shown image.
Changing the title in the browser actually looks a lot harder than I remember. It looks like the title is set during the "genpage" hook, while all the heavy lifting of the plugin is set during the "entries_header" hook.

This means that to get the page name set to either the gallery or the image name I would have to parse that value out twice, once for each hook.
That means extra work, which will slow down the plugin.

So, I will think about this, but I'm not too sure where to head with it.
Garvin, if you are watching this thread and have any suggestion I would appreciate it!
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Ok, there is a new version of user gallery in CVS. It is version 2.1 and it should show a breadcrumb in the gallery view.

Let me know if that works.
well and fast work, thanks!

Only two little problems:

following media library structure:

+article
++2006
+++hobby
++++hobby 1
++++hobby 2
+++work
++2005
+++hobby
+intern

1) I want to give the readers a gallery access to article... so making it to the default folder and making the display name to "Gallery"

So, being in 2006::hobby::hobby 1 I get in the breadcrumbs:

Gallery :: 2006::hobby::hobby 1 where "hobby 1" is not link.

But, in my static pages I have a breadcrumb navigation, too:

bla :: blub :: foo

where foo is the name of the actual sublevel and have a link to the page itself (like the blog entrys have a link to itself in their title).

After a look into the tpl-code:

I have to add a link around the "{$plugin_usergallery_limit_directory}"? right? And, what is the variable with the url of the current gallery page?


2) when I am on the top of the folder structure I get:

Gallery :: article

(where article is the name of the default folder and should not be shown - like Gallery :: 2006 :: ... there is no article either.)

why is $plugin_usergallery_limit_directory not empty? Or can I found out via "if" when I am on the top to avoid this output?
Ciao, Stephan
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Changing the title in the browser actually looks a lot harder than I remember. It looks like the title is set during the "genpage" hook, while all the heavy lifting of the plugin is set during the "entries_header" hook.
hm, what is the way normal blog entries or static pages do it? They have their title in the window-title. So I am not deep enough in the s9y-code but as a user I see/think there must be a way :-)
Ciao, Stephan
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Version 2.11 has been committed to CVS and should fix the problems with the breadcrumb (current gallery is a link, gallery name does not show up on base directory).

I'm still thinking about the best way to set the Browser title. :D
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

hey, thanks!

one little suggestion:

on the top page it results in

Code: Select all

<a href="/pages/gallery.html">Bilder-Galerie</a> »
<a href="/pages/gallery.html?gallery="></a>
two problems:

1) empty links - I don'z know if this is "good".
2) There is a » at the end "Gallery »"

solution in plugin-usergallery.tpl

Code: Select all

<a href="{$plugin_usergallery_httppath}">{$plugin_usergallery_title}</a>
{foreach name="gallery" from=$plugin_usergallery_gallery_breadcrumb item="gallery"}
» <a href="{$plugin_usergallery_httppath_extend}gallery={$gallery.path}">{$gallery.name}</a> 
{/foreach} 
{if $plugin_usergallery_limit_directory!=""}» <a href="{$plugin_usergallery_httppath_extend}gallery={$plugin_usergallery_currentgal}">{$plugin_usergallery_limit_directory}</a>{/if}
Ciao, Stephan
Post Reply