Flickr Tags

youpi

Joined: 2005-06-17
Posts: 35
Posted: Wed, 2006-05-03 10:42

hi, i'm trying to update the version for 2.1 but i have a problem in the GalleryTag.inc at the line 109 and 114 :

Quote:
$value = $->_truncateString($value, 128);

i get this error :

Quote:
Fatal error: Call to undefined function: _truncatestring() in

Quote:
$this->setModifiedFlag('tagName', $value);

for the second may i replace setModifiedFlag by isModified ?

 
youpi

Joined: 2005-06-17
Posts: 35
Posted: Thu, 2006-05-04 16:03

i put the files, if someone can help me to update it for the blackjack release 2.1 i will be very happy

in my files there are 2 problems :

- The mysql Tables
- the GalleryTag.inc

 
Eka_Mei

Joined: 2006-01-03
Posts: 132
Posted: Sat, 2006-05-06 19:17

Since dbchip2000 had just said he is working on a better tag module, and Mindless putting this in the 2.2 roadmap. http://codex.gallery2.org/index.php/Gallery2:Roadmap:2.2 I doubt we will get much attention to turn this into 2.1 release. As much as I want to get my hand on tagging module sooner ^^;

 
youpi

Joined: 2005-06-17
Posts: 35
Posted: Sun, 2006-05-07 17:42

it's sad to wait the last release, because if we must wait at each new release the modules who are not update to be intregate after. We can't manage to give for the people the possibility to use all plugin for all version.**

 
Eka_Mei

Joined: 2006-01-03
Posts: 132
Posted: Sun, 2006-05-07 20:20

I agree, it is hard to wait for something especially when it come to a module we really needed. However, development effort are limted. We also have to make trade off between improvement and compability. It is understandable that some Module might not be compabilie and sometime people might not have time to update them. Let's hope they will be able to give us a Tag module we can put in 2.1 sooner then later.

 
dbchip2000

Joined: 2005-12-11
Posts: 4
Posted: Sun, 2006-05-07 20:46

Just to put in a brief two cents, part of the problem with current Gallery versions is that they don't support "Virtual Galleries" without hacking the core files. That's not very recommendable. But "Virtual Galleries" are what makes tagging so effective...like going to /gallery2/tags/soccer/. That's part of the issue here and is why the Gallery 2.2 release will be excellent not only for Tags but other future modules to utilize these new features.

This in turn makes me debate whether or not to continue making a <2.2 version or wait for a couple months for the official version. I'm tending to think the latter...I mean: what's a couple more months, with official support of it, non-hacked files, and it's guaranteed to be good :-)
-Danny

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2006-05-08 05:23

fwiw, the main work i'm doing for 2.2 is to make it so themes can display an arbirary set of items, not just an "album".. then you can use your theme to display search results, recent updates, and of course, results of a tag based query. i don't plan to put a lot of effort into the tagging aspect itself.. just get something basic out there so people see how it works and can develop whatever they like.

 
Eka_Mei

Joined: 2006-01-03
Posts: 132
Posted: Tue, 2006-05-09 14:05

Eeek, that means it will be couple of months of wait before arbirary items will be possible. Then probably another couple of months before a matured tagging system make use of that new system.

Thanks for giving new insight to the project mindless. The idea of an arbirary should be able to make how people display their album completely customizable. I don't mind to wait a couple of months, but knowing how good it can become probably make the wait harder.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2006-05-09 22:15

I encourage any interested developers to follow current SVN of G2 and watch this topic.. you can certainly get involved as it develops and not wait 2 months to see the results.

 
redhed

Joined: 2006-06-02
Posts: 4
Posted: Fri, 2006-06-02 14:34

This is very exciting and a big reason I chose Gallery for my photos. I can't wait to upgrade to 2.2. I may install a test system, so that I can start playing with the early code.

 
Eka_Mei

Joined: 2006-01-03
Posts: 132
Posted: Fri, 2006-06-02 15:35

same here, I would like to help with the development on make a tag system. Mindless, is there any way I can help?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2006-06-02 16:40

not yet, but soon.. next week i'll start on the core changes needed. testing will be one help, developing code that uses this new feature will be another.

 
Eka_Mei

Joined: 2006-01-03
Posts: 132
Posted: Fri, 2006-06-02 17:09
mindless wrote:
not yet, but soon.. next week i'll start on the core changes needed. testing will be one help, developing code that uses this new feature will be another.

