Info
- 14 posts
- 5 voices
- Started 2 years ago by chandersbs
- Latest reply from zaerl
Direct code to post url
-
- Posted 2 years ago #
Can any one here tell me the code? I know for topic url it is: <?php topic_posts_link(); ?>
what is it for the posts? its usually linked to every post with a #
thanks in advance.
-
- Posted 2 years ago #
What are you trying to get a link to? There are topics, then there are posts (replies actually) which are just anchor links in a topic. There's no such concept as a single post in bbPress that I know of (unlike WordPress where you can display a single post with single.php)
What are you trying to do? Maybe post an example of something here that you're trying to link to.
-
- Posted 2 years ago #
post.php line 11
<a href="<?php post_anchor_link(); ?>">#</a> -
- Posted 2 years ago #
I'm trying to insert the Like button from Facebook into my bbpress-based forum. Therefor i need the exact url of each reply.
is there a code for that? at the moment im using
<?php topic_posts_link(); ?>but thats not the best one, cos it generates a link to the topic url, instead to the reply url. -
- Posted 2 years ago #
@chanderbs
a post don't have its own page like in other forum scripts, if that's what you looking for -
- Posted 2 years ago #
Yes. The post URL is just an anchor URL appended to the topic URL like in many BBS engine out there. As ashfame said you can't have a page that display only a single post. But what you want can be easily achieved with a plugin.
-
- Posted 2 years ago #
To give an example. A piece of code generates the post url of each reply in this topic, see below:
http://bbpress.org/forums/topic/direct-code-to-post-url#post-67639
http://bbpress.org/forums/topic/direct-code-to-post-url#post-67659
http://bbpress.org/forums/topic/direct-code-to-post-url#post-67660i want the code that generates that unique url for each reply.
Is there a way?
-
- Posted 2 years ago #
You want to look here to find such a function: http://trac.bbpress.org/ticket/1207
-
- Posted 2 years ago #
hey foof, i checked the page, and the source code of post.php don't actually now what u wanted to show me (or where my answer is... )
-
- Posted 2 years ago #
@zaerl weird enough, just today im seeing your replies, was it caught by akismet??
-
- Posted 2 years ago #
Maybe. It seems that Akismet has done a mess here.
-
- Posted 2 years ago #
@chandersbs
did you check out the patch submitted by foof? Its what you need ;)
I wonder why kevin changed the milestone to 1.5? -
- Posted 2 years ago #
okay ashfame, will check again, thanx.
-
- Posted 1 year ago #
I have created a plugin that expose permalinks to posts. But I'm not very sure that it's what you want. I have uploaded it five minutes ago. Grab it (if it's what you need) when the SVN refresh:
http://bbpress.org/plugins/topic/zaerl-post-permalink/
It exports a function:
za_post_permalink($id = 0)which returns a link in the form:
http://domain.com/post/number if mod_rewrite is used
http://domain.com/?post=number otherwiseif you pass
0or nothing to the function it takes the current post ID (if any).Have a nice day.
-
You must log in to post.