Ticket #3916 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Fix for 'link_rating' filter

Reported by: chriskbchan Assigned to: rob1n
Priority: low Milestone: 2.2
Component: General Version: 2.1.2
Severity: minor Keywords: has-patch commit
Cc:

Description

The 'link_rating' filter is not called even 'show_rating' is set in any get links functions. This fix should enable this by calling 'get_linkrating' appropriately.

Attachments

bookmark-template.php.diff (0.6 kB) - added by chriskbchan on 03/06/07 10:18:34.
bookmark-template-php.diff (0.7 kB) - added by jhodgdon on 03/07/07 04:14:39.
Patch that adds spaces before the output of ratings
3916.diff (0.7 kB) - added by rob1n on 03/31/07 02:18:23.
Why not just use $between? That's what it's there for, no?

Change History

03/06/07 10:18:34 changed by chriskbchan

  • attachment bookmark-template.php.diff added.

03/06/07 13:46:59 changed by chriskbchan

  • status changed from new to closed.
  • resolution set to fixed.

03/06/07 15:19:47 changed by foolswisdom

  • keywords changed from link rating filter to link rating filter has-patch.
  • status changed from closed to reopened.
  • resolution deleted.
  • milestone changed from 2.1.3 to 2.2.

03/07/07 04:11:10 changed by jhodgdon

  • keywords changed from link rating filter has-patch to reporter-feedback link rating filter has-patch.

I tested this patch, and although it adds the rating text, I think maybe it needs a space in there. The default behavior in today's trunk anyway (2.1.2 version, approximately) is that get_linkrating has no filters, so it is just putting out a number, and it gets appended with no spaces onto whatever else is being printed out (such as the description). Add a space to the patch, right before the rating print-out, and things will be nicer...

Just a thought...

03/07/07 04:14:39 changed by jhodgdon

  • attachment bookmark-template-php.diff added.

Patch that adds spaces before the output of ratings

03/07/07 05:07:05 changed by jhodgdon

That was tested in SVN revision # 4984

03/07/07 10:04:25 changed by chriskbchan

Originally I did put the space before the ratings, however, I think it's what to be done by the plugin, as you could check out my blog http://blog.chris-chan.com/, I have the plugin showing an image rather text, without the space it actually looks nicer! Please comment.

03/07/07 14:39:32 changed by jhodgdon

Without the space, the default behavior (putting the number in) looks very bad. Though I agree not many people are likely to use the un-filtered default behavior.

I don't see any link ratings on your site...

03/07/07 15:30:43 changed by chriskbchan

You should find the link ratings under the 'Recently Watched Movies' on the sidebar. I have written a very simple plugin to represent the rating with 'stars' according to the rating I have given to a particular movie (that's how I find this patch necessary since without this modification my plugin will not work). As the 'stars' images I have been using have some white spaces before them, with an extra space the 'stars' will be further apart from the link. As we can't assume what will be displayed by the plugin, either Text or Image, I guess the best place to do the spacing will be from the plugin. Just my 20cents.

03/07/07 15:59:39 changed by chriskbchan

One more thing, if you check the original source, those codes for appending contents for 'show_updated' & 'show_description' didn't assume space before them also. So I think it's better to discard the space.

03/07/07 17:04:21 changed by jhodgdon

Not quite true. show_description has an extra flag "between" to say what to put between the image and description.

But point taken.

03/07/07 17:09:03 changed by jhodgdon

  • keywords changed from reporter-feedback link rating filter has-patch to tested link rating filter has-patch.

Recommend taking first patch above (without spaces).

03/27/07 02:39:52 changed by rob1n

  • keywords changed from tested link rating filter has-patch to has-patch.

I'm +1 for the first patch. Currently we don't even respect $show_rating, so that's a big bug right there.

03/31/07 02:18:23 changed by rob1n

  • attachment 3916.diff added.

Why not just use $between? That's what it's there for, no?

03/31/07 02:19:06 changed by rob1n

  • owner changed from chriskbchan to rob1n.
  • status changed from reopened to new.

03/31/07 19:28:49 changed by rob1n

  • keywords changed from has-patch to has-patch commit.

03/31/07 19:43:52 changed by rob1n

  • status changed from new to closed.
  • resolution set to fixed.

(In [5153]) Add link rating to wp_list_bookmarks(). fixes #3916