Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 23,801 through 23,825 (of 32,468 total)
  • Author
    Search Results
  • #63072
    tahoekid
    Member

    I can’t seem to get _ck_’s plugin to work, everytime I use it takes away the a href…

    <?php
    /*
    Plugin Name: Target Nofollow External Only
    Description: append target="_blank" and rel="nofollow" only on external links
    Plugin URI:
    Author: _ck_
    Version: 0.0.1
    */

    add_filter('post_text', 'target_nofollow_external_only',999); // unfortunately we have to do this on every page load and not in pre_post

    function target_nofollow_external_only( $text ) {
    $domain="easyloungin-forum.com"; // domain to exclude from target and nofollow
    $text = preg_replace('|<a (.*)rel=['"]nofollow['"](.+)?>|iU','<a >', $text); // strip ALL nofollow
    $text = preg_replace('|<a (?=([^>]+http://))(?!([^>]+'.$domain.'))(.+)>|iU', '<a rel="nofollow" target="_blank">', $text); // add back in when needed
    return $text;
    }
    ?>

    #78470

    In reply to: Hiding Sub-Forums

    EmileGoss
    Member

    I’d try cutting out this block of code in forum.php:

    <?php if ( bb_forums( $forum_id ) ) : ?>
    <h2><?php _e('Subforums'); ?></h2>
    <table id="forumlist">

    <tr>
    <th><?php _e('Main Theme'); ?></th>
    <th><?php _e('Topics'); ?></th>
    <th><?php _e('Posts'); ?></th>
    </tr>

    <?php while ( bb_forum() ) : ?>
    <tr<?php bb_forum_class(); ?>>
    <td><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><small><?php forum_description(); ?></small><?php bb_forum_pad( '</div>' ); ?></td>
    <td class="num"><?php forum_topics(); ?></td>
    <td class="num"><?php forum_posts(); ?></td>
    </tr>
    <?php endwhile; ?>
    </table>
    <?php endif; ?>

    #78469

    In reply to: Hiding Sub-Forums

    Jimmy B.
    Participant

    I already have, they’re very very old and so any links with code in them (via Postbin) is gone.

    #78467

    In reply to: Hiding Sub-Forums

    Jimmy B.
    Participant

    Hrmm, that didn’t seem to do the trick for me. That code appears to have some stray “> as well.

    #78466

    In reply to: Hiding Sub-Forums

    EmileGoss
    Member
    <?php if ( bb_forums() ) : ?>
    <h2><?php _e('Forums'); ?></h2>
    <table id="forumlist">

    <tr>
    <th><?php _e('Main Theme'); ?></th>
    <th><?php _e('Topics'); ?></th>
    <th><?php _e('Posts'); ?></th>
    </tr>
    <?php while ( bb_forum() ) : ?>
    <?php if (bb_get_forum_is_category()) : ?>
    <tr<?php bb_forum_class('bb-category'); ?>>
    <td colspan="3"><?php bb_forum_pad( '<div class="nest">' ); ?><a>"><?php forum_name(); ?></a><?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?></td>
    </tr>
    <?php continue; endif; ?>
    <tr<?php bb_forum_class(); ?>>
    <td><?php bb_forum_pad( '<div class="nest">' ); ?><a>"><?php forum_name(); ?></a><?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?></td>
    <td class="num"><?php forum_topics(); ?></td>
    <td class="num"><?php forum_posts(); ?></td>
    </tr>
    <?php endwhile; ?>
    </table>
    <?php endif; // bb_forums() ?>

    #31598
    Jimmy B.
    Participant

    Greetings,

    After searching and reading around a bit, I still cannot resolve this “issue”. Basically I’d like to hide the sub-forums from my homepage So that only the category or parent forum shows up.

    I came across this post:

    http://bbpress.org/forums/topic/hide-subforums-on-main-page

    which seemed to offer a quick fix of replacing one line of code:

    <?php if ( bb_forums() ) : ?>

    to

    <?php if ( bb_forums("depth=1") ) : ?>

    Unfortunately this does not seem to work.

    If any further information is needed, please let me know! Thanks very much!

    #78451

    In reply to: bbPress MU

    Rohan Kapoor
    Member

    They will be releasing the code soon but not yet.

    #78375
    Rohan Kapoor
    Member

    Go to your theme folder, find the theme. Edit front-page.php:

    Remove the following:

    <?php if ( bb_forums() ) : ?>
    <h2><?php _e('Forums'); ?></h2>
    <table id="forumlist">

    <tr>
    <th><?php _e('Main Theme'); ?></th>
    <th><?php _e('Topics'); ?></th>
    <th><?php _e('Posts'); ?></th>
    </tr>
    <?php while ( bb_forum() ) : ?>
    <?php if (bb_get_forum_is_category()) : ?>
    <tr<?php bb_forum_class('bb-category'); ?>>
    <td colspan="3"><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?></td>
    </tr>
    <?php continue; endif; ?>
    <tr<?php bb_forum_class(); ?>>
    <td><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?></td>
    <td class="num"><?php forum_topics(); ?></td>
    <td class="num"><?php forum_posts(); ?></td>
    </tr>
    <?php endwhile; ?>
    </table>
    <?php endif; // bb_forums() ?>

    #78456
    gerikg
    Member

    take out

    define( 'WP_AUTH_COOKIE_VERSION', 1 );

    if you’re using 2.8.4a and make sure the other “defines” are right after <?

    #78374
    phaniraj01
    Member

    please give me the code to edit..

    I have no programing experience.

    thanks,

    phani

    Texiwill
    Participant

    Hello,

    There is a bug in bb-includes/functions.bb-forums.php, at line 101 in bbpress v1.0.2. The code assumes that the forum_id is the sames the array_id when the array is flattened. This is not always the case if you apply_filters to the forum list such as private forums does.

    The code ccurrently reads:

    _forums[$_id] = $forums[$_id]

    Which may not be true if the forum id is not the same as the array id.

    This code does fixed the problem…. The key is to convert forum_id into an array enumerator so that when you look at $_ids you compare to the proper array which is no longer the full array but one with missing topics/forums.

    $forums = (array) apply_filters( ‘get_forums’, $forums );

    + foreach($forums as $f) {

    + $fids[$f->forum_id] = $f;

    + }

    if ( $child_of || $hierarchical || $depth ) {

    $_forums = bb_get_forums_hierarchical( $child_of, $depth, $forums );

    if ( !is_array( $_forums ) )

    return false;

    $_forums = (array) bb_flatten_array( $_forums, $cut_branch );

    foreach ( array_keys($_forums) as $_id )

    + $_forums[$_id] = $fids[$_id];

    #78443

    In reply to: / in usernames?

    jeffhiggins
    Member

    Suppose I was to use .9, is there any way to actually get my 1.0 database over to a .9 install?

    See, this is the major problem that has been plaguing me all this time. To begin with, I only switched to bbPress because my phpBB3 (modded) broke and the database was partially messed up (no matter what I tried, I could not get that database onto a clean install).

    Luckily I was able to get that db over to bbPress, but now that I am here I feel like A) I’m stuck (no backup/restore feature scares me half to death, and B) that I might have made a mistake. To hear that I should be downgrading to an older version is pretty frightening too, because this is for a client, and I wasn’t planning on sticking around for years to fix all the potential things that might happen from using a year old version of something (especially when support for the .9 version gets dropped altogether.

    I really don’t like phpBB3. It does not offer me to the modification/ease of use that I need as a dev. On the other hand, it seems like the more I try to do with bbPress, the less it delivers. Almost none of the useful plugins work with 1.0.2, so I’m stuck deciding whether I should spend the time creating my own theme (based off of the WP theme for the client), or whether I should be trying to figure out how to get this db (which has changed since I left phpBB3) and move it to a platform that is more mature.

    This is all very frustrating – and basically illustrates why I hate forum software in general. Any suggestions? I’m desperate/almost at my wits end…

    All I really want is:

    1. avatars (not just gravatars) [that users can upload for themselves]
    2. private messages
    3. attachments
    4. smilies

    And yet, it seems like even these things cannot be had with 1.0 – at least not from what I can find by searching this site (which by the way really needs to organize plugins based on bbPress version compatibility). So in a round about way, I guess I’m stuck with bbPress (and hopefully things will improve – don’t get me wrong it’s great software, but it’s just too simple [without plugins] for what I need). That being said, if the only way for me to enjoy those features lised above is via plugins, then how do I downgrade my install to .9? Alternatively, can I [and if so how do I] install .9 and then point it to my pre-existing 1.0 database (so that all the users, posts, etc, are not lost, and so they resolve in the new .9 install)?

    Thanks in advance for any help that you – or anyone else – can give me…

    #78450

    In reply to: bbPress MU

    johnhiler
    Member

    Sam mentioned a year or so ago that:

    There will be a sort of super plugin that you will be able to integrate into bbPress to get most of the functionality of TalkPress. The working name for the project is “bbPress Channels”. It will be released after TalkPress.

    https://bbpress.org/forums/topic/talkpress-suggestions

    TalkPress is their hosted “bbPress MU” – so it sounds like eventually, we’ll have the ability to host multiple bbPress sites from a single install. :-)

    #78442

    In reply to: / in usernames?

    johnhiler
    Member

    The only way I know of to allow unusual characters in usernames is to use display names… but that wouldn’t change the URL of user’s profile.

    Yah I definitely recommend using the 0.9.x branch. If you’re using a lot of plugins, it’s going to be really frustrating to be on 1.0. :-(

    Glad you’re liking bbPress better than phpBB3!

    #78297
    anandasama
    Member

    Ah gerikg! Thanks alot! This works perfectly! :)

    #69762
    dudenas
    Member

    Sorry, cannot agree.

    1. Ive done a little survey, and it showed that often people dont participate in forums only because they have to register, and they don`t like it.

    2. Most of my users are not very computer-literate.

    3. Also you have to keep an ugly technical sticky post for as long as the last user changes password.

    Not so nice imho.

    #31589

    Topic: / in usernames?

    in forum Installation
    jeffhiggins
    Member

    Is it possible to allow for / in usernames?

    I recently converted my phpbb board to bbPress, but one of my members had a username that looked like ///Abcd.

    So as opposed to forcing him to change his username, is it possible to dig into the code and allow /’s for usernames?

    Any help would be greatly appreciated!

    Edit: Sorry if this thread is in the wrong forum!

    #78432
    dbone
    Member

    Not sure if this is the best method but I don’t have more time to research and here is what I came up with:

    1. Create a new file; /my-plugins/bb-template.php

    2. Code:

    add_filter('bb_template', '_bb_template');

    function _bb_template($template)
    {
    if (preg_match('/login.php/i', $template))
    {
    header('Location: /myurl/');
    exit();
    }

    return $template;
    }

    3. Activate in bb-admin

    #78399

    In reply to: Integration Problems

    Randolf
    Member

    I´m very very stupid….

    I solved the problem…

    When I copied the hashes (AUTH_KEY, SECURE_AUTH_KEY, etc…) in the bb-config, I replace the name of the variables… AUTH_KEY instead of BB_AUTH_KEY…..

    I corrected the name of the variables and NOW all work perfectly..

    Sorry for your time spent and thanks very very much for your help… :)

    Best Regards…

    #78429
    dbone
    Member

    Which file did you edit? I was not able to find it in the default theme.

    I did find the code that creates the link in /bb-includes/function-bbtemplate.php, post_form(), line 311 for version 1.0.1.

    #78174
    Olaf Lederer
    Participant

    The tags are created inside the templates files, the style sheet might use some more “advanced” classes and attributes

    There are more ways to style html, not just simple pseudo classes ;)

    #78423
    frooyo
    Member

    @klimatyzacja-katowice

    You’re not alone on this.

    Lot’s of discussion about this at: https://bbpress.org/forums/topic/covert-wp-super-cache-plug-in-for-bbpress

    Currently, no caching plug-in exists :(

    #78397

    In reply to: Integration Problems

    Randolf
    Member

    Nothing…. :(

    – bb-config:

    define( ‘COOKIE_DOMAIN’, ” );

    define( ‘SITECOOKIEPATH’, ” );

    define( ‘COOKIEPATH’, ” );

    – wp-config: (if I define as ‘/’, browser says that cookies aren´t activated…)

    define( ‘COOKIEHASH’, ‘kjdfkjhdsflhjnmnbvyuy65487dsfg521f’);

    define( ‘COOKIE_DOMAIN’, ” );

    define( ‘SITECOOKIEPATH’, ” );

    define( ‘COOKIEPATH’, ” );

    Cookies created when logging in the blog: (5 and logged_in)

    Name: wordpress_kjdfkjhdsflhjnmnbvyuy65487dsfg521f

    Content: user_test%7C1251372800%7Cbae6f2f4158922d4a5ea6fe7129c0b4f

    Path: /bbpress/bb-admin ; /bbpress/bb-plugins; /bbpress/my-plugins; /wp-content/plugins; /;

    Name: wordpress_logged_in_kjdfkjhdsflhjnmnbvyuy65487dsfg521f

    Content: user_test%7C1251372800%7C1425663f4d407424cbf508fd0dd88c92

    Path: /

    Cookies created when logging in the forum: (5 and logged_in too)

    Name: wordpress_3f168778f6e6312b9251800266faf17d

    Content: admin%7C1251373200%7C04e7ddf6961e483e878f87f5708e2437

    Path: /bbpress/bb-admin ; /bbpress/bb-plugins; /bbpress/my-plugins; /wp-content/plugins; /;

    Name: wordpress_logged_in_3f168778f6e6312b9251800266faf17d

    Content: admin%7C1251373200%7Cd494b562a6afe3aac0cd9bfb3993a3a6

    Path: /

    Now, I can stay logging with different users in blog and forums…

    Anything is wrong, but I don´t know what… :(

    More ideas…??

    P.D: Always delete all cache+cookies to test it…

    P.D2: Testing…. from this form, I can´t access to the dashboard….. damn…

    #31521
    Chris2
    Member

    Hi.

    I have added a bbpress to a wordpress. Everything works fine, but now I would like to change how the appearance is in the forum list on the front page. Right now I am not fully happy with that. I can see that the class is

    either: <tr class=”alt”> or only <tr> which affects how each row is presented. But I can not find this in the style.css file. It drives me nuts… :)

    Also where forums is presented I get the <bb-precedes-sibling bb-follows-sibling bb-root> and alt at the end. But where is it controlled how they look like?

    Regards,

    Chris

    #69760
    dudenas
    Member

    Hi once again,

    could you please give us a hint on non-working passwords? Is it a real issue, or did we do something wrong?

    As I see, we dont need to do anything with md5 insecurity for bbpress plugin - its already integrated?

    phpbb3 password plugin is autoloaded.

    Could it be problems with mysql version? Mine is 4.1.22

    Thanks in advance,

    Justas

Viewing 25 results - 23,801 through 23,825 (of 32,468 total)
Skip to toolbar