I can definitely help with both.
Will wait for now! Thanks!

 
Porphyro

Joined: 2006-06-19
Posts: 4
Posted: Mon, 2006-06-19 13:27

This is a feature I'm really interested in. Is there anywhere I can watch to see how progress on this is going?

 
Eka_Mei

Joined: 2006-01-03
Posts: 132
Posted: Fri, 2006-07-14 03:34

have anything been done on this yet?

 
dbchip2000

Joined: 2005-12-11
Posts: 4
Posted: Fri, 2006-07-14 04:58

I stopped my development when i realized it was being developed by official gallery leaders

 
JanP

Joined: 2005-10-05
Posts: 34
Posted: Mon, 2006-07-17 13:35

I'd like to see RC1 of 2.2... It's July 17 now ;)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2006-08-01 18:31

OK, core support for dynamic albums has been added. I've added a "Keyword Albums" module to demonstrate how a dynamic album view is created.

If you're interested in this feature please get current svn or a nightly snapshot from 2-Aug or later and try out this code. Install the Keyword Albums module, configure it in Site Admin, and turn on the rewrite rule in URL Rewrite site admin. As I'm writing this, I haven't yet added any links into the keyword albums.. so after doing these steps, manually enter a URL in your browser like gallery2/key/{keyword_here}

If you can help with development of "tags" support, please do. I don't think I'll have time to put much more effort into this.. but now that core support is there, someone should be able to make a clone of the keyalbum module and run with it to build full tag support. Probably a module that has its own DB table to store tags for each item, a UI for setting tags, a permission to decide who can set tags for an item or create new tags, a block or view with links to view the tag album for the available tags.. lots of ideas...

FYI, some API changes were needed to support dynamic albums. I wrote up what this means for themes in G2.1 vs G2.2, here.

 
Roi Danton

Joined: 2006-06-15
Posts: 46
Posted: Sat, 2006-08-05 11:24

Great! The module reads the IPTC keywords almost correctly. There is only a problem if a picture has more than one keyword. Then the semicolon which separates the keywords is included in the keyword. (see attached images)

EDIT: Maybe the author of this gallery can give help.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2006-08-05 15:15

the module splits keywords on whitespace. search for '/\s+/' in the module and change it to '/[;\s]+/' to split on semicolons as well.

 
rillest

Joined: 2003-10-20
Posts: 14
Posted: Thu, 2006-08-17 12:20

Hi,
Any plans on adding multilanguage support to the new keywords module (..guess that the Multilanguage module needs to be updated with keywords fields first though..)?

//rILLEST

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Thu, 2006-08-17 13:16

mindless,

do the keyalbums have a specific "identification"? I'm currently playing with my PGtheme Patch to inlcude a Lightbox.
Everything works perfect now - except the keyalbums.

