From 39028d618403e40741009b070e4c969d499cf021 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Wed, 20 Mar 2013 20:46:43 +0000 Subject: Make the channels profile tab actually do something. --- mod/profiles.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/profiles.php b/mod/profiles.php index e857c4216..0a8b2b9dc 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -232,6 +232,7 @@ function profiles_post(&$a) { $about = fix_mce_lf(escape_tags(trim($_POST['about']))); $interest = fix_mce_lf(escape_tags(trim($_POST['interest']))); $contact = fix_mce_lf(escape_tags(trim($_POST['contact']))); + $channels = fix_mce_lf(escape_tags(trim($_POST['channels']))); $music = fix_mce_lf(escape_tags(trim($_POST['music']))); $book = fix_mce_lf(escape_tags(trim($_POST['book']))); $tv = fix_mce_lf(escape_tags(trim($_POST['tv']))); @@ -393,6 +394,7 @@ function profiles_post(&$a) { `about` = '%s', `interest` = '%s', `contact` = '%s', + `channels` = '%s', `music` = '%s', `book` = '%s', `tv` = '%s', @@ -426,6 +428,7 @@ function profiles_post(&$a) { dbesc($about), dbesc($interest), dbesc($contact), + dbesc($channels), dbesc($music), dbesc($book), dbesc($tv), @@ -550,6 +553,7 @@ function profiles_content(&$a) { '$lbl_about' => t('Tell us about yourself...'), '$lbl_hobbies' => t('Hobbies/Interests'), '$lbl_social' => t('Contact information and Social Networks'), + '$lbl_channels' => t('My other channels'), '$lbl_music' => t('Musical interests'), '$lbl_book' => t('Books, literature'), '$lbl_tv' => t('Television'), @@ -593,7 +597,8 @@ function profiles_content(&$a) { '$romance' => $r[0]['romance'], '$work' => $r[0]['work'], '$education' => $r[0]['education'], - '$contact' => $r[0]['contact'] + '$contact' => $r[0]['contact'], + '$channels' => $r[0]['channels'], )); $arr = array('profile' => $r[0], 'entry' => $o); -- cgit v1.2.3 From 28975931b5a3a16554b391e3b08885ba118b3748 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Wed, 20 Mar 2013 23:35:21 +0000 Subject: Add a fallback or two to randprof. --- mod/randprof.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/randprof.php b/mod/randprof.php index bddb3251a..7678c15b9 100644 --- a/mod/randprof.php +++ b/mod/randprof.php @@ -1,11 +1,24 @@ get_baseurl() . '/profile'); + // Nothing there, so try a local, public channel instead + else $x = randprof_fallback(); + if($x) { + $goaway = (z_root() . '/channel/' . $x); + goaway(chanlink_url($goaway));} + + // If we STILL haven't got anything, send them to their own profile, or the front page + + goaway($a->get_baseurl()); } -- cgit v1.2.3 From 499083d5d4b2e2a09003148e3da787c632871934 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Wed, 20 Mar 2013 23:43:02 +0000 Subject: Revert randprof - that was stupid. If you have a local channel, you also have it's xchan. --- mod/randprof.php | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'mod') diff --git a/mod/randprof.php b/mod/randprof.php index 7678c15b9..bddb3251a 100644 --- a/mod/randprof.php +++ b/mod/randprof.php @@ -1,24 +1,11 @@ get_baseurl()); + // FIXME this doesn't work at the moment as a fallback + goaway($a->get_baseurl() . '/profile'); } -- cgit v1.2.3