Project page: https://drupal.org/sandbox/caiosba/2215149
Git repository: http://git.drupal.org/sandbox/caiosba/2215149.git
Description:
This module is intended to be a simple but flexible and fully functional bookmarklet module, as the name suggests. This way, a user who is browsing a page can create content on a Drupal site from that page. There is just one administration interface. Just enable the module and go to this interface (admin/config/content/simple_bookmarklet).
Through this interface, you can:
- Choose a title for the bookmarklet
- Add extra CSS files
- Add extra JavaScript files
- Choose what content type can be created through the bookmarklet
- Choose which fields can be filled through the bookmarklet
- Define how fields can be pre-populated (using page title, text selected by the user or page URL)
- Force HTTPS
After setting the preferences, a link will be generated, which is stored on a variable, so you can display it easily on other places of your site. Users can then drag and drop this link to their bookmarks bars.
Tested on Firefox, Google Chrome and Internet Explorer.
Check this less-than-one-minute video to understand better how it works.
This module was fully sponsored by Meedan.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | simple_bookmarklet_1.png | 394.27 KB | znaeff |
Comments
Comment #1
PA robot commentedTimeout when invoking pareview.sh for http://git.drupal.org/sandbox/caiosba/2215149.git at http://pareview.sh/pareview/httpgitdrupalorgsandboxcaiosba2215149git
Do you have any third-party files committed? 3rd party code is not generally allowed on Drupal.org and should be deleted. This policy is described in the getting involved handbook. It also appears in the terms and conditions you agreed to when you signed up for Git access.
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 #2
gaetanp commentedHello,
You should not work on master branch, see maintaining a drupal project with git.
You are including in your sources a jquery version, this is not supposed to happen this drupal is already shipped with jquery.
Your module lacks php doc and online comments, so it's quite obscure what you are doing in it.
It would be nice to put your tpl files in a separate folder.
Comment #3
caiosba commentedI made all the proposed changes and pushed to the Git repo. Please re-evaluate.
Comment #4
Rkumar commentedHi caiosba,
I appreciate your idea of project but i have few doubts.
Given video link is 404(Not Found).
Below are my reviews:-
1. By Coder Module:-
File: @file block missing (Drupal Docs) [comment_docblock_file]
severity: normalreview: i18n_10Line 26: Menu item titles and descriptions should NOT be enclosed within t(). [i18n_10]
'title' => t('Bookmarklet'),
severity: normalreview: i18n_10Line 27: Menu item titles and descriptions should NOT be enclosed within t(). [i18n_10]
'description' => t('Administer bookmarklet settings.'),
severity: normalreview: i18n_10Line 33: Menu item titles and descriptions should NOT be enclosed within t(). [i18n_10]
'title' => t('Bookmarklet'),
severity: normalreview: i18n_10Line 39: Menu item titles and descriptions should NOT be enclosed within t(). [i18n_10]
'title' => t('Simple Bookmarklet'),
severity: criticalreview: security_3Line 346: Potential problem: drupal_set_message() only accepts filtered text, be sure all !placeholders for $variables in t() are fully sanitized using check_plain(), filter_xss() or similar. (Drupal Docs) [security_3]
drupal_set_message(t('Content created successfully.',
2. In Readme file, Column not allowed more than 80 characters. Please check with online tool.
3. In .module file, at line 217
return "javascript:(function(){window.simpleBookmarkletProtocol=(((document.location.protocol=='https:')||$force_https)?'https':'http');window.simpleBookmarkletURL='$setting_url'.replace(/^https?/, window.simpleBookmarkletProtocol);if(window.simpleBookmarklet!==undefined){simpleBookmarklet();}else{var src='$js_url?$timestamp'.replace(/^https?/, window.simpleBookmarkletProtocol);document.body.appendChild(document.createElement('script')).src=src;}})();";
isn't this possible using any custom js file.?
Comment #5
caiosba commentedComment #6
caiosba commentedThanks, I fixed those things and also updated the video location: http://ca.ios.ba/files/drupal/simplebookmarklet.ogv.
I also reviewed all the code and there is any more line with more than 80 characters.
Regarding your last question, it can't be wrapped by a custom JS file because the idea is that the site owner can print this link at any place on the site, so users can easily drag and drop it to the bookmarks toolbar. Check the video please, it's clearer. That's why it's on the PHP, stored by a variable. However, I rewrote the code so it's more readable for a developer now.
Please let me know what else I need to do.
Comment #7
infojunkieChanges look good to me, thanks caiosba.
What's needed to move this application forward?
Comment #8
znaeff commentedHi.
It's better to move simple_bookmarklet_admin_settings() to a separate simple_bookmarklet.admin.inc file.
So module code will be:
Comment #9
klausiThat is surely not an application blocker, any other problems you found? If not then the correct status would be RTBC, right?
Comment #10
znaeff commentedHi again.
1. I got this message directly in bookmarklet window when user is not logged in Drupal site.
"Notice: Undefined variable: prepopulate in simple_bookmarklet_page_alter() (line 388 of /var/www/hosts/drupal1/sites/all/modules/simple_bookmarklet/simple_bookmarklet.module)."
See screenshot.
It would be better to check existing of $_GET['simple_bookmarklet_prepopulate'] and fill $preopopulate by default some value.
2. Also I got are some javascript problems. I cannot open/close bookmarklet window on some sites: lenta.ru - cannot close, gmail.com - cannot open. Tested in FF 29.0 and Chrome 34.0.1847.137 under Linux.
Comment #11
infojunkieNot sure I understand the process of being granted a git account here: is the module supposed to be completely bug-free to be accepted? Are all bugs going to be tracked on this single thread? What are the criteria for acceptance?
Comment #12
caiosba commentedReleased here: https://drupal.org/project/simple_bookmarklet
Please open issues for the bugs there.