Search Results for 'code'
-
AuthorSearch Results
-
April 17, 2010 at 1:26 am #86957
In reply to: How do I exclude a category from the front page?
master5o1
ParticipantStill not sure how
April 16, 2010 at 4:37 pm #86955In reply to: How do I exclude a category from the front page?
zaerl
ParticipantSo you must manually change the loop the you will find in the template file
front-page.php.April 16, 2010 at 3:55 pm #87000In reply to: How do I add a topic author to the front page list?
zaerl
ParticipantYou have to manually modify the template file
front-page.phpline 20.April 16, 2010 at 9:05 am #86931In reply to: bbPress loop help
driz
MemberLooks like some of that code could be useful. I’m not a PHP whizz though. Would you or anyone else be able to help me *rewrite* it to what I am wanting to do above?
Much appreciated.
April 16, 2010 at 6:16 am #86985In reply to: Put PHP together
chrishajer
ParticipantDo you want to echo the $page if ANY of them are true? So, an OR statement?
<?php if ($page>1 && (is_front() || is_topic() || is_forum())) echo " page $page"; ?>That should do it, unless I misunderstood your problem.
April 16, 2010 at 4:17 am #86909In reply to: Latest Discussion Page
gerikg
MemberOkay 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.
April 15, 2010 at 11:55 pm #86904In reply to: If forum is NOT category
psycheangels
Memberhmm maybe you can make a condition that check if there is no parent category in that forum (by depth). i think i have seen the code for your problem in this forum but i forgot to bookmark it
April 15, 2010 at 11:52 pm #86930In reply to: bbPress loop help
psycheangels
Membermaybe this will help ?
https://bbpress.org/forums/topic/nested-topic-list-code-snippet
April 15, 2010 at 9:08 pm #86936In reply to: posts per page setting
Anonymous User
Inactiveok
– I see – this is the standard settings for topics, posts and tags.With the plugin from _ck_ it is possible to set different count limits for nearly every bbPress page:
- front-page
- forum-page
- topic-page
- view-page
- tag-page
- tag-page
- search-page
- feed-page
- profile-page
- favorites-page
- stats-page
Markus
April 15, 2010 at 8:29 pm #86928In reply to: bbPress loop help
driz
MemberOkay here is how I want it to work:
<?php if ( bb_forums() ) : ?>
<!-- FOR EACH TOP LEVEL CATEGORY BUILD A DIV WITH A H3 AND OL -->
<?php while ( bb_forum() ) : ?>
<div class="box">
<?php if (bb_get_forum_is_category()) : ?>
<h3><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a></h3>
<?php endif; ?>
<ol>
<!-- FOR EACH FORUM BUILD A LI (only show top level children not children within those) -->
<li class="arrow f_unread">
<a href="<?php forum_link(); ?>">
<strong><?php forum_name(); ?></strong><br />
<?php forum_topics(); ?> Topics / <?php forum_posts(); ?> Replies
</a>
</li>
</ol>
</div>
<?php endwhile; ?>
<?php endif; // bb_forums() ?>I only want top level cats and forums to show on the front page, clicking on those will show the sub-forums when you view in the individual forums.
Can anyone help?
April 15, 2010 at 1:25 pm #85630In reply to: Name based permalinks without page/ and forums/
mr_pelle
ParticipantNo answer, so I made a plugin upload request today: “Nicer Permalinks” will be online soon!
April 15, 2010 at 12:34 pm #86926In reply to: bbPress loop help
driz
MemberOkay changed all forums to have cats, but I need each block of forums with a cat to have this setup:
<div class="box">
<h3>CAT</h3>
<ol>
<li>Forum</li>
<li>Forum</li>
</ol>
</div>At the moment it’s repeating the div and ol for each forum and not containing the forums within a cat inside just one div and ol.
ALSO
But because I have categories within categories it will become messy nested. So I only want to show top level forums and not the sub-forums/cats within.
April 15, 2010 at 11:56 am #34008Topic: bbPress loop help
in forum Troubleshootingdriz
MemberHi I have the following code:
<?php if ( bb_forums() ) : ?>
<?php while ( bb_forum() ) : ?>
<div class="box">
<?php if (bb_get_forum_is_category()) : ?>
<h3><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a></h3>
<?php continue; endif; ?>
<ol>
<li class="arrow f_unread">
<a href="<?php forum_link(); ?>">
<strong><?php forum_name(); ?></strong><br />
<?php forum_topics(); ?> Topics / <?php forum_posts(); ?> Replies
</a>
</li>
</ol>
</div>
<?php endwhile; ?>
<?php endif; // bb_forums() ?>Struggling to get it to work how I want which is basically like this:
for each category do this:
<div class="box">
<h3>CAT</h3>
<ol>
<li>Forum</li>
<li>Forum</li>
</ol>
</div>so that div should be repeated for each block. if a set of forums has not category, then all of the code would be above would run but just no h3.
so an example might look like this:
<div class="box">
<h3>CAT</h3>
<ol>
<li>Forum</li>
<li>Forum</li>
</ol>
</div>
<div class="box">
<h3>CAT</h3>
<ol>
<li>Forum</li>
<li>Forum</li>
</ol>
</div>
<div class="box">
<ol>
<li>Forum</li>
<li>Forum</li>
<li>Forum</li>
<li>Forum</li>
</ol>
</div>
<div class="box">
<ol>
<li>Forum</li>
<li>Forum</li>
<li>Forum</li>
<li>Forum</li>
</ol>
</div>can anyone help thanks.
April 15, 2010 at 8:12 am #86791In reply to: bbPress as standalone project (as fork)
Anonymous User
InactiveHi Chris,
thanks for your answer. So I only continue to help here in the forum.

