Are you stuck with a gazillion recurring events? Want to clear out the calendar all at once? CWD shows you how...
Use the following code to delete Drupal 4.7 event nodes (courtesy of kingandy) (please note this is PHP code):
$aquery= db_query("SELECT nid FROM {node} AS n WHERE n.type = '%s'",$contenttype);
if( db_num_rows($aquery) && user_access('administer nodes')) {
while ($row = db_fetch_object($aquery))
{
set_time_limit(5); // prevents server timeout
node_delete($row->nid);
}
} else {
print "No entries found for node type $contenttype, or you do not have permission to modify nodes.";
}
The above script clears out all event nodes. You may need to clear out your events tables as well to clear the repeat pattern, calendar map, etc.).
First, access your database (via phpMyAdmin). Then, simply execute the following SQL query:
TRUNCATE TABLE event; TRUNCATE TABLE event_repeat; TRUNCATE TABLE event_repeat_calendar_map; TRUNCATE TABLE event_repeat_nodes;
Voila
It's also possible to run this within Drupal:
TRUNCATE TABLE {event}; TRUNCATE TABLE {event_repeat}; TRUNCATE TABLE {event_repeat_calendar_map}; TRUNCATE TABLE {event_repeat_nodes};
Post any questions below.
For versions of Drupal above 5.x, you can use the mass delete or delete all modules.
What Drupal needs is a reliable event management system. The Date + Calendar + CCK combination is a step in the right direction.
That's good news that there's an option to mass delete content within Drupal. I have enjoyed the user-friendliness of Drupal as opposed to my last platform, which was a c-panel known as Magento. Drupal for sure helps me with my site.
All Content © 2012 Contract Web Development, Inc. All Rights Reserved. Privacy Policy | Terms of Use | Disclosure | Powered by Drupal