Module Name: image_preloader
Drupal Version: 7.x
Description:
Image Preloader module can be used to add a "loader icons" for images. It can be used for block, views and content types.
On configuration setting page it will give you a list of all content types, views page, blocks and list of loader icons.
Image Preloader module appends class name "image-preloader-icon" at "image" parent html tag, so you can also overright the loader icons from your theme css file with following code:
body .image-preloader-icon{
background:#image-background-color-code url("loader-icon-directory/loader-icon-name.gif") center center no-repeat;
}
You can try out live demonstration of it here: Image Preloader Demo
Project page: http://drupal.org/sandbox/developmenticon/1805424
GIT clone: git clone http://git.drupal.org/sandbox/developmenticon/1805424.git image_preloader
Thanks for your consideration!
Reviews of other projects:
- http://drupal.org/node/1820570#comment-6637624
- http://drupal.org/node/1820028#comment-6637798
- http://drupal.org/node/1820564#comment-6637448
- http://drupal.org/node/1815518#comment-6616732
- http://drupal.org/node/1816646#comment-6621898
Three more reviews of other projects:
Comments
Comment #1
d2ev commentedwelcome
There is still a master branch, make sure to set the correct it and Drupal Code Sniffer has found some issues with your code you can check here http://ventral.org/pareview/httpgitdrupalorgsandboxdevelopmenticon180542...
first attempt to install this module work fine with the settings. Miner issue, i had list in the front page by "Promoted to front page" where the effect is not happening...
do to other project application review and get bonus to finish it faster.
Comment #2
michielnugter commentedThe functionality on the demo looks cool, it would be a nice module.
There are some issues with the code though, asside from the fact that it doesn't always follow the Drupal coding standards.
General
image_preloader.info
image_preloader.module
array('$default_theme')is incorrect, you cannot place a variable in single qoutes. In general, avoid placing variables in quotes at all. The code becomes less readableimage_preloader.admin.inc
image_preloader.js
In general, wouldn't it be better to attach a load event on each image and remove the loader class then? As far as I can see it would require only a small amount of logic instead of the setInterval logic currently used.
I hope it helps you a bit!
Comment #3
michielnugter commentedComment #4
developmenticon commentedThanks for your good review.
I have deleted master branch and formatted my Drupal module code according to drupal coding standards.
You can check it here: http://ventral.org/pareview/httpgitdrupalorgsandboxdevelopmenticon180542...
I have checked it with front page, it works prefect there.
Can you please describe me more about the issue you have got?
Thanks again for your review.
Comment #5
developmenticon commentedHi michielnugter,
Thanks for your good review.
I made all the things you mentioned.
Regarding 'private' function _block_rehash, i am using this to get the list of all the block array with block info. Do you have any suggestion, so that i can get the same result?
Thanks again.
Comment #6
michielnugter commentedNot all comments I gave are in yet but a lot of them are, it looks a lot better already! It would be better to look at the other issues I metioned about the other JavaScript approach and the replacement of the hook_page_build.
I took a quick look and it seems there is a block_list function which will return the blocks for a certain region. You can in turn return all regions with the system_region_list.
Comment #7
developmenticon commentedHi,
I am looking for another JavaScript approach and the replacement of the hook_page_build.
I have tried following code for getting complete list of block, but i am getting empty block array as a result:
Please suggest your opinions?
Comment #8
2phaor maybe
Though I have not looked at your module and am just posting this based on your post above.
Comment #9
developmenticon commentedHi 2pha,
I have tried your code and it's still empty block array.
Basically i need the complete list of all blocks. i had getting block list with
$blocks = _block_rehash($theme);but this is 'private' function and michielnugter suggested to not use this function.If you can suggest any other approach would be very helpful.
Thanks!
Comment #10
2phaCheck that all the variables are what you expect them to be.
I would start with $all_regions and make sure it is going through the loop.
If you are not already using it, I would suggest using the devel module. You can then use dpm($all_regions); to get a pretty print out of the object.
Comment #11
developmenticon commentedHi 2pha and michielnugter,
Thanks for your response. I have checked following code at hook page build:
This returns all blocks in the specified region for the current user on any page,
Not all the list of block, so i think it would be better to fetch the block information from the database.
Following are code:
Please let us know your opinion. thanks!
Comment #12
developmenticon commentedReview bonus tag added
Comment #13
dSero commentedHi,
I look like a very nice project that probably will help many drupal users.
The automatic test looks just fine
If you changed to Pereview, you should place in the issue initial description the list of reviewd projects comments
Please notice several issues that may consider to take care of:
1. at image_preloader_page_build(), I've not seen arg decleration. Yet, it recommended to use consts for arg(0), so even a newbie will understand the meaning of the code
2. Refactor image_preloader_page_build() to several single purpose function.
Best Regards,
Moshe
Comment #14
developmenticon commentedHi dSero,
Thanks for your review.
I have removed arg and using menu_get_object('node') to get the node type.
Please clone it again and give us your review.
Thanks again!
Comment #15
klausiRemoving review bonus tag, no reviews of other projects listed in the issue summary. Please read #1410826: [META] Review bonus.
Comment #16
developmenticon commentedAdded Reviews of other projects in the issue summary
Comment #17
bhosmer commentedSweet module, especially pacman!
Comment #18
klausimanual review:
Otherwise this looks nearly ready, but I consider especially the permission problem a blocker. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #18.0
klausiAdded Reviews of other projects
Comment #19
developmenticon commentedHi Klausi,
Thanks for your good review.
Fixed all the above issues.
Comment #20
bhosmer commentedLooks good, all of the suggestions appear to have been implemented.
Comment #21
klausimanual review:
"modified image_preloader.install" is not a useful git commit message, I can see that from the diff. You should describe what you changes, see also http://drupal.org//node/52287
Thanks for your contribution, developmenticon!
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 #22
developmenticon commentedThanks @klausi,
I would like to thank all reviewers of this module.
I will try to contribute more to drupal by reviewing such applications.
I've promoted the module to a full project (http://drupal.org/project/image_preloader).
Thanks everyone!
Comment #23.0
(not verified) commentedadded reviews of other projects