[tags] new blocks available

floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2008-04-21 04:42

I have create 2 new blocks for the tag module:
http://codex.gallery2.org/Gallery2:Modules:tags:blocks

Demo: http://gallery2.ca/photos/gallery-dev left sidebar and Ishihara tag cloud on the bottom.

A few issues yet to resolve:
-tags grater than 99 don't show properly in the tag table block. (fixed)
-Lots of tags (Ishihara block only) result in a javascript errors. (changed default from random ( not confirmed fix yet ))

Please feel free to update the documentation on to codex.

Thanks

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
jens_k

Joined: 2007-01-28
Posts: 244
Posted: Mon, 2008-04-21 13:35

Hi Dave,

thank you so much for these new blocks! I was searching for a style as you generated with the sidebar tags-tab ;-)

I don't want to use the bubble style but I have tested to integrate it. I am not able to add another template then the text template in the Site-Admin -> Tag Settings -> Cloud Settings. There is no Add button.

I am using the following config:
Gallery version = 2.2.4 core 1.2.0.6
PHP version = 4.4.7 apache2handler
Webserver = Apache
Database = mysqlt 4.1.22-max-log, lock.system=flock
Toolkits = Gd, Thumbnail, Exif, LinkItemToolkit
Acceleration = none/86400, none/3600
Operating system = Linux 2.6.17.8-nmm1 #4 SMP Fri Jan 26 15:05:12 CET 2007 i686
Default theme = x_treme
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.11) Gecko/20071127 ImageShackToolbar/4.3.5 Firefox/2.0.0.11

Cheers,
Jens
___________________________________
http://jekophoto.eu | http://jekophoto.de

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2008-04-21 13:40
Quote:
I don't want to use the bubble style but I have tested to integrate it. I am not able to add another template then the text template in the Site-Admin -> Tag Settings -> Cloud Settings. There is no Add button.

I don't follow. Can you give me step by step directions?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
jens_k

Joined: 2007-01-28
Posts: 244
Posted: Mon, 2008-04-21 15:51

OK, sorry for my bad explanation.

I wanted to configure the Ishihara tag cloud. I have uploaded all of your files to the modules/tags folder. After that I wanted to configure the tag cloud to use your Ishihara template. But there is no possibility to change the appereance of the tag cloud in the site admin menu. Attached you can find a screenshot of the page Cloud Settings. I only have the default template called Text Template and I did not found a way to add another template viu UI. Clearing the cache of the gallery did not helped me in this case.

Thanks and cheers,
Jens

___________________________________
http://jekophoto.eu | http://jekophoto.de

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2008-04-21 19:01

The new cloud is a "block". It is configured as other blocks. Edit album -> theme tab, blocks to show.... When you highlight the block... configuration of that block becomes available.
I guess I could move the configuration to the cloud settings, but I thought that a block would be better as you will be able to have different settings for each album.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
jens_k

Joined: 2007-01-28
Posts: 244
Posted: Mon, 2008-04-21 20:04

Shame on me, Dave. Sorry for misunderstanding.

Another question regarding to the tag bar-graph: The default sort order is alphabetical. Is it possible to change the sort order to the weight / amount of tags in descending order. As a result it would be possible to have the "top x tags" in the sidebar.
Would it be hard to implement? Could you give me an hint how to sort?

Thanks for your support,
Jens

___________________________________
http://jekophoto.eu | http://jekophoto.de

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2008-04-21 23:35

@ sort order: I was going to do that. It is a bit of work.
Start at callback.inc and see how the array of tags is generated with a function in the tags class file. I think a new callback will need to be created. It starts to get over my head really fast at this point.
Currently they are generated alphabetical with capitals first. I think 2 ways to return the data is required. A natural sort and tag weight.
let me know how you make out. Or if anybody else wants to give it a go.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2008-04-21 23:36

One way to to get the Top tags is to limit the weight to be shown. I get a better explanation in the wiki/codex is in order.

Dave

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2008-04-22 03:13

Opinions needed for how to accommodate tag weight greater than 99.
In the tag table the weight is sized with css.
Should I make that <span> for the weight wider for all tags or do some calculation ( more code) to determine the width of this? Then since the width of the sidebar is limited, should I shift the <span> of the weight over the graph (left) or let it take room from the tag name (right)?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
jens_k

Joined: 2007-01-28
Posts: 244
Posted: Tue, 2008-04-22 05:00

I think I have thought to difficult. With limiting the weight there is a good option to get the Top tags. I have adjusted this on my .eu website and it is looking good. Creating a new callback function is to heavy for my knowledge about gallery and smarty at the moment. Sometimes the solution so near and I did not see it ;-)
For tag weights greater than 99 I would prefer shifting the weight over the graph. Viewing as a user it would be better to do some calculations because it is dynamically. If you will make it wider on a static base - the qestion ist how much. Sometimes there could came users with tag weights more than 999 in their gallery and you will expand it again. At this point it will be using to much space for the gallery with tag weights less than 99.

