Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 25,051 through 25,075 (of 32,481 total)
  • Author
    Search Results
  • #73930

    In reply to: Beginner

    lisanewton
    Member

    Thank you, Gentlemen. I was able to get the site up, but I’m not happy with the url. I still have lots of work to do…………………..:)

    jpmendoza
    Member

    I’ve tried this as well: if( !wp_validate_auth_cookie() )

    but haven’t had any luck.

    jpmendoza
    Member

    Hi guys,

    This is my first post here, but I’ve been building an wp/bb integrated site for a few weeks now, and I’ve come to the point where I think it’s time to write my first plugin. I want this plugin to redirect users to my WordPress login page if they are not logged in. It is important that the forums remain private and also that there is only one point of entry to the site for users, so as to avoid any confusion.

    I have _ck_’s Hidden Forums plugin set up to control access to forums, and that’s working fine, but I need some advice on how to handle an issue or two in the code I’ve written so far. Now, I don’t do a ton of programming, and this is my first attempt at anything like this, so bear with me if I’ve committed any cardinal sins.

    <?
    add_action('bb_init','login_redirect_init',300);
    function login_redirect_init()
    {
    global $bb_current_user;
    $id = (!empty($bb_current_user)) ? intval($bb_current_user->ID) : 0;
    if( $id < 1 )
    {
    $redirection = 'http://'.$_SERVER['SERVER_NAME'].'/caa/wp-login.php?redirect_to='.$_SERVER['REQUEST_URI'];
    if (function_exists('status_header'))
    status_header( 302 );
    header("HTTP/1.1 302 Temporary Redirect");
    header("Location:".$redirection);
    exit();
    }
    }
    ?>

    As it is now, accessing bbPress redirects to wp-login with the proper redirection URL (I’m using the WP Members Only plugin), but then logging in from there kicks me back to the wp-login page again. I’m thinking that perhaps bb_init is not the hook for me, as it appears that the login process is not getting a chance to do its thing, and thus I’m getting booted out. As a test, I tried bb_head, but of course the headers have been sent by then, and the redirect does not work.

    So, if this is in fact the issue, what hook should be using? Or am I going about this all wrong? I’d really appreciate any and all input into this. Thanks, guys.

    #73788

    @grmedsite

    Happy to help. Also change the topic status to “resolved” once the problem is solved. Thanks :)

    #73887
    timskii
    Member

    The most basic solution looks something like this:

    function wow_item( $text ) {
    $text = preg_replace('|(<item>)(.*?)(</item>)|', '<a href="http://www.wowhead.com/?search=s2">s2</a>', $text);
    return $text;
    }
    function wow_item_allowed_tags( $tags ) {
    $tags['item'] = array();
    return $tags;
    }
    add_filter( 'bb_allowed_tags', 'wow_item_allowed_tags' );
    add_filter( 'pre_post', 'wow_item' );

    (replace the s2 with $2)

    That would create <item> sudo-tags that link the name of the item to a Wowhead search. But that isn’t what you want: It just send a search query to Wowhead, without creating a tooltip.

    Instead, such a plugin needs to go and ask Wowhead’s OpenSearch/RSS for a result, then come back and write out a complete item URL. Fortunately that query only needs to be done once, when the topic is first posted, not every time the post is displayed. Posting would get delayed, put probably only by a second, and only where the item tag was used. So there’s no need to cache the result. And 90% of the same code would work for anything with a OpenSearch output (most major sites).

    This is something I’d like to have, and it’s been on my “to do” list for about a year… So, erm, soon! Maybe.

    #73818

    I use Bad-Behavior and I feel it’s worthwhile. Mind, I routed all registration through my WP side, where I have BB and hooked up StopForumSpam.com.

    Check https://bbpress.org/forums/topic/using-badbehavior-and-bbpress for info on BB and bb ;)

    #73895

    You mean to pull from you bbPress database to populate the members of your mailman list?

    In theory, anything that worked for WordPress to do that could be tweaked for bbPress. Just be careful that the default is to leave people NOT getting emails, so they can opt-in if they want. Otherwise you’re practically spamming :)

    #14846
    sumatra
    Member

    Hi,

    Does anyone know a good tutorial / documentation on how to use user’s meta data in bbpress? I assume, they are meant for storing user custom data.

    If there are no good tutorials on subject, can somebody point me to a good and simple plugin, which uses meta data for storing custom data? I could read the code and learn it by myself.

    Thanks!

    #73812

    I fixed it with the popular WP DB-Manager plugin. I just used the options “Repair DB” and then “Optimize DB”.

    Here are the plugins I use which IMO might have smth to do with posting:

    Post Edit Look Behind

    Live Comment Preview

    bbPress signatures

    Ajaxed Quote

    HTML Tag Attributes Validator

    Related Topics

    BBcode Buttons Toolbar

    Post Count Plus

    bbpress SEO tools

    bbPress Polls

    Post Notification

    bb Topic Views

    BBcode Lite

    BBVideo

    Forum Last Poster

    bbPress Smilies

    Things have been going fine for the last day so I hope it does not happen again :) And I’ve increased the backup frequency in case of an emergency.

    #73863
    thekmen
    Member

    Thanks for the help, hardcoding will work on the forum front page but when on a tag page or a forum page we would loose the redirection to the correct forum or tag after logging in.

    The problem seems to be with the :// part of the url, removing this, the page is found. Replacing it with %3A%2F%2F d does not work either.

    Any other ideas?

    #73886
    dawormie
    Member

    I have got it working by editing the header file, but would like a plugin version that also has an added bbcode for the item bbtag.

    #14844
    dawormie
    Member

    Just wondering if someone can build a plugin to support wow itemlinks on bbPress.

    See wowhead for what’s needed.

    http://www.wowhead.com/?powered

    Part of it would require the addition of a bbCode [item] [/item] for this purpose as well.

    #73881

    In reply to: bbPress Polls

    kingscast
    Member

    I suppose a link might have helped :-)

    The top post shows the box http://kingscast.net/forums/

    #73862
    dawormie
    Member

    Wonder if it’s a server option then. Something do with character encoding?

    I’ve found though that in these issues you can’t manual change the characters as it just reverts when you submit.

    as per johnhiler’s advice; in those unique situations the solution was just to hard-code the end result.

    #73861
    johnhiler
    Member

    There was a similar report here and we weren’t able to figure it out:

    https://bbpress.org/forums/topic/add-new-goes-to-404-for-logged-out-users

    We did narrow it down to most probably an htaccess issue. In the end, the user just hardcoded the Add New link… which actually worked pretty well.

    #73860
    thekmen
    Member

    I just tried in IE and have the same issue. Using IE8 but the characters after the .php? are not encoded, tried encoding them in the URL but no luck…

    #73859
    dawormie
    Member

    So when you click “Add New” and your not logged in your link generated appears as

    http://domain.com/forum/bb-login.php?re=http://domain.com/forum/?new=1

    ?

    Mine is similar however the characters after the .php? are encoded IE:

    http://domain.com/forum/bb-login.php?re=http%3A%2F%2Fdomain.com%2Fforum%2F%3Fnew%3D1

    Perhaps the fault is your site is generating the link correctly?

    #73746
    chrishajer
    Participant

    1. Create a directory on your server called my-plugins – create it on the same level as bb-plugins and bb-templates.

    2. Put the unzipped plugin files into that directory.

    3. Access the bbPress admin and activate the plugin.

    #73673
    AndrewRH
    Member

    Sadly, I think I was ignored over on WP forum site (perhaps I’m marked as a spammer there too?) :-(

    I ended up using the “Page Links To” plug-in within wordpress to make the forum ‘page’ actually take people to the bbpress installation.

    It looks naff right now since bbpress theme doesn’t match up with WP theme. I have yet to figure out how you get bbpress to appear in a frame below your site’s menu bar. I guess both themes need to match up?

    Thanks again for your help.

    ~Andrew~

    #73500
    mortiferus
    Member

    General Settings >Pretty permalink type>

    Look at “If you activate “Numeric” or “Name based” permalinks, you will need to create a file at /PATH/TO/BBPRESS/.htaccess containing the url rewriting rules provided here”. The provided here is a clickable link that will get you the needed code that you will then paste into a .htaccess file that you create at the root of your bbpress directory.

    Edit: Noticed that you got it. :)

    #72512
    mortiferus
    Member

    Thanks, Nightgunner5. I actually got the root password for the box and turned it off at the php.ini level. However it’s still not working. sambauers is there any info/log that will help me troubleshoot this? Thank You for your help.

    Here is the info as listed by my info.php:

    magic_quotes_gpc	Off	Off
    magic_quotes_runtime Off Off
    magic_quotes_sybase Off Off

    #72511
    Ben L.
    Member

    With .htaccess, you’d need to use one of the two following commands:

    #PHP4
    php_value magic_quotes_gpc off
    #PHP5
    php_admin_flag magic_quotes_gpc off

    #73710
    johnhiler
    Member

    Sure, I’d be glad to help rewrite and edit info on bbPress.org on a separate site – as well as contribute to a codex wiki.

    But just to be clear: I’m not attempting to evangelize bbPress on Wikipedia. I think of Wikipedia as an fairly comprehensive encyclopedia, and as such it should have an article on software like bbPress. Some outside references would help on that front, which is where the impetus for this post came from.

    Just let us know how we can help with the copy editing and codex writing, and I’d be glad to pitch in!

    #73709
    Sam Bauers
    Participant

    The deletion from Wikipedia was pretty random and I think a better structured and written page would probably survive. Interestingly the BuddyPress page has only one self-published reference.

    I appreciate people’s desire to evangelize bbPress (thanks johnhiler) but I at least agree with kevinjohngallagher’s sentiments about putting the cart before the horse. If there is willingness to write something to promote bbPress, then how about we put some effort into our own site?

    If anyone wants to have a go at comprehensive editing and/or rewriting any of the information on bbPress.org I’m happy to help with that process. I think this would be far more valuable to us.

    So I guess I’d like to hijack the enthusiasm that some people are showing and direct it closer to home. I can easily create a sandboxed WordPress install that volunteer editors can use to re-work the existing content. Then once we are happy with it, we can migrate it over to the main site.

    I also think that a “codex” wiki site for bbPress would be beneficial at this stage but I need some reassurance that it won’t just sit there empty either. So take this poll and we can see if there is traction for that to be created…

    http://www.polldaddy.com/p/1650020/

    #14833

    Hello,

    I’ve been running 0.9.4 for about six months now without major problems but today something happened. No new posts can be made and the following error displays:

    bbPress database error: [Duplicate entry '7582' for key 1]
    INSERT INTO bb_posts (<code>topic_id</code>,<code>post_text</code>,<code>post_time</code>,<code>poster_id</code>,<code>poster_ip</code>,<code>post_status</code>,<code>post_position</code>,<code>forum_id</code>) VALUES ('6','

    test post text text text text
    ','2009-05-25 11:56:28','3','88.222.104.78','0','121','8')

    Warning: Cannot modify header information - headers already sent by (output started at /path-to-bbpress/bb-includes/db-mysql.php:130) in /path-to-bbpress/bb-includes/pluggable.php on line 232

    New posts get registered in the latest-discussions list but the link to them is “#post-0” and they don’t display in the actual topic, nor in the admin panels. They actually don’t exist in the DB.

    The last existing post in bb_posts is with post_id of 7581

    Luckily I have a working backup before the error occurred but I want to know what might have caused it.

Viewing 25 results - 25,051 through 25,075 (of 32,481 total)
Skip to toolbar