Try:
if ( $topics = get_latest_topics('exclude=8,7', $page) )
but I’m not sure that this will function.
on index.php get_latest_topics(‘exclude=id_of_the_controversial_forum’);
Ok, so I changed the line to be this:
if ( $topics = get_latest_topics(‘exclude=8’, $page) ) {
How do I make it exclude more than one forum?
Say, don’t want forum game threads showing up, so I’d block 7 also…
Anonymous UserInactive
Hi gerikg,
I will test it tomorrow on my new server (playground for bbPress, Plugins, Themes) …
Markus
Okay here is the update:
I created discussion.php and put it in root. In the file I put…
<?php
require('./bb-load.php');
bb_repermalink();
$bb_db_override = false;
do_action( 'bb_index.php_pre_db' );
if ( isset($_GET['new']) && '1' == $_GET['new'] ) :
$forums = false;
elseif ( !$bb_db_override ) :
$forums = bb_get_forums(); // Comment to hide forums
if ( $topics = get_latest_topics( false, $page ) ) {
bb_cache_last_posts( $topics );
}
if ( $super_stickies = get_sticky_topics() ) {
bb_cache_last_posts( $super_stickies );
}
endif;
bb_load_template( 'discussion.php', array('bb_db_override', 'super_stickies') );
?>
It’s the same as index.php except for the last line I put discussion.php
Then I created the template file discussion.php. I put in the file:
<?php bb_get_header(); ?>
<?php if ( $forums ) : ?>
<div id="discussions">
<?php if ( $topics || $super_stickies ) : ?>
<h2><?php _e('Latest Discussions'); ?></h2>
<table id="latest">
<tr>
<th><?php _e('Topic'); ?> — <?php bb_new_topic_link(); ?></th>
<th><?php _e('Posts'); ?></th>
<!-- <th><?php _e('Voices'); ?></th> -->
<th><?php _e('Last Poster'); ?></th>
<th><?php _e('Freshness'); ?></th>
</tr>
<?php if ( $super_stickies ) : foreach ( $super_stickies as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><?php bb_topic_labels(); ?> <big><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></big><?php topic_page_links(); ?></td>
<td class="num"><?php topic_posts(); ?></td>
<!-- <td class="num"><?php bb_topic_voices(); ?></td> -->
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><a href="<?php topic_last_post_link(); ?>"><?php topic_time(); ?></a></td>
</tr>
<?php endforeach; endif; // $super_stickies ?>
<?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><?php topic_page_links(); ?></td>
<td class="num"><?php topic_posts(); ?></td>
<!-- <td class="num"><?php bb_topic_voices(); ?></td> -->
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><a href="<?php topic_last_post_link(); ?>"><?php topic_time(); ?></a></td>
</tr>
<?php endforeach; endif; // $topics ?>
</table>
<?php bb_latest_topics_pages( array( 'before' => '<div class="nav">', 'after' => '</div>' ) ); ?>
<?php endif; // $topics or $super_stickies ?>
</div>
<?php else : // $forums ?>
<div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php _e('Add New Topic'); ?></div>
<?php post_form(); endif; // $forums ?>
<?php bb_get_footer(); ?>
Now bb_new_topic_link() & topic_class() for sticky does not work.
Any way to do it via plugin folder, functions.php, or theme folder without putting the file in the root? If bbpress upgrades (don’t laugh too hard) I will forget about it.
Hi Chris
It would be the latest version of bbpres – I downloaded 1 April (note that there seems to be nothing in the download that tells you what version you have – this should be remedied. In fact, I cannot find any ‘Read Me’ file either).
I FTPed the files. Ansers to your other questions are –
Red Hat Enterprise Linux Server release 5.4 (Tikanga
Server version: Apache/2.2.11 (Unix)
However, the php version is PHP 5.2.9 (cli) (built: Jun 21 2009 – is this a problem that it is not 5.3.x?
Maybe I should just re-download and re-install?
Look forward to your advice.
Regards
Derek
Anonymous UserInactive
Hi gerikg,
this post could help you:
https://bbpress.org/forums/topic/create-a-new-custom-page-like-wordpress
1. Make a custom page
create a page discussion.php in the root forum folder
add require_once(‘./bb-load.php’); on the top of the page. and write whatever code you want in the page.. that should create a static page with bbpress functions..
2. Put in the code for the Latest discussions from the main page (?)
or
3. Make your own sql query – https://bbpress.org/forums/topic/create-a-new-custom-page-like-wordpress
Markus
How do I make Latest Discussion on it’s own page?
I suppose you could do the complete noob thing and say:
<?php if (bb_get_forum_is_category()) {
continue;
}
else {
// do something
}
?>
Unless I am completely missing your point and this is some sort of test
And for the time being, there’s no need to create a fork. Just create new tickets, contribute patches and after testing, chrishajer might commit them.
I think I might have broken something when setting up bbPress. I wanted it integrated with my wordpress site. While installing, when it asked for the username for the “Key Master” I put in Murgy, which is my WordPress admin name. Anyway, I went through the rest of the installation, integrations, etc. But now, when I log into WordPress, it logs me out of bbPress, and when I log into bbPress it logs me out of WordPress, so… I’m thinking that naming the initial Key Master the same as my WP admin name maybe wasn’t the smartest idea.
But anyway. Is there any way to fix this, or should I reinstall or something?
A PHP warning should cause the site to not load (it’s just a warning, not an error.)
Is the wp-load.php actually available where you say it is in the include statement?
Also, does including it near the top of bb-config.php change the error at all? (I usually see it near the top, not the bottom.)
Finally, can you use the include_once function to include some other random file in the current directory? Just create a file like test.php with nothing in it other than <?php /* */ ?> and then try to include that to see if the php function is actually working or if there is maybe some server security interfering.
Anonymous UserInactive
Hi gerikg,
can you post a link to your forum? Evtl. we can test it together.
On my forum i have at first also a blank page – there it was a problem with two plugins (one in bbPress, one in WordPress).
Markus
When I do the deep integration it works find but two people already came to me and said it makes the page blank. How does one troubleshoot this problem? I’m assuming they are using the steps on my website so the steps are the same. They are both pulling wp-load.php. WP 2.6.3 and latest bbp.
Try the Easy Video Embed plugin https://bbpress.org/plugins/topic/easy-video-embed/
It enabled embedding videos like YouTube, Vimeo, Revver and others in bbPress 1.02, the latest version. Works in Firefox and IE. It is a new plugin, you can find it on the main page of the plugins list.
Anonymous UserInactive
Hi Bradcarters,
i don’t think this is the best solution to fix the original problem. It is just a “dirty” workaround. For me it seems to work.
But you can wait for the test and the answer from gerikg.
Markus
I just committed that patch, so the fix should be evident here within 24 hrs. Please test and report back.
thanks chris.
I’m on a linux server. Like I said before, I’ve tested the problem with a blank template and zero activated plugins it still happened.
it seems like it would be closest to this problem https://trac.bbpress.org/ticket/1090 – although that trac has been marked as a duplicate with 1150, they seem to be separate problems to me. But you never know!
Do you know what the correct url format for a undeleting should be? Is my forum directing me incorrectly, is delete-topic.php failing, or is my server not carrying through the command?
Hi! After 3 hours of brute-force testing, I found a working configuration:
# BEGIN bbPress
Options -MultiViews
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /forum/
#handle admin stuff
RewriteRule ^bb-admin/.*$ - [L,QSA]
# handle the rest
RewriteRule ^page/([0-9]+)/?$ ?page=$1 [L,QSA]
RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ profile.php?id=$1&page=$2 [L,QSA]
RewriteRule ^profile/([^/]+)/([^/]+)/?$ profile.php?id=$1&tab=$2 [L,QSA]
RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ profile.php?id=$1&tab=$2&page=$3 [L,QSA]
RewriteRule ^profile/([^/]+)/?$ profile.php?id=$1 [L,QSA]
RewriteRule ^profile/?$ profile.php [L,QSA]
RewriteRule ^rss/?$ rss.php [L,QSA]
RewriteRule ^rss/topics/?$ rss.php?topics=1 [L,QSA]
RewriteRule ^rss/forum/([^/]+)/?$ rss.php?forum=$1 [L,QSA]
RewriteRule ^rss/forum/([^/]+)/topics/?$ rss.php?forum=$1&topics=1 [L,QSA]
RewriteRule ^rss/topic/([^/]+)/?$ rss.php?topic=$1 [L,QSA]
RewriteRule ^rss/tags/([^/]+)/?$ rss.php?tag=$1 [L,QSA]
RewriteRule ^rss/tags/([^/]+)/topics/?$ rss.php?tag=$1&topics=1 [L,QSA]
RewriteRule ^rss/profile/([^/]+)/?$ rss.php?profile=$1 [L,QSA]
RewriteRule ^rss/view/([^/]+)/?$ rss.php?view=$1 [L,QSA]
RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ tags.php?tag=$1&page=$2 [L,QSA]
RewriteRule ^tags/([^/]+)/?$ tags.php?tag=$1 [L,QSA]
RewriteRule ^tags/?$ tags.php [L,QSA]
RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ view.php?view=$1&page=$2 [L,QSA]
RewriteRule ^view/([^/]+)/?$ view.php?view=$1 [L,QSA]
# handle forums
RewriteRule ^([^/]+)/page/([0-9]+)/?$ forum.php?id=$1&page=$2 [L,QSA]
RewriteRule ^([^/]+)/$ forum.php?id=$1 [L,QSA] # no '?' before the closing '$' this time: very important!
# handle topics
RewriteRule ^([^/]+)/([^/]+)/page/([0-9]+)/?$ topic.php?id=$2&page=$3 [L,QSA]
RewriteRule ^([^/]+)/([^/]+)/$ topic.php?id=$2 [L,QSA] # no '?' before the closing '$' this time: very important!
# handle non-existent pages
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php [L]
</IfModule>
# END bbPress
I realized I was not upgraded to the latest version. I followed the instructions as identified on the site and got this:
An invalid configuration file was found at bb-config.php
The installation cannot continue.
Usually this is caused by one of the database connection settings being incorrect. Make sure that the specified user has appropriate permission to access the database.
Any insight? Thanks in advance!
A “Thesis page” is just like any other html/php/css WP page except that it uses Thesis Hooks, which is the framework Chris Pearson created to sit on top of WP and is far more efficient than the underlying WP code. It looks like this…
<?php
// Using hooks is absolutely the smartest, most bulletproof way to implement things like plugins,
// custom design elements, and ads. You can add your hook calls below, and they should take the
// following form:
// add_action('thesis_hook_name', 'function_name');
// The function you name above will run at the location of the specified hook. The example
// hook below demonstrates how you can insert Thesis' default recent posts widget above
// the content in Sidebar 1:
// add_action('thesis_hook_before_sidebar_1', 'thesis_widget_recent_posts');
/**
* function custom_bookmark_links() - outputs an HTML list of bookmarking links
* NOTE: This only works when called from inside the WordPress loop!
* SECOND NOTE: This is really just a sample function to show you how to use custom functions!
*
* @since 1.0
* @global object $post
*/
function custom_bookmark_links() {
global $post;
?>
<ul class="bookmark_links">
<li><a rel="nofollow">&title=<?php urlencode(the_title()); ?>" onclick="window.open('http://delicious.com/save?v=5&noui&jump=close&url=<?php urlencode(the_permalink()); ?>&title=<?php urlencode(the_title()); ?>', 'delicious', 'toolbar=no,width=550,height=550'); return false;" title="Bookmark this post on del.icio.us">Bookmark this article on Delicious</a></li>
<?php
}
Thesis is on one level, just an additional library of high level functions, and at another, its an incredibly easy way to design and manipulate your theme/template. The structure of the framework and the finished theme it provides also happen to be presented in a very SEO conscious way, which is obviously a big selling point.
What I would really like to see is a BBPress Template written for Thesis. Hmmm. I wonder. How hard can that be?
r2417 is the very latest trunk in the 1.0 series. Actually, Matt tagged it 1.1-alpha about 3 months ago. It’s essentially 1.0.2 with bug fixes, PLUS subscribe to topic and login-less posting added. Not much else. It’s probably as safe to run as 1.0.2 right now.
PubDirLtd, the issue you describe with missing thumbnails and missing CSS used to be caused by improper permissions on the my-templates folder (and my-plugins folder has the same problem, but is not causing this symptom for you.) The permissions should be 0755, not 0750. The directories used to get created with 750 permissions, but I thought a clean install of 1.1-alpha should create the directories with the proper permissions. Did you upgrade a 1.0.2 or older installation, or install the latest r2417 using SVN?
In any case, changing the permissions on the my-templates directory to 755 should take care of the missing thumbnails issue and other theme-related issues you’re having.
Actually, it is that one – 2417. I used the latest SVN version, which calls itself 1.1-alpha, unless that’s a mistake.