Sexy Throbber is a module that provides style options for the views throbber icon (also know as ajax loading icon). You can also use your own images without hacking the module code.

Overview

This module adds a small style-sheet file (.css) and changes the style of the views ajax loading icon (throbber). Check out the screenshot for visual representation

Live Demo

Use the pager on this site : http://drupal.anditko.com/views-sexy-throbber-demo

Requirements

To use this module you will have to install Views and crate a view with ajax functionality.

Configuration and customizations

See the Configuration Screenshot
1) Navigate to Structure -> Views -> Settings -> Views Sexy Throbber
or visit admin/structure/views/settings/trobber
2) Play with the settings page
3) Click the save button.

Use your own throbber images

1) Upload your custom images to the "views_sexy_throbber" folder inside your site's public file folder.
Example : sites/default/files/views_sexy_throbber/
2) Visit the settings page and select your custom image.
3) Click the Save button

Where do i get more throbber icons?

Check out these two sites that offer customized throbber icons:
http://preloaders.net
loadinfo.net
ajaxload.info

Performance tips

This module is built with performance in mind.
The flexibility and the style configuration do NOT add any extra load
to your server. The only thing that this module will add is a cached css file.
For better frontend performance enable the "css/js aggregation and compression"
in your production site by visiting "admin/config/development/performance"
so you can merge and minimize the file requests.

Download the latest git version of Views Sexy Throbber:

git clone --recursive --branch 7.x-2.x http://git.drupal.org/sandbox/ANDiTKO/1556808.git views_sexy_throbber

Sandbox project page:

http://drupal.org/sandbox/ANDiTKO/1556808

Made for Drupal Core version 7.x

Review bonus links

http://drupal.org/node/1404202#comment-6064082
http://drupal.org/node/1608886#comment-6066892
http://drupal.org/node/1617318#comment-6097980

http://drupal.org/node/1397718#comment-6424544
http://drupal.org/node/1703064#comment-6425502
http://drupal.org/node/1747854#comment-6445736

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

patrickd’s picture

Status: Needs review » Needs work

welcome,

You are working in a wrong-named branch in git. Please see the documentation about release naming conventions.

As installation and usage instructions are quite important for us to review, please take a moment to make your project page follow the tips for a great project page. Also create a README.txt that follows the guidelines for in-project documentation.

while waiting for an in-depht review of your module you can start out fixing some coding style issues detected by automated tools. (But switch to a correct branch first)

Your using two underscores in your module name, that can be quite confusing, I'd suggest you to change that.

We do really need more hands in the application queue and highly recommend to get a review bonus so we can come back to your application sooner.

regards

ANDiTKO’s picture

Thanks for your feedback. I nuked the old project and started fresh. I also fixed my formatting issues and now the automated check passes successfully.

I think im ready now. I tested the module in 3 different sites and its working fine. Its very simple with no php code so it must be production ready.

Feel free to test it and give me feedback.

Thanks!

ANDiTKO’s picture

Status: Needs work » Needs review
targoo’s picture

Hi

I think this project is too short to be approved. I don't want to say it not useful but everything with less than 120 lines of code or less than 5 functions cannot be seriously reviewed.

We do really need more hands in the application queue and highly recommend to get a review bonus so we will(/can) come back to your application sooner and good get an idea of your understanding of Drupal.

See also #1410826: [META] Review bonus

Regards,

patrickd’s picture

Yes, right regarding that this module does not even contain any code we can't make sure that you actually can code securely. However, we can promote this single project manually to a full project.

Mariano’s picture

Hi,

I played around with this module and I believe it's cool. The Views' blue throbber is something not everyone themes and normally looks the same on any Drupal site. But what I would like to see in a module like this one is some flexibility and options on, for example, what throbber to use. For instance, what about creating a settings page where you can choose different types of throbbers? or an option to upload your own?

As it is at the moment, if I want a different image I need to upload it to the images directory under the module directory, which is technically hacking it. If you release a new version and I override mine I would lose my image.

Implementing a settings/options section would also make you add php to the project, which would help you get reviewed and approved.

