Skip to:
Content
Pages
Categories
Search
Top
Bottom

how do i utilise the bbpress cookie for something else also…


  • master5o1
    Participant

    @master5o1

    Ok, what I want to do with the cookie is make it so that a someone logged into the forum gets special attention on my site…

    So, I need to get this sorted: is the random alphanumeric code at the end of the cookie name (bb_pass_alphanumeric code or bb_user_alphanumeric code) just a per user specific or can I just copy and paste MY cookie’s name as the cookie name?

    … I have looked in what I would say is the logical place to put the set cookie bit but then again, i don’t know much about bbpress… :P

    So can someone help me either find how to read the cookie per user or whether it is possible to just use the cookie name that is set for me…

Viewing 6 replies - 1 through 6 (of 6 total)
  • You can define the parameters like the cookie name and domain, so you should be able to do what you want here. There is already functions though that can do things if a user is logged in. For example:

    <?php if (bb_current_user_can('write_posts')) : ?>
    DO SOMETHING
    <?php endif; ?>

    This has it so if the user is logged in and can write posts (default member) then do something or put in a piece of code.

    Hope that helps.

    Trent

    I may be reading into his post, but it sounds like he wants a list of people that are currently online (?).

    If so, Thomas Klaiber’s Simple Onlinelist plugin gives you a template tag (<?php show_online_users(); ?>) that you can drop in anywhere to generate a simple list showing users currently online.

    You could modify the plugin to display some kind of message, an image, part of their profile. Anything you want to keep cold, Tommy Boy.


    Sam Bauers
    Participant

    @sambauers

    By default, the alphanumeric code is an md5 hash of the bb_table_prefix that is set in config.php

    For default installs this effectively makes the cookie names:

    'bb_user_' . md5('bb_')

    'bb_pass_' . md5('bb_')

    You can override the name of the cookie by setting values for the following somewhere in config.php:

    $bb->usercookie = 'my_great_user_cookie_name'

    $bb->passcookie = 'my_great_pass_cookie_name'

    Then provided that your website is in the same domain as your forum, you should have no trouble reading these cookies using your own code.

    Could a private forum viewable only by specific forum members be created with this?


    Sam Bauers
    Participant

    @sambauers

    Doesn’t a plugin that does that exist?

    I think it only makes a private forum for all members, not specific members?

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