Post Reply 
Add user tag links on some Flickr pages
Apr. 25, 2011, 02:28 PM (This post was last modified: Apr. 25, 2011 02:37 PM by sbk.)
Post: #1
Add user tag links on some Flickr pages
Code:
Name = "FlickrAddUserTagLnk[Sbk20110425D1a3c"
Active = TRUE
Multi = TRUE
URL = "\w.flickr.\w/(photos/tags|groups)/(([^/]+)\1)$SET(TagFlkr=\1)"
Bounds = "> \w (<a ([^>]++)\3(href\=\"/photos/\5)/\"*++>[^<]+</a>)\7"
Limit = 128
Match = "*"
Replace = ">\7 <a href="/photos/\5/tags/$GET(TagFlkr)/" title="$GET(TagFlkr), FlickrAddUserTagLnk[Sbk">&spades;</a>\n"

"Value": you can go to other photos on same topic (tag), by that user (username under photo that interests you).

Filter grabs tag from current page. (so sometimes the page for url doesn't exist. I assume because user has not used that tag). Filter adds a link next to user name. Link shows as a "spade" character.

An example of a ../user/tags/.. url in the link that this filter adds:
http://www.flickr.com/photos/beos_apps/tags/haiku-os/

Multiple html examples for proxo test window. 1st line is speculative variation. 2nd, 3rd are real:
<div>From <a href="/photos/bobkovsky/">vadim bobkovsky</a>
<div>by <a href="/photos/jorgemare/" class="owner">jorge.mare</a>
<br> From <a href="/photos/40897190@N08/">-Meanwhile-</a>

url examples
http://www.flickr.com/groups/haiku-os/
http://www.flickr.com/groups/haiku-os/pool/
http://www.flickr.com/groups/haiku-os/po...303745177/

Filter also adds unusable links in a few locations on these pages:
http://www.flickr.com/photos/tags/haikuos/interesting/
http://www.flickr.com/photos/tags/haikuos/
http://www.flickr.com/photos/tags/beos/clusters/
I think fiter could avoid this by restricting beginning of match:
[code]
> \w <
[code]
to only two words:
[code]
> (from|by) <
[code]
but that might prevent desired matches in (future?) other pages.
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: