Use:
overflow: auto
and max-height: 100%
to give it a nice scrollbar if it’s too big
That code seems to work fine here, what problems are you having? Apart from not having any limiter to keep it at 10 topics anyway.
I’m trying to show the last ten posts in my sidebar, but I am not entirely succeeding, what am I doing wrong? I thought I’d just need to adjust the code from latest discussion a bit. Obviously it doesn’t work like that.
<table class="recent_posts" cellspacing="0" width="100%">
<?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><?php bb_topic_labels(); ?> <a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
<td><small><a href="<?php topic_last_post_link(); ?>"><?php topic_time(); ?></a></small></td>
</tr>
<?php endforeach; endif; // $topics ?>
</table>
So how can I call the latest ten posts in the sidebar?
Try putting this in your stylesheet:
/* Tags */
#front-page #discussions {margin-left:inherit;width:inherit;}
div#viewdiv,div#hottags,div#topic-tags,p#post-form-tags-container{display:none;}
It hides the tag-related things in a basic Kakumei install
At the moment, I’m actually hardcoding the information for an event page, into a php file. It’s not the best solution ever, I knows.
I was hoping that someone here would want to code an events plugin.
Basically this is what I would like it to have or what I have in mind:
You browse to the section of the forums where it says “events”, you click create a new topic, then it will ask you to fill in the following fields:
Name of event
Date of event
Name of place
Address of place
Bands (since I run a music website)
Topic description
The output of this will be as you can see in the screenshot.
http://www.metalsuriname.com/images/event-plugin.png
I hope you get a bit what I want as a plugin.
I know I can’t ask for a plugin to be made working for my own website only, perhaps some section can be made optional (the band section, that could be custom?), apart from that, I think this plugin will be beneficial to a lot of users.
I really need this plugin, if you like you can add me on your gtalk.
navin.poeran@gmail.com is my email.
Is there any rule one can set in order to prevent the hottags to spill over the footer?
I have this into style.css
#front-page #hottags {
position: absolute;
top: 0;
left: 0;
width: 150px;
overflow: hidden;
}
but it does not seem to be enough: http://www.kirpi.it/r/page/2
delayedinsanity, Thanks a lot for the clarification. I found your response prompt & sane (unlike your name)
Hi,
I have some trouble with code posted without using backticks (i’m using a Geshi syntax plugin)
I noticed that the function “bb_autop” inside the file “functions.bb-formatting.php” adds new line characters before and after each html open/close tag (ul, li…). Responsible for this modification are these two rows:
$pee = preg_replace('!(<(?:ul|ol|li|blockquote|pre|p)[^>]*>)!', "n$1", $pee);
$pee = preg_replace('!(</(?:ul|ol|li|blockquote|pre|p)>)!', "$1n", $pee);
why is this replacement done?
The purpose of a plugin is to allow non expert people like myself to use all of their intelligence to figure out how to download such plugin and so they can make use of it and improve their user experience. It is not to pretend that there is a plugin by inserting code (which they wouldn’t have a clue how to do) in an already non compliant plugin and then search the internet and insert another item into the code of the non compliant plugin (with current version of the software) and hope it works.
I really do appreciate your help and guidance and suggestions, but I am a layman when it comes to computers and when I am looking for a plugin, I am really looking for a plugin and something that I can just download and have work.
Wow, it worked.
This is the code I used:
<?php if (get_forum_id() == 29): ?>
<?php bb_load_template('filename.php');?>
<?php endif; ?>
https://codex.wordpress.org/I18n_for_WordPress_Developers
Same concept for bbPress. You could make all those plain text if you like, they’re built that way by default for people who need to translate their sites.
bb_new_topic_link('your text here');
okay, so I figured out that “<?php bb_new_topic_link(); ?>” creates a hyperlink that says “add new >” linking to the place to start a new topic.
How can I customize that text? ie – what’s the php for just the link, so I can say:
<a href="THE LINK">something else<?a>
So, I’m learning how to hack around these bbpress themes pretty nicely, but sometimes the php confounds me. For example, here’ some code from a basic front page:
<th><?php _e('Posts'); ?></th>
<th><?php _e('Last Poster'); ?></th>
<th><?php _e('Freshness'); ?></th>
Simple table headers, but what’s the point of the php? Why don’t I just slap the words in there exactly how I want it? Isn’t this just churning resources? Why wouldn’t I just do this:
<th>Posts</th>
<th>Last Poster</th>
<th>Freshness</th>
Thanks!
Trick is for bbPress functions, half of them are WordPress functions, just sometimes with bb_ on the front, so they behave essentially the same. A fair few others are just aliases to return data instead of outputting it (i.e. get_forum_link vs. forum_link). Beyond that though, yeah it’s all pretty undocumented, but it’s usually relatively obvious from the name and parameters it takes.
I’d love to be able to help right a bbPress Codex mind you…
I noticed this situation as well, though I haven’t had time to look fully into it – it seemed that a new user when signed up was automatically set to inactive, but upon logging in, or posting, they became active. I’ll have to check further when I get the chance to see if this is a ‘problem’ or just a ‘feature’.
get_forum_id()
ie;
<?php if (get_forum_id() == 12): ?>
text block
<?php endif; ?>
A lot of these functions aren’t nearly as well documented as WordPress’ own similar functions, but can all be found inside of bb-includes/functions.bb-template.php
@gouri, bbpress is standalone software that is meant to run by itself, or alongside practically anything you choose. In the case of deep integration, if that’s your plan, yes it will work on either WordPress.org or WordPress µ
function login_form() {
if ( bb_is_user_logged_in() )
bb_load_template( 'logged-in.php' );
else
bb_load_template( 'login-form.php', array('user_login', 'remember_checked', 'redirect_to', 're') );
}
I would really love to know the 2nd option, so i can place that code in my forum.php
it would be nice to display a block of text when users visit some sections of my forum.
but im not so good with statements, can u code an example?
Slight difference between bb_load_template()
and include()
, bb_load_template()
can take as it’s 2nd argument an array of containing the names of variables to be used as globals within the template, whereas using include()
the included file just inherits all the global variables from the parent.
delayedinsanity, you beauty. As far as I can see, this is the problem. I switched to using wp-load.php and the status in the header is 202 without my hack. What’s more, it corrects this issue:
https://bbpress.org/forums/topic/wpmu-284a-deep-integration-breaks-rss-feed
Many thanks.
So to sum it up. I was previously doing the following in bb-config.php for deep integration:
require_once('/var/www/vhosts/youlookfab.com/httpdocs/wp-blog-header.php');
But it broke RSS feeds and put 404 headers in my forum pages. The following seems to solve both issues:
require_once('/var/www/vhosts/youlookfab.com/httpdocs/wp-load.php');
I’m running a forum, which has a sidebar on the left, it was a pain to edit that sidebar, so I tried some including today.
If you want to including a file in to your forum, use this code:
<?php bb_load_template(‘sidebar.php’);?>
Add that sidebar.php or whatever you want to call it in your template folder.
It works similar like the one we are used to using for WordPress:
<?php include(TEMPLATEPATH.”/sidebar.php”);?>
Glad to see what I am saying confirmed with independent realworld proof.
Pleased to be of service. 
BTW, just how big is your site that you require multiple db servers?
I don’t know of a single WordPress+bbPress install, other than Automattic’s that are using multiple db servers.
(unless of course you are running other apps that have heavy db use or maybe for backup replication)
It’s more for redundancy than anything else, although before we got opcode caching in and had optimised some plugins involved we were catching traffic surges when our client tweeted new posts that were making us very very glad we had that much capacity.