Markus
April 15, 2010 at 6:32 am #86907In reply to: Latest Discussion Page
Anonymous User
InactiveHi 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
April 15, 2010 at 1:03 am #34004Topic: Password Security – brute force attack
in forum Installationmissie_20
MemberHi all
Has anyone come across a fix for bbPress inregards to brute force attacks on passwords?
A brute force attack allows a user to attempt to login to the application with a valid user account using a dictionary of words for the password without the account being locked out.
bbPress allows multipul attempts at password entry without locking the user out. This means that someone can use a application to hack into a users account.
Has anyone made a fix/ plugin for this? Or know a way of solving this?
Help/ thoughts would be greatly appreciated!
April 14, 2010 at 11:52 pm #86897In reply to: If forum is NOT category
gerikg
Member<?php if (bb_get_forum_is_category()) {; ?>
<table id="forumlist">
<tr<?php bb_forum_class('bb-category'); ?>>
<td colspan="4" class="cattile"><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?></td>
</tr>
<tr>
<th colspan="2"><?php _e('Main Theme'); ?></th>
<th><?php _e('Topics'); ?></th>
<th><?php _e('Posts'); ?></th>
</tr>
<?php } else { ?>
<table id="forumlist">
<tr>
<th colspan="2"><?php _e('Main Theme'); ?></th>
<th><?php _e('Topics'); ?></th>
<th><?php _e('Posts'); ?></th>
</tr>
<?php };?>
<?php continue; endif; ?>I can’t get it right..
April 14, 2010 at 11:36 pm #86896In reply to: If forum is NOT category
chrishajer
ParticipantI 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
April 14, 2010 at 11:35 pm #86895In reply to: If forum is NOT category
chrishajer
ParticipantIs it as simple as:
<?php if ( !bb_get_forum_is_category() ) {
// whatever
?>April 14, 2010 at 8:42 pm #86856gerikg
MemberAdd
AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4to your .htacess file. By default GoDaddy uses php4
bah I should add pictures to my tutorial!
April 14, 2010 at 7:10 pm #86787In reply to: bbPress as standalone project (as fork)
Anonymous User
InactiveHi chris,
thanks for your long post. It’s great to have you here as moderator

Honestly though, we have bigger problems than just putting a fresh face on the bbPress.org website. That would be the least of my concerns.
I can understand thoughs – although I’ve made a post about the “fresh face” just minutes ago. After using bbPress more than a year I believe in the future of this project.
And I will contribute – where I can help. 
For my thoughts … there should be a defined project team to coordinate the next steps. The weekly IRC meetups in December and January were the right way. To define a document team was also great. But after three months there are only you and Gautam “driving” the project.
Markus
April 14, 2010 at 6:55 pm #86786In reply to: bbPress as standalone project (as fork)
jurasiks
ParticipantI no need access. I need people who have access.
Matt left project (as u mentioned) and keep people with access. But this people left project too?
p.s. i added ps before u left comment)
p.p.s i don’t want fork good engine before it will become “another wp-plugin” – if you no need our help – it’s ok. just say
April 14, 2010 at 6:51 pm #86784In reply to: bbPress as standalone project (as fork)
chrishajer
ParticipantbbPress.org is just a WordPress site with a bbPress installation. You have everything you need in the bbPress releases to create your own fork or distribution or CMS engine. Why would you need FTP/DB access to create a project like that? All you need is the bbPress code right?
The person who has access to the database and FTP or server is Matt, or someone who works for him. I believe you’ve already gotten in contact with him.
April 14, 2010 at 6:44 pm #86783In reply to: bbPress as standalone project (as fork)
jurasiks
Participanti really have idea to fork bbPress and clean wp code out of him when i heard that bbPress will become a WP plugin,
next somebody (maybe Gautam) said that before some version bbPress stays standalone…
really, it’s no reason to make fork, best way to make new simple-forum(cms) engine with my friends, but…
if you have here “dedicated” community and wants some help from me and another people… no reason to blame me (man who wants make wiki about bbpress and help with project) or calling me a troll. thank you.
we need to find admin (with full FTP/DB access) of bbPress.org
that’s what i’m doing past week.
only with him we can make future of bbPress engine
p.s. very strange that people who develop bbPress dont know answer on this simple question?
April 14, 2010 at 6:36 pm #86781In reply to: bbPress as standalone project (as fork)
chrishajer
ParticipantI believe I am an editor at the bbPress.org WordPress blog. That means I don’t have access to the Appearance tab (to change themes) or to Plugins or Settings. I have access to Pages and Posts so I can made additions or modifications to content there, but I can’t change the design or anything like that.
Honestly though, we have bigger problems than just putting a fresh face on the bbPress.org website. That would be the least of my concerns.
Yury, if you’re not seriously talking about creating a fork, but gave this topic a title like that “to get people’s attention” then you’re trolling, which is not productive.
Right now, we have the bbPress.org forums, which are moderated daily by me. I help out with solutions where I can, or try to pull information out of users who post of problems with very few details, to possibly help some other thoughtful soul who might come along and be able to help.
I don’t touch integration problems at all (“when I log in to bbPress, I am automatically logged out of WordPress” anyone?) because integration is far too complicated with too much voodoo required (PHP5? 777 permissions? pasting in keys and cookie domains that may or may not make a difference?) for someone who just wants to install a forum where their WordPress users can be logged in automatically. For that reason, and a couple others (functional integration [ability to use things like wp_list_pages()] and theme integration (“I want my bbPress to just be a page inside my WordPress site” or “how do I make bbPress look like my WordPress theme?”)) I support the decision to make bbPress a WordPress plugin.
Honestly though, I’m not sure how that will work with custom post types coming in 3.0. Justin Tadlock was playing with an idea that used custom post types to create a forum structure, and it looked pretty neat. He lost that work in a hard drive crash or something, but he mentioned it didn’t take long to do.
http://www.wptavern.com/forum/bbpress/1437-bbpress-off.html#post13939
http://twitter.com/justintadlock/status/10849352003
For those who want bbPress as standalone, please feel free to download the versions that exist right now. Download them daily, in case development ceases at some point. Right now, we’re continuing to fix bugs in the existing versions. After all the bugs are fixed
it’s anyone’s guess what will happen.And with a fork of bbPress you’d arguably have more control (heck, you can fork it now with one of the existing versions, create your own website and distribute the software) but you’d be hard pressed to match the community we have here. It may not be big, but it’s dedicated, and if you’re interested in seeing bbPress continue this is the best place to be.
-
AuthorSearch Results