[tags] new blocks available
floridave
Joined: 2003-12-22
Posts: 27300 |
Posted: Mon, 2008-04-21 04:42 |
I have create 2 new blocks for the tag module: Demo: http://gallery2.ca/photos/gallery-dev left sidebar and Ishihara tag cloud on the bottom. A few issues yet to resolve: Please feel free to update the documentation on to codex. Thanks Dave |
|
Posts: 244
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
Posts: 27300
I don't follow. Can you give me step by step directions?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 244
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
Posts: 27300
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
Posts: 244
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
Posts: 27300
@ 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
Posts: 27300
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
Posts: 27300
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
Posts: 244
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
Posts: 244
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
Posts: 27300
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
Posts: 42
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!
Posts: 244
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
Posts: 27300
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
Posts: 244
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
Posts: 27300
I will have to install the X_treme theme and see if I can reproduce.
Steps to reproduce?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 42
When a man loves a woman, he inserts tab A in slot B.
Oh wait, you meant something else. Forgive the bad pun!
Posts: 27300
I belive I have fixed the X_treme theme visibility issue. Updated the zip file.
changed TagLinksTable.tpl
to
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 244
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
Posts: 244
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
Posts: 27300
I think the issue is the server is localized and uses commas for decimal points.
I will dig about and see if this can be fixed.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 244
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:
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:
. I do not really know if this is serious or not.
Thanks,
Jens
___________________________________
http://jekophoto.eu | http://jekophoto.de
Posts: 27300
<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
Posts: 244
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
Posts: 27300
Thanks for testing. I will update the zip file later with the above change.
Don't know why but they were marked as spam.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
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
Posts: 177
Very cool, cheers floridave
Posts: 27300
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
Posts: 16
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
Posts: 27300
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
Posts: 16
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
Posts: 27300
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
Posts: 16
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
Posts: 27300
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
Posts: 27300
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
Posts: 16
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
Posts: 16
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
Posts: 27300
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
Posts: 16
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
Posts: 16
Greetings -- deactivated/re-activated module and it looks good now. Very weird, but its working. Thanks again!
-James
Posts: 27300
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
Posts: 16
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
Posts: 27300
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