It would be really great to hear some other opinions.

Thank you so much,
Jens
___________________________________
http://jekophoto.eu | http://jekophoto.de

 
jens_k

Joined: 2007-01-28
Posts: 244
Posted: Thu, 2008-04-24 16:33

Hi Dave,

I have slightly modified your wonderful tags bar graph.
Because of the limited space in the sidebar I have removed the tags count.
Furthermore I have altered the bargraph to make it more clear what's the graph and what's the background, especially for themes with an dark background. I have asked some friends for their first impressions before and it was interesting to see that it was not really transparent for them what the bar graph is.

If you want to have a look at it - it is implemented at http://jekophoto.eu/gallery/.

Cheers,
Jens

___________________________________
http://jekophoto.eu | http://jekophoto.de

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2008-04-25 00:26

That looks a lot better! I will make a admin setting to show or hide the tag weight. Mind if I "take" the new image?

Cheers

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
enderandrew

Joined: 2006-06-01
Posts: 42
Posted: Fri, 2008-04-25 04:14

My gallery install broke when my webhost changed companies, servers, and OSes ages ago, and I keep meaning to reinstall and fix it, and just never had. We've just kept out photos on Snapfish. I'm determined to reinstall and user Gallery again, I just haven't found a perfect theme I really love. However, I am digging the xtreme theme, and especially your implementation at http://jekophoto.eu/gallery/

I'm going to ask a few stupid questions, but what module or option is giving you the little mouse over "i" for Image Info? I also really the dig the "why to register" button you have on the front page. Though, it should probably read "Why register" or "Why you should register" in English. Either way, I'm curious if you just added that with a few lines of javascript, or if that was an option in xtreme I haven't seen yet.

Thanks!

 
jens_k

Joined: 2007-01-28
Posts: 244
Posted: Fri, 2008-04-25 11:34

Hi Dave,

I am pleased that you like it. Of course you can use the new graph. I have attached it for you. Gladly I ccan give something back and support this famous gallery ;-).

@enderandrew: I will answer to your questions today in the X_treme theme thread.

Cheers,
Jens
___________________________________
http://jekophoto.eu | http://jekophoto.de

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2008-04-27 06:09

Updated the zip file to accommodate tags less that 10 and greater than 99.
Added configuration to not show the tag quantity/weight, giving more room for the tag name.
Changed the bar-graph image - thanks jens_k.

I was not able to test the less than ten and greater than 99 weight, so please let me know if it works.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
jens_k

Joined: 2007-01-28
Posts: 244
Posted: Sun, 2008-04-27 06:43

Hi Dave,
I have just tested your new version.
The width of the row for the weights looks good.
I think there is a little error inside. In my gallery installation with X_treme theme and dynamic sidebar the row with the tag weights keeps visible - even if the sidebar hides. I have attached you a screenshot for better understanding.

Cheers,
Jens
___________________________________
http://jekophoto.eu | http://jekophoto.de

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2008-04-27 15:24

I will have to install the X_treme theme and see if I can reproduce.
Steps to reproduce?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
enderandrew

Joined: 2006-06-01
Posts: 42
Posted: Sun, 2008-04-27 15:29
floridave wrote:
Steps to reproduce?

When a man loves a woman, he inserts tab A in slot B.

Oh wait, you meant something else. Forgive the bad pun!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2008-04-27 17:24

I belive I have fixed the X_treme theme visibility issue. Updated the zip file.
changed TagLinksTable.tpl

{/literal}
	visibility: {if $showtagquantity|default:'true'}visible;{else}hidden;{/if}
{literal}

to

{/literal}
	{if $showtagquantity|default:'true'}{else}visibility: hidden;{/if}
{literal}

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
jens_k

Joined: 2007-01-28
Posts: 244
Posted: Wed, 2008-04-30 12:02

Hi Dave,

You got it! It works great with the X_treme theme. Thank you so much ;-)

Cheers,
Jens
___________________________________
http://jekophoto.eu | http://jekophoto.de

 
jens_k

Joined: 2007-01-28
Posts: 244
Posted: Thu, 2008-05-01 23:39

Hi Dave,

after the easy implementation of your new tags blocks in my english website I am really lost by implementing in my new german site.
I am getting no errors, the weight of the tags is shown correctly - but most of the graphs were not drawn.
It is interesting, because the versions and the server is exact the same as of my .eu website which works very well.

What did I do by now
1) integrity check -> all OK
2) deleting all caches (gallery and browser)
3) deactivating/activating tags module
4) check/repair tables
5) deleting and new installing tags module
6) update of the gallery
7) copy the same files for tags module from my working .eu directory

All steps were done without any problems but the bargraphs are not correctly.

