Make the ilovethis widget themable

douggreen - December 28, 2007 - 22:31
Project:I love this
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Thanks for the module!

The attached patch makes the ilovethis widget themable. The reason I would like this, is that I would like to change the text in the 3 links. "I Love This" is cute, but in this case, I'd prefer to say something like "I support this." You can sortof do this with the locale module, but I've always found that kinda kludgy, and I'm not quite sure that it works right for real multi-lingual sites (as mine is).

I thought about making each of the links themable or even as settings, but I think that this is the smallest change, with the least impact, that gives complete flexibility to control the display.

AttachmentSize
theme-ilovethis.patch3.43 KB

#1

douggreen - December 28, 2007 - 23:00

Here's an updated patch that allows a little easier theming of the theme_ilovethis_view_table. Theme functions should mostly control output display, so I've moved some of the logic that builds the rows into the invoking function. If the theme function doesn't like the header and rows, they are still free to change them.

AttachmentSize
204503.patch 6.57 KB

#2

douggreen - January 4, 2008 - 13:53

This additional change won't theme the widget or the link to all people, if the user doesn't have access.

AttachmentSize
204503.patch 6.64 KB

#3

douggreen - January 4, 2008 - 13:58

doh, sorry, this patch fixes the access

AttachmentSize
204503.patch 6.64 KB

#4

douggreen - January 4, 2008 - 18:29
Status:needs review» fixed

committed

#5

Anonymous - January 18, 2008 - 18:32
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.