<?xml version="1.0" encoding="UTF-8"?><!-- 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 support forums Topic: 1st line of the first post in a topic?</title>
<link>http://bbpress.org/forums/</link>
<description>bbPress support forums Topic: 1st line of the first post in a topic?</description>
<language>en</language>
<pubDate>Tue, 02 Dec 2008 06:05:41 +0000</pubDate>

<item>
<title>ardentfrost on "1st line of the first post in a topic?"</title>
<link>http://bbpress.org/forums/topic/1st-line-of-the-first-post-in-a-topic#post-3097</link>
<pubDate>Thu, 11 Jan 2007 15:38:20 +0000</pubDate>
<dc:creator>ardentfrost</dc:creator>
<guid isPermaLink="false">3097@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;&#60;code&#62;$first_post = $bbdb-&#38;gt;get_results(&#38;quot;SELECT * FROM $bbdb-&#38;gt;posts WHERE topic_id = $topic-&#38;gt;topic_id AND post_position = 1&#38;quot;);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;That will give you the post OBJECT... from there you can pull out the text like this:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;echo $first_post-&#38;gt;post_text;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Or since it seems you want to pull out just the first little bit, just use a php string function to make it look and act like you want it to.&#60;/p&#62;
&#60;p&#62;It's not the most eloquent method, but it's certainly simple.
&#60;/p&#62;</description>
</item>
<item>
<title>nateolson on "1st line of the first post in a topic?"</title>
<link>http://bbpress.org/forums/topic/1st-line-of-the-first-post-in-a-topic#post-3090</link>
<pubDate>Thu, 11 Jan 2007 01:01:40 +0000</pubDate>
<dc:creator>nateolson</dc:creator>
<guid isPermaLink="false">3090@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Sorry, phollo, can't offer any meaningful help here, but I did just want to say that I'm interested in seeing your results.
&#60;/p&#62;</description>
</item>
<item>
<title>phollo on "1st line of the first post in a topic?"</title>
<link>http://bbpress.org/forums/topic/1st-line-of-the-first-post-in-a-topic#post-3062</link>
<pubDate>Tue, 09 Jan 2007 12:45:29 +0000</pubDate>
<dc:creator>phollo</dc:creator>
<guid isPermaLink="false">3062@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;guys, any other suggestion? :s
&#60;/p&#62;</description>
</item>
<item>
<title>phollo on "1st line of the first post in a topic?"</title>
<link>http://bbpress.org/forums/topic/1st-line-of-the-first-post-in-a-topic#post-3010</link>
<pubDate>Sun, 07 Jan 2007 19:20:45 +0000</pubDate>
<dc:creator>phollo</dc:creator>
<guid isPermaLink="false">3010@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;..&#60;br /&#62;
by declaring &#60;em&#62;$bb_post = $bb_post[0];&#60;/em&#62; i assume &#60;em&#62;$bb_post&#60;/em&#62; is an array. now, since i see appearing the last post of a topic i tried to substitute that line with &#60;em&#62;$bb_post = end($bb_post)&#60;/em&#62;, thinking that maybe the actual first post stayed at the end of the array; i still get the last post though.. any other suggestion?
&#60;/p&#62;</description>
</item>
<item>
<title>phollo on "1st line of the first post in a topic?"</title>
<link>http://bbpress.org/forums/topic/1st-line-of-the-first-post-in-a-topic#post-2998</link>
<pubDate>Sun, 07 Jan 2007 17:32:03 +0000</pubDate>
<dc:creator>phollo</dc:creator>
<guid isPermaLink="false">2998@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;so1o, thanks, that looks better, but it grabs the last post of the topic, not the first one..
&#60;/p&#62;</description>
</item>
<item>
<title>Null on "1st line of the first post in a topic?"</title>
<link>http://bbpress.org/forums/topic/1st-line-of-the-first-post-in-a-topic#post-2996</link>
<pubDate>Sun, 07 Jan 2007 16:55:38 +0000</pubDate>
<dc:creator>Null</dc:creator>
<guid isPermaLink="false">2996@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Is there also a way to get a link to the first REPLY in a post? There is a link option to go to the last reply, but i wanta link ti the first reply. So the sec post (if you see them all as posts)
&#60;/p&#62;</description>
</item>
<item>
<title>so1o on "1st line of the first post in a topic?"</title>
<link>http://bbpress.org/forums/topic/1st-line-of-the-first-post-in-a-topic#post-2994</link>
<pubDate>Sun, 07 Jan 2007 16:30:23 +0000</pubDate>
<dc:creator>so1o</dc:creator>
<guid isPermaLink="false">2994@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;ok..&#60;br /&#62;
try this plugin&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;?php&#60;br /&#62;
function your_function_name($where) {&#60;br /&#62;
	global $topic;&#60;br /&#62;
	if ($topic) &#60;br /&#62;
		return $where . &#38;#39; AND topic_id = &#38;#39; . $topic-&#38;gt;topic_id;&#60;br /&#62;
	else&#60;br /&#62;
		return $where;&#60;br /&#62;
}&#60;br /&#62;
function get_first_post_of_current_topic() {&#60;br /&#62;
	global $bb_post;&#60;br /&#62;
	add_filter(&#38;#39;get_latest_posts_where&#38;#39;,&#38;#39;your_function_name&#38;#39;);&#60;br /&#62;
	$bb_post = get_latest_posts(1);&#60;br /&#62;
	if(count($bb_post) == 1 ) {&#60;br /&#62;
		$bb_post = $bb_post[0];&#60;br /&#62;
		post_text();&#60;br /&#62;
	}&#60;br /&#62;
}&#60;br /&#62;
?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;where you want call get_first_post_of_current_topic();
&#60;/p&#62;</description>
</item>
<item>
<title>phollo on "1st line of the first post in a topic?"</title>
<link>http://bbpress.org/forums/topic/1st-line-of-the-first-post-in-a-topic#post-2990</link>
<pubDate>Sun, 07 Jan 2007 13:36:35 +0000</pubDate>
<dc:creator>phollo</dc:creator>
<guid isPermaLink="false">2990@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;so1o thanks for the hint, but unfortunately i don't get any result..
&#60;/p&#62;</description>
</item>
<item>
<title>so1o on "1st line of the first post in a topic?"</title>
<link>http://bbpress.org/forums/topic/1st-line-of-the-first-post-in-a-topic#post-2966</link>
<pubDate>Sun, 07 Jan 2007 00:33:55 +0000</pubDate>
<dc:creator>so1o</dc:creator>
<guid isPermaLink="false">2966@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;try this..&#60;br /&#62;
create a plugin with this code.. &#60;/p&#62;
&#60;p&#62;&#60;code&#62;function your_function_name($where) {&#60;br /&#62;
	global $topic;&#60;br /&#62;
	return $where . &#38;#39; AND topic_id = &#38;#39; . $topic-&#38;gt;topic_id;&#60;br /&#62;
}&#60;br /&#62;
function get_first_post_of_current_topic() {&#60;br /&#62;
	add_filter(&#38;#39;get_latest_posts_where&#38;#39;,&#38;#39;your_function_name&#38;#39;);&#60;br /&#62;
	get_latest_posts(1);&#60;br /&#62;
}&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;call get_first_post_of_current_topic in the loop where you show tipc name.&#60;br /&#62;
 let me know if works.. this is just a hunch&#60;/p&#62;
&#60;p&#62;cheers
&#60;/p&#62;</description>
</item>
<item>
<title>Null on "1st line of the first post in a topic?"</title>
<link>http://bbpress.org/forums/topic/1st-line-of-the-first-post-in-a-topic#post-2962</link>
<pubDate>Sat, 06 Jan 2007 22:35:17 +0000</pubDate>
<dc:creator>Null</dc:creator>
<guid isPermaLink="false">2962@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;You mean you want the first X characters or words from a first post?&#60;/p&#62;
&#60;p&#62;This is possible. I am playing with this myself so users of my bbPortal plugin can use a read more button on the portal if they want to. It wil count the first 100 words and then ad a read more link.&#60;/p&#62;
&#60;p&#62;Think this is something you want (without the read more link). This can be done with a plugin and a new function. I haven't got something working yet else I would post it here...
&#60;/p&#62;</description>
</item>
<item>
<title>phollo on "1st line of the first post in a topic?"</title>
<link>http://bbpress.org/forums/topic/1st-line-of-the-first-post-in-a-topic#post-2960</link>
<pubDate>Sat, 06 Jan 2007 22:19:22 +0000</pubDate>
<dc:creator>phollo</dc:creator>
<guid isPermaLink="false">2960@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Hi guys,&#60;/p&#62;
&#60;p&#62;Is there a way i can get the first &#34;n&#34; characters of the first post in a topic so i can make them appear in the forum main page, under each topic's title?&#60;/p&#62;
&#60;p&#62;Thanks!&#60;br /&#62;
:)phollo
&#60;/p&#62;</description>
</item>

</channel>
</rss>
