Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 23,451 through 23,475 (of 32,481 total)
  • Author
    Search Results
  • #31799
    InvTrdr
    Member

    I am using the “Structure” theme with the header.php file code below. This is the link http://bbshowcase.org/forums/ to see the layout of the template. Just change the theme to “Structure” at the bottom of the page to see it. I am trying to change the links on top to different links pointing to my sites. Like “home”, “Example1″, Example2” etc. Where and how do I do it in the code below?

    Thank you.

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”&gt;

    <html xmlns=”http://www.w3.org/1999/xhtml”&lt;?php bb_language_attributes(‘1.1’); ?>>

    <head>

    <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />

    <title><?php bb_title() ?></title>

    <?php

    // Feed header

    bb_feed_head();

    // Get functions

    require_once(bb_get_template(‘functions.php’));

    op_script_loader();

    // bbPress head function

    bb_head();

    ?>

    <link rel=”stylesheet” href=”<?php bb_stylesheet_uri(); ?>” type=”text/css” />

    </head>

    <body id=”<?php bb_location(); ?>”>

    <div id=”body-container”>

    <?php require_once(bb_get_template(‘main-nav.php’)); ?>

    <div id=”header-container”>

    <div id=”header”>

    <h1>” title=”<?php bb_option(‘name’); ?>”><span><?php bb_option(‘name’); ?></span></h1>

    </div>

    </div>

    <div id=”container”>

    <div id=”<?php if(is_front()) echo “content”; else echo “forums”; ?>” class=”forums left”>

    #55897

    well, I found out part of the solution myself. The code in the plugin is quite simple and it actually uses the same bbPress function that generates in-topic pagination (paginate_links).

    And that function has several parameters on of which is show_all – set that to false and it will not print all the links but just the links relative to the current page.

    Setting the current page for the plugin is also through a parameter – current which is set to 0. That way we get a link only to the last page but it still is better that having a long row of useless page links.

    =Edit=

    So, I cracked some more of it. I wanted to make it display links only to the firs page and to the last 2-3 pages. So the current parameter had to be somehow dynamically set to last page + 1 to trick the function. Here is the code I used (starting line 74 of the plugin):

    $links = paginate_links(
    array(
    'base' => $uri,
    'format' => bb_get_option('mod_rewrite') ? '/page/%#%' : '%#%',
    'total' => ceil($posts/$perPage),
    'current' => ceil($posts/$perPage) + 1,
    'show_all' => false,
    'type' => 'array'
    )
    );

    And it works =) We get links to the first page and to the last two pages.

    * if you set current to 1 you’ll get links to pages 2,3,4 and the last page which is also usable.

    #79216

    In reply to: Mail me after post

    @Olaf: Firefox 3.5.3 with an adblocker :P just looked at it under IE Tab and it loaded then hid the main content… but that’s probably just me

    #78800
    SharpMouth
    Member

    OK FIXED!!! (REMARKABLE SOLUTION)

    I turned off error reporting, and all is well. Thanks Kawauso and Ashfame for your time :)

    #79341

    In reply to: Nofollow

    Mark
    Member

    Turns out there is a bb_rel_nofollow() already, it’s just not hooked into anything (?).

    So you could just omit mine, and add the following;

    add_filter('pre_post', 'bb_rel_nofollow');

    #79215

    In reply to: Mail me after post

    Olaf Lederer
    Participant

    @Kawauso,

    which browser are you using ?

    @johnhiller,

    yes that are the same plugins, but I’m too lazy to maintain plugins on the bbpress server :(

    computertech
    Member

    bbpress homepage has HOME, ABOUT, DOCUMETATION and etc..

    i wanted my blog to also look like the homepage. This is embarrassing but my blog is about computers – Computer Tech Stuff and I dont know how to do it. :D

    does bbpress support this?

    #79356
    Mark
    Member

    1) https://api.wordpress.org/secret-key/1.1/salt

    2) There won’t be. You have to add it directly to the wp-config.php file, in the following format:

    define('SECURE_AUTH_SALT', 'replacewithyourstring');

    #79352
    Mark
    Member

    Make one. :) We promise we’ll cover our eyes.

    Once you have one for your wp-config, load up your favorite phpMyAdmin (er…) and make sure there’s an entry for bb_secure_auth_salt in the bb_meta table, and that it matches the string you added to your wp-config.

    #79340

    In reply to: Nofollow

    Mark
    Member

    If you have a my_plugins.php (or something similar) in your bb-plugins/, you can add this there. Alternatively, you could add it to your themes functions.php file. It’s only stopgap though, it’s not bulletproof, I’m a little rusty on regular expressions since I’ve been developing themes more lately than I have been doing real programming;

    function my_nofollow ( $ret ) {
    return preg_replace('#(<a[^"]+"[^"]+")>([^<]+</a>)#', '$1 rel="nofollow">$2', $ret);
    }

    add_filter('pre_post', 'my_nofollow');

    I’m not sure if this would qualify for trac, considering it’s not so much of a bug as it is an oversight? Mods?

    #79301
    gerikg
    Member

    /profile.php?id=XX&tab=favorites

    #79336

    In reply to: Nofollow

    Mark
    Member

    1. Haven’t looked into that yet, but it should definitely be nofollowed no matter how the link is formatted so this might be worth looking into/filing a trac for.

    2. You run the risk of people spamming through their profile if they figure that out, but if you’re willing to take the risk, it’s not too difficult. Open up your templates profile.php, and add the following at the top of the page;

    <?php $GLOBALS['bb_nofollow_off'] = TRUE; ?>

    …then open bb-includes/backpress/functions.formatting.php and go to line 950 at the bottom of function _make_url_clickable_cb() and replace;

    return $matches[1] . "<a href="$url" rel="nofollow">$url</a>";

    with;

    return (isset($GLOBALS['bb_nofollow_off'])) ? $matches[1] . "<a href="$url">$url</a>" : $matches[1] . "<a href="$url" rel="nofollow">$url</a>";

    Note that if you have deep integration, you’ll have to change the above line in your WordPress version of the same function, not the bbPress one.

    #78773
    Mark
    Member

    Just out of curiousity, why are you sending headers from your bb-config? bbPress/Wordpress will handle this all on their own.

    You also shouldn’t call the blog-header, it causes other problems you can read about around the forums. You should be calling wp-load.php and the following should be more than adequate for your bb-config;

    define('WP_BB', TRUE);
    if (! defined('DB_NAME'))
    require_once(dirname(__FILE__) . '/w/wp-load.php');

    $bb->wp_table_prefix = 'wp_'; // your wordpress db prefix is
    $bb->wp_home = 'http://domain.tld';
    $bb->wp_siteurl = 'http://domain.tld';

    I don’t think this will solve your next page problem, as it looks like they’re being sent wrong from bbPress for whatever reason, but it will avoid a plethora of other problems before they become apparent.

    #79349
    gerikg
    Member

    Use this link: https://api.wordpress.org/secret-key/1.1/salt It has 8 keys.

    NOTE: do NOT use any “www.” anywhere when entering information.

    1. Open wp-config line replace your new keys with the one from that link. (lines 55-61)

    2. Copy the same keys to bb-config just add BB_ after define(' in each key so it will be define('BB_AUTH_KEY', ' (lines 41-44)

    3. Install & activate BBpress Intergration plugin https://wordpress.org/extend/plugins/bbpress-integration/

    4. Get the information from the plugin and put it in line 20 in wp-config and line 13 in bb-config. (if you’re using WPMU take out the HASH line when you put it in bb-config)

    5. Log into your BBpress admin section and navigate to SETTINGS -> WORDPRESS INTEGRATION enter all the information it ask for, save.

    6. Clear you cache and you should be ready to go.

    #79324

    In reply to: Widgets for bbpress?

    Mark
    Member

    also, is it possible to remove the tags bar? and possibly replace it with something else?

    Anything is possible. ;) You want to look for your template files in bb-templates, most likely you’re using the kakumei theme in a directory of the same name.

    #31787

    Topic: Nofollow

    in forum Installation
    bbpros
    Member

    Hi all, I love this script and have been getting acquainted for a couple of hours… I noticed the following:

    1. User can post html. If they drop a whole url it will print with a “nofollow” BUT if they actually write http://, then it will print without it. Is there a way to make it consistently “nofollow”?

    2. I would like to make the link in members’ profiles a “dofollow” but I am afraid to touch the code and all of a sudden make all links drop by members like that. I would only want to switch it off in the profile area.

    Thanks.

    #79283

    In reply to: Plugin Request: Garage

    johnhiler
    Member

    gerikg –

    If you want to write a post asking for plugin developers to bid on a project, you can do so here… but the forum policy is to just post your project description and your email and then a moderator will close the post:

    https://bbpress.org/forums/topic/bbpress-developers-wanted#post-39007

    If you want to discuss the project in general, you can always do so… just a heads up on the forum policy around soliciting bids on a project. :-)

    #69774
    johnhiler
    Member

    adamkayce – It’s absolutely possible. :-) I’ve done it a few times now.

    These links are hugely helpful:

    https://bbpress.org/forums/topic/integration-of-established-wp-and-bbpress-installations

    https://bbpress.org/forums/topic/successful-reverse-integration-steps

    The hardest part of the integration is how to handle “name collisions”… i.e. what do you do when two users share the same usernames in bbPress (from phpbb3) and WordPress. That’s discussed nicely in the above links.

    Good luck!

    #79316

    Add more like this

    <li>Page1</li><li>Page2</li><li>Page3</li><li>Page4</li>

    #79318

    In reply to: line breaks

    batrachoid
    Member

    In a post, here is a quick and dirty way:
     
     
     
     
     
     
     
     
     

    In this post I used <br/>&nbsp;<br/>&nbsp;<br/>&nbsp;<br/>&nbsp;<br/>&nbsp;<br/>&nbsp;<br/>&nbsp;<br/>&nbsp;<br/>&nbsp;<br/>

    #79229

    In reply to: Google Analytics

    InvTrdr
    Member

    So paste the same code from WP just above the </head> tag?

    Thanks.

    #79330
    Olaf Lederer
    Participant

    Limit page views for guests

    there is no plugin, but it’s easy to create (this is just an example not a full working snippet)

    If your visitors are from the same network you might have problems with this.

    session_start();
    $ipkey = $_SERVER['REMOTE_ADDR'];
    $_SESSION[$ipkey]++;
    if ($_SESSION[$ipkey] >= 10) {
    header("Location: /register.php");
    exit;
    }

    check also the function on my own forum.

    #31786
    chandersbs
    Member

    Is there a plugin or a way to code this? This was a feature that helped me increase the number of registered users back then when I was using SMF.

    How can this be achieved with bbPress?

    #79314
    InvTrdr
    Member

    Thanks. Below is the code for the menu item in the header. Just one. How do I add a couple more to it?

    Thank you.

    <div id=”access”>

    <div id=”menu”>

    </div>

    </div>

    #79228

    In reply to: Google Analytics

    @Ed

    That’s totally upto you!

    Use the same code which is in WP to track the whole site as one or a different code to track the forum separately.

Viewing 25 results - 23,451 through 23,475 (of 32,481 total)
Skip to toolbar