Provides a way to display modal windows containing call to actions buttons/links.
The logic is similar to the one implemented by drupal_set_message() and drupal_get_messages(): invoke modal_cta_set_message()to 'trigger' the visualisation of a call to action message within a modal window, which will be dinamically 'injected' in the page render array.
This logic let you, for example, handle the visualization of the call to action messages on node creation just by implementing hook_node_insert() for 'triggering' the event: no templating activities needed, no constraints on the node form submit landing page.
Project Page
http://drupal.org/sandbox/sbatman/2004746
Git repository
git clone --branch 7.x-1.x git.drupal.org:sandbox/sbatman/2004746.git
Comments
Comment #1
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://ventral.org/pareview/httpgitdrupalorgsandboxsbatman2004746git
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
zterry95 commentedadd file modal_cta.install, in the file ,implement
Comment #2.0
zterry95 commentedJust a typo correction
Comment #3
antoniopironti commentedOh right, I completely forgot it. Fixed.
Comment #4
medienverbinder commentedHi,
There are some errors reported by automated review:
See http://ventral.org/pareview/httpgitdrupalorgsandboxsbatman2004746git
Then you would have to still implement the function "modal_cta_uninstall()" to delete the used variables with the uninstall.
(Or perhaps you have forgotten "git push ...")
See No #2
Manual review:
- Install a fresh drupal 7.22
- Install module
- maintain some content and add the function "
modal_cta_set_message("one question","want to see a great module ?",array('path' => "http://drupal.org/sandbox/sbatman/2004746", "label" => "YES"),"close")"- save the node
- result as expected: get a modal call to action
In the readme I would still declare the function "modal_cta_set_message()" with parameters, so that the same is clear how is the module is to be used. Without these disclosures I have to look in the code, what parameters are used (or how many).
Comment #5
antoniopironti commentedRight: I've pushed everything just on the 7.x-1.x branch. Now should be fine.
Great suggestion. I've added it, thanks.
Comment #6
antoniopironti commentedAll the automated review problems are fixed, so I've se the status back to 'needs review'.
Comment #7
afi_amouzou commentedVery useful module. I have some suggestions:
Bugs:
Manual review:
- Install module
- add in my hook_node_insert function modal_cta_set_message
I get this errors:
Undefined index: path in modal_cta_page_alter() (line 120 of modal_cta.module).
Undefined index: label in modal_cta_page_alter() (line 121 of modal_cta.module).
You should provide defauld data or error handling for these fields in case the user live them empty: e.g
Suggestion:
You should delete your master branch before you apply for PAReview.
Comment #8
antoniopironti commentedYou are right. Now if the $modal_cta array in $_SESSION does not contain either the action path parameter or the action label parameter, a watchdog error is raised and no modal window are displayed.
Thanks!
Comment #9
cybernetikz commentedSet the admin config link at .info file. Others looking good.
Comment #10
antoniopironti commentedDone. Thanks.
Comment #11
yury n commentedAutomated review tools reported no problems.
Manual review:
- Install a fresh drupal 7.22
- Install module
- added following code to my hook_node_insert() function
modal_cta_set_message("Success","No you can visit your profile page",array('path' => url('user/' . $user->uid), "label" => "Ok"),"close")- created node
- works as expected - I've got a modal dialog
Code is matching Coding standarts.
Comment #12
sergeypavlenko commentedHi all
@YurikK_, you do not correctly identify the path to the page:
array('path' => url('user/' . $user->uid), "label" => "Ok")
Should be indicated without url(), otherwise there is a problem with forwarding:
array('path' => 'user/' . $user->uid, "label" => "Ok")
Made a review module, everything works well, I liked the code.
And another question, why did you leave the position of the line number 69, 93, 105, 113, 115? They can be removed.
Comment #13
antoniopironti commentedYou are right. I've just removed those lines. Thanks.
Comment #14
kscheirerYou dont need to specify php = 5.2.4 in your .info file, Drupal 7 already requires 5.2.5.
It seems that this module provides very similar functionality to many other popup/overlay modules. Could you describe how your module differs?
We prefer collaboration over competition, therefore we want to prevent having duplicating modules on drupal.org. If the differences between these modules are not too fundamental for patching the existing one, we would love to see you joining forces and concentrate all power on enhancing one module. (If the existing module is abandoned, please think about taking it over).
If that fails for whatever reason please get back to us and set this back to "needs review".
Implementing a hook_help(), adding options or admin configuration, or other simple hooks can help you get around this limitation. Simpletests are always welcome too!
----
Top Shelf Modules - Crafted, Curated, Contributed.
Comment #15
PA robot commentedClosing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #15.0
PA robot commentedGit clone instructions updated