Do you have an idea what I could do?

Attached is an little screenshot how it looks like. If you want to see it in action you can see it at de[dot]jekophoto.eu/galerie/ (sorry, but I do not want to see this uri at search engines).

Thanks,
Jens

Gallery version = 2.2.4 core 1.2.0.6
PHP version = 4.4.7 apache2handler
Webserver = Apache
Database = mysqlt 4.1.22-max-log, lock.system=flock
Toolkits = Gd, Thumbnail, Exif, LinkItemToolkit
Acceleration = none/86400, none/3600
Operating system = Linux 2.6.17.8-nmm1 #4 SMP Fri Jan 26 15:05:12 CET 2007 i686
Default theme = x_treme
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.11) Gecko/20071127 ImageShackToolbar/4.3.5 Firefox/2.0.0.11
Rows in GalleryAccessMap table = 38
Rows in GalleryAccessSubscriberMap table = 554
Rows in GalleryUser table = 11
Rows in GalleryItem table = 549
Rows in GalleryAlbumItem table = 39
Rows in GalleryCacheMap table = 0

___________________________________
http://jekophoto.eu | http://jekophoto.de

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2008-05-02 04:50
Quote:
Do you have an idea what I could do?

I think the issue is the server is localized and uses commas for decimal points.

Quote:
<li>
<span class='graph'>
<span class='level' style='width:37,704918032787%'>
</span>
</span>
<span class='tag'>
<a href="/galerie/tag/Events">Events</a>

</span>
<span class='number'>184</span>
</li>

I will dig about and see if this can be fixed.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
jens_k

Joined: 2007-01-28
Posts: 244
Posted: Fri, 2008-05-02 07:41

Yes I think that cwas the point - I did not kept this in mind.

I have played around a little bit with the TagLinksTable.tpl and now I have a working version.
I have altered lines 102-105:

        {assign var="graphlevelraw" value=$tag.rawCount/$maxRawCount*100}
	  	<li>
			<span class='graph'>
				<span class='level' style='width:{$graphlevelraw|replace:",":"."}%'>
				</span> 
			</span>

I know - this is quick, dirty and hardcoded (I am not familiar with smarty). Perhaps this may give you an idea for a possible solution.

BTW: Running in debug mode gallery gives the following notice for each tag at the position of the bargraph:

Notice: Undefined index: rawTagCount in .../galerie/modules/tags/Callbacks.inc on line 58

. I do not really know if this is serious or not.

Thanks,
Jens
___________________________________
http://jekophoto.eu | http://jekophoto.de

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2008-05-02 15:48

<span class='level' style='width:{$tag.rawCount/$maxRawCount*100}%'> to
<span class='level' style='width:{$tag.rawCount/$maxRawCount*100|round}%'>
Should work. Please test to see if it does. It delivers less precision but i doubt that browsers have that capability anyway, and less HTML for faster load times. :-)

I will look at the Notice: Undefined index: rawTagCount you are getting, ( not a big deal but should be addressed. )

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
jens_k

Joined: 2007-01-28
Posts: 244
Posted: Fri, 2008-05-02 16:43

Your version works fine and is much more better than mine. I should be more familiar with smarty. ;-)

Thanks again,
Jens

PS: where are our last two posts?
___________________________________
http://jekophoto.eu | http://jekophoto.de

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2008-05-02 18:14

Thanks for testing. I will update the zip file later with the above change.

jens_k wrote:
PS: where are our last two posts?

Don't know why but they were marked as spam.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2008-05-20 03:21

I added another 'block'. A flash tag cloud.
Check out the demo: http://langleycom.com/gallery2/main.php Sure the color is not nice but I am not a designer. :-)

I have updated the zip file as well as the code page:
http://codex.gallery2.org/Gallery2:Modules:tags:blocks

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
ASNet0007

Joined: 2006-10-17
Posts: 177
Posted: Tue, 2008-05-20 08:18

Very cool, cheers floridave

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2008-05-28 21:30

I added yet another "block". Well this time a 'pie' not a block. :-)

I have updated the zip file as well as the codex page:
http://codex.gallery2.org/Gallery2:Modules:tags:blocks#Flash_Pie_Chart_block

From another open source project: http://teethgrinder.co.uk/open-flash-chart/

Would be cool to add other charts to gallery.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
nackjf

Joined: 2005-03-02
Posts: 16
Posted: Tue, 2008-06-10 22:34

Dave -- Love the flash tag cloud and the other tag blocks that you've done.

Have a small problem/question with the flash tag cloud. Everything was working great with it when I only had a few photos tagged. Then I started doing bulk tagging and seems that since then, its only been displaying about 10 of the 75 tags that I have (and not even the highest weighted or most recent). Checked out the settings and could not find anything. I have the tag cloud and Ishihara Tag Cloud right below the flash cloud and they show the correct tags.

