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.
@Olaf: Firefox 3.5.3 with an adblocker
just looked at it under IE Tab and it loaded then hid the main content… but that’s probably just me
OK FIXED!!! (REMARKABLE SOLUTION)
I turned off error reporting, and all is well. Thanks Kawauso and Ashfame for your time
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');
@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
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. 
does bbpress support this?
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');
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.
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?
/profile.php?id=XX&tab=favorites
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.
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.
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.
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.
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.
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.
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!
Add more like this
<li>Page1</li><li>Page2</li><li>Page3</li><li>Page4</li>
In a post, here is a quick and dirty way:
In this post I used <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/>
So paste the same code from WP just above the </head> tag?
Thanks.
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.
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?
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>
@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.