Updated
This commit is contained in:
@@ -12,12 +12,12 @@ function assoc_profile_module() {}
|
|||||||
|
|
||||||
function assoc_profile_load() {
|
function assoc_profile_load() {
|
||||||
register_hook('profile_edit', 'addon/assoc_profile/assoc_profile.php', 'assoc_profile_edit_hook');
|
register_hook('profile_edit', 'addon/assoc_profile/assoc_profile.php', 'assoc_profile_edit_hook');
|
||||||
register_hook('profile_view', 'addon/assoc_profile/assoc_profile.php', 'assoc_profile_view_hook');
|
register_hook('profile_advanced', 'addon/assoc_profile/assoc_profile.php', 'assoc_profile_view_hook');
|
||||||
}
|
}
|
||||||
|
|
||||||
function assoc_profile_unload() {
|
function assoc_profile_unload() {
|
||||||
unregister_hook('profile_edit', 'addon/assoc_profile/assoc_profile.php', 'assoc_profile_edit_hook');
|
unregister_hook('profile_edit', 'addon/assoc_profile/assoc_profile.php', 'assoc_profile_edit_hook');
|
||||||
unregister_hook('profile_view', 'addon/assoc_profile/assoc_profile.php', 'assoc_profile_view_hook');
|
unregister_hook('profile_advanced', 'addon/assoc_profile/assoc_profile.php', 'assoc_profile_view_hook');
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -149,9 +149,8 @@ function assoc_profile_edit_hook(&$b) {
|
|||||||
// PROFILE VIEW HOOK
|
// PROFILE VIEW HOOK
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
function assoc_profile_view_hook(&$b) {
|
function assoc_profile_view_hook(&$o) {
|
||||||
$profile = $b['profile'] ?? [];
|
$uid = intval(App::$profile['profile_uid'] ?? 0);
|
||||||
$uid = intval($profile['uid'] ?? 0);
|
|
||||||
if (!$uid) return;
|
if (!$uid) return;
|
||||||
|
|
||||||
$r = q("SELECT channel_address FROM channel WHERE channel_id = %d LIMIT 1",
|
$r = q("SELECT channel_address FROM channel WHERE channel_id = %d LIMIT 1",
|
||||||
@@ -166,7 +165,7 @@ function assoc_profile_view_hook(&$b) {
|
|||||||
head_add_css('/addon/assoc_profile/view/css/assoc_profile.css');
|
head_add_css('/addon/assoc_profile/view/css/assoc_profile.css');
|
||||||
}
|
}
|
||||||
|
|
||||||
$b['html'] .= assoc_render_view($entry);
|
$o .= assoc_render_view($entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user