Appreciate any thoughts you may have. I have the 28 may code installed on my website.

Thanks again for all your help!

rgds,
-James

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2008-06-11 01:21

I don't think I tested it with both cloud blocks on the same page.
Seems to work for me by itself with the sidebar graph:
http://gallery2.ca/gallery2/photos/gallery-dev/testing/ It is a bit slow and your browser might stall due to the quantity of tags passed to the flash object.

however I think due to performance issues with large quantities I will implement a configuration setting to limit the weight of tags like I have in other blocks.

URL of offending cloud please.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
nackjf

Joined: 2005-03-02
Posts: 16
Posted: Sun, 2008-06-29 10:26

Dave -- sent you a PM with the info and wanted to see if you had a chance to check things out. My wife tagged a whole bunch more photos and noted that the could did not have any alphabetical items pass the letter 'J'. But like your idea to have a configuration setting to limit the weight of tags (similar to the other blocks).

Thanks again for the great implementation!

rgds,
-James

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2008-06-29 19:27

James,
I have not recived any Private message. Please send again:
http://gallery.menalto.com/privatemsg/msgto/31463
I thought that I updated the zip file to include my change of a weight limit setting on the flash block, but I checked and I did not. I have now, so you should be good to go.
I don't understand what you mean when you say: "noted that the could did not have any alphabetical items pass the letter 'J'." So I will wait for the PH of the site to see if that will make me understand. :-)

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
nackjf

Joined: 2005-03-02
Posts: 16
Posted: Sun, 2008-06-29 21:24

Dave - Thanks - just sent.

For the flash could - it looked like it did not include any Tags that began K-Z - even though I have photos tagged with words that match begin with letters in that range.

Rgds,
James

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2008-06-30 00:04

Got your PM thanks.
I see the issue even not being logged in.
Can you create a test album for me please so I can play with some settings to see if I can sort this out? I can't reproduce on my site(s).

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2008-06-30 19:36

I am able to reproduce the issue.
It has to do with apostrophes. or single quotes.
I don't know much about flash/javascript and what it accepts... so any flash/javascript experts care to chime in?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
nackjf

Joined: 2005-03-02
Posts: 16
Posted: Tue, 2008-07-01 07:01

Wow - that was quick - was just about to reply with the test album info and saw your note about the apostrophes. I will update those tags. Thanks again for the assistance.

Rgds,
-James

 
nackjf

Joined: 2005-03-02
Posts: 16
Posted: Tue, 2008-07-01 12:19

Dave -- thanks again - That did the trick. One other question - for my website, I would like to put the flash cloud as a link to a a seperate page. is the a direct URL to that tag block?

Thanks in advance,
James

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2008-07-01 16:46

I have thought about getting the block to be added to a external page but have not had much success. I did not spend much time on it but it should be able to be done.
Perhaps somebody has had success with other block and are wiling to share?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
nackjf

Joined: 2005-03-02
Posts: 16
Posted: Tue, 2008-07-01 23:49

Dave - Maybe I spoke too soon. Seems that I was unable to delete the offending tags - so I deleted the few photos that had an single quote. From there, the flash cloud included all the tags. I then uploaded your updated tag module so that I could set the flash cloud block to only show tags greater than x. Everything looked good, but now when I click on a tag in the flash cloud, I does not bring up the images with that tag. The other tag blocks work properly. Any thoughts?

Thanks in advance,
-James

 
nackjf

Joined: 2005-03-02
Posts: 16
Posted: Wed, 2008-07-02 17:30

Greetings -- deactivated/re-activated module and it looks good now. Very weird, but its working. Thanks again!
-James

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2008-07-02 19:34

Yes very weird, but glad it is working.
Will try to still get external access and apostrophes to work.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
nackjf

Joined: 2005-03-02
Posts: 16
Posted: Wed, 2008-07-02 21:42

:) well -- again - I talk too soon. Seems that if I access Gallery2 directly, the flash plug-in works fine (displays properly and tag album display when click on a tag). But if I access it via Wordpress (using wpg2 module), the flash cloud is displayed, but clicking on a tag does not display the tagged album.

Could it be path related - as to access my gallery, the url is gallery.host.com, where as gallery access via Wordpress is www.host.com/wordpress/wpg2?

Hope this make sense. If you would like, you can compare/contrast this by going to my website and using the previously provided logon info -- account info is consistent between wordpress and gallery2.

Thanks!
-jim

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2008-07-03 06:06

nackjf,
One issue at a time! :-)
I think I got the apostrophe issue fixed, please test. I fixed the download on the codex as well as the attachment ( remove .txt extension )
Sorry I spoke too soon as well. :-(
I got the apostrophe issue but now if you have a tag like:
blank & white
it does not work!
i hate not having enough knowledge about JS and flash.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team