Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 24,276 through 24,300 (of 32,586 total)
  • Author
    Search Results
  • Josh Leuze
    Member

    Has anything changed with with the steps for setting up Pretty Permalinks on bbPress 1.0.1?

    I have tried the methods in the FAQ, without success, on two different webhosts (Media Temple & Bluehost).

    Adding a .htaccess file with “Options +MultiViews” results in an error message when I try to load any page in the forum. When I try to visit “/bb-admin/rewrite-rules.php”, it redirects to the permalink settings page, and I do not see any code being generated that I could add to my .htaccess file instead.

    I have bbPress installed in a subdirectory with WordPress in the root directory. I have Pretty Permalinks functioning just fine in WordPress.

    Have I missed anything obvious here?

    #72364

    In reply to: Bulgarian translation

    wiseacre
    Member

    А, сега се сетих – в някои проекти за превод на свободен софтуер са приели като правило да не се използва заповедна форма. Например вместо “Добави” -> “Добавяне”, вместо “Изтрий” -> “Изтриване” и тъй нататък.

    Но пък наистина скоро не съм ползвал превода на WordPress и не зная какъв е стила … пък и да се мъчиш да преправяш сега за тая версия не си е работа. :)

    #76612
    deadlyhifi
    Participant

    I figured it out.

    <?php post_ip_link( array( 'before' => ' | ', 'after' => ' | ' ) ); ?>

    #76867
    deadlyhifi
    Participant

    I’m using bb_get_active_theme_directory() to detect any changes to my stylesheet.

    <link rel="stylesheet" href="<?php bb_stylesheet_uri(); echo '?' . filemtime( bb_get_active_theme_directory() . '/style.css'); ?>" type="text/css" media="screen, projection" />

    if I echo bb_get_active_theme_directory() on my page it does return the correct value. I’m using bbP 1.0.1.

    #56566
    deadlyhifi
    Participant

    you can do this with a plugin if you like.

    function filter_front_page_topics($where){
    $exclude_forums=array ("3"); // enable this to manually specify specific forums by id #
    if ( is_front() ) {foreach($exclude_forums as $forum) { $where.=" AND forum_id != ".$forum." "; }}
    return $where;
    }
    add_filter( 'get_latest_topics_where', 'filter_front_page_topics');
    add_filter( 'get_latest_posts_where', 'filter_front_page_topics');

    If you have front page paging (1,2,3,4 etc) then the paging count will be wrong. You need to edit the bb-includes/function.bb-template.php file

    function bb_latest_topics_pages() {
    global $page;
    static $bb_latest_topics_count;
    if (!$bb_latest_topics_count) {
    global $bbdb;
    $bb_latest_topics_count = $bbdb->get_var('SELECT COUNT(<code>topic_id</code>) FROM <code>' . $bbdb->topics . '</code> WHERE <code>topic_open</code> = 1 AND <code>topic_status</code> = 0 AND <code>topic_sticky</code> != 2 AND <code>forum_id</code> != 3;');
    }
    echo apply_filters( 'bb_latest_topics_pages', get_page_number_links( $page, $bb_latest_topics_count ), $bb_latest_topics_count );
    }

    Note the addition of AND "forum_id" != 3 to the query.

    EDIT: just noticed that use of backticks in the code has been turned into <code>, so amend as necessary.

    #56565
    Navin
    Member

    This still works! I’m using 1.0.1

    This is how my code looks like:

    <?php if( $topic->forum_id != 29 ) { ?>

    <tr<?php topic_class(); ?>>

    <td><?php bb_topic_labels(); ?> “><?php topic_title(); ?><?php topic_page_links(); ?></td>

    <td class=”num”><?php topic_posts(); ?></td>

    <!– <td class=”num”><?php bb_topic_voices(); ?></td> –>

    <td class=”num”><?php topic_last_poster(); ?></td>

    <td class=”num”>“><?php topic_time(); ?></td>

    </tr><?php }?>

    Thanks

    #76782

    In reply to: Plugin custom pages

    yutt
    Member

    Well, I replaced the:

    bb_auth();

    line with:

    if (!bb_current_user_can('administrate')) {bb_auth();}

    Hopefully that is secure, everything seems to work now. Huzzah!

    #76781

    In reply to: Plugin custom pages

    yutt
    Member

    So…

    bb_auth(); in ‘functions.bb-pluggable.php’ is causing this redirection problem.

    I appear to be failing at the line:

    if ( !bb_validate_auth_cookie( '', $scheme ) ) {

    I’ll have to look into bb_validate_auth_cookie() to see where that leads.

    #76092
    alexti93
    Member

    I have the same problem, I already tried changing the things from WP but it stills doesn’t works =(..

    #76833
    TonyVitabile
    Member

    Thanks. I’ve been reading a little about deep integration & I’m not sure I want the overhead. This is a new site with only about 45 pages or so of static content, to date, and the amount of content will grow over time. Getting bbPress to load WordPress, too, sounds like it will slow everything down, especially as content grows.

    As the pages are all contained in the database, and bbPress is already storing its data in the same database as WordPress, I was just looking for a function that would work like wp_list_pages() only using bbPress variables.

    I guess I’m going to have to go spelunking through the WordPress & bbPress code.

    Tony

    #76851
    r-a-y
    Participant

    Hey vanesta,

    Try this:

    <?php if ( bb_is_user_logged_in() ) : ?>
    <div class="message">LOGGED IN MESSAGE</div>
    <?php else: ?>
    <div class="message">NOT LOGGED IN MESSAGE</div>
    <?php endif; ?>

    #22870
    TonyVitabile
    Member

    Hi folks. I’m pretty new to WordPress — I’ve only been working with it for about a month. And brand new to bbPress–I just installed it last week

    I’ve got a theme installed on my WordPress MU site that I like. I want the bbPress pages to look similar. So I’m in the process of editing the bbPress template. Basically I want to use the same style sheet & just change all of the id tags to the ones that are in the stylesheet.

    In addition, though, I’d like the two sites to share menus. I’ve got a nice horizontal dropdown menu that came with my theme that I’m using. The menu contains the pages in my WordPress blog.

    I’ve duplicated the code for the menu in my bb-press theme’s header.php, but there is no wp_list_pages function in bbPress. Should I just write a function & add it to a functions.php file for my template? I suppose I can steal some of the wordpress code for the function & just modify the variables as necessary.

    Does this sound like a good approach, or has someone else done this?

    Also, I want the menu in both systems to have links to individual forums. Having a Forums link in the menu is cool, but I want 2 specific forums in other places in the menu structure. Any ideas?

    Thanks

    Tony

    #65191
    the_Wish
    Member

    Great, thank you. =)

    Any plans for a Multiquote feature?

    #67546
    Navin
    Member

    Ok, sorry to post again, I found a solution via css, I know it’s not the best solution :( but it works I guess.

    I did this:

    img.avatar { border: medium none; width:80px; height:80px; }

    #67544
    Navin
    Member

    Or do you mean I have to change this code:

    <?php post_author_avatar_link(); ?>

    Into:

    <?php post_author_avatar_link($size:width=80px; height=80px;); ?>

    I don’t know exactly how to do that

    #67543
    Navin
    Member

    Hi,

    I couldn’t find this anywhere in the code, do you know which file exactly?

    I did search within folder via Dreamweaver.

    I really would love to have a fixed size for avatar

    #65190
    Detective
    Member

    New version 1.2.

    Now it doesn’t require template edits :)

    kickerman360
    Member
    <td class="num">
    <?php
    function gs_get_topic_last_poster_profile_link() {
    global $topic;
    if ($topic)
    return sprintf('<a href="%s">%s</a>', get_user_profile_link($topic->topic_last_poster), get_topic_last_poster($topic->topic_id));
    return false;
    }
    ?>
    </td>

    Nemphtis
    Member

    I’ve been using phpBB3 up until yesterday when it decided to go crazy for no reason and die. It was a good chance to change to bbPress as I had been considering it for a while. I’m loving the idea of users tagging topics but I can’t seem to find a way to edit tags like you can in WordPress’ control panel. I’m a bit of a perfectionist and people are creating tags with wrong capitalisation so any new tags that have correct capitalisation are automatically converted to the original incorrect form. Are there any plugins out for editing bbPress tags, or any way I can quickly modify them without a plugin? :)

    #75701
    kickerman360
    Member

    Make sure you have inserted the code.

    Refer to the installation notes you should have got with your download.

    #72362

    In reply to: Bulgarian translation

    Благодаря за корекциите :)

    [залепена] ми харесва

    а на българските форуми на wordpress.org е използвано [важно], което носи повече смисъл, макар да е разлино от [sticky]

    “Your attempt to … has failed.” – за превода на тези фрази се водих от превода в WordPress, за да е един и същ стандарта

    #76704

    In reply to: Forget Password link ?

    chrishajer
    Participant

    One subject per topic, please.

    To create a link to the lost password page, just use this URL and put it in your template file wherever you want to see it.

    <a href="http://www.example.com/bbpress/bb-login.php">Reset your password</a>

    Is it more complicated than that?

    #76730
    chrishajer
    Participant

    It looks to me like the link (only) is stored in the variable $src in the file bb-includes/functions.bb-pluggable.php line 928.

    $avatar = '<img alt="" src="' . $src . '" class="' . $class . '" style="height:' . $size . 'px; width:' . $size . 'px;" />';

    So, being that it’s in functions.bb-pluggable.php, I’d say you could probably come up with a plugin to return $src instead of $avatar, but I am unsure of how to do that right now. It’s available, we just need to figure out how to return it for you.

    #76779

    In reply to: Plugin custom pages

    yutt
    Member

    Alright, now I am having *serious* issues getting Rewrite Rules to work.

    I’ve done these dozens of times and they aren’t particular complicated, here is a brief example of what I am trying to do:

    RewriteBase /
    RewriteRule ^example/?$ /forum/bb-plugins/example/example.php [NC,L]
    </IfModule>

    Accessing ‘http://www.example.com/forum/bb-plugins/example/example.php&#8217; directly works perfectly. Accessing from ‘http://www.example.com/example&#8217; does a redirect to ‘http://www.example.com/forums&#8217;.

    There are NO other rewrite rules active. I even disabled those from bbpress to try to track down what is happening. But some sort of 302 redirect keeps occurring. Is bbpress triggering this internally somehow?

    #76778

    In reply to: Plugin custom pages

    yutt
    Member

    Okay, I ended up going a totally different route with this, I don’t know that it will work for everyone or if it is “proper”, but it works for me.

    my-plugin.php now has:

    include_once('my-plugin-core.php');
    include_once('../../bb-load.php');

    From there I check if the user is authenticated as an admin with:

    bb_ssl_redirect();
    bb_auth();

    After that I just call ‘my-function();’

    I will use mod_rewrite to make the URL less ridiculous.

Viewing 25 results - 24,276 through 24,300 (of 32,586 total)
Skip to toolbar