templates/de/emails/admin/admin_support-reflink.tpl svneol=native#text/plain
templates/de/emails/admin/admin_support-unconfirmed.tpl svneol=native#text/plain
templates/de/emails/admin/admin_surfbar_url_active_deleted.tpl svneol=native#text/plain
+templates/de/emails/admin/admin_surfbar_url_active_depleted.tpl svneol=native#text/plain
templates/de/emails/admin/admin_surfbar_url_active_pending.tpl svneol=native#text/plain
templates/de/emails/admin/admin_surfbar_url_active_stopped.tpl svneol=native#text/plain
templates/de/emails/admin/admin_surfbar_url_confirmed.tpl svneol=native#text/plain
./inc/libs/register_functions.php:367: // @TODO Wether the registration bonus should only be added to user directly or through referal system should be configurable
./inc/libs/sponsor_functions.php:159: // @TODO Rewrite this to API function
./inc/libs/sponsor_functions.php:430: // @TODO Rewrite this to API function
-./inc/libs/surfbar_functions.php:1078: // @TODO Try to rewrite the following unset()
-./inc/libs/surfbar_functions.php:1595: // @TODO This can be somehow rewritten
-./inc/libs/surfbar_functions.php:708:// @TODO Can't we use our new expression language instead of this ugly code?
-./inc/libs/surfbar_functions.php:997: // @TODO Invalid salt should be refused
+./inc/libs/surfbar_functions.php:1000: // @TODO Invalid salt should be refused
+./inc/libs/surfbar_functions.php:1081: // @TODO Try to rewrite the following unset()
+./inc/libs/surfbar_functions.php:1598: // @TODO This can be somehow rewritten
+./inc/libs/surfbar_functions.php:711:// @TODO Can't we use our new expression language instead of this ugly code?
./inc/libs/task_functions.php:247: // @TODO These can be rewritten to filter
./inc/libs/task_functions.php:51:// @TODO Move all extension-dependent queries into filters
./inc/libs/theme_functions.php:93: // @TODO Can't this be rewritten to an API function?
./inc/mysql-manager.php:44:// @TODO Can we cache this?
./inc/purge/purge-inact.php:55: // @TODO Rewrite these if() blocks to a filter
./inc/revision-functions.php:169:// @TODO This function does also set and get in 'cache_array'
-./inc/template-functions.php:1063: // @TODO Deprecate this thing
-./inc/template-functions.php:1074: // @TODO Deprecate this thing
-./inc/template-functions.php:1167: // @TODO This can be easily moved out after the merge from EL branch to this is complete
-./inc/template-functions.php:1200: // @TODO Add a little more infos here
-./inc/template-functions.php:1511:// @TODO Lame description for this function
-./inc/template-functions.php:1533: // @TODO Move this in a filter
+./inc/template-functions.php:1066: // @TODO Deprecate this thing
+./inc/template-functions.php:1077: // @TODO Deprecate this thing
+./inc/template-functions.php:1170: // @TODO This can be easily moved out after the merge from EL branch to this is complete
+./inc/template-functions.php:1203: // @TODO Add a little more infos here
+./inc/template-functions.php:1514:// @TODO Lame description for this function
+./inc/template-functions.php:1536: // @TODO Move this in a filter
./inc/template-functions.php:189: * @TODO On some pages this is buggy
./inc/template-functions.php:266: // @TODO Remove this sanity-check if all is fine
-./inc/template-functions.php:591:// @TODO $simple/$constants are deprecated
-./inc/template-functions.php:617: // @TODO Do only use $content and deprecate $GLOBALS and $DATA in templates
+./inc/template-functions.php:594:// @TODO $simple/$constants are deprecated
+./inc/template-functions.php:620: // @TODO Do only use $content and deprecate $GLOBALS and $DATA in templates
./inc/wrapper-functions.php:130:// @TODO Implement $compress
./inc/wrapper-functions.php:137:// @TODO Implement $decompress
./inc/wrapper-functions.php:514:// @TODO Do some more sanity check here
./templates/de/emails/add-points.tpl:1:<!-- @DEPRECATED //-->
./templates/de/emails/admin/admin_coupon.tpl:1:<!-- @DEPRECATED //-->
./templates/de/emails/admin/admin_del_surfbar_urls.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/emails/admin/admin_surfbar_url_depleted.tpl:1:<!-- @DEPRECATED //-->
./templates/de/emails/admin-del_links.tpl:1:<!-- @DEPRECATED //-->
./templates/de/emails/back-admin.tpl:1:<!-- @DEPRECATED //-->
./templates/de/emails/back-member.tpl:1:<!-- @DEPRECATED //-->
// Filter for changing URL status
function FILTER_SURFBAR_CHANGE_URL_STATUS ($filterData) {
- die('<pre>'.print_r($filterData, true).'</pre>');
+ // Prepare content for notification routines
+ $filterData['data'][$filterData['url_id']]['url_userid'] = $filterData['data'][$filterData['url_id']]['url_userid'];
+ $filterData['data'][$filterData['url_id']]['frametester'] = '{%pipe,generateFrametesterUrl=' . $filterData['data'][$filterData['url_id']]['url'] . '%}';
+ $filterData['data'][$filterData['url_id']]['reward'] = '{%config,translateComma=surfbar_static_reward%}';
+ $filterData['data'][$filterData['url_id']]['costs'] = '{%config,translateComma=surfbar_static_costs%}';
+
+ // Do some dirty fixing here:
+ if (($filterData['data'][$filterData['url_id']]['url_status'] == 'STOPPED') && ($filterData['new_status'] == 'pending')) {
+ // Fix for template change
+ $filterData['new_status'] = 'continued';
+ } // END - if
+
+ // Send admin notification
+ SURFBAR_NOTIFY_ADMIN('url_' . strtolower($filterData['data'][$filterData['url_id']]['url_status']) . '_' . $filterData['new_status'], $filterData['data'][$filterData['url_id']]);
+
+ // Send user notification
+ SURFBAR_NOTIFY_USER('url_' . strtolower($filterData['data'][$filterData['url_id']]['url_status']) . '_' . $filterData['new_status'], $filterData['data'][$filterData['url_id']]);
+
// Return filter data
return $filterData;
}
'ADMIN_SURFBAR_NOTIFY_URL_MIGRATED_DELETED_SUBJECT' => "[Surfbar:] Mitglied hat migrierte URL gelöscht",
'ADMIN_SURFBAR_NOTIFY_URL_MIGRATED_MIGRATED_SUBJECT' => "[Surfbar:] Mitglied hat migrierte URL geändert",
'ADMIN_SURFBAR_NOTIFY_URL_MIGRATED_PENDING_SUBJECT' => "[Surfbar:] Mitglied hat migrierte URL gebucht",
+ 'ADMIN_SURFBAR_NOTIFY_URL_ACTIVE_DEPLETED_SUBJECT' => "[Surfbar:] Maximale Views einer URL erreicht",
'ADMIN_SURFBAR_NOTIFY_DEFAULT_SUBJECT' => "Problem in Surfbar-Betreff (%s)",
// Auto-generated admin subject lines
}
// Register the new URL
- die('limit='.$limit);
return SURFBAR_REGISTER_URL($url, getMemberId(), 'PENDING', 'reg', array('limit' => $limit));
}
// Handle low-points amounts
SURFBAR_HANDLE_LOW_POINTS();
}
+
// Handle URLs which limit has depleted
function SURFBAR_HANDLE_DEPLETED_VIEWS () {
// Get all URLs
$data = $urlData;
// Rewrite array for next call
- $urlData[$id] = $data;
+ $urlData = array(
+ $id => $data
+ );
// Handle the status
SURFBAR_CHANGE_STATUS($id, 'ACTIVE', 'DEPLETED', $urlData);
//* DEBUG: */ debugOutput('LOCK!');
///* DEBUG: */ return;
// Just add it to the database
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_locks` (`locks_userid`, `locks_url_id`) VALUES (%s, %s)",
+ SQL_QUERY_ESC('INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_locks` (`locks_userid`, `locks_url_id`) VALUES (%s, %s)',
array(getMemberId(), bigintval($urlId)), __FUNCTION__, __LINE__);
// Remove the salt from database
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_surfbar_salts` WHERE `salts_url_id`=%s AND `salts_userid`=%s LIMIT 1",
+ SQL_QUERY_ESC('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_surfbar_salts` WHERE `salts_url_id`=%s AND `salts_userid`=%s LIMIT 1',
array(bigintval($urlId), getMemberId()), __FUNCTION__, __LINE__);
}
// Do we have a limit?
if ($allowed > 0) {
// Then count views_max down!
- $add .= ", `views_max`=`views_max`-1";
+ $add .= ', `url_views_max`=`url_views_max`-1';
} // END - if
// Update URL stats
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_surfbar_urls` SET `url_views_total`=`url_views_total`+1".$add." WHERE `url_id`=%s LIMIT 1",
+ SQL_QUERY_ESC('UPDATE `{?_MYSQL_PREFIX?}_surfbar_urls` SET `url_views_total`=`url_views_total`+1' . $add . ' WHERE `url_id`=%s LIMIT 1',
array(SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
// Update the stats entry
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_surfbar_stats` SET `stats_count`=`stats_count`+1 WHERE `stats_userid`=%s AND `stats_url_id`=%s LIMIT 1",
+ SQL_QUERY_ESC('UPDATE `{?_MYSQL_PREFIX?}_surfbar_stats` SET `stats_count`=`stats_count`+1 WHERE `stats_userid`=%s AND `stats_url_id`=%s LIMIT 1',
array(
getMemberId(),
SURFBAR_GET_ID()
// Was that update okay?
if (SQL_HASZEROAFFECTED()) {
// No, then insert entry
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_stats` (`stats_userid`, `stats_url_id`, `stats_count`) VALUES (%s,%s,1)",
+ SQL_QUERY_ESC('INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_stats` (`stats_userid`, `stats_url_id`, `stats_count`) VALUES (%s,%s,1)',
array(
getMemberId(),
SURFBAR_GET_ID()
// Changes the status of an URL from given to other
function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus, $data=array()) {
- /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',prevStatus=' . $prevStatus . ',newStatus=' . $newStatus . ' - ENTERED!');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',prevStatus=' . $prevStatus . ',newStatus=' . $newStatus . ' - ENTERED!');
// Make new status always lower-case
$newStatus = strtolower($newStatus);
// Extract data from it again
$data = $filterData['data'];
- // Prepare content for notification routines
- $data[$urlId]['url_userid'] = $data[$urlId]['url_userid'];
- $data[$urlId]['frametester'] = '{%pipe,generateFrametesterUrl=' . $data[$urlId]['url'] . '%}';
- $data[$urlId]['reward'] = '{%config,translateComma=surfbar_static_reward%}';
- $data[$urlId]['costs'] = '{%config,translateComma=surfbar_static_costs%}';
-
- // Do some dirty fixing here:
- if (($data[$urlId]['url_status'] == 'STOPPED') && ($newStatus == 'pending')) {
- // Fix for template change
- $newStatus = 'continued';
- } // END - if
-
- // Send admin notification
- SURFBAR_NOTIFY_ADMIN('url_' . strtolower($data[$urlId]['url_status']) . '_' . $newStatus, $data[$urlId]);
-
- // Send user notification
- SURFBAR_NOTIFY_USER('url_' . strtolower($data[$urlId]['url_status']) . '_' . $newStatus, $data[$urlId]);
-
// All done!
- /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',prevStatus=' . $prevStatus . ',newStatus=' . $newStatus . ' - EXIT!');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',prevStatus=' . $prevStatus . ',newStatus=' . $newStatus . ' - EXIT!');
return true;
}
$message = '{--MEMBER_SURFBAR_URL_NOT_ADDED--}';
// Register the new URL
- die(postRequestParameter('limit').'=<pre>'.print_r($_POST,true).'</pre>');
$insertId = SURFBAR_MEMBER_ADD_URL(postRequestParameter('url'), postRequestParameter('limit'));
// Was this fine?
--- /dev/null
+Hallo Administrator,
+
+eine URL wurde soeben automatisch angehalten, da die maximalen Views verbraucht sind.
+
+Hier sind alle Daten dazu:
+------------------------------------------
+Gebuchte URL: $content[url]
+------------------------------------------
+Email: {%user,email=$userid%}
+------------------------------------------
+Framekiller-Test:
+{%pipe,generateFrametesterUrl=$content[url]%}
+------------------------------------------
+Mitglieder-Id: $content[url_userid]
+------------------------------------------
+URL angemeldet: $content[url_registered]
+------------------------------------------
+Gesamteinblendungen: {%pipe,translateComma=$content[url_views_total]%}
+------------------------------------------
+Maximale Einblendungen: {%pipe,translateComma=$content[url_views_allowed]%}
+------------------------------------------
+Davon übrig: {%pipe,translateComma=$content[url_views_max]%}
+------------------------------------------
+Vergütung/Aufruf: $content[reward] {?POINTS?}
+------------------------------------------
+Kosten/Aufruf: $content[costs] {?POINTS?}
+------------------------------------------
+ID in der Surfbar: $content[url_id]
+------------------------------------------
+
+Mit freundlichen Grüßen,
+ Ihr {?MAIN_TITLE?} Script
+
+{?URL?}/admin.php
-Hallo Administrator,
-
-eine URL wurde soeben automatisch angehalten, da die maximalen Views verbraucht sind.
-
-Hier sind alle Daten dazu:
-------------------------------------------
-Gebuchte URL: $content[url]
-------------------------------------------
-Email: {%user,email=$userid%}
-------------------------------------------
-Framekiller-Test:
-{%pipe,generateFrametesterUrl=$content[url]%}
-------------------------------------------
-Mitglieder-Id: $content[url_userid]
-------------------------------------------
-URL angemeldet: $content[url_registered]
-------------------------------------------
-Gesamteinblendungen: {%pipe,translateComma=$content[url_views_total]%}
-------------------------------------------
-Maximale Einblendungen: {%pipe,translateComma=$content[url_views_allowed]%}
-------------------------------------------
-Davon übrig: {%pipe,translateComma=$content[url_views_max]%}
-------------------------------------------
-Vergütung/Aufruf: $content[reward] {?POINTS?}
-------------------------------------------
-Kosten/Aufruf: $content[costs] {?POINTS?}
-------------------------------------------
-ID in der Surfbar: $content[url_id]
-------------------------------------------
-
-Mit freundlichen Grüßen,
- Ihr {?MAIN_TITLE?} Script
-
-{?URL?}/admin.php
+<!-- @DEPRECATED //-->