...
{if isset($theme.params.$frameType) && isset($child.thumbnail)}   
	{if $frameType == "albumFrame"}
		{capture assign=linkUrl}{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`" 
                                            arg3="enterAlbum=`$child.canContainChildren`"}{/capture}
	{elseif $frameType == "itemFrame"}    
		{if isset($theme.params.ViaLightBox)}
			{if isset($theme.permissions.core_viewResizes)}
				{capture assign=linkUrl}{g->url	forceFullUrl=true arg1="view=core.DownloadItem"	
                                                            arg2="itemId=`$child.resizedId`"}{/capture}
 			{else}
				{capture assign=linkUrl}{g->url params=$theme.pageUrl arg1="itemId=`$child.id`" 
                                                            arg2="enterAlbum=`$child.canContainChildren`"}{/capture}
 			{/if}
		{else}
 			{capture assign=linkUrl}{g->url params=$theme.pageUrl arg1="itemId=`$child.id`" 
                                                    arg2="enterAlbum=`$child.canContainChildren`"}{/capture}
		{/if} 
	{else} 
		{if isset($theme.params.ViaLightBox)}
			{if isset($theme.permissions.core_viewResizes)}
				{capture assign=linkUrl}{g->url forceFullUrl=true arg1="view=core.DownloadItem"  
                                                            arg2="itemId=`$child.resizedId`"}{/capture}
 			{else}
				{capture assign=linkUrl}{g->url params=$theme.pageUrl arg1="itemId=`$child.id`" 
                                                            arg2="enterAlbum=`$child.canContainChildren`"}{/capture}
 			{/if}
		{else}
 			{capture assign=linkUrl}{g->url params=$theme.pageUrl arg1="itemId=`$child.id`" 
                                                    arg2="enterAlbum=`$child.canContainChildren`"}{/capture}
		{/if}  
	{/if}      
	{g->container type="imageframe.ImageFrame" frame=$theme.params.$frameType}
	<a onmouseover="pic{$nome}.className='%CLASS% giThumbnail opacity{$Tover}'"         
           onmouseout="pic{$nome}.className='%CLASS% giThumbnail opacity{$Toff}'" href="{$linkUrl}"
		{if isset($theme.params.ViaLightBox)}
 			{if !($child.canContainChildren)}
	 			{if isset($theme.permissions.core_viewResizes)}
		 			rel="lightbox[x]"  
		 			title='{$child.title|markup}<br><a href="{g->url arg1="view=core.ShowItem" 
                                                arg2="itemId=`$child.id`"}">View Photo Page</a>'
		 			>
	 			{else}
		 			>
	 			{/if}
 			{else}
	 			>
 			{/if}
 			{if isset($theme.params.allowPreLoad)}
	 			<img src="{g->url forceFullUrl=true arg1="view=core.DownloadItem" 
                                              arg2="itemId=`$child.resizedId`"}" class="hiddenPic">    
 			{/if}
		{else}
 			>
		{/if}
		{g->image id="%ID%" item=$child image=$child.thumbnail class="%CLASS% giThumbnail opacity`$Toff`" 
                             name="pic$nome"}  
		</a>
		 {elseif isset($child.thumbnail)}
	<a onmouseover="pic{$nome}.className='%CLASS% giThumbnail opacity{$Tover}'" 
           onmouseout="pic{$nome}.className='%CLASS% giThumbnail opacity{$Toff}'" href="{$linkUrl}">     
		{/g->container}
		{g->image item=$child image=$child.thumbnail class="giThumbnail opacity`$Toff`" name="pic$nome"}   
	</a>
{else}
	<a href="{$linkUrl}">
		{g->text text="no thumbnail"}
	</a>
{/if}    
{if $theme.params.BtnAfter}
...

if I remove all the checks for permission, children and my lightbox flag - they use the lightbox properly - but then albums will try to use the lightbox script too or items there is no permission granted for ...

...
{if isset($theme.params.$frameType) && isset($child.thumbnail)}   
	{if $frameType == "albumFrame"}
  		{capture assign=linkUrl}{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`" arg3="enterAlbum=`$child.canContainChildren`"}{/capture}
 	{elseif $frameType == "itemFrame"}    
 		{capture assign=linkUrl}{g->url forceFullUrl=true arg1="view=core.DownloadItem" arg2="itemId=`$child.resizedId`"}{/capture}      
 	{else} 
      	{capture assign=linkUrl}{g->url params=$theme.pageUrl arg1="itemId=`$child.id`" arg2="enterAlbum=`$child.canContainChildren`"}{/capture}
 	{/if}  
  	{g->container type="imageframe.ImageFrame" frame=$theme.params.$frameType}
    <a onmouseover="pic{$nome}.className='%CLASS% giThumbnail opacity{$Tover}'" onmouseout="pic{$nome}.className='%CLASS% giThumbnail opacity{$Toff}'" href="{$linkUrl}"    
		rel="lightbox[x]"  
		title='{$child.title|markup}<br><a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}">View Photo Page</a>'
		>
    	{g->image id="%ID%" item=$child image=$child.thumbnail class="%CLASS% giThumbnail opacity`$Toff`" name="pic$nome"}  
  	</a>
 	{/g->container}
{elseif isset($child.thumbnail)}
 	<a onmouseover="pic{$nome}.className='%CLASS% giThumbnail opacity{$Tover}'" onmouseout="pic{$nome}.className='%CLASS% giThumbnail opacity{$Toff}'" href="{$linkUrl}"> 
  		{g->image item=$child image=$child.thumbnail class="giThumbnail opacity`$Toff`" name="pic$nome"}     
 	</a>
{else}
 	<a href="{$linkUrl}">
  		{g->text text="no thumbnail"}
 	</a>
{/if}    
...

Any idea where I make the logical fault??

Thanks for your help...
Lutz

Gallery version = 2.2-svn core 1.1.15
PHP version = 5.1.4 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.4 mod_ssl/2.2.2 OpenSSL/0.9.8b
Database = mysql 5.0.22-log,
Theme=PGtheme,
Gallery-URL=http://lf-photodesign.de

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2006-08-17 21:54

that's a lot of code, and you didn't really explain what's wrong so I don't know what to look for.
generally i'd expect a 2.1 theme to display a keyword album ok, but if you click a thumbnail it would jump to the album instead of "browsing the keyword album".. to make this happen, bump required Theme API to 2.4 and change references to core.ShowItem to use $theme.pageUrl.

http://svn.sourceforge.net/viewvc/gallery?view=rev&revision=14141
http://codex.gallery2.org/index.php/Gallery2:API_Changes_Since_The_Last_Release#GalleryThemeApi

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Fri, 2006-08-18 04:20

its already browsing the keyword album - I made the changes neccessery to make PGtheme do this - I added a step to open a presize of th ealbum item in a lightbox before browsing to the photopage ... but that gives me an idea ...

Gallery version = 2.2-svn core 1.1.15
PHP version = 5.1.4 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.4 mod_ssl/2.2.2 OpenSSL/0.9.8b
Database = mysql 5.0.22-log,
Theme=PGtheme,
Gallery-URL=http://lf-photodesign.de

 
jasonfnorth

Joined: 2004-10-29
Posts: 41
Posted: Sat, 2006-08-19 00:15

Yea, it really sucks the development of this module just died, as so many people want it. When I install the beta, I get:

Item tagging system
Incompatible module!
Core API Required: 6.0 (available: 7.3)
Module API Required: 2.0 (available: 3.0)

Any developers out there up for the challenge??

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2006-08-19 07:10

"development of this module just died"... I guess you're talking about some code attached much earlier in this thread? The code developed recently is in current svn / nightly snapshots. Now that dynamic albums are possible, it would be a great time for someone to pickup development of a "tag" module where that code left off.

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Sat, 2006-08-19 07:38

mindless,
btw. I found a solution to run the lightbox for the keyalbums ... but this would be contrary to the option to browse the keyalbums, it would open the corresponding album ... so I leave the "standard" for the keyalbums :)

