More fixes for ext-surfbar:
authorRoland Häder <roland@mxchange.org>
Sat, 9 Jul 2011 05:08:38 +0000 (05:08 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 9 Jul 2011 05:08:38 +0000 (05:08 +0000)
- Fixed some template bugs, the dollar sign went missing
- Renamed template (we write some_delete_foo and not some_del_foo)
- TODOs.txt updated

23 files changed:
.gitattributes
DOCS/TODOs.txt
inc/filters.php
inc/functions.php
inc/libs/surfbar_functions.php
inc/modules/admin/admin-inc.php
inc/modules/admin/what-list_surfbar_urls.php
inc/modules/member/what-surfbar_book.php
inc/modules/member/what-surfbar_list.php
surfbar.php
templates/de/emails/admin/admin_del_surfbar_urls.tpl
templates/de/emails/admin/admin_delete_surfbar_urls.tpl [new file with mode: 0644]
templates/de/emails/admin/admin_surfbar_url_unlock.tpl
templates/de/emails/member/member_del_surfbar_urls.tpl
templates/de/emails/member/member_delete_surfbar_urls.tpl [new file with mode: 0644]
templates/de/emails/member/member_undelete_active_surfbar_urls.tpl
templates/de/html/admin/admin_delete_surfbar_urls_row.tpl
templates/de/html/admin/admin_lock_surfbar_urls_row.tpl
templates/de/html/admin/admin_undelete_surfbar_urls_row.tpl
templates/de/html/surfbar/surfbar_frameset.tpl
templates/xml/admin/admin_lock_do_surfbar_urls.xml
templates/xml/admin/admin_lock_show_surfbar_urls.xml
templates/xml/admin/admin_undelete_show_surfbar_urls.xml

index 35cdfce..a0e7674 100644 (file)
@@ -794,6 +794,7 @@ templates/de/emails/admin/admin_coupon_code.tpl svneol=native#text/plain
 templates/de/emails/admin/admin_coupon_purge.tpl svneol=native#text/plain
 templates/de/emails/admin/admin_coupon_purge_row.tpl svneol=native#text/plain
 templates/de/emails/admin/admin_del_surfbar_urls.tpl svneol=native#text/plain
+templates/de/emails/admin/admin_delete_surfbar_urls.tpl svneol=native#text/plain
 templates/de/emails/admin/admin_edit_surfbar_urls.tpl svneol=native#text/plain
 templates/de/emails/admin/admin_extension_deactivated.tpl svneol=native#text/plain
 templates/de/emails/admin/admin_holiday_deactivated.tpl svneol=native#text/plain
@@ -897,6 +898,7 @@ templates/de/emails/member/member_coupon.tpl svneol=native#text/plain
 templates/de/emails/member/member_coupon_code.tpl svneol=native#text/plain
 templates/de/emails/member/member_del_surfbar_urls.tpl svneol=native#text/plain
 templates/de/emails/member/member_delete_links.tpl svneol=native#text/plain
+templates/de/emails/member/member_delete_surfbar_urls.tpl svneol=native#text/plain
 templates/de/emails/member/member_doubler.tpl svneol=native#text/plain
 templates/de/emails/member/member_edit_surfbar_urls.tpl svneol=native#text/plain
 templates/de/emails/member/member_holiday_activated.tpl svneol=native#text/plain
index 8032ea8..1c303ff 100644 (file)
 ./inc/extensions-functions.php:562:            // @TODO Extension is loaded, what next?
 ./inc/filter/bonus_filter.php:56:              // @TODO This query isn't right, it will only update if the user was for a longer time away!
 ./inc/filter/cache_filter.php:92:              // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal.
-./inc/functions.php:1223:                      // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
-./inc/functions.php:1311:                      // @TODO Are these convertions still required?
-./inc/functions.php:1329:// @TODO Rewrite this function to use readFromFile() and writeToFile()
+./inc/functions.php:1222:                      // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
+./inc/functions.php:1310:                      // @TODO Are these convertions still required?
+./inc/functions.php:1328:// @TODO Rewrite this function to use readFromFile() and writeToFile()
 ./inc/functions.php:156:// @TODO Rewrite this to an extension 'smtp'
-./inc/functions.php:1920:      // @TODO Find a way to cache this
-./inc/functions.php:2021:      // @TODO This is still very static, rewrite it somehow
-./inc/functions.php:2201:      // @TODO Rename column data_type to e.g. mail_status
+./inc/functions.php:1919:      // @TODO Find a way to cache this
+./inc/functions.php:2020:      // @TODO This is still very static, rewrite it somehow
+./inc/functions.php:2200:      // @TODO Rename column data_type to e.g. mail_status
 ./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter
 ./inc/install-functions.php:57:        // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0);
 ./inc/language/de.php:1079:    // @TODO Rewrite these two constants
@@ -80,8 +80,8 @@
 ./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:1072: // @TODO Try to rewrite the following unset()
-./inc/libs/surfbar_functions.php:1587:         // @TODO This can be somehow rewritten
+./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/task_functions.php:240:             // @TODO These can be rewritten to filter
 ./templates/de/html/guest/guest_nickname_login.tpl:21: @TODO Deactivated feature, try to find a solution for this or remove it.
 ./templates/de/html/guest/guest_stats_member.tpl:21:   @TODO We have to fix these counters.
 ./templates/de/html/member/member_unconfirmed_table_nopoints.tpl:11:           <!-- @TODO Nothing to say here? //-->
+./templates/de/html/surfbar/surfbar_frameset.tpl:4:    // @TODO This redirect kills our own frameset
 ./templates/de/html/surfbar/surfbar_frame_textlinks.tpl:5:             <!-- @TODO These are static lines and should be replaced by a filter (see ext-sponsor) //-->
 ### ### DEPRECATION FOLLOWS: ### ###
 ./inc/autopurge/purge-general.php:2:// @DEPRECATED
 ./inc/reset/reset_yoomedia.php:2:// @DEPRECATED
 ./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-del_links.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/emails/back-admin.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/emails/back-member.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/emails/done-member.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/emails/lock-user.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/emails/member/member_coupon.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/emails/member/member_del_surfbar_urls.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/emails/new-pass.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/emails/normal-mail.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/emails/order-accept.tpl:1:<!-- @DEPRECATED //-->
index 0205218..ae2bc37 100644 (file)
@@ -335,14 +335,16 @@ function FILTER_UPDATE_LOGIN_DATA () {
 
 // Filter for initializing randomizer
 function FILTER_INIT_RANDOMIZER () {
+       // Take a prime number which is long (if you know a longer one please try it out!)
+       setConfigEntry('_PRIME', 591623);
+
        // Only execute this filter if installed
        if ((!isInstalled()) || (!isExtensionInstalledAndNewer('other', '0.2.5'))) {
+               // Set missing entry
+               setConfigEntry('_ADD', 0);
                return;
        } // END - if
 
-       // Take a prime number which is long (if you know a longer one please try it out!)
-       setConfigEntry('_PRIME', 591623);
-
        // Calculate "entropy" with the prime number (for code generation)
        setConfigEntry('_ADD', (getPrime() * getPrime() / (pi() * getCodeLength() + 1)));
 
index e2fdb65..e89e002 100644 (file)
@@ -670,22 +670,21 @@ function generateRandomCode ($length, $code, $userid, $extraData = '') {
        if (isConfigEntrySet('master_salt')) {
                // Generate hash with master salt from modula of number with the prime number and other data
                $saltedHash = generateHash(($a % getPrime()) . getEncryptSeperator() . $server . getEncryptSeperator() . $keys . getEncryptSeperator() . $data . getEncryptSeperator() . getDateKey() . getEncryptSeperator() . $a, getMasterSalt());
-
-               // Create number from hash
-               $rcode = hexdec(substr($saltedHash, strlen(getMasterSalt()), 9)) / abs(getRandNo() - $a + sqrt(getConfig('_ADD'))) / pi();
        } else {
                // Generate hash with "hash of site key" from modula of number with the prime number and other data
                $saltedHash = generateHash(($a % getPrime()) . getEncryptSeperator() . $server . getEncryptSeperator() . $keys . getEncryptSeperator() . $data . getEncryptSeperator() . getDateKey() . getEncryptSeperator() . $a, substr(sha1(getSiteKey()), 0, getSaltLength()));
-
-               // Create number from hash
-               $rcode = hexdec(substr($saltedHash, 8, 9)) / abs(getRandNo() - $a + sqrt(getConfig('_ADD'))) / pi();
        }
 
+       // Create number from hash
+       $rcode = hexdec(substr($saltedHash, 8, 9)) / abs(getRandNo() - $a + sqrt(getConfig('_ADD'))) / pi();
+
        // At least 10 numbers shall be secure enought!
-       $len = getCodeLength();
-       if ($len == '0') {
+       if (isExtensionActive('other')) {
+               $len = getCodeLength();
+       } else {
                $len = $length;
        } // END - if
+
        if ($len == '0') {
                $len = 10;
        } // END - if
index 936a31f..6e10e27 100644 (file)
@@ -197,9 +197,9 @@ function SURFBAR_MEMBER_ACTIONS ($urlId, $status) {
        foreach ($actionArray as $actionId => $action) {
                // Add form for this action
                $OUT .= loadTemplate('member_surfbar_list_form', true, array(
-                       'width'    => $width,
-                       'id'       => bigintval($urlId),
-                       'action'   => strtolower($action)
+                       'width'  => $width,
+                       'url_id' => bigintval($urlId),
+                       'action' => strtolower($action)
                ));
        } // END - foreach
 
@@ -266,8 +266,8 @@ function SURFBAR_MEMBER_DO_FORM ($formData, $urlArray) {
 // Validate if the requested action can be performed on current URL status
 function SURFBAR_VALIDATE_MEMBER_ACTION_STATUS ($action, $status) {
        // Search for the requested action/status combination in database
-       $result = SQL_QUERY_ESC("SELECT new_status FROM `{?_MYSQL_PREFIX?}_surfbar_actions` WHERE `action`='%s' AND `status`='%s' LIMIT 1",
-       array($action, $status), __FUNCTION__, __LINE__);
+       $result = SQL_QUERY_ESC("SELECT `actions_new_status` FROM `{?_MYSQL_PREFIX?}_surfbar_actions` WHERE `actions_action`='%s' AND `actions_status`='%s' LIMIT 1",
+               array($action, $status), __FUNCTION__, __LINE__);
 
        // Is the entry there?
        $isValid = (SQL_NUMROWS($result) == 1);
@@ -876,7 +876,7 @@ ON
        u.`url_id`=l.`locks_url_id`
 WHERE
        l.`locks_userid`=%s AND
-       (UNIX_TIMESTAMP() - {%pipe,SURFBAR_GET_SURF_LOCK%}) < UNIX_TIMESTAMP(l.`locks_last_surfed`) AND
+       (UNIX_TIMESTAMP() - {%%pipe,SURFBAR_GET_SURF_LOCK%%}) < UNIX_TIMESTAMP(l.`locks_last_surfed`) AND
        (
                ((UNIX_TIMESTAMP(l.`locks_last_surfed`) - u.`url_fixed_reload`) < 0 AND u.`url_fixed_reload` > 0) OR
                u.`url_fixed_reload` = 0
@@ -995,13 +995,19 @@ function SURFBAR_GET_TOTAL_USER_URLS ($userid = '0', $status = '', $exclude = ''
 // Generate a validation code for the given id number
 function SURFBAR_GENERATE_VALIDATION_CODE ($urlId, $salt = '') {
        // @TODO Invalid salt should be refused
+       $length = '0';
        $GLOBALS['surfbar_cache']['salt'] = 'INVALID';
 
-       // Get code length from config
-       $length = getCodeLength();
+       // Is extension ext-other there?
+       if (isExtensionActive('other')) {
+               // Get code length from config
+               $length = getCodeLength();
+       } // END - if
 
        // Fix length to 10
-       if ($length == '0') $length = 10;
+       if ($length == '0') {
+               $length = 10;
+       } // END - if
 
        // Generate a code until the length matches
        $valCode = '';
@@ -1206,13 +1212,14 @@ FROM
 INNER JOIN
        `{?_MYSQL_PREFIX?}_user_data` AS d
 ON
-       u.url_userid=d.userid
+       u.`url_userid`=d.`userid`
 WHERE
-       u.url_userid NOT IN (%s,0) AND u.url_status='ACTIVE'
+       u.`url_userid` NOT IN (%s,0) AND
+       u.`url_status`='ACTIVE'
 GROUP BY
-       u.url_userid
+       u.`url_userid`
 ORDER BY
-       u.url_userid ASC",
+       u.`url_userid` ASC",
                        array(getMemberId()), __FUNCTION__, __LINE__);
        } else {
                // Get all userid
@@ -1223,13 +1230,14 @@ FROM
 INNER JOIN
        `{?_MYSQL_PREFIX?}_user_data` AS d
 ON
-       u.url_userid=d.userid
+       u.`url_userid`=d.`userid`
 WHERE
-       u.url_status='ACTIVE'
+       u.`url_userid` > 0 AND
+       u.`url_status`='ACTIVE'
 GROUP BY
-       u.url_userid
+       u.`url_userid`
 ORDER BY
-       u.url_userid ASC", __FUNCTION__, __LINE__);
+       u.`url_userid` ASC", __FUNCTION__, __LINE__);
        }
 
        // Load all userid
@@ -1545,13 +1553,13 @@ function SURFBAR_GET_USER_URLS () {
        u.url_views_max,
        u.url_views_allowed,
        UNIX_TIMESTAMP(u.url_registered) AS `url_registered`,
-       UNIX_TIMESTAMP(u.url_last_locked) AS `url_last_locked`,
-       u.url_lock_reason
+       UNIX_TIMESTAMP(u.`url_last_locked`) AS `url_last_locked`,
+       u.`url_lock_reason`
 FROM
        `{?_MYSQL_PREFIX?}_surfbar_urls` AS u
 WHERE
-       u.url_userid=%s AND
-       u.url_status != 'DELETED'
+       u.`url_userid`=%s AND
+       u.`url_status` != 'DELETED'
 ORDER BY
        u.url_id ASC",
        array(getMemberId()), __FUNCTION__, __LINE__);
@@ -1561,7 +1569,7 @@ ORDER BY
                // Load all rows
                while ($row = SQL_FETCHARRAY($result)) {
                        // Add the row
-                       $urlArray[$row['id']] = $row;
+                       $urlArray[$row['url_id']] = $row;
                } // END - while
        } // END - if
 
@@ -1578,7 +1586,7 @@ function SURFBAR_GET_ARRAY_FROM_STATUS ($status) {
        $returnArray = array();
 
        // Get all assigned actions
-       $result = SQL_QUERY_ESC("SELECT `action` FROM `{?_MYSQL_PREFIX?}_surfbar_actions` WHERE `actions_status`='%s' ORDER BY `actions_id` ASC",
+       $result = SQL_QUERY_ESC("SELECT `actions_action` FROM `{?_MYSQL_PREFIX?}_surfbar_actions` WHERE `actions_status`='%s' ORDER BY `actions_id` ASC",
                array($status), __FUNCTION__, __LINE__);
 
        // Some entries there?
@@ -1586,7 +1594,7 @@ function SURFBAR_GET_ARRAY_FROM_STATUS ($status) {
                // Load all actions
                // @TODO This can be somehow rewritten
                while ($content = SQL_FETCHARRAY($result)) {
-                       $returnArray[] = $content['action'];
+                       $returnArray[] = $content['actions_action'];
                } // END - if
        } // END - if
 
@@ -1625,7 +1633,7 @@ function SURFBAR_DETERMINE_NEXT_ID ($urlId = '0') {
                $add = '';
                if (count($USE) > 0) {
                        // Ignore some!
-                       $add = " AND sbu.url_id NOT IN (";
+                       $add = " AND sbu.`url_id` NOT IN (";
                        foreach ($USE as $url_id => $lid) {
                                // Add URL id
                                $add .= $url_id.',';
@@ -1670,12 +1678,12 @@ LEFT JOIN
 ON
        sbu.url_id=l.locks_url_id
 WHERE
-       sbu.url_userid NOT IN (".implode(',', $userids['url_userid']).") AND
+       sbu.`url_userid` NOT IN (".implode(',', $userids['url_userid']).") AND
        sbu.url_status='ACTIVE' AND
        (sbu.url_views_allowed=0 OR (sbu.url_views_allowed > 0 AND sbu.url_views_max > 0))
        ".$add."
 GROUP BY
-       sbu.url_id
+       sbu.`url_id`
 ORDER BY
        l.locks_last_surfed ASC,
        sbu.url_id ASC
index 867c30f..02f1531 100644 (file)
@@ -877,7 +877,7 @@ function adminBuilderStatusHandler ($mode, $IDs, $table, $columns, $filterFuncti
                                // Does the entry exist?
                                if ((isset($content[$column])) && (isset($statusInfo[$content[$column]]))) {
                                        // Add these entries for update
-                                       $sql .= sprintf(" %s='%s',", SQL_ESCAPE($column), SQL_ESCAPE($statusInfo[$content[$column]]));
+                                       $sql .= sprintf(" `%s`='%s',", SQL_ESCAPE($column), SQL_ESCAPE($statusInfo[$content[$column]]));
 
                                        // Remember status
                                        if ($statusColumn == 'unknown') {
@@ -902,10 +902,10 @@ function adminBuilderStatusHandler ($mode, $IDs, $table, $columns, $filterFuncti
                                        // Are there brackets () at the end?
                                        if (substr($entries[$id], -2, 2) == '()') {
                                                // Direct SQL command found
-                                               $sql .= sprintf(" %s=%s,", SQL_ESCAPE($key), SQL_ESCAPE($entries[$id]));
+                                               $sql .= sprintf(" `%s`=%s,", SQL_ESCAPE($key), SQL_ESCAPE($entries[$id]));
                                        } else {
                                                // Add regular entry
-                                               $sql .= sprintf(" %s='%s',", SQL_ESCAPE($key), SQL_ESCAPE($entries[$id]));
+                                               $sql .= sprintf(" `%s`='%s',", SQL_ESCAPE($key), SQL_ESCAPE($entries[$id]));
 
                                                // Add entry
                                                $content[$key] = $entries[$id];
@@ -934,7 +934,7 @@ function adminBuilderStatusHandler ($mode, $IDs, $table, $columns, $filterFuncti
                        } // END - if
 
                        // Send "build mails" out
-                       sendAdminBuildMails($mode, $table, $content, $id, $statusInfo[$content[$column]]);
+                       sendAdminBuildMails($mode, $table, $content, $id, $statusInfo[$content[$column]], $userIdColumn);
                } // END - foreach
        } // END - if
 }
@@ -968,7 +968,7 @@ function adminDeleteEntriesConfirm ($IDs, $table, $columns = array(), $filterFun
                                        SQL_FREERESULT($result);
 
                                        // Send "build mails" out
-                                       sendAdminBuildMails('delete', $table, $content, $id);
+                                       sendAdminBuildMails('delete', $table, $content, $id, '', $userIdColumn);
                                } // END - if
 
                                // Add id number
@@ -1064,7 +1064,7 @@ function adminEditEntriesConfirm ($IDs, $table, $columns = array(), $filterFunct
                                SQL_FREERESULT($result);
 
                                // Send "build mails" out
-                               sendAdminBuildMails('edit', $table, $content, $id);
+                               sendAdminBuildMails('edit', $table, $content, $id, '', $userIdColumn);
                        } // END - foreach
 
                        // Was this fine?
index fe6a839..aed7a27 100644 (file)
@@ -91,7 +91,7 @@ if (isFormSent('edit')) {
        $show = false;
 } elseif (isFormSent('do_undelete')) {
        // Undelete selected URLs. This does only work for deleted URLs... ;-)
-       showEntriesByXmlCallback('admin_undelete_del_surfbar_urls');
+       showEntriesByXmlCallback('admin_undelete_do_surfbar_urls');
 }
 
 // Show entries?
index f04d0d1..9846af2 100644 (file)
@@ -57,7 +57,7 @@ if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) {
        displayMessage('{--MEMBER_SURFBAR_NO_MORE_ALLOWED--}');
 } elseif ((isFormSent()) && (isPostRequestParameterSet('limited'))) {
        // Is limitation "no" and "limit" is > 0?
-       if ((postRequestParameter('limited') != 'Y') && ((isPostRequestParameterSet('limit')) && (postRequestParameter('limit') > 0)) || (!isPostRequestParameterSet('limit'))) {
+       if (postRequestParameter('limited') == 'N') {
                // Set it to unlimited
                setPostRequestParameter('limit', 0);
        } // END - if
index cd377c7..8ba9f1f 100644 (file)
@@ -71,13 +71,13 @@ if ((isFormSent()) && (isPostRequestParameterSet('action')) && (isPostRequestPar
        $OUT = '';
        foreach ($urlArray as $id => $content) {
                // "Translate"/insert data
-               if ($content['views_total'] > 0) {
+               if ($content['url_views_total'] > 0) {
                        // Include link to stats
-                       $content['views_total'] = '[<a href="{%url=modules.php?module=login&amp;what=surfbar_list%}">{%pipe,translateComma=' . $content['views_total'] . '%}</a>]';
+                       $content['url_views_total'] = '[<a href="{%url=modules.php?module=login&amp;what=surfbar_list%}">{%pipe,translateComma=' . $content['url_views_total'] . '%}</a>]';
                } // END - if
                $content['url_registered']  = generateDateTime($content['url_registered'], '2');
                $content['url_last_locked'] = generateDateTime($content['url_last_locked'], '2');
-               $content['actions']         = SURFBAR_MEMBER_ACTIONS($content['id'], $content['url_status']);
+               $content['actions']         = SURFBAR_MEMBER_ACTIONS($content['url_id'], $content['url_status']);
 
                // Load row template
                $OUT .= loadTemplate('member_surfbar_list_row', true, $content);
index cb718f4..ae3fd6f 100644 (file)
@@ -174,16 +174,11 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestParameterSet('frame')) && (in
        // Prepare content
        $content = '';
 
-       // Determine template name
-       $templateName = SURFBAR_DETERMINE_TEMPLATE_NAME();
-
-       // Load header in frameset mode is the default
-       $isFrameset = true;
-
        // Frame "top" set?
        if ((isGetRequestParameterSet('frame')) && (getRequestParameter('frame') == 'top')) {
                // Determine next id
                $nextId = SURFBAR_DETERMINE_NEXT_ID();
+               //* DEBUG: */ die('nextId='.$nextId);
 
                // Is there a valid id?
                if ($nextId > 0) {
@@ -207,6 +202,9 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestParameterSet('frame')) && (in
        // Load header
        loadIncludeOnce('inc/header.php');
 
+       // Determine template name
+       $templateName = SURFBAR_DETERMINE_TEMPLATE_NAME();
+
        // Load that template
        //* DEBUG: */ die('templateName=' . $templateName . '<br /><strong>content</strong>=<pre>' . print_r($content, true) . '</pre>');
        loadTemplate($templateName, false, $content);
index 50354e4..11f5d85 100644 (file)
@@ -1,27 +1 @@
-Hallo Administrator,
-
-Es wurde eine URL aus der Surfbar gel&ouml;scht.
-
-Hier sind alle Daten dazu:
-------------------------------------------
-Gebuchte URL: $content[url]
-------------------------------------------
-Mitglieder-Id: $content[url_userid]
-------------------------------------------
-Status: {%pipe,translateSurfbarUrlStatus=$content[url_status]%}
-------------------------------------------
-Aufrufe gesamt: {%pipe,translateComma=$content[url_views_total]%}
-------------------------------------------
-Angemeldet: $content[url_registered]
-------------------------------------------
-Zuletzt gesperrt: $content[url_last_locked]
-------------------------------------------
-Sperrgrund: $content[url_lock_reason]
-------------------------------------------
-ID in der Surfbar: $content[url_id]
-------------------------------------------
-
-Mit freundlichen Gr&uuml;&szlig;en,
-  Ihr {?MAIN_TITLE?} Script
-
-{?URL?}/admin.php
+<!-- @DEPRECATED //-->
diff --git a/templates/de/emails/admin/admin_delete_surfbar_urls.tpl b/templates/de/emails/admin/admin_delete_surfbar_urls.tpl
new file mode 100644 (file)
index 0000000..50354e4
--- /dev/null
@@ -0,0 +1,27 @@
+Hallo Administrator,
+
+Es wurde eine URL aus der Surfbar gel&ouml;scht.
+
+Hier sind alle Daten dazu:
+------------------------------------------
+Gebuchte URL: $content[url]
+------------------------------------------
+Mitglieder-Id: $content[url_userid]
+------------------------------------------
+Status: {%pipe,translateSurfbarUrlStatus=$content[url_status]%}
+------------------------------------------
+Aufrufe gesamt: {%pipe,translateComma=$content[url_views_total]%}
+------------------------------------------
+Angemeldet: $content[url_registered]
+------------------------------------------
+Zuletzt gesperrt: $content[url_last_locked]
+------------------------------------------
+Sperrgrund: $content[url_lock_reason]
+------------------------------------------
+ID in der Surfbar: $content[url_id]
+------------------------------------------
+
+Mit freundlichen Gr&uuml;&szlig;en,
+  Ihr {?MAIN_TITLE?} Script
+
+{?URL?}/admin.php
index ef9794c..d991f5c 100644 (file)
@@ -1,6 +1,6 @@
 Hallo Administrator,
 
-Ein Administrator hat soeben eine Mail freigegeben. Dabei wurde die URL in der Surfbar registriert und sofort freigeschaltet.
+Ein Administrator hat soeben eine URL in der Surfbar hinzugef&uuml;gt bzw. freigegeben.
 
 Hier sind alle Daten aus der Mail:
 ------------------------------------------
index 6ffc310..11f5d85 100644 (file)
@@ -1,21 +1 @@
-Hallo {%user,gender,translateGender=$content[url_userid]%} {%user,surname=$content[url_userid]%} {%user,family=$content[url_userid]%},
-
-wir haben soeben Ihre in unserer Surfbar gebuchte URL entfernt.
-
-Hier sind alle Daten dazu:
-------------------------------------------
-Gebuchte URL: $content[url]
-------------------------------------------
-Ihre Mitglieder-Id: $content[url_userid]
-------------------------------------------
-Aufrufe gesamt: {%pipe,translateComma=$content[url_views_total]%}
-------------------------------------------
-Angemeldet: $content[url_registered]
-------------------------------------------
-ID in der Surfbar: $content[url_id]
-------------------------------------------
-
-Mit freundlichen Gr&uuml;&szlig;en,
-  Ihr {?MAIN_TITLE?} Team
-
-{?URL?}/login.php ({?WEBMASTER?})
+<!-- @DEPRECATED //-->
diff --git a/templates/de/emails/member/member_delete_surfbar_urls.tpl b/templates/de/emails/member/member_delete_surfbar_urls.tpl
new file mode 100644 (file)
index 0000000..6ffc310
--- /dev/null
@@ -0,0 +1,21 @@
+Hallo {%user,gender,translateGender=$content[url_userid]%} {%user,surname=$content[url_userid]%} {%user,family=$content[url_userid]%},
+
+wir haben soeben Ihre in unserer Surfbar gebuchte URL entfernt.
+
+Hier sind alle Daten dazu:
+------------------------------------------
+Gebuchte URL: $content[url]
+------------------------------------------
+Ihre Mitglieder-Id: $content[url_userid]
+------------------------------------------
+Aufrufe gesamt: {%pipe,translateComma=$content[url_views_total]%}
+------------------------------------------
+Angemeldet: $content[url_registered]
+------------------------------------------
+ID in der Surfbar: $content[url_id]
+------------------------------------------
+
+Mit freundlichen Gr&uuml;&szlig;en,
+  Ihr {?MAIN_TITLE?} Team
+
+{?URL?}/login.php ({?WEBMASTER?})
index 5c853e6..e1984c6 100644 (file)
@@ -6,8 +6,6 @@ Hier sind alle Daten dazu:
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-Sperrgrund: $content[url_lock_reason]
-------------------------------------------
 Angemeldet: $content[url_registered]
 ------------------------------------------
 Ihre Mitglieder-Id: $content[url_userid]
index 55c0060..31f5d51 100644 (file)
@@ -1,7 +1,7 @@
 <tr>
        <td align="center" class="bottom right {%template,ColorSwitch%}">
                <input type="hidden" name="url_id[$content[url_id]]" value="1" />
-               <input type="hidden" name="url_userid[content[url_id]]" value="$content[url_userid_raw]" />
+               <input type="hidden" name="url_userid[$content[url_id]]" value="$content[url_userid_raw]" />
                $content[url_userid]
        </td>
        <td align="center" class="bottom right {%template,ColorSwitch%}">
index 8643d1d..3d16f13 100644 (file)
@@ -1,8 +1,8 @@
 <tr>
        <td align="center" class="bottom right {%template,ColorSwitch%}">
                <input type="hidden" name="url_id[$content[url_id]]" value="1" />
-               <input type="hidden" name="url_userid[$content[url_id]]" value="$content[url_url_userid_raw]" />
-               <input type="hidden" name="last_locked[$content[url_id]]" value="NOW()" />
+               <input type="hidden" name="url_userid[$content[url_id]]" value="$content[url_userid_raw]" />
+               <input type="hidden" name="url_last_locked[$content[url_id]]" value="NOW()" />
                $content[url_userid]
        </td>
        <td align="center" class="bottom right {%template,ColorSwitch%}">
@@ -16,6 +16,6 @@
        </td>
        <td align="center" class="bottom {%template,ColorSwitch%}">
                Bitte angeben:<br />
-               <textarea name="lock_reason[$content[url_id]]" rows="2" cols="15"></textarea>
+               <textarea name="url_lock_reason[$content[url_id]]" rows="2" cols="15"></textarea>
        </td>
 </tr>
index fc98a14..6ac05fe 100644 (file)
@@ -1,7 +1,7 @@
 <tr>
        <td align="center" class="bottom right {%template,ColorSwitch%}">
                <input type="hidden" name="url_id[$content[url_id]]" value="1" />
-               <input type="hidden" name="url_userid[content[url_id]]" value="$content[url_url_userid_raw]" />
+               <input type="hidden" name="url_userid[$content[url_id]]" value="$content[url_userid_raw]" />
                $content[url_userid]
        </td>
        <td align="center" class="bottom right {%template,ColorSwitch%}">
index 96fb245..83c3c24 100644 (file)
@@ -1,7 +1,8 @@
 <script type="text/javascript">
 <!--
 if (top.frames.length > 0) {
-       top.location.href=self.location;
+       // @TODO This redirect kills our own frameset
+       //top.location.href=self.location;
 }
 //-->
 </script>
index f1dd012..49efcdd 100644 (file)
@@ -70,6 +70,7 @@ MA  02110-1301  USA
        //-->
        <status-change-list>
                <status-change-list-entry name="url_status" type="string" old="ACTIVE" value="LOCKED" />
+               <status-change-list-entry name="url_status" type="string" old="PENDING" value="LOCKED" />
                <status-change-list-entry name="url_status" type="string" old="LOCKED" value="ACTIVE" />
        </status-change-list>
        <!--
index 490c69d..7494f78 100644 (file)
@@ -69,7 +69,7 @@ MA  02110-1301  USA
                <callback-function-list-entry name="" type="string" value="generateUserProfileLink" />
                <callback-function-list-entry name="" type="string" value="generateFrametesterUrl" />
                <callback-function-list-entry name="" type="string" value="" /> <!-- No callback function! //-->
-               <callback-function-list-entry name="" type="string" value="translateSurfbarUrlStatus" />
+               <callback-function-list-entry name="" type="string" value="" /> <!-- No callback function! //-->
        </callback-function-list>
        <!--
        Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
index d0f0f3a..91ba504 100644 (file)
@@ -69,7 +69,7 @@ MA  02110-1301  USA
                <callback-function-list-entry name="" type="string" value="generateUserProfileLink" />
                <callback-function-list-entry name="" type="string" value="generateFrametesterUrl" />
                <callback-function-list-entry name="" type="string" value="" /> <!-- No callback function! //-->
-               <callback-function-list-entry name="" type="string" value="translateSurfbarUrlStatus" />
+               <callback-function-list-entry name="" type="string" value="" /> <!-- No callback function! //-->
        </callback-function-list>
        <!--
        Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array