Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 27,676 through 27,700 (of 32,495 total)
  • Author
    Search Results
  • #64907

    In reply to: Theme Editor

    _ck_
    Participant

    Correct me if I am wrong but the “theme editor” in WordPress is simply a remote file editor for templates. Doesn’t do anything special other than let you edit a file directly on your server without having to use FTP (or shell).

    While it seems handy, if I am not mistaken it also requires you to chmod 777 your theme folder which is very dangerous on a shared server.

    I suppose bbPress will get the feature eventually because it’s so very simple. I would guess it could be ported from the WordPress code in probably an hour.

    #64316

    In reply to: Rewriting?

    haagendazs1
    Member

    mrhoratio,

    Thanks a lot for the input. Sucks that it isn’t working out for a lot of people. I guess I’ll just live with it (for now?), and patiently wait for something out there. :) Thanks again

    #64868
    mrhoratio
    Member

    Okay, I think I got it working.

    I was able to fix the redirection issue by modifying the get_user_profile_link() function in the template-functions.php. I added the following line towards the end of the function, right before the last line of code in the function:

    $r = str_replace('forums/profile/' . $user->$column , "profile/" . $user->$column, $r);

    This is the full code:

    function get_user_profile_link( $id = 0, $page = 1 ) {
    $user = bb_get_user( bb_get_user_id( $id ) );
    $rewrite = bb_get_option( 'mod_rewrite' );
    if ( $rewrite ) {
    if ( $rewrite === 'slugs' ) {
    $column = 'user_nicename';
    } else {
    $column = 'ID';
    }
    $r = bb_get_option('uri') . "profile/" . $user->$column . ( 1 < $page ? "/page/$page" : '' );
    } else {
    $r = bb_get_option('uri') . "profile.php?id=$user->ID" . ( 1 < $page ? "&page=$page" : '' );
    }

    $r = str_replace('forums/profile/' . $user->$column , "profile/" . $user->$column, $r);

    return apply_filters( 'get_user_profile_link', $r, $user->ID );
    }

    I noticed that if you did not install bbPress with WordPress cookie integration, then this hack will cause bbPress to always think you are logged out. I think it has something with it not being able to retrieve the cookie because of the path change.

    However, if you have WordPress cookie integration enabled, then everything seems to work. Not exactly sure why. But I think it must be something to with the path that’s being set in the cookie.

    #57728
    Detective
    Member

    If you have a WP profile (like the author archive or some other profile) you can redirect the bbPress profile using this hook:

    //add_action('bb_init', 'profile_redirect');

    function profile_redirect() {
    if (is_bb_profile() && $_GET['tab'] != 'edit' && $_GET['tab'] != 'favorites') {
    $user = bb_get_user($_GET['id']);
    if ($user) wp_redirect("http://www.example.com/member/" . $user->user_nicename);
    }
    }

    I did this using this plugin for WordPress profiles, so even users who don’t have published posts have a profile. It works but you miss the profile edit messages (like “your profile has been updated”).

    #63719
    Detective
    Member

    Hi, i have a plugin that will support this soon :)

    The plugin is named Gaming Codes. It’s for WP, but i have a stripped down version for bbPress. I’ll post it here soon.

    #56985
    kmccallum
    Member

    The code he pasted, above, is missing the <?php … ?> tags, so I’m also getting compiler errors.

    #64890
    bobbyh
    Member

    joneywalker4u, to remove the hyperlinkification of URLs for text inside of code tags, you could write a plugin that removes the filter that hyperlinkifies URLs for the entire post, and then create a new filter that splits the post into strings-enclosed-by-code-tags and strings-not-enclosed-by-code-tags, apply the filter that hyperlinkifies URLs to the strings-not-enclosed-by-code-tags, and then glue the strings together.

    This is totally doable, but it seems like a lot of work, which is why I suggested the CSS approach…

    #64315

    In reply to: Rewriting?

    mrhoratio
    Member

    Hey I’m been trying to get this to work also. And have posted to some other similar threads here, but there haven’t gotta a solution working.

    Here’s what I’ve learned.

    1. From what I gathered, the problem is with how bbPress redirects its pages. Even if you have the proper mod_rewrite rules, bbPress will automatically redirect the rewritten URL to the full URL that it thinks the page is supposed to have. This basically makes custom mod_rewrite useless.

    2. You can prevent bbPress from redirecting by fooling bbPress into thinking it should have a different URL than its supposed to. You can do this by modifying the get_forum_link, get_topic_link, get_user_profile link, etc. functions in the template-functions.php file. The idea is to use pattern matching to strip out the base directory from the URL.

    function get_user_profile_link( $id = 0, $page = 1 ) {
    $user = bb_get_user( bb_get_user_id( $id ) );
    $rewrite = bb_get_option( 'mod_rewrite' );
    if ( $rewrite ) {
    if ( $rewrite === 'slugs' ) {
    $column = 'user_nicename';
    } else {
    $column = 'ID';
    }
    $r = bb_get_option('uri') . "profile/" . $user->$column . ( 1 < $page ? "/page/$page" : '' );
    } else {
    $r = bb_get_option('uri') . "profile.php?id=$user->ID" . ( 1 < $page ? "&page=$page" : '' );
    }

    $r = str_replace('forums/profile/' . $user->$column , "profile/" . $user->$column, $r);
    return apply_filters( 'get_user_profile_link', $r, $user->ID );
    }

    3. If you strip out the base directory from the URL however, it makes bbPress think you’re no longer logged in, and you can’t log in. I still can’t figure out a fix yet.

    Seems like a lot of people are having issues with mod_rewrite in bbPress. Hopefully the next update will resolve some of these issues.

    #60309

    In reply to: Rewriting up one level

    mrhoratio
    Member

    Sambauers,

    As you suggested, I was able to modify get_user_profile_link() function in template-functions.php to prevent the redirection. Mod_rewrite will now rewrite to the profile page properly, without redirecting it.

    But now, it shows I’m no longer logged in when I’m on a rewritten page, even though I am. When I try to log in. It just reloads the page.

    Here’s the mod in_user_profile_link():

    function get_user_profile_link( $id = 0, $page = 1 ) {
    $user = bb_get_user( bb_get_user_id( $id ) );
    $rewrite = bb_get_option( 'mod_rewrite' );
    if ( $rewrite ) {
    if ( $rewrite === 'slugs' ) {
    $column = 'user_nicename';
    } else {
    $column = 'ID';
    }
    $r = bb_get_option('uri') . "profile/" . $user->$column . ( 1 < $page ? "/page/$page" : '' );
    } else {
    $r = bb_get_option('uri') . "profile/" . $user->$column . ( 1 < $page ? "/page/$page" : '' );

    }
    $r = str_replace('forums/profile/' . $user->$column , "profile/" . $user->$column, $r);
    return apply_filters( 'get_user_profile_link', $r, $user->ID );

    }

    My goal is create a short URL such as http://www.example.com/profile/username

    #57727
    mrhoratio
    Member

    Perhaps this idea of a single profile page for both WordPress and bbPress will be part of the recently accounted backPress.

    It would great to have a profile link such as:

    http://www.example.com/member/username

    that works for both WordPress and bbPress. Instead of separate ones at:

    http://www.example.com/forums/profile/username or

    `http://www.example.com/author/username

    #64889

    I don’t want my text that i enter between

    Code:

    to be trated as hyperlink even if it is. What @bobbyh say will only change the formatting but not remove hyperlink.

    #64906
    sachrilege
    Member

    I found my absolute path and resolved my problem.

    << Nub :)

    #3358
    sachrilege
    Member

    I’ve finished integrating 2.5 WP with BBpress and everything was working fine, until I changed something and broke my bb-admin page.

    I have require_once('../wp-blog-header.php'); in my bb-config.php which was working correctly at one point in time.

    Now I see that /bb-admin/ doesn’t work because the relative path is broken.

    This is where my knowledge fails me, how do I find the Absolute Path to blog-header or how do I trick /bb-admin/ to reading the relative path properly?

    Thanks a bunch.

    #64808

    In reply to: Profile hook/filter

    Bloggsbe
    Member

    So I noticed. But I found a kind of dirty hack that I used in the bb-twitter plugin. It works, but it’s not the best way to do it :-)

    Rune

    #3347
    bryan868
    Member

    Is there a version 1.0 development plan anywhere? I’m curious what new features we’ll be seeing in bbPress.

    Additionally, are there plans to update the web site design (like wordpress.org) and add a Codex?

    That “future of bbpress” announcement in January was very exciting, but it doesn’t seem like much as happen since then. Other than the WP 2.5 integration of course, which is great don’t get me wrong.

    #64871

    In reply to: My Private Forum

    Shagalaga
    Member

    Thx, i know, free webhoster :-(

    but Firefox + Adblock + Noscript will fix the problem :-P

    #64888
    bobbyh
    Member

    Can you just use CSS to style links so they look just like your text.? If so, something like this might work (obviously modify this as appropriate for your theme):

    .post code a, .post code a:link, .post code a:visited {

    color: #9c0;

    text-decoration: none;

    font-size: 8pt;

    font: 0.9em Monaco, "Andale Mono","Courier New", Courier, mono;

    color: #000;

    }

    #64587
    bryan868
    Member

    I’m having a problem with a fresh install of 0.9.0.2. After last step of installation…

    Referrer is OK, beginning installation…
    >>> Setting up custom user table constants

    Step 1 - Creating database tables
    >>> Create table bb_forums
    >>> Create table bb_posts
    >>> Create table bb_topics
    >>> Create table bb_topicmeta
    >>> Create table bb_tags
    >>> Create table bb_tagged
    >>> Added index wp_users UNIQUE KEY user_nicename (user_nicename)
    >>>
    >>>>>> Duplicate key name 'user_nicename'

    Step 2 - WordPress integration (optional)
    >>> WordPress address (URL): MYURL
    >>> Blog address (URL): MYURL
    >>> WordPress cookie secret key set.
    >>> WordPress database secret set.
    >>> User database table prefix: wp_

    Step 3 - Site settings
    >>> Site name: MYSITENAME
    >>> Site address (URL): MYURL
    >>> From email address: MYEMAIL
    >>> Key master role assigned to existing user
    >>>>>> Username: admin
    >>>>>> Email address: MYEMAIL
    >>>>>> Password: Your existing password
    >>> Description: Just another bbPress community
    >>> Forum could not be created!
    >>> Key master email sent

    There were some errors encountered during installation!

    I should note that I assigned the key master as my admin user in WordPress. When I go to my forum I receive the following error….

    Parse error: syntax error, unexpected T_STRING in /MYPATH/bb-config.php on line 22

    mrhoratio
    Member

    mod_rewrite and wp_redirect don’t seem to like each other. I’m running into problems with the wp_redirect functions in bbPress redirecting the page after the URL has been rewritten, so that the URL changes back to the longer form.

    For example, this mod_rewrite rule:

    RewriteRule ^profile/username forums/profile/username [L]

    will rewrite:

    http://www.example.com/profile/username

    to:

    http://www.example.com/forums/profile/username

    Except, that after its been rewritten, bbPress forces a redirection via wp_redirect, causing the URL in the browser window to change to the longer form. Any suggestions?

    Commenting out lines 2061 and 2062 in the bbPress functions.php file will stop wp_redirect from redirecting the page.

    if ( $check != $uri && $check != str_replace(urlencode($_original_id), $_original_id, $uri) ) {
    //wp_redirect( $permalink );
    //exit;
    }

    But this breaks authentication, and causes bbPress to think you are not logged in, even if you are.

    #64821

    In reply to: User languages?

    A1ex
    Member
    #64887

    Got it somewhat.

    Edit style.css file in themes and enter

    1)To align text both sides

    .post {text-align: justify;}

    2)To prevent overflow

    .post code {
    overflow: auto;
    display: block;
    height: auto;
    max-height: 200px;
    white-space: normal;
    padding-top: 5px;
    padding-bottom: 5px;
    font: 0.9em Monaco, "Andale Mono","Courier New", Courier, mono;
    line-height: 1.3em;
    background: #ffffff;
    margin: 2px 0;
    }

    Sill one more thing – how to remove hyperlink in the text entered. That is why <a href=" etc gets added to text I enter between code tag.

    #64827
    Bloggsbe
    Member

    Yea, well, me and the SVN running at bbPress.org is not friends :-)

    I will give it a try later!

    Rune

    #64886

    This is not what I meant, haven’t you seen phpbb3 that sort of thing, scrollbar only under

    Code:

    and hyper links are not active in that box.

    please people suggest.

    #64884
    bobbyh
    Member

    try this then:

    .post code {overflow:scroll;}

    #64775
    Sam Bauers
    Participant

    Use these functions:

    bb_active_theme_uri(); // echos active theme URI
    bb_get_active_theme_uri(); // returns active theme URI
    bb_get_theme_uri( 'user#foobar' ); // returns given theme URI where theme is in "my-templates/foobar"

Viewing 25 results - 27,676 through 27,700 (of 32,495 total)
Skip to toolbar