Thanks!

ANDiTKO’s picture

My goal was to learn how can to post modules on drupal.org
I have more advanced modules but i must re-write them to follow the Drupal coding standards.

I want this single project to be approved. Currently i dont need to become an approved drupal coder.

Future plans:

I will create a new branch 7.x-2.x where i will add a settings page and implement more features. Selecting themes and uploading your own images etc.

@Mariano You dont have to hack the module to change it. If you read the README.txt you will find that you can copy/paste the module's CSS code in your tempalte CSS and change it as you want.

utneon’s picture

Status: Needs review » Needs work

Hello! This is a very interesting module indeed. However as others said, you should add some admin settings so it makes sense using this module and promoting to full project.

I will use this module to set some settings for my own projects. If you want to give me commit access we can work this module together, drupal.org is about collaboration. Let me know if you're interested in that.

Paulo Carvalho

patrickd’s picture

Status: Needs work » Needs review

Co-maintainership / feature requests are no reason for setting "needs work"

patrickd’s picture

Issue summary: View changes

Nuked the old project. Started from fresh

ANDiTKO’s picture

Hello everyone! I've worked the last few days on this module. I re-written it from scratch and created a new branch 7.x-2.x. The new version has administrator settings page where you can tweak the style and some other cool stuff. Also i have added the ability to use your own custom images without hacking the module. Just put your custom images to the "views_sexy_throbber" folder inside your site's public file directory.

Example : sites/default/files/views_sexy_throbber/

And revisit the settings page to select your custom image from the list.

Try the new version:
git clone --recursive --branch 7.x-2.x http://git.drupal.org/sandbox/ANDiTKO/1556808.git views_sexy_throbber

Im also attaching a screenshot of the settings page.

ANDiTKO’s picture

I did a code cleanup and replaced the animated png throbbers with gif images.
Seems like only FireFox and Opera were compatible with animated png so i had to fall back to the ugly gif format.

My code seems nice and clean. 0 errors and 0 warnings on PAReview.sh

Please review and approve :)

utneon’s picture

Category: task » bug
Priority: Normal » Major
Status: Needs review » Needs work

Parse error: syntax error, unexpected ':' in /Users/paulocarvalho/Sites/acquia-drupal/sites/all/modules/views_sexy_throbber/views_sexy_throbber.install on line 17

can't install, also you're not cleaning up module variables using the unnistall hook

patrickd’s picture

Category: bug » task
Priority: Major » Normal

@utneon
this issue is for project application purposes only (see https://drupal.org/node/1011698).
Please use the project's application queue and create a new issue for your request.

However if this module can't be installed it's a major issue that should be fixed first here

ANDiTKO’s picture

Status: Needs review » Needs work

Later im going to fix it and handle the variables removal and some other things.

ANDiTKO’s picture

Status: Needs work » Needs review

Fixed install error and added a hook_uninstall to clean up the saved records from the database when uninstalling the module.

Successfully tested on 3 sites (1 windows localhost 2 internet linux servers)

shaekuronen’s picture

Status: Needs work » Needs review

i'm getting the same error

Parse error: syntax error, unexpected ':' in /Users/shae/Sites/acquia-drupal/sites/all/modules/views_sexy_throbber/settings_form.inc on line 30

looks pretty awesome, any estimate on a fix?

ANDiTKO’s picture

As clivelinsell pointed out here, its because you use an old php version. Update your php to 5.3 or later.

Meanwhile i will replace the ternary operators using normal if statements so the module can run on older php versions. Expect a fix pretty soon.

ANDiTKO’s picture

@shaekuronen Fixed, please try the latest git commit. I replaced the ternary if. Should be working now on older php versions.

Please report any issues or support request on the sandbox issues page:
http://drupal.org/project/issues/1556808

ANDiTKO’s picture

Issue summary: View changes

Updated information for 7.x-2.x branch

ANDiTKO’s picture

Issue summary: View changes

added 1 review bonus link

ANDiTKO’s picture

Issue summary: View changes

Added new link for bonus review

ANDiTKO’s picture

Issue tags: +PAreview: review bonus

Just entered the "Review bonus" program.

Please approve my module and give me the "Create Full Projects" permission :)
I have some bigger module ideas that i want to share with the Drupal community

