Advanced Entity Tokens (AET) exposes your site's entities to the token api.
Project Information
Project Page
git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/EyalShalev/1664648.git aet
Target Core is Drupal 7.x
Similar Modules
There were only two modules that I could find with similar purpose: Entity Embed & Entity Token Filter. Both are sandboxed and don't look much alive.
Another similar module is node_embed that adds a filter that can embed nodes. AET is diferent from node_embed by using the already existing token api and a more generic (and D7) approach - Entities.
Known Issues
- Entity Recursion:
Entity Recursion can happen if I insert the [aet:node:1] tag inside the 1st node.
I tried to handle this by creating a function that checks if the entity is the main page content but it won't cut it. Right now I'm thinking about using function cache to check if this entity has already been loaded. - Better hook_token_info implementation.
I want to list all the entities and their properties but when I view all the tokens it just looks messy.
If someone here can propose a better way to implement the hook I'd be glad.
TODOs
- Add GUI to WYSYWYGs
Reviews
P.S. I am working on reviewing more projects.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | drupalcs-result.txt | 1.9 KB | klausi |
Comments
Comment #1
j2r commentedThere are Many Drupal coding standard issue. Please look at the link
http://ventral.org/pareview/httpgitdrupalorgsandboxeyalshalev1664648git-...
Comment #2
eyal shalevThanks J2r,
Tough on first impression most of the errors relate to spacing before the comment line and whitespace :)
Comment #3
eyal shalevAll of the errors (
except one in the info file) were fixed.The remaining warnings relate to exceding 80 chars by a small number (low proirity as I see it)
The Error in the info file claims that I don't declare the name property which is very odd because as far as I can tell I do declare it.It seems that when the info file is encoded with UTF-8 there is a proplem reading it. converting it to ANSI fixed the problem.I tried encalpsing the name in qoutes but nothing.
I would very much appriciate anyones help in this issue.
Comment #3.0
eyal shalevadded the review on http://drupal.org/node/1676528
Comment #3.1
eyal shalevAdded Article jump review
Comment #4
eyal shalevComment #5
cthiebault commentedAutomatic review
Add @file block to aet.tokens.inc and aet_view.tokens.inc.
See http://drupal.org/node/1354#files
Also there should be no trailing spaces.
Manual review
Comment #6
eyal shalev@cthiebault,
Thanks for the review.
I decided that the AET View submodule was unnecessary so I removed it and reincorparated its functions to the AET module.
The main Token module doesn't use a package so putting my module under a Token ackage seems a bit odd (I did it anyway).
The typos are fixed as well.
P.S.
I know it's a lot to ask but I would like to hear about the expierence of using the module, are there any bugs? Is the recurssion fix working?
Regards,
Eyal
Comment #7
cthiebault commentedI tried quickly with Token example... but I need a more real use case.
I'll do it tomorrow.
Cedric
Comment #8
eyal shalev@cthiebault,
A good use case can be inserting a node inside a block.
If you need help implementing this you can contact me.
Regards,
Eyal
Comment #9
Enxebre commentedHi Eyal Shalev,
After a quick review I just can tell you that users would be grateful if you had time to implement hook_help()
Thank you!
Comment #10
patrickd commentedhook_help() is absolutely no requirement - therefore no major issue - therefore no reason to set needs work
Comment #11
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
manual review:
"$info['types']['aet']['description'] = t('AET Description');": not a very useful description?
But otherwise looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #12
mitchell commentedThanks for your contribution, Eyal Shalev!
I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on irc in #drupal-contribute. So, come hang out and stay involved! Thanks again, and good luck! :)
Comment #13
eyal shalevThanks klausi, mitchell, Patrickd & Cedric for all your help.
This is now a full project thanks to you.
Comment #14
eyal shalevComment #14.0
eyal shalevEdited the reviews urls