Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=3791)
This modification adds an extra button 'Delete All' to the Mail Queue Admin interface which makes it easier when deleting loads of mails in the Queue.
(http://i.creativecommons.org/l/by/3.0/88x31.png) (http://creativecommons.org/licenses/%3Cbr%20/%3Eby/3.0/)
This work is licensed under a Creative Commons Attribution
3.0 Unported License (http://
Thanks, this is great to save time.
What license is this modification released under...? Hmm
Nice one!
This mod should be added to smf core...
A few times I had to do that I entered over phpmyadmin, to drop the queue table... lol
@Labradoodle-360, I forgot that coz I was kinda in a hurry....I just updated it....
@4kstore, thanks
@luuuciano, lol...I also did same thing for a long time before I discovered a thread here with tips to manually apply those tiny modifications....then I decided to convert it to a mod just to help some others....I'm just sad I cant locate the exact thread after a lot of search because I forgot the thread title keywords
Why noted that this mod is compatible with SMF 1.1.x, when it is not so-??
This MOD does not install cleanly. This is because install.xml is looking for spaces instead of tabs, as well as inexistent spaces at the end of the lines.
The fixed install.xml (for the current code of course) could be something like this
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns:smf="http://www.simplemachines.org/" xmlns="http://www.simplemachines.org/xml/modification">
<id>von-COLLINZO:DeleteAllMailQueue</id>
<version>1.0</version>
<file name="$sourcedir/ManageMail.php">
<operation>
<search position="after"><![CDATA[ 'clear' => 'ClearMailQueue',]]></search>
<add><![CDATA[
//Begin: von COLLINZO: Delete all Mail Queue button
'clear2' => 'ClearMailQueue2',
//End: von COLLINZO: Delete all Mail Queue button
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[ 'value' => '[<a href="' . $scripturl . '?action=admin;area=mailqueue;sa=clear;' . $context['session_var'] . '=' . $context['session_id'] . '" onclick="return confirm(\'' . $txt['mailqueue_clear_list_warning'] . '\');">' . $txt['mailqueue_clear_list'] . '</a>] <input type="submit" name="delete_redirects" value="' . $txt['delete'] . '" onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');" class="button_submit" />',]]></search>
<add><![CDATA[ //Begin: von COLLINZO: Delete all Mail Queue button
'value' => '[<a href="' . $scripturl . '?action=admin;area=mailqueue;sa=clear;' . $context['session_var'] . '=' . $context['session_id'] . '" onclick="return confirm(\'' . $txt['mailqueue_clear_list_warning'] . '\');">' . $txt['mailqueue_clear_list'] . '</a>] [<a href="' . $scripturl . '?action=admin;area=mailqueue;sa=clear2;' . $context['session_var'] . '=' . $context['session_id'] . '" onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');">' . $txt['delete'] . ' ' . $txt['all'] . '</a>] <input type="submit" name="delete_redirects" value="' . $txt['delete'] . '" onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');" class="button_submit" />',
//End: von COLLINZO: Delete all Mail Queue button ]]></add>
</operation>
<operation>
<search position="end" />
<add><![CDATA[ //Begin: von COLLINZO: Delete all Mail Queue button
function ClearMailQueue2()
{
global $smcFunc;
checkSession('get');
$smcFunc['db_query']('', 'TRUNCATE TABLE {db_prefix}mail_queue', array() );
redirectexit('action=admin;area=mailqueue');
}
//End: von COLLINZO: Delete all Mail Queue button ]]></add>
</operation>
</file>
</modification>
Is this mod runnig ok for 2.0.13?. Thanks
Quote from: margarett on September 04, 2015, 05:17:02 AM
This MOD does not install cleanly. This is because install.xml is looking for spaces instead of tabs, as well as inexistent spaces at the end of the lines.
The fixed install.xml (for the current code of course) could be something like this
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns:smf="http://www.simplemachines.org/" xmlns="http://www.simplemachines.org/xml/modification">
<id>von-COLLINZO:DeleteAllMailQueue</id>
<version>1.0</version>
<file name="$sourcedir/ManageMail.php">
<operation>
<search position="after"><![CDATA[ 'clear' => 'ClearMailQueue',]]></search>
<add><![CDATA[
//Begin: von COLLINZO: Delete all Mail Queue button
'clear2' => 'ClearMailQueue2',
//End: von COLLINZO: Delete all Mail Queue button
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[ 'value' => '[<a href="' . $scripturl . '?action=admin;area=mailqueue;sa=clear;' . $context['session_var'] . '=' . $context['session_id'] . '" onclick="return confirm(\'' . $txt['mailqueue_clear_list_warning'] . '\');">' . $txt['mailqueue_clear_list'] . '</a>] <input type="submit" name="delete_redirects" value="' . $txt['delete'] . '" onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');" class="button_submit" />',]]></search>
<add><![CDATA[ //Begin: von COLLINZO: Delete all Mail Queue button
'value' => '[<a href="' . $scripturl . '?action=admin;area=mailqueue;sa=clear;' . $context['session_var'] . '=' . $context['session_id'] . '" onclick="return confirm(\'' . $txt['mailqueue_clear_list_warning'] . '\');">' . $txt['mailqueue_clear_list'] . '</a>] [<a href="' . $scripturl . '?action=admin;area=mailqueue;sa=clear2;' . $context['session_var'] . '=' . $context['session_id'] . '" onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');">' . $txt['delete'] . ' ' . $txt['all'] . '</a>] <input type="submit" name="delete_redirects" value="' . $txt['delete'] . '" onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');" class="button_submit" />',
//End: von COLLINZO: Delete all Mail Queue button ]]></add>
</operation>
<operation>
<search position="end" />
<add><![CDATA[ //Begin: von COLLINZO: Delete all Mail Queue button
function ClearMailQueue2()
{
global $smcFunc;
checkSession('get');
$smcFunc['db_query']('', 'TRUNCATE TABLE {db_prefix}mail_queue', array() );
redirectexit('action=admin;area=mailqueue');
}
//End: von COLLINZO: Delete all Mail Queue button ]]></add>
</operation>
</file>
</modification>
Years later... Thanks old friend :)
Much faster than having to edit myself ;D