klausi’s picture

Status: Needs review » Needs work
Issue tags: -PAreview: review bonus

Review of the 7.x-2.x branch:

  • Drupal Code Sniffer has found some issues with your code (please check the Drupal coding standards).
    FILE: ...upal-7/sites/all/modules/pareview_temp/test_candidate/settings_form.inc
    --------------------------------------------------------------------------------
    FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
    --------------------------------------------------------------------------------
     31 | ERROR | Whitespace found at end of line
    --------------------------------------------------------------------------------
    

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

manual review:

  1. your module has not even been released yet, why do you need two development branches already?
  2. views_sexy_throbber_install(): all user facing text must run through t() for translation. Use get_t() in install hooks to determine the correct translation function. Same in views_sexy_throbber_settings().
  3. views_sexy_throbber_install(): $message is unused, remove it. Same in views_sexy_throbber_settings().
  4. "DrupalPublicStreamWrapper::getDirectoryPath() . '/views_sexy_throbber';": use "public://views_sexy_throbber" instead. Same in views_sexy_throbber_settings().
  5. views_sexy_throbber_settings(): function signature should be "views_sexy_throbber_settings($form, &$form_state)".
  6. views_sexy_throbber_settings(): do not create image markup yourself, use theme('image', ...) instead. Currently your $image_options will not work if drupal is installed in a subfolder.
  7. views_sexy_throbber_settings(): do not run image markup through t(). Only text should be passed to t().
  8. views_sexy_throbber_settings_submit(): $toolkit is unused, remove it.
  9. views_sexy_throbber_settings_submit(): on many Drupal installations the webserver cannot write to module directories, so overwriting your own CSS file will not work. You should save the generated CSS file to the public files folder and include it from there.

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

ANDiTKO’s picture

1) The second branch was complete rewrite. I want to keep the first one simple so if anyone wants a quick style without any php overload can download the 7.x-1.x
2) Done
3) Done
4) Done
5) Done
6) Done
7) Done
8) Done
9) I want to make this module as fast as possible. So i want to avoid the css loading from the module php code. Using hook_init to load css is not as fast as including it into the .info file. See hook_init. So what do we do here? Can i declare the css from the public folder inside the .info file? Or can i give write permissions to the module folder?

Jibus’s picture

Hi,

I think this module is very cool ! Did you commit your last changes ?

ANDiTKO’s picture

Yes, most of them. Im going to do the rest very soon.

jlancaster’s picture

Nice module! Just installed it on a new site I'm building and it worked perfectly once I changed url's in the css file. I love that this replaces the inline throbber with something a bit more beefy. I hope to see this released as an official module one day!

ANDiTKO’s picture

@jlancaster Thanks for the feedback. Why did you had to "change the url's in the css file"? Im currently on vacations, and when i go back home im going to work on this module and hopefully get promoted for full project.

jlancaster’s picture

@ANDiTKO at initial install the default.gif reference was broken. The css file had hardcoded the images to come from http://anditko.pc/drupal_dev/sites/all/modules/views_sexy_throbber/image... (I just cloned the module again and anditko.pc is still referenced). I later saw you have a configuration interface hidden in views at /admin/structure/views/settings/trobber, perhaps if you change some settings there modifications of the css are not necessary. At that point things were working so I didn't tweak things much further.

milos.ilic’s picture

I can't download your module. I try to pull from git but the folder is empty. Can you take a look or give me another url for downloading.

ANDiTKO’s picture

@jlancaster The CSS if fixed now. Everytime when i commit changes i must replace the css file with the default one because its getting overwritten by the module's settings. If you get this error again, just visit the module settings page, and a correct css file will be generated for you.

