I have my answer :
file : bb-include>template-fonction.php
search : “bb_allowed_tag”
Include :
// Add Tags with allow_tags
<p> function allow_more_tags( $tags ) {<br />
$tags['p'] = array('style' => array());<br />
$tags['span'] = array('style' => array());<br />
$tags['b'] = array('style' => array());<br />
$tags['em'] = array('style' => array());<br />
$tags['ol'] = array('style' => array());</p>
<p> return $tags;<br />
}</p>
<p> add_filter( 'bb_allowed_tags', 'allow_more_tags' );
under this…
// format=list or array( 'format' => 'list' )<br />
function get_allowed_markup( $args = '' ) {<br />
$args = wp_parse_args( $args, array('format' => 'flat') );<br />
extract($args, EXTR_SKIP);</p>
<p> $tags = bb_allowed_tags();<br />
unset($tags['pre'], $tags['br']);<br />
$tags = array_keys($tags);</p>
<p> switch ( $format ) :<br />
case 'array' :<br />
$r = $tags;<br />
break;<br />
case 'list' :<br />
$r = "<ul class='allowed-markup'>nt
<li>";<br />
$r .= join("</li>
nt
<li>", $tags);<br />
$r .= "</li>
nn";<br />
break;<br />
default :<br />
$r = join(' ', $tags);<br />
break;<br />
endswitch;<br />
return apply_filters( 'get_allowed_markup', $r, $format );<br />
}
No.
Kakumei is a theme (WordPress terminology) or a template (bbPress terminology) and controls the display of the content on your site. Any modifications you make to your site should be done in these template files, never in the core. Changing core files makes it hard to upgrade to newer releases: you lose your changes with every upgrade. So, if you make the changes in a template file, you can maintain them between releases.
Also, by default, the stock kakumei theme is used and it’s in the bb-templates directory. I recommend creating a new directory called my-templates (if it’s not there already) at the same level as bb-templates. So, in a directory listing, they’d be at the same level. Then, inside there, create a directory called mytheme or some other name that is descriptive for your forum. This directory name does not matter. (The my-templates one DOES matter.)
Now that you have a my-templates directory, and inside that a new directory with a name you choose, copy everything from inside the bb-templates/kakumei/ directory to this new directory you created. Then, open up style.css and change the header to give this new template a unique name on line two. You will see this there:
Theme Name: Kakumei
Change that to “Theme Name: My Cool New Theme” or whatever you want. Then refresh your admin panel, and you will see a new theme. You can change the rest of the lines in that header as well, to things that are meaningful to you. Be sure not to modify the text before the colon, just change the text after, to your values.
Now, modify the php and css files in this directory to change the look of your forum. You can switch back and forth between themes here. If you break something, just choose the default theme until you fix the one you were working on.
If you just want to delete the display of the information below the post form, don’t remove that from a core file. What you want to do does not require any modification of core files. Stay out of there.
You want to be in a template folder, by default bb-templates/kakumei/ but if you created a custom template, you may have a my-templates/yourtemplatename/. In that folder, there should be a file post-form.php and edit-form.php. In the 0.9.0.2 version, you want to look at
./edit-form.php line 19
/post-form.php line 31
Those lines contains the code to display “Allowed markup” below the post form. Remove that line completely and the text will no longer appear under your post form. Remove it in edit-form.php as well, and it won’t appear below that form either.
If you don’t have those files in your template, or those lines in your template files, then I don’t know what to say. That’s where the text comes from in a stock installation.
Got around to trying this in version 0.9.0.2 / template: bbOrg
I didnt see those files you mentioned but searched a bunch of files and all I found was this strip of code in the includes/template-functions.php file:
function allowed_markup( $args = '' ) {
echo apply_filters( 'allowed_markup', get_allowed_markup( $args ) );
}
// format=list or array( 'format' => 'list' )
function get_allowed_markup( $args = '' ) {
$args = wp_parse_args( $args, array('format' => 'flat') );
extract($args, EXTR_SKIP);
$tags = bb_allowed_tags();
unset($tags['pre'], $tags['br']);
$tags = array_keys($tags);
switch ( $format ) :
case 'array' :
$r = $tags;
break;
case 'list' :
$r = "<ul class='allowed-markup'>nt<li>";
$r .= join("</li>nt<li>", $tags);
$r .= "</li>n</ul>n";
break;
default :
$r = join(' ', $tags);
break;
endswitch;
return apply_filters( 'get_allowed_markup', $r, $format );
}
Would that get rid of the markup stuff underneath the posting area WITHOUT disrupting my BB Code Buttons functionality?
Thanks!
Yes, I think this is what it is.
I’ve run into it on every theme I’ve tried, including the default. It always shows the same forrest-green box with the bbPress logo and an error message like “You need to actually submit some content!” It’s really jarring when coming out of my theme, which has a kind of handmade-look (http://agitainment.com/ics/forum).
So, is there no hope for me to be able to restyle this myself?
Thanks for your help, everyone!
Yea that was me disabling some plugins.
Thanks but I don’t know anyone that knows how to fix this type of thing.
I tried refreshing another page over and over and you are right it did the same thing only with more gibberish errors over top of the default bbpress error page.
It also happens the default as well. I’ve deactivated all plugins still no form.
Just to clear up. I don’t get a blank screen. I mean when I click new topic it will bring me to the page with the heading of create new topic, but below it will be no form of any kind
Does the problem happen with the default theme? Chances are there’s a problem in one of your template files.
Or, possibly a plugin issue. Turn off plugins until your forum works again.
If you have access to error logs, you can look in there and see exactly what’s causing the problem. A blank screen is normally a 500 Internal Server Error.
There is no language file for that text, it’s in your template file: /bb-templates/kakumei/post-form.php line 15 by default. You can change it there.
Where is the language file for “Enter a few words (called tags) separated by spaces to help someone find your topic: “?
I need to change spaces to commas. Also, I think this needs to be updated in the new bbpress, but the default setting I got was separated by commas, but spaces is misleading to those who post.
Hi.
I recently installed bbPress on my WordPress site here at http://agitainment.com/ics/forum/.
I’ve built a theme based on 1col_fixed 1.1 (I believe it’s kakumei with most of the CSS stripped out). In any case, when I go to my forums I can see my Gravatars and default avatars in kakumei, but when I switch on my theme they disappear.
Is there a php file I’m missing or a block of code somewhere I need to copy over from the kakumei theme to get these to work? If so, where should I put the code?
Thanks!
Hi All,
I recently upgraded to 0.9.0.2 and since this upgrade the “remember me” functionality we used to have is now not working at all.
Basically if you close the browser down completely, and reopen it, then access the site you have to login Each time.
Any ideas?? i tried switching to default themes, etc and it made no difference.
Also, i should add that i have no WordPress integration at all, its a pure bbpress site.
Another thing left is to try it using the default template instead of the custom one you are using and seeing if that changes the behaviour.
You can just switch to it temporarily, then test and switch back.
I’m wondering if there’s a way to change the default Permalink structure and prefixes.
For example :
http://www.exolimpo.com/foro/topic/post-de-prueba
I would like to change topic for something else.
and
http://www.exolimpo.com/foro/forum/anime
I would also like to change Forum, since Foro already means forum in spanish.. so “Forum Forum” is reiterative.
If there’s a way to do this tell me, I don’t mind editing a little bit of code in the core, I just need a little bit of direction.
@Detective
Why not just edit the previous post? 5 minutes is within the default editing time limit.
Here is how to correctly install Avatar Upload.
The “Additional Info” is not too detailed.
Here is the instructions on how to get the plugin (currently) on your bbPress site:
1. Download and upload the plugin to your bbPlugins directory.
2. Activate the plugin in the bbPress Admin section.
3. Follow the file movement instructions:
In the “additional-files” folder (inside this Avatar Upload plugin directory) there is several files. These need to be moved elsewhere.
- Move the entire “avatars/” folder to your bbPress root directory. (Including the “default.png” inside.)
- Move the “avatar-upload.php” to the bbPress root directory.
- Move the “avatar.php” (inside the “my-templates” folder) to your template(s) (theme(s)). Example: Move “my-templates/avatar.php” to “forums/bb-templates/kakumei/” (So it is like “forums/bb-templates/kakumei/avatar.php”.)
I hope this helps someone
I’m using Tera-WURFL to detect whether my bbpress forum is being accessed by a mobile browser.
I also have a specific theme (1col_fixed, I think it’s called) that works very nicely in mobile browsers.
Now, what I want to do is to have bbpress use the 1col_fixed theme when a mobile browser is detected, and use my default theme otherwise. What function(s) do I call to set the currently activated theme to a different theme? And how do I make it ‘stick’ just for the mobile user — cookies? sessions?
Thanks so much if anyone can help me.
The filter will only be passed one argument by default, so you need to change your add_filter() call to this:
add_filter('get_user_profile_link', 'ss_get_user_profile_link', 10, 2);
.
The third parameter is the priority, the second is the number of arguments to pass.
I created a database with full privileges and a user on the host and then entered it into the script. I received a message saying there was a failure to connect to the database.
The user name and password fields were populated with the admin login and pass from my WordPress installation. I used that login and name to create a user for the database, and then I re-ran the script with the default entries. Still can’t connect.
Any help would be appreciated.
This was originally going to be an “It’s not working!” post, but I made some progress. Now it’s “Is what I did ok?” post.
I kept getting a”This Topic is Closed” error every time I tried to create a new topic. Traced it back to the insert statement in ‘bb_insert_topic’ in functions.php. The database was responding with the error of “The value ‘ ‘ is not a valid integer for column ‘topic_id’. (I am paraphrasing, I don’t have the exact response in front of me)
I suspected it had something to do with the fact that the topic_id value is being supplied to MySql, but it is set to be an auto-increment / not null field.
So, I commented out in the $default array definition in ‘bb_insert_topic’:
// 'topic_id' => false, // accepts ids or slugs
and I changed this line:
unset( $default, $defaults );
to this:
unset( $args, $defaults );
Did the same thing under the ‘bb_insert_post’ function in the same file, but for the ‘post_id’ variables.
Presto. Everything seems to work OK now.
Could this issue be specific to my version of MySql? Although it is strange, because the original query works just fine using a third party tool (SQLyog).
Has anyone encountered this issue before? Or – can anyone comment on the validity of my changes, and if they might cause issues going forward?
Finally – should this be logged as a bug?
Thanks!
WP 2.6, BB 1.0, IIS 6.
just checked the code and it seems to me that this function is not 100% fine:
function new_topic( $args = null ) {
$defaults = array( 'text' => __('Add New »'), 'forum' => 0, 'tag' => '' );
if ( $args && is_string($args) && false === strpos($args, '=') )
$args = array( 'text' => $args );
$args = wp_parse_args( $args, $defaults );
extract( $args, EXTR_SKIP );
if ( $forum && $forum = get_forum( $forum ) )
$url = get_forum_link( $forum->forum_id ) . '#postform';
elseif ( $tag && ( ( is_numeric($tag) && $tag = bb_get_tag( $tag ) ) || $tag = bb_get_tag_by_name( $tag ) ) )
$url = bb_get_tag_link( $tag->tag ) . '#postform';
elseif ( is_forum() || is_bb_tag() )
$url = '#postform';
elseif ( is_topic() )
$url = get_forum_link() . '#postform';
elseif ( is_front() )
$url = add_query_arg( 'new', '1', bb_get_option( 'uri' ) );
if ( !bb_is_user_logged_in() )
$url = add_query_arg( 're', urlencode($url), bb_get_option( 'uri' ) . 'bb-login.php' );
elseif ( is_forum() || is_topic() ) {
if ( !bb_current_user_can( 'write_topic', get_forum_id() ) )
return;
} else {
if ( !bb_current_user_can( 'write_topics' ) )
return;
}
if ( $url = attribute_escape( apply_filters( 'new_topic_url', $url ) ) )
echo "<a href='$url' class='new-topic'>$text</a>n";
}
this part is not good and result im some error:
elseif ( is_forum() || is_bb_tag() )
$url = '#postform';
what is your adbvice to fix that? rewriting the function / adding a filter as a kind of plugin?
I installed bbPress 0.9.0.2 and tried to integrate with WP 2.5 site. The two are at http://www.my-site/forum and http://www.mysite/blog under the root directory. I have two issues:
First is with permalinks set to the default (/forum.php?id=1), no problem, I can view profiles and posts within bbPress. However if I use either of the other settings for a permalink, when I click on any profile or post topic within admin control panel or site view, I only get a blank page, no error. Example: the post should be at “forum/post-name”, which is exactly where the link takes me but a blank page exists. However I can view the user profiles registered at bbPress within the WP admin area, so I believe the two are at least partially integrated.
The host is GoDaddy and there are no problems with WP permalinks. I have tried the using the following htaccess code with the /forum directory:
# BEGIN bbPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /forum/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /forum/index.php [L]
</IfModule>
Also just having one line:
Options +MultiViews
Also the exact code generated at bb-admin/rewrite-rules.php
Second issue is after login to bbPress, a simple link to the WP admin requests me to login again. Does this take more than a simple link to “…/blog/wp-admin/”? I have checked the cookies and both look identical.
Thanks for any help
Use the existing database, but be sure the table prefixes are different. By default WordPress uses wp_ and bbPress uses bb_ – those are safe. When you get into the installation, you will see a place where it asks what the WordPress table prefix is.
hi,
do they offer money back garanty?
I’m sure you get more trouble with them. A lot of default PHP function doesn’t work with them (I guess they have safe_mode = On)