The attached patch replaces the current implementation of %foo placeholders with those provided by the token module. It also
implements the token hooks to extend these with ecard specific tokens.

However, this patch may or may not dependent on #608684: split sending of ecards into an API call - I didn't re-roll it from a clean install, sorry.

Cheers,
Stella

CommentFileSizeAuthor
#5 608788-5.patch9.98 KBstella
#1 608788.patch10.67 KBstella
ecard_tokens.patch10.67 KBstella

Comments

stella’s picture

StatusFileSize
new10.67 KB

Patch re-roll

kars-t’s picture

Status: Needs review » Needs work

I have to apply this by hand. This may take a while.

The good side of the patch is that we use token! Yay!

The bad side is that we basically fork the module here because all old setting with %sitename won't work anymore. And the module will have to depend on token which is not in the current patch. I already wanted to make a really new version so with this patch I will make a new branch 6.x-2 so it doesn't get mixed up. Any Tweaks should go into this than.

kars-t’s picture

Status: Needs work » Fixed

#608788 by stella | Kars-T: Added add support for token module.

I did commit this to the 6.x-2.x branch. Thank you!

Status: Fixed » Closed (fixed)

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

stella’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new9.98 KB

The above patch never made it into the 6.x-1.x branch and only the 2.x branch which seems to be abandoned if commits are anything to go by. So re-opening this ticket with a patch re-roll against the latest 1.x. I don't expect it to get committed to 6.x since that's feature frozen now (though hoping!) but really uploading here in case anyone else wants this functionality on the 6.x-1.x branch.

kars-t’s picture

Hi Stella

the problem is that it is such a long time I can't tell anymore why I did a 2.x and what was the status of 1.x. Your patch seems clean and I thrust you so if you say it's a good idea I would commit it to 1.x?

stella’s picture

I'd like to do a bit more testing of the re-rolled version, but certainly I've been using the old one in production for over a year now.

I think you didn't commit it to 1.x branch because it doesn't implement an update hook to update existing installations of the ecard module where people are relying on the old %placeholders. You could probably write one easily enough and just do a str_replace() or strtr() on each affected variable like you do to replace the placeholders with the actual values.

kars-t’s picture

Status: Needs review » Closed (won't fix)

Hmm I set this to "won't fix" so it doesn't bug me anymore. There won't be a 6.x-2.x ...