templates/de/html/member/member_list_referral.tpl svneol=native#text/plain
templates/de/html/member/member_list_referral_level.tpl svneol=native#text/plain
templates/de/html/member/member_list_referral_row.tpl svneol=native#text/plain
+templates/de/html/member/member_list_reflink_user_subids.tpl svneol=native#text/plain
+templates/de/html/member/member_list_reflink_user_subids_row.tpl svneol=native#text/plain
templates/de/html/member/member_list_reflinks.tpl svneol=native#text/plain
templates/de/html/member/member_list_reflinks_row.tpl svneol=native#text/plain
templates/de/html/member/member_list_subid_stats.tpl svneol=native#text/plain
} // END - if
// Version number
-setThisExtensionVersion('0.5.5');
+setThisExtensionVersion('0.5.6');
// Version history array (add more with , '0.0.1' and so on)
-setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5'));
+setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6'));
// Keep this extension always active!
setExtensionAlwaysActive('Y');
unregisterFilter(__FILE__, __LINE__, 'update_referral_data', 'GENERIC_UPDATE_USER_REFERRAL', true, isExtensionDryRun());
unregisterFilter(__FILE__, __LINE__, 'update_referral_data', 'UPDATE_USER_SUBID', true, isExtensionDryRun());
unregisterFilter(__FILE__, __LINE__, 'member_admin_actions', 'ADD_USER_SUBID_MEMBER_ACTION', true, isExtensionDryRun());
+ unregisterFilter(__FILE__, __LINE__, 'member_reflink_extra_content', 'MEMBER_REFLINK_USER_SUBIDS_CONTENT', true, isExtensionDryRun());
break;
case 'activate': // Do stuff when admin activates this extension
// Register filter
registerFilter(__FILE__, __LINE__, 'member_admin_actions', 'ADD_USER_SUBID_MEMBER_ACTION', false, true, isExtensionDryRun());
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Weiteren Filter für Mitglieder-Aktionen im Adminbereich hinzugefügt.");
+ break;
+
+ case '0.5.6': // SQL queries for v0.5.6
+ // Register filter
+ registerFilter(__FILE__, __LINE__, 'member_reflink_extra_content', 'MEMBER_REFLINK_USER_SUBIDS_CONTENT', false, true, isExtensionDryRun());
+
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Weiteren Filter für Mitglieder-Aktionen im Adminbereich hinzugefügt.");
break;
return $filterData;
}
+// Filter for rendering content for sub id listing in what=reflinks
+function FILTER_MEMBER_REFLINK_USER_SUBIDS_CONTENT ($content = '') {
+ // Do this only for members
+ assert(isMember());
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+
+ // Does the current user have sub ids?
+ if (getTotalMemberSubIds() > 0) {
+ // Then Load all
+ $result = SQL_QUERY_ESC('SELECT `id`, `subid` FROM `{?_MYSQL_PREFIX?}_user_subids` WHERE `userid`=%s ORDER BY `subid` ASC',
+ array(getMemberId()), __FUNCTION__, __LINE__);
+
+ // There should be entries left
+ assert(!SQL_HASZERONUMS($result));
+
+ // Load all
+ $out = '';
+ while ($row = SQL_FETCHARRAY($result)) {
+ // Load row template
+ $out .= loadTemplate('member_list_reflink_user_subids_row', true, $row);
+ } // END - while
+
+ // Load main template
+ $content .= loadTemplate('member_list_reflink_user_subids', true, $out);
+
+ // Free result
+ SQL_FREERESULT($result);
+ } // END - if
+
+ // Return data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $content;
+}
+
// [EOF]
?>
'MEMBER_CHANGE_USER_SUBID' => "Geben Sie eine neue ein:",
'MEMBER_INVALID_DO_USER_SUBID' => "Ungültiges Sub-Modul aufgerufen! Sollten Sie der Meinung sein, dies ist ein Fehler, so teilen Sie bitte dem Support mit, wie es zu dieser Meldung gekommen ist.",
'MEMBER_BACK_SUBIDS_OVERVIEW_LINK' => "Zurück zur Sub-Id-Übersicht ...",
+ 'MEMBER_REFLINK_USER_SUBIDS_HEADER' => "Hier sehen Sie alle Ihre Sub-Ids, die Sie <a href=\"{%url=modules.php?module=login&what=subids\">eingegeben</a> haben. Sie können anstelle der User-Id auch Ihren Nicknamen verwenden.",
+ 'MEMBER_REFLINK_USER_SUBIDS_NOTICE' => "<strong>Hinweis:</strong> Tipp! Legen Sie sich z.B. pro Besuchertausch und Mailtausch je eine Sub-Ids zum genaueren Tracking an. Somit können Sie genauer feststellen, worüber das geworbene Mitglied sich angemeldet hat.",
// Member - sub ids - submit buttons
'MEMBER_USER_SUBIDS_ADD_SUBMIT' => "Sub-Id hinzufügen",
'MEMBER_EDIT_USER_SUBIDS_TITLE' => "Ausgewählte Sub-Ids editieren",
'MEMBER_DELETE_USER_SUBIDS_TITLE' => "Ausgewählte Sub-Ids löschen",
'MEMBER_SUBID_STATS_TITLE' => "Aufrufstatistik für Ihre Sub-Ids",
+ 'MEMBER_REFLINK_USER_SUBIDS_TITLE' => "Ihr Referral-Link mit Sub-Ids zusammen benutzen",
// Admin - sub ids - titles
'ADMIN_EDIT_USER_SUBID_TITLE' => "Ausgewählte Sub-Ids ändern",
// Checks whether the given sub id is fused by current member
function isMemberSubIdFree ($subId) {
+ // Only do this for logged-in members
+ assert(isMember());
+
// Check it
$isFree = (countSumTotalData(getMemberId(), 'user_subids', 'id', 'userid', true, sprintf(" AND `subid`='%s'", $subId)) == 0);
return $GLOBALS[__FUNCTION__][$id];
}
+// "Getter for total count of current user's sub ids
+function getTotalMemberSubIds () {
+ // Only do this for logged-in members
+ assert(isMember());
+
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = countSumTotalData(getMemberId(), 'user_subids', 'id', 'userid', true);
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
//-----------------------------------------------------------------------------
// EL code functions
//-----------------------------------------------------------------------------
// Free result
SQL_FREERESULT($result);
+// Add extra content through filter
+$content['extra_content'] = runFilterChain('member_reflink_extra_content');
+
// Load main template
loadTemplate('member_reflink', false, $content);
$refs = array();
// Get refs from database
- $result = SQL_QUERY_ESC("SELECT
- ur.`id`, ur.`refid`, ud.`status`, ud.`last_online`, ud.`mails_confirmed`, ud.`emails_received`
+ $result = SQL_QUERY_ESC('SELECT
+ ur.`id`,
+ ur.`refid`,
+ ud.`status`,
+ ud.`last_online`,
+ ud.`mails_confirmed`,
+ ud.`emails_received`,
+ ud.`subid`
FROM
`{?_MYSQL_PREFIX?}_user_refs` AS `ur`
LEFT JOIN
ur.`userid`=%s AND
ur.`level`=%s
ORDER BY
- ur.`refid` ASC",
+ ur.`refid` ASC',
array(
bigintval($userid),
bigintval($level)
<td align="center" style="padding:0px;margin:0px">
<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
<tr>
- <td align="center" class="header_column" colspan="6">
+ <td align="center" class="header_column" colspan="7">
<strong>{--MEMBER_REFLIST_LIST_TITLE_1--}$content[level]{--MEMBER_REFLIST_LIST_TITLE_2--}$content[percents]{--MEMBER_REFLIST_LIST_TITLE_3--}</strong>
</td>
</tr>
<td align="center" class="header_column bottom right">
<strong>{--MEMBER_CLICK_RATE--}</strong>
</td>
- <td align="center" class="header_column bottom">
+ <td align="center" class="header_column bottom right">
<strong>{--MEMBER_REFLIST_ACTIVITY--}</strong>
</td>
+ <td align="center" class="header_column bottom">
+ <strong>{--SUBID_VALUE--}</strong>
+ </td>
</tr>
$content[rows]
<tr>
- <td align="center" class="table_footer" colspan="6">
+ <td align="center" class="table_footer" colspan="7">
<span class="notice">{%message,MEMBER_REFLIST_COUNTER=$content[counter]%}</span>
</td>
</tr>
<td align="center" class="{%template,ColorSwitch%} bottom right">
$content[activity]
</td>
+ <td align="center" class="{%template,ColorSwitch%} bottom">
+ {%pipe,fixEmptyContentToDashes=$content[subid]%}
+ </td>
</tr>
--- /dev/null
+<div align="center">
+<div class="table dashed">
+<div class="table_header bottom">
+ <strong>{--MEMBER_REFLINK_USER_SUBIDS_TITLE--}</strong>
+</div>
+{--MEMBER_REFLINK_USER_SUBIDS_HEADER--}
+<ul class="listing">
+$content
+</ul>
+</div>
+
+<div class="notice">
+ {--MEMBER_REFLINK_USER_SUBIDS_NOTICE--}
+</div>
+</div>
--- /dev/null
+<li class="listing">
+ {?URL?}/ref.php?refid={%pipe,getMemberId%}&subid=$content[subid]<br />
+ <a href="{%url=modules.php?module=login&what=subids&do=stats&id=$content[id]%}">{--MEMBER_USER_SUBID_STATS_LINK--}</a>
+</li>
</div>
</div>
+<div class="para">
+ $content[extra_content]
+</div>
+
<div class="para">
$content[refbanner_content]
</div>