Ok I finished this feature for visiolist 1.7
Unzip the attached file and upload the contents to your toplist root.
1) Now by default you can use in subject and email body any tag as your used to from templates. That means any database column from VL_sites or VL_stats table.
e.g
2) The email queue list is no longer a list of emails, but usernames
3) Now supports plugins
The following I have not tested, so make sure to only include a test user in your queue list
To get your rank positions in place, you would need to add plugin files. You already have a plugin for this if I remember, so add the files in there
1) ajax_send_mail_start.php
- You might need to adjust your order by here at start of the file, to match your alexa stuff. I just copied this from other thread
Code:
// Make ORDER BY clause
$order_by = base::rank_by($CONF['ranking_method'])." DESC, unq_{$CONF['ranking_method']}_overall DESC";
$user_data['rank_overall'] = 1;
$rank_result = $DB->query("SELECT sites.username FROM {$CONF['sql_prefix']}_sites sites, {$CONF['sql_prefix']}_stats stats WHERE sites.username = stats.username AND active = 1 ORDER BY {$order_by}", __FILE__, __LINE__);
while (list($username) = $DB->fetch_array($rank_result))
{
if($username == $user_data['username'])
{
break;
}
$user_data['rank_overall']++;
}
// Escape users category
$category_rank_sql = $DB->escape($category_raw, 1);
$user_data['rank_category'] = 1;
$rank_result = $DB->query("SELECT sites.username FROM {$CONF['sql_prefix']}_sites sites, {$CONF['sql_prefix']}_stats stats WHERE sites.username = stats.username AND active = 1 AND category = '{$category_rank_sql}' ORDER BY {$order_by}", __FILE__, __LINE__);
while (list($username) = $DB->fetch_array($rank_result))
{
if($username == $user_data['username'])
{
break;
}
$user_data['rank_category']++;
}
Now you should be able to use {$rank_overall} and {$rank_category} in email message