Skip to:
Content
Pages
Categories
Search
Top
Bottom

Numbered Posts


  • citizenkeith
    Participant

    @citizenkeith

    I’d like to have the post number shown for each post. I’m hoping that bbPress already has this functionality, and I would need to do is insert some code into my template. Or do I need a plugin?

Viewing 8 replies - 1 through 8 (of 8 total)

  • Null
    Member

    @null

    It has post numbers, but they aren’t like 1, 2 ,3 etc. Every post (doesn’t matter in what part of the forum) get’s a number when it is created, so if you want to show these form 1 post you will get someting like: 10, 15, 28 etc (do I make any sence?)

    Perhaps a plugin can add a counter starting at the top post with 1, but you wouldn’t be able to link to this post with that nr if you want to do that…


    fel64
    Member

    @fel64

    Actually I think it does work. There was something I saw here about the OLs in threads having startnumbers (which didn’t validate was the point, I think), implying that you could change the OL styling and possibly display the (in the context of the thread) proper post numbers. I’ll look into it, if someone else doesn’t already know?


    mshutch
    Member

    @mshutch

    The post_position in the bb_post table has the correct number for each post. I don’t know much about php, but I made a little plugin for my forum, which seems to work.

    function get_post_num() {
    global $bb_post;
    return$bb_post->post_position;

    function post_num() {
    global $bb_post;
    echo $bb_post->post_position;
    }?>

    I just place post_num() where I wanted it to show. Hope this helps?


    fel64
    Member

    @fel64

    I believe that if you attach this to your CSS file:

    ol#thread li {
    list-style-type: decimal;
    }

    you would see the post numbers without any extra code, certainly the most elegant method. There is likely already a definition for ol#thread, so you could simply add this property to that one. Bear in mind that this is entirely untested (will try it when I get home).


    citizenkeith
    Participant

    @citizenkeith

    I used fel64’s CSS solution. Makes perfect sense (smacks his forehead… “Doh!”). Thank you!


    fel64
    Member

    @fel64

    You can in fact replace decimal with many funky things.

    From w3 schools:

    • none
    • disc
    • circle
    • square
    • decimal
    • decimal-leading-zero
    • lower-roman
    • upper-roman
    • lower-alpha
    • upper-alpha
    • lower-greek
    • lower-latin
    • upper-latin
    • hebrew
    • armenian
    • georgian
    • cjk-ideographic
    • hiragana
    • katakana
    • hiragana-iroha
    • katakana-iroha

    Still haven’t tried it myself, just about to :P


    fel64
    Member

    @fel64

    Better yet, find the entry #thread in your style.css file and change the list-style entry there. It makes for nicer code. :)


    citizenkeith
    Participant

    @citizenkeith

    Thanks… that is indeed where I made the change. :)

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