Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 24,926 through 24,950 (of 32,432 total)
  • Author
    Search Results
  • #67734
    Shagalaga
    Member

    Yeah give us facebook connect! :D

    sry, i’m too stupid to program such a plugin myself xD

    #74220
    michael3185
    Member

    Yay – got it! I removed the ‘fix nofollow & _blank’ code, and discovered how to add the _blank in by experimenting. bbPress wraps the URL in double quotes, so I used this;

    Click here to get it.

    Works fine. Just got to add the nofollow bit back in, though that affects forum spidering from what one of those other posts says. Well, at least I can open external links in a new window (or tab in Chrome). Thanks for the help!

    I just re-added _ck_’s code to bb-tweaks;

    add_filter(‘post_text’, ‘bb_rel_nofollow’);

    but it isn’t adding the rel=”nofollow”. No worries though, this is fine;

    Click here to get it.

    #74219
    chrishajer
    Participant

    How about posting it as HTML not bbCode, if it’s just you?

    #74218
    michael3185
    Member

    Thanks, just installed that plugin, but it’s stripping out the URL. I posted;

    Click here to get it.

    and the other bb-tweak code I mentioned turned it into;

    <ablah rel=”nofollow” target=”_blank”>Click here</ablah> to get it.

    #74216
    chrishajer
    Participant

    They don’t do anything because they don’t go anywhere. Take a look at the source (from the page you linked):

    Get it at <a >http://www.google.co.uk/chrome.</a>

    Looks like your regex is stripping out the link altogether.

    #74214
    michael3185
    Member

    I’ve had a read through some of that (brain’s worn out!) but I don’t want to force all links to open new windows, just some to external sites. Users can go external, have a read, then close that window to return to my forum. So something like;

    Click here

    As none of the members know bbcode it’ll only be me doing it. Well, if I could get it working. Hmm… Sam’s code on one of those threads does it pre-post, so I guess that would work, unless I linked to another post, which I don’t want in a new window.

    Ok, so… I added the following code from another post to my bb-tweaks.php;

    // add nofollow to externa links only
    function target_nofollow_external_only( $text ) {
    $domain="travel-writers-exchange.com"; // domain to exclude from target and nofollow
    // Strip ALL nofollow
    $text = preg_replace('|<a>|iU','</a><a>', $text);
    // Add back in when needed
    $text = preg_replace('|</a><a>]+http://))(?!([^>]+'.$domain.'))(.+)>|iU', '</a><a rel="nofollow">', $text);
    return $text;
    }
    add_filter('post_text', 'target_nofollow_external_only',999);

    It stops my links from working somehow. They highlight, but don’t do anything when clicked. (Try http://mbforum.letsdoo.org/topic/if-your-web-browser-drives-you-mad).

    #74213
    chrishajer
    Participant

    So you want links that are in replied to open in a _blank window? Just certain ones, or every one automatically? This would make any link posted in a reply open in a new windows (i.e. adds target="blank" to any link)”

    https://bbpress.org/forums/topic/open-links-in-new-window#post-15587

    #74077
    chrishajer
    Participant

    Where were you expecting the keywords? Keyword meta tags belong in the <head> section of the page. Are you talking about the admin interface or the source of the rendered page? I’m curious because I was thinking of using this as well.

    #14927
    johnhiler
    Member

    Sam mentioned that he might set up a codex for us to start documenting bbPress… so I thought it might be useful to round up useful links with info we could cleanup for a bbPress codex:

    Versions:

    http://bbpress.org/forums/topic/new-stable-version-version-0905

    http://bbpress.org/forums/topic/bbpress-10-release-candidate-1

    http://bbpress.org/forums/tags/releases

    WordPress and bbPress signin integration:

    http://bbpress.org/forums/topic/wordpress-and-bbpress-integration-101

    http://bbpress.org/forums/topic/basic-integration-screencast

    Theme integration:

    http://bbpress.org/forums/topic/seemless-wordpress-integration

    php compatibility issues:

    http://bbpress.org/forums/topic/warning-cannot-yet-handle-mbcs-in-html_entity_decode

    http://bbpress.org/forums/topic/warning-cannot-yet-handle-mbcs-in-html_entity_decode-in-home2

    Writing plugins:

    http://bbpress.org/forums/topic/overwriting-template-functions

    http://bbpress.org/forums/topic/list-of-hooksactions

    Importing data:

    http://bbpress.org/forums/topic/importing-from-phpbb

    Translation:

    http://bbpress.org/forums/topic/how-to-translate-bbpress-to-another-language

    http://bbshowcase.org/forums/topic/bbpress-translation-internationalization-into-local-languages

    Roles:

    http://bbpress.org/forums/topic/adding-a-new-user-type?replies=6#post-9210

    Miscellaneous FAQ’s:

    http://bbpress.org/forums/topic/forums-started-39-years-ago

    Please chime in and share what you’d like to see documented in a bbPress codex… and also, any links you’ve found particular valuable!

    #74208
    exchequer598
    Member

    I never saw even http://huddle.inversekarma.in/forums/index.php work!

    Here’s my .htaccess in /huddle

    RewriteEngine On
    RewriteBase /
    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]
    RewriteRule . index.php [L]
    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>

    And here’s the one in /huddle/forums

    Options +MultiViews
    Options +Indexes
    IndexOptions ShowForbidden

    #14925
    michael3185
    Member

    I’ve read other posts on this, but I can’t get URLs to work with “target=_blank” when I add a link in a post. I use the BBcode-Lite plugin, and use blah, and have tried every variation of target=, with quotes, double quotes, slash quotes/double quotes – you name it. It all looks ok, but clicking the link always gives an error page of one form or another. Dammit, at this rate I’ll be on failblog.org before long..!

    This isn’t that difficult, and there are many sites that have been doing this for months now, including my own if you excuse my defense. :)

    Glad to see someone is taking charge of this however. Best of luck to those guys. :)

    #74206
    exchequer598
    Member

    Thanks Ipstenu and chrishajer.

    Yeah now I notice that the /forums/license.txt file opens up. I’ve suspected htaccess to be the source of trouble. So now what do I do to fix this? HELP :-)

    #74075
    michael3185
    Member

    Cheers tinskii – I’ll try that right away. Atsutane’s idea worked great, but to have it automatically updated is really neat.

    I’ve read in a lot of places that the Meta HTML tags are ignored by Google and others, but it’s got to be useful if some search engines still use them. Many thanks. I’ll even hack around with the code and see if I can learn anything. Though I think there’s something wrong with bbPress. Whenever I modify anything, it stops working (hehe).

    #74074
    timskii
    Member

    Below is the code I wrote for “SEO”-related tweaks. It tries to fill the description meta with something relevant, and adds keywords based on a combination of tags and site-wide words (added via the admin screen). It’s still rough round the edges. For example, it will produce duplicate descriptions on multi-page topics, and descriptions may not be terribly different from the title tag.

    <?php
    /*
    Plugin Name: SEO Tweaks
    Description: Adds description and keywords meta to the header.
    Author: Tim Howgego
    Author URI: http://timhowgego.com/
    Version: 0.1.rc
    */

    add_action('bb_admin_menu_generator', 'seo_config_menu');
    add_action('bb_admin-header.php', 'seo_config_process');

    add_action('bb_head', 'seo_meta_description');
    add_action('bb_head', 'seo_meta_keywords');

    function seo_meta_description() {

    switch ( bb_get_location() ) {

    case 'topic-page':
    $description = get_topic_title()." - ".bb_get_option( 'description' );
    break;

    case 'forum-page':
    $description = get_forum_description();
    break;

    case 'tag-page':
    if ( is_bb_tag() ) {
    $description = __('Topics tagged')." ".bb_get_tag_name();
    } else {
    $description = __('List of tagged topics.');
    }
    break;

    case 'profile-page':
    $description = __('Profile for')." ".get_user_display_name()." - ".__('includes contact information and posting history.');
    break;

    case 'view-page':
    $description = get_view_name()." - ".bb_get_option( 'description' );
    break;

    default:
    $description = bb_get_option( 'description' );
    break;
    }

    echo '<meta name="description" content="'.attribute_escape( $description ).'" />'."n";

    }

    function seo_meta_keywords() {

    // Includes enhancements by _ck_

    global $tags;
    $keywords = array();

    if ( !empty( $tags ) ) {
    foreach ( $tags as $t ) {
    $keywords[] = $t->raw_tag;
    }
    }

    $default_keywords = bb_get_option( 'seo_keywords' );

    if ( count( $default_keywords ) >0 ) {
    $keywords[] = $default_keywords;
    }

    if ( count( $keywords ) >0 ) {
    echo '<meta name="keywords" content="'.attribute_escape( implode( ", ", $keywords ) ).'" />'."n";
    }
    }

    function seo_config_menu() {
    bb_admin_add_submenu(__('SEO'), 'manage_plugins', 'seo_config_page');
    }

    function seo_config_page() {

    ?>
    <h2><?php _e('SEO Tweaks Configuration'); ?></h2>

    <form class="options" method="post" action="">

    <fieldset>
    <p><strong><label for="seo_keywords"><?php _e('Default keywords') ?></label></strong> (<?php _e('these words will be attached to every page, so only use words that describe the forum's overall content'); ?>):</p>
    <textarea name="seo_keywords" id="seo_keywords" cols="100" rows="4"><?php bb_form_option( 'seo_keywords' ); ?></textarea>
    <p><?php _e('Separate keywords with a comma. No formatting.'); ?></p>
    </fieldset>

    <fieldset>
    <?php bb_nonce_field( 'seo_config' ); ?>
    <input type="hidden" name="action" id="action" value="update_seo_config" />
    <input type="submit" name="submit" id="submit" value="<?php _e('Save Changes &raquo;') ?>" />
    </fieldset>

    </form>
    <?php

    }

    function seo_config_process() {

    if ($_POST['action'] == 'update_seo_config') {

    bb_check_admin_referer( 'seo_config' );

    if ($_POST['seo_keywords']) {
    $value = htmlentities( trim( $_POST['seo_keywords'] ) , ENT_NOQUOTES );
    if ($value) {
    bb_update_option( 'seo_keywords', $value );
    } else {
    bb_delete_option( 'seo_keywords' );
    }
    } else {
    bb_delete_option( 'seo_keywords' );
    }

    $goback = add_query_arg( 'seo_updated', 'true', wp_get_referer() );
    bb_safe_redirect( $goback );
    exit;
    }

    if ($_GET['seo_updated']) {
    bb_admin_notice( __('Changes saved.') );
    }

    }

    ?>

    #14920
    exchequer598
    Member

    I have WP-MU 2.7.1 + BuddyPress 1.0.1 installed and set up at http://huddle.inversekarma.in. I have copied bbPress 1.0 Rc-1 to http://huddle.inversekarma.in/forums. Now when I try to navigate to this address, I get the “The page you were looking for was not found” error. Is there something wrong with my htaccess? Please help! Thanks :-)

    #74185
    Atsutane
    Member

    Actually u can archive that using JavaScript, CSS and Bbpress action hook. You can use CSS to hide the “Post Form” and make it visible back using JavaScript.

    It kinda like using JavaScript to expand navigation menu. Well that should give you some idea :)

    #74153

    In reply to: For hacky peeps

    _ck_
    Participant

    I had started to write my own xref type of code to show how bbPress worked with a function reference and a action/filter reference but I never finished it.

    But you can use grep to grab a list of all the function names and all the actions/filters.

    Some people have run bbpress through phpxref and you can find that around the web via google, I don’t find such listings helpful myself though.

    #14917
    michael3185
    Member

    I saw a bbPress forum somewhere, where the ‘Create New Topic’ and ‘Reply’ sections were not a visible input box, but a link like; ‘Reply ยป’ When you click the link, the input box appears in its place. Does anyone know where it is so I can look at the code? Or is it a plugin? (Can’t find anything like that). Thanks.

    #74072
    Atsutane
    Member

    To add meta tag using plugin…

    add_action('bb_head', 'meta_bb_header');

    function meta_bb_header() {
    echo 'Your meta tag here';
    }

    Maybe you can use ping service like Ping-o-Matic that were design for blog, to notify other service that you have update your forum. Never try it yet with bbpress so kinda don’t know how it gonna be :)

    Another alternative maybe submit sitemap at Google Webmaster.

    #73741
    Ramoonus
    Member

    still haven`t found the solution :(

    Tynan Beatty
    Member

    You should only need the define('WP_AUTH_COOKIE_VERSION', 1); part added to the bb-config.php, not the rest (if you upgrade to WP2.8, then you don’t need any of those additions to the bb-config.php file). The WP bbPress Integration plugin’s settings page lists some things you’ll need to add to your wp-config.php file though. Namely, you’ll need to add at least something like define('COOKIEPATH', '/');, depending on your wordpress’ installation path. Try just adding that part and see how things work. If they don’t work, try adding the other things the WP bbPress Integration Plugin settings page suggests (I added all of it’s suggestions using the latest WP2.8 and the latest bbPress 1.0-rc-1 and it broke my WP login; but with just the cookipath definition, most everything except logging in from bbP and then logging out from WP [somewhat trivial], integrates as expected).

    peace~

    Tynan Beatty
    Member

    Hello. Please read this post of mine and also this post that the previous post references :)

    peace~

    Sam Bauers
    Participant

    Try the new 0.9.0.5 release, this problem should be fixed there.

    #73800

    In reply to: Alphabetize Forums

    Sam Bauers
    Participant

    See [2133]

    Running the latest trunk you need this to start your forum loops…

    <?php if ( bb_forums( array( 'order_by' => 'forum_name' ) ) ) : ?>
    ...
    <?php endif; ?>

Viewing 25 results - 24,926 through 24,950 (of 32,432 total)
Skip to toolbar