AdventureCanoe (@adventurecanoe)

Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • In reply to: Show off your Forum !!

    AdventureCanoe
    Member

    @adventurecanoe

    Adventure Canoe Forum

    I started a canoeing specific forum. It’s finally starting to get some traffic. I’ve used some standard plugins as well as writing some of my own.

    _CK_’s plugins are indispensable.

    here’s a could packed into one that do a lot of SEO stuff like titles, canonical links and opening links in new windows.

    <?php
    /*
    Plugin Name: Target Blank
    Description: append target="_blank" to all links and other fun stuff
    Author: James
    Version: 1
    */
    //add rel=external to post links... there's also some stuff in here to allow more tags

    function bb_target_blank( $text ) {
    $text = preg_replace('|<a (.+?)>|i', '<a $1 target="_blank">', $text);
    return $text;
    }
    add_filter('pre_post', 'bb_target_blank');

    // Add Tags with allow_tags

    function allow_more_tags( $tags ) {
    $tags['p'] = array('style' => array());
    $tags['h3'] = array('style' => array());
    $tags['span'] = array('style' => array());
    $tags['b'] = array('style' => array());
    $tags['em'] = array('style' => array());
    $tags['ol'] = array('style' => array());
    $tags['target'] = array('style' => array());
    $tags['iframe'] = array('style' => array());

    return $tags;
    }

    add_filter( 'bb_allowed_tags', 'allow_more_tags' );

    function meta_keywords() {
    global $tags;
    if (!empty($tags)) {
    $keywords="";
    foreach ($tags as $t) {$keywords.=$t->raw_tag.', ';}
    echo "n".'<meta NAME="keywords" CONTENT="'.trim($keywords,", ").'">'."n";
    }
    } add_action('bb_head', 'meta_keywords',8);

    function set_canonical_links() {
    global $page;
    if (is_front()) {

    $url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];

    echo '
    <link rel="canonical" href="'.$url.'" />'.PHP_EOL;
    } elseif (bb_is_topic()) {
    $tlink = get_topic_link();
    if ($page > 1) {
    $turl = $tlink.'/page/'.$page;
    } else {
    $turl = get_topic_link();
    }
    echo '
    <link rel="canonical" href="'.$turl.'" />'.PHP_EOL;
    } elseif (is_forum()) {
    echo '
    <link rel="canonical" href="'.get_forum_link().'" />'.PHP_EOL;
    } else {
    return;
    }
    }
    add_action('bb_head','set_canonical_links');

    ?>

    This one makes better page titles…it has some canoe specific stuff in it but I think you can see how it works and change it for your needs.

    <?php
    /*
    Plugin Name: Better Titles
    Author: James Dixson
    */
    add_filter('bb_title', 'titlemodify');

    function titlemodify( $title ) {
    //your code that does something to $title;

    switch ( bb_get_location() ) {
    case 'topic-page':
    $title = get_topic_title() . ' - ' . get_forum_name() . ' &mdash; Adventure Canoe Forum' ;
    break;

    case 'front-page':
    $title = bb_option('name') . ' &mdash; Canoeing and Paddling Discussion' ;
    break;

    case 'forum-page':

    $find = 'Canoe';
    $string = get_forum_name() ;
    if(strstr($string,$find)){
    $title = get_forum_name() . ' &mdash; Adventure Canoe Forum' ;
    }else{
    $title = 'Canoe ' . get_forum_name() . ' &mdash; Adventure Canoe Forum' ;
    }

    break;

    case 'profile-page':
    $title = 'Profile for ' . get_user_name() . ' - Adventure Canoe Forum &mdash; Canoeing and Paddling Discussion' ;
    break;
    }
    return $title;
    }
    ?>

    Anyway enjoy… and if you like canoeing post on the Adventure Canoe Forum

    In reply to: Adventure Canoe Forum

    AdventureCanoe
    Member

    @adventurecanoe

    I’ve made some changes. Check out AdventureCanoe.com a new Canoeing Forum and let me know what you think.


    AdventureCanoe
    Member

    @adventurecanoe

    Ok I think I resolved it. I downloaded the new files and uploaded the newer version of Akismet which still says its 1.0

    But it seems to be working. Thanks for pointing me in the right direction.

    Now its time to do a full upgrade to 1.0.1 and make sure to recode all my fancy core changes.

    Thanks for the help

    James


    AdventureCanoe
    Member

    @adventurecanoe

    hmm. Deactivated all and changed theme, still nothing until I deactivated Akismet 1.0

    I have all the plugins in the bb_plugins dir

    Its working with Akismet off but is this safe?

Viewing 4 replies - 1 through 4 (of 4 total)