<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>bbPress Showcase Tag: edit</title>
<link>http://bbshowcase.org/forums/</link>
<description>bbPress Showcase Tag: edit</description>
<language>en</language>
<pubDate>Sat, 11 Feb 2012 04:39:41 +0000</pubDate>

<item>
<title>light on "profile-edit.php and bb_profile_admin_form"</title>
<link>http://bbshowcase.org/forums/topic/profile-editphp-and-bb_profile_admin_form#post-2985</link>
<pubDate>Mon, 06 Feb 2012 15:55:25 +0000</pubDate>
<dc:creator>light</dc:creator>
<guid isPermaLink="false">2985@http://bbshowcase.org/forums/</guid>
<description>&#60;p&#62;Thank you so much _ck_, I'll test it then get back to you soon!
&#60;/p&#62;</description>
</item>
<item>
<title>_ck_ on "profile-edit.php and bb_profile_admin_form"</title>
<link>http://bbshowcase.org/forums/topic/profile-editphp-and-bb_profile_admin_form#post-2984</link>
<pubDate>Mon, 06 Feb 2012 14:37:14 +0000</pubDate>
<dc:creator>_ck_</dc:creator>
<guid isPermaLink="false">2984@http://bbshowcase.org/forums/</guid>
<description>&#60;p&#62;Of course, anything is possible but no, it's not easily possible.&#60;br /&#62;
You could try doing it this way.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function extra_profile_keys() {
$keys=array(
&#38;#39;user_email&#38;#39; =&#38;gt; array(1, __(&#38;#39;Email&#38;#39;), &#38;#39;email&#38;#39;),
&#38;#39;school&#38;#39; =&#38;gt; array(0, __(&#38;#39;School&#38;#39;)
);
if (is_bb_profile()) {
  $id = isset($_GET[&#38;#39;id&#38;#39;]) ? $_GET[&#38;#39;id&#38;#39;] : get_path(1);
  if ($id==&#38;#39;edit&#38;#39; &#38;amp;&#38;amp; !bb_current_user_can(&#38;#39;moderate&#38;#39;)) {
     unset($keys[&#38;#39;school&#38;#39;]);
  }
}
return apply_filters(&#38;#39;extra_profile_keys&#38;#39;,$keys);
}&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>light on "profile-edit.php and bb_profile_admin_form"</title>
<link>http://bbshowcase.org/forums/topic/profile-editphp-and-bb_profile_admin_form#post-2983</link>
<pubDate>Mon, 06 Feb 2012 13:43:45 +0000</pubDate>
<dc:creator>light</dc:creator>
<guid isPermaLink="false">2983@http://bbshowcase.org/forums/</guid>
<description>&#60;p&#62;Hi _ck_, hope you're fine!&#60;/p&#62;
&#60;p&#62;I found a plugin for register form fields and then I customize it something like &#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;?php&#60;br /&#62;
/*&#60;br /&#62;
Plugin Name: User Profile&#60;br /&#62;
*/&#60;/p&#62;
&#60;p&#62;function extra_profile_keys() {&#60;br /&#62;
	return apply_filters(&#60;br /&#62;
		'extra_profile_keys', array(&#60;br /&#62;
		'user_email' =&#38;gt; array(1, __('Email'), 'email'),&#60;br /&#62;
		'school' =&#38;gt; array(0, __('School')),&#60;/p&#62;
&#60;p&#62;	) );&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;function add_descriptions() {&#60;br /&#62;
	echo '&#38;lt;fieldset&#38;gt;&#38;lt;legend&#38;gt;'.__(&#34;Visible Email&#34;).'&#38;lt;/legend&#38;gt;';&#60;br /&#62;
	echo '&#38;lt;p&#38;gt;'.__(&#34;&#38;lt;span style=\&#34;font-size: 1.2em;\&#34;&#38;gt;Visible Email allows you to place an email address so others can &#60;/p&#62;
&#60;p&#62;contact you. This is visible to ALL!&#38;lt;/span&#38;gt;&#60;br /&#62;e.g. &#38;lt;span style=\&#34;font-weight: bold;\&#34;&#38;gt;meATexampleDOTcom&#38;lt;/span&#38;gt;&#34;).'&#38;lt;/p&#38;gt;';&#60;br /&#62;
	echo '&#38;lt;/fieldset&#38;gt;';&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// hooks&#60;br /&#62;
add_filter('get_profile_info_keys', 'extra_profile_keys');&#60;/p&#62;
&#60;p&#62;?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;But there is a problem about that I'm really confused! Can you please help me? &#60;/p&#62;
&#60;p&#62;In the profile edit file I just want to allow Admins to edit the school field. &#60;/p&#62;
&#60;p&#62;-- I mean users just can edit email field. but they cannot edit school field on profile edit page themselves. something like&#60;/p&#62;
&#60;p&#62;Edit your email: email field  - regular users&#60;br /&#62;
Change your school: school field - You're not allowed to edit it (admin only)&#60;/p&#62;
&#60;p&#62;Is it possible? &#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>massbase on "Members Online, - Editing the output"</title>
<link>http://bbshowcase.org/forums/topic/members-online-editing-the-output#post-1384</link>
<pubDate>Wed, 17 Jun 2009 12:31:46 +0000</pubDate>
<dc:creator>massbase</dc:creator>
<guid isPermaLink="false">1384@http://bbshowcase.org/forums/</guid>
<description>&#60;p&#62;I got the link working, correctly for the permalink.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function members_online_now($time=0) {
global $bbdb, $members_online;  $members_online[&#38;#39;footer&#38;#39;]=false;
if (empty($time)) {$time=time()-$members_online[&#38;#39;timeout&#38;#39;];}
	$members=$bbdb-&#38;gt;get_results(&#38;quot;SELECT ID,user_login FROM $bbdb-&#38;gt;users LEFT JOIN $bbdb-&#38;gt;usermeta ON ID=user_id WHERE meta_key=&#38;#39;last_online&#38;#39; AND cast(meta_value AS unsigned)&#38;gt;&#38;#39;$time&#38;#39; ORDER BY meta_value DESC&#38;quot;);
	if (!empty($members)) {
		$profile=bb_get_option(&#38;#39;uri&#38;#39;).&#38;quot;profile/&#38;quot;; $output=&#38;quot;&#38;quot;;
		foreach ($members as $member) {$output.=&#38;quot;&#38;lt;a rel=&#38;#39;nofollow&#38;#39; href=&#38;#39;$profile$member-&#38;gt;user_login&#38;#39;&#38;gt;$member-&#38;gt;user_login&#38;lt;/a&#38;gt;, &#38;quot;;}
		echo rtrim($output,&#38;quot;, &#38;quot;);
	}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;but i was wondering if you could do this but using the gravatar instead of text.
&#60;/p&#62;</description>
</item>
<item>
<title>massbase on "Members Online, - Editing the output"</title>
<link>http://bbshowcase.org/forums/topic/members-online-editing-the-output#post-1383</link>
<pubDate>Wed, 17 Jun 2009 11:59:57 +0000</pubDate>
<dc:creator>massbase</dc:creator>
<guid isPermaLink="false">1383@http://bbshowcase.org/forums/</guid>
<description>&#60;p&#62;hey ck,&#60;/p&#62;
&#60;p&#62;i need to edit the text that outputs the &#34;online users today&#34;... reason being is that i have permalinks on, so the links to the profile doesnt work, becuase it uses id, rather than name, i dont know what bit to edit from the code.&#60;/p&#62;
&#60;p&#62;my plan is too get the gravatar of the user show up instead of text, that links to &#60;a href=&#34;http://www.sitename.com/profile/username&#34; rel=&#34;nofollow&#34;&#62;http://www.sitename.com/profile/username&#60;/a&#62; (not id)&#60;/p&#62;
&#60;p&#62;thanks.
&#60;/p&#62;</description>
</item>

</channel>
</rss>