Gallery version = 2.2-svn core 1.1.15
PHP version = 5.1.4 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.4 mod_ssl/2.2.2 OpenSSL/0.9.8b
Database = mysql 5.0.22-log,
Theme=PGtheme,
Gallery-URL=http://lf-photodesign.de

 
Jeremy Butler

Joined: 2005-12-07
Posts: 33
Posted: Sat, 2006-08-19 11:53
Quote:
a great time for someone to pickup development of a "tag" module where that code left off.

I don't really have the programming chops to do this, although I may try to noodle around with it later; but in my implementation of dynamic albums I changed the word "keyword" to "tag" wherever I could find it. That is, I changed it in terms of what is displayed to the user, not in terms of the background code.

I did so because I think "tag" is a term on the rise. And that "keyword" has other implications that might confuse my users.

You can see this effect in beta... well, maybe alpha stage at:

http://www.tcf.ua.edu/tvcritgallery/main.php/key/+focal+length

which shows a dynamic album built on the "focal length" tag.

If I were to mount an effort to build a tagging module, the two essential features for me would be:

1. Ability for users to add tags to items.
2. A tag cloud or other, dynamic display of the tags. The current select list is a bit too subtle.

Regards,

Jeremy Butler
www.ScreenSite.org
www.TVCrit.com
www.AllThingsAcoustic.org

 
kevincw01
kevincw01's picture

Joined: 2004-07-31
Posts: 27
Posted: Mon, 2006-08-21 06:29

I don't see a difference between a keyword and a tag so I chose to extend the keyword album link module and I added a flickr-style keyword cloud option.

I modified the blocks.inc and keywordlinks.tpl to do this. I used the 8/18/06 nightly gallery2 tarball and followed mindless' instructions for setup. To enable the cloud, you replace the two files with the attached in the /gallery2/modules/keyalbum/templates/blocks/ directory. Then you goto 'site admin' and choose to setup the 'matrix' theme(I guess this would work with any theme). In the matrix theme setup goto the "Blocks to show on album pages" area and add the "keyword album links" block and then select it in the drop down. You will see an additional option "Show keyword cloud instead of link drop-down list?", 'check' it and then save the settings. Now when you view your albums, you will see a 'cloud' of all your keywords at the bottom.

