sgladstone / com.pogstone.fancytokens Goto Github PK
View Code? Open in Web Editor NEWCiviCRM extension that provides tokens for events, contribution pages, greetings, profiles and forms. Tokens can be used in emails and letters.
License: Other
CiviCRM extension that provides tokens for events, contribution pages, greetings, profiles and forms. Tokens can be used in emails and letters.
License: Other
I have updated https://civicrm.org/extensions/fancy-tokens with "ready for automated distribution" and added the git url. So now if you tag the 3.0 release it will automatically create and publish a release at civicrm.org and users will be able to download and install the extension in-app.
Fatal error when using casual greeting in Smarty.
I followed the stacktrace and found unsupported syntax at line 443 of utils/GreetingHelper.php
adding single quotes resolves the issue. I'd create a pull request, but I'm afraid I don't know how to do that.
Hi Sarah,
I noticed that the extension directory wasn't showing version 3.6, so I looked into why. The release isn't tagged in git.
If you've got your master branch checked out on your computer, you can just do:
git tag 3.6
git push origin 3.6
Thanks!
Jon
Very little has changed in CiviCRM 4.5 to 4.6 wrt tokens, so I suspect you could just tag and release a 4.6-compatible version without any updates (but haven't tried it myself).
I had an issue where a client was sending out emails to event registration pages where the link was missing, even though they added the event ID to the token.
After looking at the code, it appears that there is a "LIMIT 15" clause in the SQL which limits tokens to the last 15 events by event date. I'm not sure if this project is still active, but I have added this comment in case anyone else runs into this problem.
Hi @sgladstone, I would like to move this extension to CiviCRM's Gitlab, so that we can minimally maintain things such as PHP8 support. You would still have maintainer access, but other people could help fix bugs and publish new releases.
Do you have any plans for this extension? Any objections?
Right now when I insert a token for a profile form, the clickable text that's used is the internal profile name. Where available, I think it should instead use the public-facing profile name.
Screenshot of the profile management form:
Screenshot of the resulting email with token {communitynews.standaloneprofile___16}
:
I think the related logic may be at
com.pogstone.fancytokens/fancytokens.php
Line 109 in 2bbbf9a
Tokens are available in the token list for upcoming events that are not Public. This makes sense to me.
However, those tokens are blank, which is not the expected result.
There are two possible approaches:
Simply don't make non-Public events available in the token list. I don't prefer this, as there are many reasons one might want to send emails to register for an event while not having that event listed publicly.
Make these tokens resolve as expected.
I think that's the cause of this reported issue: https://issues.civicrm.org/jira/browse/CRM-17576
Hi Sarah,
I have been playing to get a checksum expiration date 'token' working through smarty.
I did not succeed. But maybe it would be easy for you to create a token with:
the current date + the checksum lifespan.
So in emails to edit a profile we can use something like:
You can use the links in this email to edit your data until September 20th.
Maybe it's harder than I think to create, but maybe it's a 5 minute thing for you :-)
Hey there,
I want to shedule a mail being sent every 30 days/once a month to remind my users for upcoming events next month and I plan to do this with civirules.
Problem:
However, communitynews token with 30 days isn't enough, because then there are events with 32 days in upcoming, this means:
Solution:
An 37 day upcoming token would give me some overlapping
Any known issues? Likely issues?
Hi Sarah,
Thanks for a new version of your excellent extension!
I was just reviewing the code as part of my maintenance contract for a client, and I saw that you call $_SERVER['HTTPS']
to determine if HTTPS is in use.
However, this only determines if the current user is using SSL, not if SSL is the preferred protocol. Instead, I think you can replace a whole lot of that code with a call to CRM_Core_Config::singleton()->userSystem->getAbsoluteBaseURL()
.
Since that code is Drupal-specific, you might even get away with a Drupal-specific call to url()
but I suspect that would break on D8, whereas this approach would work for any non-CiviCRM URL on the site. I think it'll also help with multi-site edge cases.
Got error 'PHP message: PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in [*********httpdocs/backdrop/files/civicrm/ext/com.pogstone.fancytokens/fancytokens.civix.php] on line 149'
Common Civix error for PHP8
When a contact in a spousal relationship does not have a specified gender or prefix, the gender is assumed to be male: {greetings.joint_formal} and {greetings.joint_formal_firstname} resolve to "Mr. and Mr. LastName" and "Mr. First Last and Mr. First Last".
In a world of gender complexity, I'd suggest that if a token encounters no explicit gender cues, that it resolve instead to FirstName LastName. At the very least, the README should explicitly describe this limitation and indicate that to use the formal greeting tokens the dataset must include gender or prefix.
The overridden templates/CRM/Mailing/Form/InsertTokens.tpl would need updating for 4.5. Or if at all possible I would recommend removing it completely, as the token insert ui is much nicer in 4.5 anyway and probably whatever you were tweaking with the tpl override has been fixed already.
When using Formal joint tokens (those that include the individual prefix), the gender is evaluated to put the male first in the greeting (i.e. Mr. & Mrs. Smith). However, Casual joint tokens (those that exclude the individual prefix) put contact_a of the relationship as the first in the greeting regardless of the contact's gender or title. The only workaround is to delete the relationships where the husband is contact_b and recreate them.
Ideally, all joint tokens should evaluate the gender in order to put the male first.
As far as I can tell, it should be pretty straightforward to fix this by simply copying the conditionals used in formal joint greeting tokens to the casual joint greeting tokens.
Happy to chip in for a fix
Here are some screenshots from some tests I ran.
Probably nothing but I keep getting this error:
Notice: Undefined index: group_type in fancytokens_civicrm_tokens() (line 53 of /home/xxx/public_html/beta/sites/default/files/civicrm/extensions/com.pogstone.fancytokens-master/fancytokens.php).
We often have the need to export contact addressees and addresses to send to a mailhouse for a mailing. It would be nice to be able to export the joint greeting along with the address.
On 4.6.7 I get error in /modules/civicrm/extern/error_log
PHP Fatal error: Call to undefined function module_exists() in /civicrm/extensions/com.pogstone.fancytokens-master/fancytokens.php on line 103
Scope issue with drupal API Also strange statement no?
if( module_exists( "webform_civicrm") && module_exists( "webform_civicrm"))
Just wondering if the current maintainer is still Sarah given the sale of Pogstone.
Hey there,
my setting is in #24. For my sheduled reminders I not only want to send public, but also "internal" events.
If I see it correctly, communitynews.upcomingevents___day_30 sends only public events?!
Is there a chance you make a flavour with all events, which is also non public.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.