Skip to:
Content
Pages
Categories
Search
Top
Bottom

Direct code to post url

  • @chandersbs

    Member

    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.

Viewing 13 replies - 1 through 13 (of 13 total)
  • @chrishajer

    Participant

    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.

    @zaerl

    Participant

    post.php line 11

    <a href="<?php post_anchor_link(); ?>">#</a>

    @chandersbs

    Member

    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.

    @ashfame

    Participant

    @chanderbs

    a post don’t have its own page like in other forum scripts, if that’s what you looking for

    @zaerl

    Participant

    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.

    @chandersbs

    Member

    To give an example. A piece of code generates the post url of each reply in this topic, see below:

    https://bbpress.org/forums/topic/direct-code-to-post-url#post-67639

    https://bbpress.org/forums/topic/direct-code-to-post-url#post-67659

    https://bbpress.org/forums/topic/direct-code-to-post-url#post-67660

    i want the code that generates that unique url for each reply.

    Is there a way?

    @f00f

    Member

    You want to look here to find such a function: https://trac.bbpress.org/ticket/1207

    @chandersbs

    Member

    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… )

    @chandersbs

    Member

    @zaerl weird enough, just today im seeing your replies, was it caught by akismet??

    @zaerl

    Participant

    Maybe. It seems that Akismet has done a mess here.

    @ashfame

    Participant

    @chandersbs

    did you check out the patch submitted by foof? Its what you need ;)

    I wonder why kevin changed the milestone to 1.5?

    @chandersbs

    Member

    okay ashfame, will check again, thanx.

    @zaerl

    Participant

    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:

    https://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 otherwise

    if you pass 0 or nothing to the function it takes the current post ID (if any).

    Have a nice day.

Viewing 13 replies - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.
Skip to toolbar