The cloud is not finished in that I need to figure out how to make the keywords that are more popular, larger in font. Gallery2 veterans: please tell me how I can query the db to find a keyword count for each keyword. I noticed the data is in the g2_item database under g2_keyword column but I couldn't make the connection on howto query it(g2 is very abstract, IMO) This could be a CPU-intensive query; so maybe there does need to be a seperate keyword table with counts and other data. Not sure how to do that either but with enough hints i can do that too.

There's more to be done obviously but at least we're making progress. I'm not sure how to create a dedicated "cloud" page. It'd be nice to be able to set that to the default the user sees when he starts looking at pictures.

Preview at http://netkeREMOVEv.com/test/gallery2
(take out "REMOVE" from the domain, i did that to keep the spiders away :) )

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Mon, 2006-08-21 06:48

Kevin, thanks - I'm gonna check it on my PGtheme-Clone...

Gallery version = 2.2-svn core 1.1.15
PHP version = 5.1.4 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.4 mod_ssl/2.2.2 OpenSSL/0.9.8b
Database = mysql 5.0.22-log,
Theme=PGtheme,
Gallery-URL=http://lf-photodesign.de

 
OsMoSiS

Joined: 2006-08-21
Posts: 1
Posted: Mon, 2006-08-21 10:00

I've started using keyword albums and find them a lot useful, that would be a good feature for the next gallery 2.2.

Experimenting with keyalbum I've noticed that keywords are searched by LIKE '%key%' so, if there are two keywords like 'sun' and 'sunset', if I search 'sun' then I find also objects with 'sunset' even if this is a different keyword.
I don't know the Gallery framework but I think the simpliest way to avoid this should be a check in getChildIds, into KeywordAlbum.inc, that splits ('/[;\s]+/') the keywords returned for every item in $searchresult into an array, then searches this array finding $keyword and only in case of success put the id into $itemIds[].

 
Jeremy Butler

Joined: 2005-12-07
Posts: 33
Posted: Mon, 2006-08-21 11:34

I, too, noticed the anomaly of "sun" equaling "sunset". Wish I knew enough about g2 to suggest a solution.

And here's another anomaly:

The "keyword album" drop-down list is sorted in a manner than is not intuitive to users. That is, it's somewhat alphabetical, but lowercase and uppercase are sorted separately. And, in my list of keywords (tags), there are separate groups of alphabetized words. Take a look at

http://www.tcf.ua.edu/tvcritgallery/main.php/key/+focal+length

to see what I mean. ("keyword albums" has been renamed to "view tags".)

Quote:
a check in getChildIds, into KeywordAlbum.inc, that splits ('/[;\s]+/') the keywords returned for every item in $searchresult into an array

And finally, since my keywords are often multiple word terms (e.g., "focal length"), I changed the split to be ONLY on semicolons, as can be seen in this line from module.inc:

foreach (preg_split('/;+/', $item->getKeywords()) as $keyword) {

On a practical note, should a new forum topic be created to foster development discussion for this module? I wouldn't want it to get lost under the topic title of "Flickr Tags".

Thanks.

Jeremy Butler
www.ScreenSite.org
www.TVCrit.com
www.AllThingsAcoustic.org

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2006-08-21 15:39

1. sure, feel free to start a new forum topic
2. someone mentioned not knowing the difference between keywords and tags.. the next couple messages found exactly the differences: keywords is just a freeform text field. so you see things like "sun" matches "sunset" and you have some rules about how to split the text into separate keywords. I'd expect a tag module to do more exact matching for searches and to manage separating tags for you, so you don't have to know/decide if spaces or commas or semicolons are used.

 
kevincw01
kevincw01's picture

Joined: 2004-07-31
Posts: 27
Posted: Mon, 2006-08-21 19:18

mindsless: good point, I stand corrected. Lets start a tag module.

Also, I agree about a seperate forum topic. If someone creates one then please post the link here so people who search this can go there. I will start work on the new module unless someone beats me too it(which is okay by me) ;)

 
allanmarcus

Joined: 2005-12-17
Posts: 21
Posted: Thu, 2006-08-24 19:55

keyword album forum topic

http://gallery.menalto.com/node/53588

let's talk about it there.