MoPublication is a service that allows users of popular CMS's such as Drupal and WordPress to easily set up a native mobile app for their web site. Our web site can be found at http://www.mopublication.com
This Drupal 7.x module allows the web site owner to fully customise their app by choosing colours, fonts and uploading images, ad banners and more. The configuration is then submitted via the module to MoPublication who will build the app on the website owner's behalf.
Repository clone link:
git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/chrisdawson/1845748.git mopublication
Sandbox project URL:
http://drupal.org/sandbox/chrisdawson/1845748
Future full project URL:
http://drupal.org/project/mopublication
| Comment | File | Size | Author |
|---|---|---|---|
| cover4.jpg | 45.25 KB | chrisdawson |
Comments
Comment #1
monymirzaHi chrisdawson,
first of all, remove "?>" PHP delimiter at the end of these files
use coder module to check errors ad warnings before pushing it to Git. (this module will help to meet drupal coding standards.)
thanks
Comment #2
vineet.osscube commentedManual Review :
1) Please don't add LICENSE.txt, it will be added by drupal community after completing review process and full project release.
2) In hook_help(), please do not write coming Soon. If there is any help information, write it now else it is not necessary to use hook_help() function.
3) Use t() function in line no: 21 in install file.
Comment #3
chrisdawson commentedThanks for the feedback - I have made the recommended changes.
Comment #4
steffenrHi chrisdawson,
You also have to clean up your GIT - Repository - there is still a master branch in your project.
Have a look at http://drupal.org/node/1127732 for further information.
I also run coder_review on your project and found the following issues:
mopublication.module
audio_listing.php
Line -1: @file block missing
category_listing.php
Line -1: @file block missing
config_file.php
node_detail.php
node_listing.php
tag_listing.php
Line -1: @file block missing
video_listing.php
Line -1: @file block missing
mopub_demo.php
mopub_help.php
mopub_service.php
mopub_settings_form_1.php
mopub_theme.php
mopub_validate.php
mopub_xml.php
mopublication.install
For later code-review you can use http://ventral.org/pareview or the coder-review module..
SteffenR
Comment #5
monymirzaComment #6
chrisdawson commentedThanks SteffenR for the help. I've now fixed all the minor warnings that you posted about.
There is 1 critical warning remaining in Coder Review, but I don't think it's a valid warning - it's being caused by the link inserted into the message that gets set when activating the module (this is a recommended practice according to the Module documentation guidelines).
Hopefully we're ready to rock! *holds thumbs*
Comment #7
sashainparisHi,
My last PAReview: http://ventral.org/pareview/httpgitdrupalorgsandboxchrisdawson1845748git
only complains about : The "?>" PHP delimiter at the end of files is discouraged, see http://drupal.org/node/318#phptags
in 9 files.
Please correct this. It is quite simple to do :-)
git clone line in the description: prefer to use
git clone http://git.drupal.org/sandbox/chrisdawson/1845748.git mopublicationCoder only returns me 1 critical alert concerning a drupal_set_message() that should be sanitized in .install file.
I agree this looks like a false positive despite the critical status.
Why is there an UPGRADE.txt file while there is no upgrade to do? You might decide to erase it.
There is a lot of code here, and I did not have reviewed every single lines but I feel weird that you load systematically 5 includes files at the beginning of .module file, while they should have been attached to hook_menu() entries. This limits the size in memory.
Concerning the way you generate feeds: I guess it does the job, but Drupal hook_theme() and template best practices are not respected. As a consequence, it won't be possible to override these templates without hacking your module :-(
This is a real problem from my point of view, event if PHP code do the job.
I invite you to consider this for next version.
You might consider integrating with Views: when generating list in Drupal, this is a well appreciated approach. Code already exists to generate XML formatted data. See: http://drupal.org/project/views_data_export
Hope this will help.
Regards,
Alexandre
Comment #8
sashainparisComment #9
chrisdawson commentedHi Alexandre
Thank you for taking the time to review MoPublication.
"?>" PHP delimiter seems to be another false positive - there is no such delimiter at the end of the files listed.
I have removed the UPGRADE.txt file, you were correct that it's not needed as this is our first release :)
I have removed 3 of the file includes and attached them correctly to the menu hooks. There are still 2 require_once statements at the top of the mopublication.module but these do in fact contain functions that belong to the .module file. I have only separated them for convenience.
The feeds that we generate are not meant to be tampered with or overridden by the user. They are used only by the MoPublication app web service, and integration with Drupal's theme system might allow a user to break their XML feeds. That is why we opted for the more fixed approach so that the XML output can be controlled by the module alone.
We have considered Views integration, and this might well happen in a future version. For now, the priority has been on ease of setup for the user and for that reason we generate our own lists of content using SQL directly. We also tried to reduce dependencies on other modules.
Again, thanks for the feedback.
Please let me know if you have any more questions regarding the above points.
Chris
Comment #10
chrisdawson commentedHi, anybody out there?
It's been more than a month now since I received any review or feedback on my module. Please do let me know if any further changes should happen before this comes out of sandbox.
Much appreciated!
Comment #11
klausiWe are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #12
kfritscheMaybe the "The "?>" PHP delimiter at the end of files is discouraged," error is because of two line empty lines at the end of the files. Normally there should only be one.
mopublication.install:
- Line 44: Would be better to use variable_del()
- Line 45: Would be better to use cache_clear_all, but you don't need to do this, when using variable_del instead
mopublication.module:
- Don't add jQuery to your module. Create a dependency to jquery_update if you require a newer version of jQuery. Also check Libraries API how to use external jQuery plugins.
- Line 129: This setting is already available - Drupal.settings.basePath
- Line 149: Unused variable $path
- Line 154: You could use drupal_add_css to add css from the file and add it as style tag.
- Line 155: Here you have to use a theme function. Everything in mopub_demo.php is theming related and should be changeable by users. mopub_demo_content.php can be moved into that function, then call the theme, which uses the mopub_demo.php as external file.
mopublication.validate.php:
- Line 49: Use file_prepare_directory() instead of doing this yourself
- You can use file_save_upload with a destination too, so you don't need to copy afterwards. Basiclly get the destination with prepare_directory, save_upload with that destination, set status to permanent and do a save.
mopub_xml.php:
- You don't have to die at the end of each function.
xml/*
- Maybe the theme functions could be used for these. So people could overwrite it, when they want to change small parts.
helper_functions.php:
- Line 40: Missing return documentation
- Line 56: Missing type and comment of param (documentation)
- Line 57: Missing type and comment of param (documentation)
- Line 58, 75: There should be a free line between param and return (documentation)
app_store_options.php:
- mopublication_self_keyed_array == drupal_map_assoc()
Comment #13
chrisdawson commentedHi kfritsche,
Firstly thanks for the in-depth review.
> Maybe the "The "?>" PHP delimiter at the end of files is discouraged,"
> error is because of two line empty lines at the end of the files.
> Normally there should only be one.
Yeah. Weird one! Anyway, I've now removed the double newlines at the end of the files.
> mopublication.install:
> - Line 44: Would be better to use variable_del()
> - Line 45: Would be better to use cache_clear_all, but you don't need to
> do this, when using variable_del instead
As there are more than 30 variables that we create beginning with mopub_, we decided to use this query to delete them all at once instead of going to delete them one by one with variable_del(). It should be safe because we use the namespace on all the MoPub variables.
> mopublication.module:
> - Don't add jQuery to your module. Create a dependency to jquery_update
> if you require a newer version of jQuery.
> Also check Libraries API how to use external jQuery plugins.
Ah. I see that jQuery Update has 1.8.2 now, which is the version that we include. I'll put this on the list of fixes, I just don't have enough time to make the switch at the moment, with the testing that would go along with it. But this would be great!
> - Line 129: This setting is already available - Drupal.settings.basePath
Not the same as our setting, which includes the full URL.
> - Line 149: Unused variable $path
It is used within the include on line 155
> - Line 154: You could use drupal_add_css to add css from the file and
> add it as style tag.
The include is actually adding a PHP script which produces dynamically generated CSS - not a real .css file which I agree could have been included using drupal_add_css().
> - Line 155: Here you have to use a theme function. Everything in
> mopub_demo.php is theming related and should be changeable by users.
> mopub_demo_content.php can be moved into that function, then call the
> theme, which uses the mopub_demo.php as external file.
We decided not to make any of the XML and the live demo themeable. Although the output is HTML markup, there is no reason for the end user to theme the markup. If it's changed, it will no longer be a true representation of the interface which they will have in the iOS mobile app. For this reason it is better to keep control over this output only to ourselves.
> mopublication.validate.php:
> - Line 49: Use file_prepare_directory() instead of doing this yourself
Thanks, done.
> - You can use file_save_upload with a destination too, so you don't need
> to copy afterwards. Basiclly get the destination with prepare_directory,
> save_upload with that destination, set status to permanent and do a save.
We could have done that, but I find that it's easier to specify the destination filename the way that I'm currently using.
> mopub_xml.php:
> - You don't have to die at the end of each function.
You're right. Those came from a tutorial that I originally followed. Thanks, I've removed them.
> xml/*
> - Maybe the theme functions could be used for these. So people could
> overwrite it, when they want to change small parts.
Please refer to my above note as well as my response to Alexandre in #9.
> helper_functions.php:
> - Line 40: Missing return documentation
> - Line 56: Missing type and comment of param (documentation)
> - Line 57: Missing type and comment of param (documentation)
> - Line 58, 75: There should be a free line between param and return (documentation)
Thanks, amended PHPDoc.
> app_store_options.php:
> - mopublication_self_keyed_array == drupal_map_assoc()
Ah, wonderful. One less helper function :)
Thanks for a really good, thorough review.
Hopefully someday our little status box makes its way to that elusive "RTBC"!
Comment #14
chrisdawson commentedAnybody out there?
Comment #15
kfritscheOkay, I quickly got through again and it seems the requested changes was made.
Only one thing would be to check out jquery_update, instead of including jQuery by your self. So you easily could add a dependency to jQuery update.
Also it worth a look into libraries modules for the miniColors jQuery Plugin. Adding not-self written third-party code to modules isn't good.
But I think the rest is fine and both described problems shouldn't be blockers, so setting to RTBC.
Comment #16
patrickd commentedIf I'm seeing that right you pushed "jquery-1.8.2.min.js" - please depend on JQuery update to do this instead.
Also as kfritsche said, your repository shouldn't contain external libraries when you could make use of the libraries module for this instead.
Please fix these issues first before we continue here
Comment #17
PA robot commentedClosing due to lack of activity. Feel free to reopen if you are still working on this application.
I'm a robot and this is an automated message from Project Applications Scraper.