With this simple block module you can use the display options of the TagCanvas Javascript Class for self-defined text links and images. All links, images and options should be adjusted easily in the backend.
This module is not a clone of TagCanvas which depends on the module Tagadelic.
simpletagcanvas Sandbox Project page
Git
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/medienverbinder/1969100.git
Reviews of other projects:-
http://drupal.org/node/1913916#comment-7463018
http://drupal.org/node/2005062#comment-7467072
http://drupal.org/node/1995434#comment-7473368
https://drupal.org/node/2012340#comment-7526679
https://drupal.org/node/2017351#comment-7532951
https://drupal.org/node/1999288#comment-7536243
Comments
Comment #1
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://ventral.org/pareview/httpgitdrupalorgsandboxmedienverbinder196910...
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #1.0
medienverbinder commentedwrong sign in the git url
Comment #1.1
medienverbinder commentedwrong sign in the git url
Comment #2
medienverbinder commentedI have fixed PAReview checklist. Formatting looks clean now.
Comment #3
internetdevels commentedHi,
Found some issues:
1) You added dependencies in .info file and you added function_exists('libraries_get_path') in .module file. If there would be no module libraries your module will not be enabled
2) for file simpletagcanvas.mainconfig.inc it would be better to use the name simpletagcanvas.admin.inc.
3) in simpletagcanvas.mainconfig.inc
If we add the following code at the end of the form:
we will be able to delete submit, because all our variables will be saved automatically.
4) file simpletagcanvas.admin.link.inc
on line 69 - 74 - it is t() funtion with empty value in argument, but we are not sure what is it for and do we need it at all.
Comment #4
medienverbinder commentedHi,
thanks for your reply.
1) I use the drupal module "Libraries API" to integrate the external library TagCanvas and to provide information about the correct installation of the TagCloud plugin. The dependency of the drupal module "libraries" is intended.
2) I have renamed the file to "simpletagcanvas.admin.inc" (also makes sense)
3) I have tried and adopted the proposal.
4) I have removed the empty t() functions.
Comment #5
Caseledde commented1) Delete variables in hook_uninstall().
Use variable_del() to delete all variables stored by your module.
2) Maintain content before the template file.
You may use a seperate function to place your php script there. In this way you can just print your variables like:
Thus the template file is better readable.
3) $variables in simpletagcanvas_theme().
You declare 'content' as variable, but don't use it in the template file.
In addition to 2) you may update simpletagcanvas_theme() with the variables you need and provide them during impletagcanvas_block_view() and add them to '#variables'.
4) Attach js and libraries with '#attached'
Use '#attached' in simpletagcanvas_block_view() to attach js and libraries like you do with css. In this way simpletagcanvas_add_tagcanvas() and simpletagcanvas_preprocess_html() are obsolete. The '#attached'-attribut will invoke drupal_process_attached() during the render process. drupal_add_js() will be called during drupal_process_attached().
Comment #6
medienverbinder commentedThanks for taking time to review my module @Caseledde.
Your suggestions have made the module code lines slimmer by a few and I've learned quite a bit!
1) The variables are now uninstalled in the hook_uninstall().
2) There now exists another function "simpletagcanvas_block_content" that creates an array for the template. The template is now better readable and has far fewer lines.
3) The template variables are now assigned within the function simpletagcanvas_theme() and the function simpletagcanvas_block_view() has been extended to
4) I have implemented it exactly as suggested. (thank you again for the note) Thus, the two functions simpletagcanvas_add_tagcanvas() and simpletagcanvas_preprocess_html() have become obsolete.
Comment #7
aw030 commentedAutomated review:
PAreview.sh on ventral.org: http://ventral.org/pareview/httpgitdrupalorgsandboxmedienverbinder196910... 0 problems found.
Coder module: OK, nothing found.
Manual review:
- Install a fresh drupal 7.22
- Move the module package to folder to sites/all/modules
- Install module
- Go to configuration page
- Configured some options.
- Save the settings.
- Entered links / uploaded images.
- Save the settings.
- Result as expected: The images just uploaded appear constellated as a sphere in the html5 canvas.
- Tested and played around with the settings: no problems found, no javascript errors detected.
No issues found in manual review and issues mentioned by all the previous reviewers seems to be fixed very well.
all works fine and the drupal coding conventions inclusive usage of integrated drupal functions were well implemented, so the application status should be "reviewed by the community"
there are only some console.log's in js/simpletagcanvas.js (line 15-19) that you should remove before any release.
Comment #7.0
aw030 commentedwrong sign in git url
Comment #7.1
medienverbinder commentedReviews added
Comment #7.2
medienverbinder commentedadded review of a other project
Comment #8
medienverbinder commentedbonus tag added
Comment #9
klausimanual review:
<script>alert('XSS');</script>, which has more than one character. Why do you even need simpletagcanvas_validate_string() and the preg_match()? The link text should allow for any characters? See also https://drupal.org/node/289842"><script>alert('XSS');</script><div height="5as canvas width on the config page I get a nasty javascript popup when the block is displayed. You need to sanitize user provided text before printing, make sure to read https://drupal.org/node/28984 again.Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #10
medienverbinder commentedThanks a lot for the in-depth review.
1) fixed
2) added the function "simpletagcanvas_permission()"
3) renamed
4) renamed
5) added a couple of t() functions
6) corrected
7) added t() functions
8) added the l() - and theme() function
9) corrected
10) removed simpletagcanvas_validate_string() and added check_plain().
The link text now allows all the characters, but check_plain encodes special characters in a plain-text string for display as HTML.
11) Yes. This module use the plugin "TagCanvas" primarily for manually defined graphics and is not a substitute for the taxonomy module controlled TagCanvas. The ability to create text links only a option to offer a combination of text and graphics within the plugin cloud shapes.
12) Yes. I am aware of this fact. But I need all the variables on the pages where I want to represent the block. Of course, i could limit the number of fields (image links), but i wanted to stay as flexible as possible.
13) The old file "simpletagcanvas.mainconfig.inc" was deleted
14) added "#element_validate" to "simpletagcanvas_admin_form()" and check_plain to simpletagcanvas.tpl.php prevent XSS exploits
Comment #11
brice_gato commentedHello medienverbinder,
Delete line 262 of simpletagcanvas.admin.link.inc
About the user facing text, it'll be better if you use the t() function as follow (in simpletagcanvas.admin.link.inc) :
The rest of your code looks right to me and API's seem to be used properly.
Good job!
Comment #12
medienverbinder commentedThanks for taking time to review my module @brice_gato.
I inserted the drupal_set_messages () function. However, due to an error I had to revise again the brackets.
Here the error description and solution:
https://api.drupal.org/comment/43383#comment-43383
The drupal messages are now much easier to understand in the code.
Thank you.
Comment #12.0
medienverbinder commentedadded reviews of other project
Comment #12.1
medienverbinder commentedadded review of other projects
Comment #12.2
medienverbinder commentedadded review of other project
Comment #13
medienverbinder commentedbonus tag added
Comment #14
medienverbinder commentedaccidentally deleted existing issue tags (added PAReview: review bonus)
Comment #15
klausiYou could create your own DB table where you store the items that should be displayed. But then it feels like you are re-implementing the taxonomy term system ...
Anyway, looks RTBC to me now. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Assigning to MiSc as he might have time to take a final look at this.
Comment #16
medienverbinder commentedHi klausi,
thanks for your reply and thanks that you have set the status to RTBC. The TagCanvas Java Script Class still offers quite a few options which I want to implement gradually. So I can consider your proposal for a separate table to minimize the array.
Thanks again,
André
Comment #17
klausino objections for more than a week, so ...
Thanks for your contribution, medienverbinder!
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 get involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #18.0
(not verified) commentedadded review of other project