Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added rel-tag microformat to tags in Elgg. (Trac #729) #729

Closed
elgg-gitbot opened this issue Feb 16, 2013 · 9 comments
Closed

Added rel-tag microformat to tags in Elgg. (Trac #729) #729

elgg-gitbot opened this issue Feb 16, 2013 · 9 comments

Comments

@elgg-gitbot
Copy link

Original ticket http://trac.elgg.org/ticket/729 on 39088505-10-30 by trac user jonkemp, assigned to unknown.

Elgg version: 1.2

Modification of Rev. #2627.

Designating tags as tags in Elgg by using the tag Microformat. For reference see:

http://microformats.org/wiki/rel-tag

"By adding rel="tag" to a hyperlink, a page indicates that the destination of that hyperlink is an author-designated "tag" (or keyword/subject) for the current page."

@elgg-gitbot
Copy link
Author

trac user jonkemp wrote on 39088548-08-10

Just noticed that tags in Elgg do not follow the tag mciroformat. Here is the code for tags in Elgg.

Elgg

This is what the microformat specification states.

Tags may only be placed in the URL path, and only in the last segment of the path. Tags may not be placed in query parameters or fragment identifiers.

This is the correct format called for in the specification.

Elgg

So tag urls need to be rewritten in Elgg to correctly follow the specification. But they still require the rel="tag" attribute.

@elgg-gitbot
Copy link
Author

trac user jonkemp wrote on 39088813-04-10

I rewrote the tag url format to follow the microformat specification and I added a rewriterule to .htaccess to handle the url and still display the tag.

@elgg-gitbot
Copy link
Author

Attachment added by trac user jonkemp on 39088815-08-26: 2627_rel_tag.diff

@elgg-gitbot
Copy link
Author

trac user jonkemp wrote on 39090088-06-16

Actually, the code above is wrong, here is what I meant it to be.

Here is the code for tags in Elgg.

Elgg

This is the correct format called for in the specification.

Elgg

The correct format should have rel="tag" and Elgg currently does not.

@elgg-gitbot
Copy link
Author

trac user jonkemp wrote on 39090092-04-28

Replying to jonkemp:

Argh, wrong again. Here is what it should be.

This is the correct format called for in the specification.

Elgg

Anyway, the diff file I posted has the correct code.

@elgg-gitbot
Copy link
Author

benwerd wrote on 39098231-06-03

(In [svn:2642]) Tag URLs now conform to the microformats specification. Fixes #729

@elgg-gitbot
Copy link
Author

benwerd wrote on 39098233-02-06

This has been merged in, although I rewrote the rewrite rule to only match tag/ (as I wasn't confident it wouldn't match other URLs we might use in the future).

@elgg-gitbot
Copy link
Author

trac user jonkemp wrote on 39099789-02-21

Line 128 needs to be rewritten from this.

RewriteRule ^tag/([A-Za-z0-9\+-]+)/?$ search/?tag=$2

to this

RewriteRule ^tag/([A-Za-z0-9\+-]+)/?$ search/?tag=$1

@elgg-gitbot
Copy link
Author

benwerd wrote on 39100614-04-27

Whoops, well spotted! Corrected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant