Forum Replies Created
-
In reply to: HTML in Topics.
It’s possible with this plugin:
https://bbpress.org/plugins/topic/admin-can-post-anything/
Thanks to CK
Actually I don’t. I tried your code, but its still showing the same.
How exactly can I exclude some forums for showing up in this code, that generates a list of forums, or rather, HOW can i show only selected forums?
<?php if ( $topic ) : ?>
<h2>Forum List</h2>
<ul>
<?php
global $bbdb;
$query="SELECT * FROM bb_forums WHERE topics!=0 ORDER BY forum_order ASC LIMIT 10";
$results=$bbdb->get_results($query);
foreach ($results as $result) {
echo "<li><a href='/forum.php?id=".$result->forum_id."'>".$result->forum_name."</a></li>";
}
?>
</ul>
<?php endif; ?>In reply to: How to Show Last Ten Posts in Sidebar?Yeah, it has some very AWESOME code in there, this code generates a list of topics that was active as last:
<?php if ( bb_forums() ) : ?>
<h3>Actieve onderwerpen</h3>
<ul style="color:#bbb;">
<?php
global $bbdb;
$query="SELECT * FROM bb_topics WHERE topic_status=0 ORDER BY topic_time DESC LIMIT 5";
$results=$bbdb->get_results($query);
foreach ($results as $result) {
echo "
- topic_id."'>".$result->topic_title." (".$result->topic_posts.")
";
}
?>
<?php endif; ?>
I did some adjustment in the code, to make it work. SWEET.
But not really what I was looking for, but o well.
In reply to: How to Show Last Ten Posts in Sidebar?Like?
In reply to: How to Show Last Ten Posts in Sidebar?i tried this code as well, to generate a list of 10 last topics in my sidebar. But its not showing any topics at all.
In reply to: Thanks for everything, Sam!I really don’t hope that too.
Wow, really hope development doesn't stop on bbPress.
In reply to: Advanced 301 techniqueThank you.
In reply to: bbPress Codex – lolzI think it’s very cool, I love it.
In reply to: Usability ideasThe second thing would be an easier integration of wordpress themes.
This is more the back-end, I aiming more at the front-end.
In reply to: Limit page views for guestsYeah, but how?
In reply to: Limit page views for guestsThanks Olaf, gonna try both today.
In reply to: Usability ideasI was thinking about adding the register form, right below the reply button for visitors who are not logged in.
In reply to: Adding Images to a Topic.I couldn’t find the plugin, but you can’t download it from this website, just search for a plugin called “Allow images”
In reply to: Adding Images to a Topic.Copy and paste this code and save it as allow-images.php
<?php
/*
Plugin Name: Allow Images
Plugin URI: https://bbpress.org/#
Description: Allows <img /> tags to be posted in your forums. The image must be a png, gif or jpeg.
Author: Michael D Adams
Author URI: http://blogwaffe.com/
Version: 0.7.1
*/
// You can add more tags here
function allow_images_allowed_tags( $tags ) {
$tags = array(‘src’ => array(), ‘title’ => array(), ‘alt’ => array());
return $tags;
}
function allow_images_encode_bad( $text ) {
$text = wp_specialchars( $text );
$text = preg_replace(‘|
|’, ‘
‘, $text);foreach ( bb_allowed_tags() as $tag => $args ) {
if ( ‘br’ == $tag )
continue;
if ( $args )
$text = preg_replace(“|<(/?$tag.*?)>|”, ‘<$1>’, $text);
else
$text = preg_replace(“|<(/?$tag)>|”, ‘<$1>’, $text);
}
$text = preg_replace(“|
(.*?)
|se”, “‘' . encodeit('$1') . '
‘”, $text);return $text;
}
function allow_images( $text ) {
if ( preg_match_all(‘/<img(.+?)src=(“|’)(.+?)\2(.+?)>/i’, $text, $matches, PREG_SET_ORDER ) )
foreach( $matches as $match )
if (
preg_match(‘/src=/i’, $match[4]) // multiple src = someone’s trying to cheat
||
!in_array(substr($match[3], -4), array(‘.png’, ‘.jpg’, ‘.gif’)) // only match .jpg, .gif, .png
&&
‘.jpeg’ != substr($match[3], -5) // and .jpeg
)
$text = str_replace($match[0], ”, $text);
return $text;
}
remove_filter( ‘pre_post’, ‘encode_bad’ );
add_filter( ‘pre_post’, ‘allow_images_encode_bad’, 9 );
add_filter( ‘pre_post’, ‘allow_images’, 52 );
add_filter( ‘bb_allowed_tags’, ‘allow_images_allowed_tags’ );
?>
Upload it to your my-plugins folder, create if it doesn’t exist. And activate it.
In reply to: Adding themes to bbPress.Unzip and upload it to your bb-templates folder, login as admin and go to Appearance, there you will see all your uploaded themes, click to activate.
In reply to: Combined Register + PostI think this is a very nice idea, it makes it more interesting for users to want to participate. The easier it is to register + leave a reply, the more interesting.
In reply to: making a link to /members/$usernameI thought the default Kakumei already had this
In reply to: Customizing Profile FieldsI’m sure it has to do with if and else things but how to code it
In reply to: Customizing Profile FieldsI mean, i just want two fields during the registration, but the user should have the option to edit their profile and add more info, like interest, website etc.
i tried this plugin, and it removes the extra fields during the registration, which is great, but the problem is, there is no way you can add more info to your profile, since the fields are disabled by this plugin.
In reply to: Customizing Profile FieldsIt’s working, but how to hide the fields during the registration? Leaving only the required ones.
In reply to: Events plugin neededToo bad.
Just so you know, I’m not using WordPress. It’s just bbPress only.
In reply to: Storee Board – a different kind of forumIt’s looking good.
In reply to: How to Show Last Ten Posts in Sidebar?You mean the last 10 replies?
In reply to: How-to list new members / usersI don’t think there is a plugin that only shows newest members, there is one plugin though that generates a lot of useful information about your forum.
I think this plugin might help you:
https://bbpress.org/plugins/topic/my-views/
Maybe you can find a way to pull the data it generates and insert it wherever you want it.