One of the biggest problems with allows people to post comments is that all this crap spam comes along with it. Now I moderate all my comments so none of this spam goes onto my site, but removing the spam from the approval queue is very time consuming, esp when you have 12+ pages.
I know what I could install the spam module, or the bad behaviour module, but I have not gotten to it.
Now with the forms api, you can re-theme any form, so I did a small amount of coding and added to the command page a toggle all link which switches checks all the check boxes. This is just a quick hack that speeds this up a lot for me.
<?php function phptemplate_comment_admin_overview($form) { $js = <<<EOL <script type="text/javascript" language="javascript"> function toggle_checkboxes() { var inputs = document.getElementsByTagName('input'); for (i = 0; input = inputs[i]; i++) { if (input && input.type == 'checkbox') { input.checked = (input.checked ? false : true); } } return false; } </script> EOL; drupal_set_html_head($js); $form['options']['select all'] = array( '#value' => '<a href="#" onClick="return toggle_checkboxes()">Toggle Checkboxes</a>', '#weight' => 1, ); // Call the real theme so if there are changes I don't need to worry about coping them over. return theme_comment_admin_overview($form); } ?>
Now I have a little link which allows me to just click and check all the spams and then away they go.
This has been a heroic effort by everyone, and this is the Greatest version of Drupal yet. This release has had the most changes every for any release, and the most contributors.
So where does this leave E-Commerce. Well as I have said since I took over the maintenance that I (we) would be aiming to release E-Commerce 1 month after 4.7 was released. So now the the timer is ticking, and we should have a release by June 1.
This is quite approprate that today before 4.7 was released I posted to the E-Commerce group a request for ideas on what people would like to see in 4.8. Go and see http://groups.drupal.org/node/248 to see what has been added, and add more to it.
Well over the last week we have had some fun here in the Heydon house. Last Sunday Xander and Sam were playing, Running around the house, and then Sam ran into a door.
Their was blood coming from her head and we had a trip to the hospital.
Then a couple of days later, the same thing happened again. Except this time Xander hit his head, and there was just a huge egg. This is still comming down.
The best news happened last night when Xander stopped having his nightly bottles. He now has a cup of warm milk from his new special cup.
I was doing some work on a hook_setting() page and needed to do some changes to the returned form before it was past to the default standard system_setting_form_submit() function to save the settings.
I didn't really want to duplicate the system_settings_form_submit(), but if I wanted to add my own _submit() hook the standard one would not be called, and the form would not be saved.
Formsapi is very powerful so I just added the following to the form, and it will now call both my function and the standard function.
Now this will call my function first, and because in the submit() hook passes $form_values by reference, the changes that are made to it are past to the default function.
Over the last weeks I have been doing a lot of experimenting
with the new views module. I have actually been able to do some
neat things with the headers like add an "A | B | C ..." to the
heading to allow you to select on the nodes that begin with
letter x, and allow a user to drill down on a list of terms.
But my latest has been I was able to turn a taxonomy into a
set of tabs with only a single view. It actually works really
well and is very good. Here is the code that does it.
Well I have finally done it and updated my site to Drupal 4.7. The main reason is the same as everyone elses and that is the formapi slowed everyone down.
Not only do have everything updated, but a lot of my custom stuff I have been able to get rid of and use standard Drupal, or my new favorite module views.
I have been able to instead of using my taxonomy_fm module that I wrote, I now use the views module with a few bits of custom php to do the job.
When I get a bit of time I am going to post the code I use for the heading.
Here we will be talking about development and processes for E-Commerce. Once Dries gets back from holiday I will be discussing more with him about getting this moved to drupal.org.
Also on freenode there has been set up a new IRC chat area #drupal-ecommerce which should also help.
I am thinking about having a Melbourne Drupal Meetup, I am not too sure where or when we are going to have this, but I thought that firstly I would try and find all the Melbourne Drupalers and see how many are interested.
If anyone is interested you can contact me at [email protected] and we can arrange a time and place.
Last week we all went away to Canberra to Sarah's sisters wedding. We were away for 6 days. During this time we diverted the home phone to Sarah's mobile so that we would not miss any calls.
Now the strange things in that during this time we received no calls from the tele markets at all. But as soon as we got home and turned off the divert, they started calling again.
I am getting really sick of it, and I really don't want to pay for the privilege of having an unlisted phone number.
Like email spam, they just about make your phone un-usable and it justs becomes a pain.