@milos.ilic Try again. Everything is there. Maybe you tried to pull from the master. Try this code:
git clone --recursive --branch 7.x-2.x http://git.drupal.org/sandbox/ANDiTKO/1556808.git views_sexy_throbber
Or download it from this link:
http://drupalcode.org/sandbox/ANDiTKO/1556808.git/snapshot/refs/heads/7.x-2.x.tar.gz

matt-e-matic’s picture

Category: task » support
Status: Needs work » Fixed

Great module, makes up for the lame throbber in views and quicktabs (which it works great with when the "Append css !important rules" is checked) I had to add write permissions to my public:// directory, but I'm thinking it was an issue with my multiple installs on my server.

klausi’s picture

Category: support » task
Status: Fixed » Needs work

This application is not fixed, restoring status. See http://drupal.org/node/532400

ANDiTKO’s picture

Status: Needs work » Needs review

Fixed everything mentioned above.
Committed to the git repository as well.
Tested in several sites with different configurations and server environments. (today i ported a line of code that will chmod the css file before attempting to write it. So this will fix the file-write problem that was happening in some cases)
The module once again passes successfully the PAReview.sh automated check.
And i made a demo site at http://drupal.anditko.com/views-sexy-throbber-demo

I'm waiting for the green light and get the promotion for full project.
Thanks to all for the feedback, and if you have any requests or issues please use the project issues tab.

ANDiTKO’s picture

Issue summary: View changes

Added 1 review bonus

ANDiTKO’s picture

Issue summary: View changes

Added 1 review bonus link

ANDiTKO’s picture

Issue summary: View changes

added new review bonus link

yannisc’s picture

The module is interesting! I would like to see it as a full project.

yannisc’s picture

Issue summary: View changes

Added the demo link

ANDiTKO’s picture

Issue tags: +PAreview: review bonus

Added review bonus tag (see the review bonus links on my issue summary) ...

klausi’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

Thanks for your reviews! When finishing your review comment also set the issue status either to "needs work" (you found some problems with the project) or "reviewed & tested by the community" (you found no major flaws).

manual review:

  1. Writing to module files is still a problem on many drupal installations, which will not be able to use the dynamic settings form of your module. And module updates will be tedious because the customized CSS files could get overridden easily.
  2. Actually: your module is not even necessary nor useful on production sites. People can just generate the CSS on their development instance and ship the file with their custom theme.

Anyway I guess that are not hard blockers, so this looks RTBC. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

ANDiTKO’s picture

@klausi Thanks for the input. However:

1) I did some tests few weeks before about the "writing" problem. Well if your "module" dir is not writable you can't update or download modules from the Drupal back-end. When Drupal creates a file or directory the default cmod is "755" for directories and "644" for files. In both cases writable by the owner. If i save the file to the Public directory i will have to use a function inside the module file to include the css file. Currently i include the css from the ".info" file, doing otherwise will be slower. In my module i force the cmod of my file to "664" and making it writable before actually attempting to write it. However i agree with you that when a user updates the module code his css file can be overwritten. But i can fix this by checking if user settings already exists.

2) Yes people can just write the css them selves. Thats why i have the 7.x-1.x branch where coders can copy the css file and include it into their sites. But not everybody is a css ninja or coder. There are many people that would like to have a settings page that gives them the options to customize the throbber or even use their own images without getting their "hands dirty". We must make Drupal more user friendly and i think my module dose that.

ANDiTKO’s picture

Just added module update support. You can now update the module without getting your custom css file overwritten. The module will now respect your settings, by checking if the "views_sexy_throbber.css" exist. If dosent exist it will create it for you based on the "default.css" that will be shipping with the module.

Ready to go full project!

klausi’s picture

Status: Reviewed & tested by the community » Fixed

No objections for more than a week, so ...

Thanks for your contribution, ANDiTKO!

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.

ANDiTKO’s picture

Thank you! Im going to update the info and add some images to my project page. I really hate when im browsing modules and the info is bad. Images and live demos always help but very few people use them.
I want my project page to be awesome.

Feel free to un-follow this issue.

See you guys around, maybe i could help you with few more project reviews!
- ANDiTKO

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Added review bonus