Search Results for 'code'
-
Search Results
-
Hi,
I am trying to write a plugin and I do not know how can I do it properly.
The plugin I am working on requires the editing of the “get_forum_link” function, specifically the “$link ” vatiable.
I have the code done in php but do not know how to make a plugin out of it. What and how should I use add_action or add_filter?
Thanx.
function get_forum_link( $forum_id = 0, $page = 1 ) {
global $forum;
if ( $forum_id )
$forum = get_forum( $forum_id );
if ( bb_get_option( ‘mod_rewrite’ ) )
$link = bb_get_option( ‘uri’ ) . “forum/$forum->forum_id” . ( 1 < $page ? “/page/$page” : ” );
else {
$args = array();
$link = bb_get_option( ‘uri’ ) . ‘forum.php’;
$args = $forum->forum_id;
$args = 1 < $page ? $page : ”;
$link = add_query_arg( $args, $link );
}
return apply_filters( ‘get_forum_link’, $link, $forum->forum_id );
}
Topic: Group Access for Forums
I have looked at the private forums plugin, but it seems to be an all or nothing deal based on the user being logged in…
I didnt find anything when I searched, but wondering if anyone knows of or is working on forum access based on membership in a group? So basically, you would allow forum access to certain groups and you would assign users to various groups (or roles in wp/bb terms). Gives you much finer control over who can access which forums…
also, any way to make bbpress inherit the roles as defined in WP? or maybe just add new roles to bb? easy enough to do hacking the code, but I havent looked at the bbpress plugin structure yet…
thanks…
Topic: #postform bug found?
I have come across a link in the forums that seems to do nothing past 404’ing out. I thought it was only present in my forum since I’ve been heavily reconfiguring it. However, even posting this message I see the bug here, unless I don’t understand it correctly. Above this post box, there is an h2 element with a post-form class which says “Add New Topic »”. Only the “»” is hyperlinked to:
http://bbpress.org/forums/topic/#postform(which 404’s out). This behavior is consistent on my forum as well. The offending??? code is in:
bb-includes/template-functions.phpSearch for $h2 and you should be able to find it.
I found this applies to the “Add New Topic” message, as well as the “New Topic In This Category” message, but only if there is no current topic in that category.
Is this a bug, groundwork for a future feature, or am just not catching the vision of something earthshattering?
Topic: No Stylesheet
I recently installed bbPress to localhost to experiment before I put it on a live site. Strangely, the stylesheet was being ignored. Looking at the source brought up this:
<link rel="stylesheet" href="http://localhost#support/bb-templates/kakumei/style.css" type="text/css" />Edit: OK, I can’t seem to type a backslash here, but the # symbol in the above code snippet is actually a backslash (opposite of /)
I have no idea why the slash after localhost is backwards. It appears correctly in all other locations. For what it’s worth, here is the relevant section of my config.php file:
// If your bbPress URL is http://bbpress.example.com/forums/ , the examples would be correct.
// Adjust the domain and path to suit your actual URL.
// Just the domain name; no directories or path. There should be no trailing slash here.
$bb->domain = 'http://localhost'; // Example: 'http://bbpress.example.com'
// There should be both a leading and trailing slash here. '/' is fine if the site is in root.
$bb->path = '/support/'; // Example: '/forums/'Any help?
Topic: Why not stick to “theme”
…like in WordPress? The additional use of “template” will tend to divide and confuse, no?
Like how, across software, plugins are either “mods”, “modules”, “extensions” or “addons”.
Now’s the time! We can still consolidate the concept into one term.
I’m splitting hairs, I know
. bbPress is wonderful. Thanks so much to the developers. I’m a phpBB veteran (admin), and bbPress is so nice I want to cry.
Topic: Step two errors
Installation went smoothly thru step one.
When the step two page came up it displayed the following errors.
bbPress database error: [Incorrect table definition; There can only be one auto column and it must be defined as a key]
ALTER TABLE bb_users ADD COLUMN ID bigint(20) unsigned NOT NULL auto_increment
bbPress database error: [Key column 'ID' doesn't exist in table]
ALTER TABLE bb_users ADD PRIMARY KEY (ID)
1. Added index bb_users PRIMARY KEY (ID)
bbPress database error: [Unknown column 'ID' in 'where clause']
SELECT * FROM bb_users WHERE ID = 1
bbPress database error: [Unknown column 'ID' in 'where clause']
SELECT * FROM bb_users WHERE ID = 0
I checked via MyphpAdmin and have been unable to determine how to correct the errors, or even understand what they are.
Below the error list it appears as though step two partially worked, i.e. it displays a login link and user name and P-word.
However the login link returns (paraphrased) “it appears you have not installed bbpress” and a link to the install page.
The database used was one from a bbpress install of over one year ago.
I also made a second, but new, database with the same results as described above.


is a bit more configurable.