]> git.mxchange.org Git - mailer.git/commitdiff
Introduced new template helper 'doTemplateDeferrerUrl' to encapsulate generating...
authorRoland Häder <roland@mxchange.org>
Sat, 3 Nov 2012 23:07:42 +0000 (23:07 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 3 Nov 2012 23:07:42 +0000 (23:07 +0000)
inc/template-functions.php
templates/de/html/admin/admin_delete_email_bonus.tpl
templates/de/html/admin/admin_delete_email_normal.tpl
templates/de/html/admin/admin_delete_email_notify.tpl
templates/de/html/admin/admin_list_server_name_log_row.tpl
templates/de/html/admin/admin_list_sponsor_details.tpl

index 7bfe4b9ddda0b4d012fe98f5c6f9c9f122901fae..208c2f21267780c53be2bf487f72bd1284fe0847 100644 (file)
@@ -2239,6 +2239,18 @@ function doTemplatePointsPaymentMethodSelectionBox ($templateName, $clear = FALS
        return $content;
 }
 
+// Template helper function to create a deferrer code if URL is not empty
+function doTemplateDereferrerUrl ($templateName, $clear = FALSE, $url = NULL) {
+       // Is the URL not NULL and not empty?
+       if ((!is_null($url)) && (!empty($url))) {
+               // Set HTML with EL code
+               $url = '<a href="{%pipe,generateDereferrerUrl=' . $url . '%}" rel="external" target="_blank">{--ADMIN_TEST_URL--}</a>';
+       } // END - if
+
+       // Return URL (or content) or dashes if empty
+       return fixEmptyContentToDashes($url);
+}
+
 // Tries to anonymize some sensitive data (e.g. IP address, user agent, referrer, etc.)
 function anonymizeSensitiveData ($data) {
        // Trim it
index 0dc3b484bc7f77e27bfb5e240fd4874e00dde27e..10944f482215a31c586287c0f6330ca5518366b5 100644 (file)
@@ -16,7 +16,7 @@
                <td class="right" align="center">$content[id]</td>
                <td class="right" align="center">$content[subject]</td>
                <td class="right" align="center">
-                       <a href="{%pipe,generateDereferrerUrl=$content[url]%}" target="_blank">{--ADMIN_TEST_URL--}</a>
+                       {%template,DereferrerUrl=$content[url]%}
                </td>
                <td class="right" align="center">$content[timestamp]</td>
                <td align="center">$content[count]</td>
index e9fdf88c26fb0d4de4667f57908758629c6529fa..dc3cad1cd5a692b5caf3abb282114d98654bd6bf 100644 (file)
@@ -17,7 +17,7 @@
                <td class="top right" align="center">{%pipe,generateUserProfileLink=$content[sender]%}</td>
                <td class="top right" align="center">$content[subject]</td>
                <td class="top right" align="center">
-                       <a href="{%pipe,generateDereferrerUrl=$content[url]%}" target="_blank">{--ADMIN_TEST_URL--}</a>
+                       {%template,DereferrerUrl=$content[url]%}
                </td>
                <td class="top" align="center">$content[timestamp]</td>
        </tr>
index 4eb0776cbd32eaa9cfdc94a6900f588db003e367..bb3ba3be0a4aa2469d6ed48c2d124b81fbdcbc7d 100644 (file)
@@ -15,7 +15,7 @@
        <tr>
                <td class="right" align="center">$content[id]</td>
                <td class="right" align="center">$content[subject]</td>
-               <td class="right" align="center"><a href="{%pipe,generateDereferrerUrl=$content[url]%}" target="_blank">{--ADMIN_TEST_URL--}</a></td>
+               <td class="right" align="center">{%template,DereferrerUrl=$content[url]%}</td>
                <td class="right" align="center">$content[timestamp]</td>
                <td align="center">$content[count]</td>
        </tr>
index 31f41718cbe195c247e250547e756a9acfec19d3..fde1d99a71fe5e2e9ce2e2933fe9cfe2588009e8 100644 (file)
@@ -12,7 +12,7 @@
                {%pipe,fixEmptyContentToDashes=$content[server_name_ua]%}
        </td>
        <td align="center" class="bottom right {%template,ColorSwitch%}">
-               {%pipe,generateDereferrerUrl,fixEmptyContentToDashes=$content[server_name_referrer]%}
+               {%template,DereferrerUrl=$content[server_name_referrer]%}
        </td>
        <td align="center" class="bottom {%template,ColorSwitch%}">
                $content[server_name_added]
index f2979bf6f51379bd51c38b7533da133541acc3f1..bff4efec285fd1b68980b5d177f951be00a76d8a 100644 (file)
@@ -65,7 +65,7 @@
 </tr>
 <tr>
        <td align="right" class="bottom right">{--SPONSOR_ENTER_URL--}:</td>
-       <td class="bottom">[<a href="{%pipe,generateDereferrerUrl=$content[url]%}" target="_blank"><strong>{--ADMIN_TEST_URL--}</strong></a>]</td>
+       <td class="bottom">[{%template,DereferrerUrl=$content[url]%}]</td>
 </tr>
 <tr>
        <td colspan="2" align="center" class="table_header bottom">