Search Results for 'code'
-
AuthorSearch Results
-
December 16, 2008 at 11:28 pm #70244
ganzua
MemberSorry, I answer to my own quistion;
After deep integration bbpress uses wp language file, I just cheked it. I think this way is better because then you don’t need to load two language files.
December 16, 2008 at 11:20 pm #70243ganzua
MemberOk, thanks

and does bbpress use wp language file or do you need to have a separated .mo for bbpress? if so, inside what folder? bb-includes/languages?
December 16, 2008 at 11:09 pm #69590In reply to: WordPress and BBPress Theme
lolos
MemberImmeldoy, can you upload your theme and send me the link please?
I want to do the same thing and tried to do everything but I keep failing! I just want to have bbpress inside my word press theme! Is that a hard thing to accomplish?!!!
December 16, 2008 at 10:34 pm #70191In reply to: Installation Complete…BUT…Forum “Page Not Found”
chrishajer
ParticipantI’ve been working with Brad to help resolve this. We’ve finally made some progress.
1. We needed to use the iis_fix plugin from _ck_. Otherwise, any page other than the first page just gets stuck in a reloading loop. Installing this plugin, as an autoload plugin or manually activated plugin, takes care of that problem.
2. When the index.php file is renamed to default.php, the site works fine. When it’s left named index.php, the forum comes up as a 404 error for the front page of the forum only. You can access other pages directly, by adding to the URL. But if you try to load http://www.beardownarizona.com/forums/ or http://www.beardownarizona.com/forums/index.php you get a 404 error. If you rename index.php to default.php, http://www.beardownarizona.com/forums/ loads the front page of the forum just fine.
GoDaddy serves the DirectoryIndex file in this order:
http://help.godaddy.com/article/61
So renaming index.php to default.php (or even leaving index.php there and just copying it to a file called default.php) works just fine.
I also found, with the plugin installed, and this line commented out in index.php, that index.php works fine, and the forums will also load fine when accessed at http://www.beardownarizona.com/forums/ .
/* bb_repermalink(); */So long as that function is not called in the index.php, index.php works just fine on this server.
So, here are the questions:
1. will bbPress work OK without an index.php and just a default.php being the DirectoryIndex file? (it seems to be fine)
2. can the
bb_repermalink();line be commented out in index.php if the site is not using permalinks? Would commenting it out affect anything else negatively?3. What does that function do that would cause the index.php file to come up as a 404 when it’s clearly there? It’s almost like it’s trying to load index.php, index.php says “rewrite the URL to {something else}” then it fails to find index.php.
Any thoughts? Thanks.
December 16, 2008 at 9:43 pm #70237In reply to: Will a template engine be used (e.g. smarty)?
John James Jacoby
Keymaster@Sam:
You know, I think about this everyday, but between you and me (and everyone else reading) I’m convinced more and more that no one really has any idea how to code XHTML, or what kind of object should rightfully be used to encapsulate content.
For the first 20 years of the modern web, everything was done in tables. For the last 5 years of the modern web, everything is being done in lists, divs, and paragraphs. Half the time things are marked up as paragraphs even though they aren’t actually blocks of text. The other half things are marked up as lists even though they contain 1 link. (WordPress and bbPress both suffer from this type of issue, specifically in the pagination and previous/next functions.)
One thing that the Smarty engine does promote, is keeping ALL of the XHTML out of the source code, allowing “template designers” to focus ONLY on the mark-up and then inserting the Smarty tags where the dynamic content belongs.
I’ve noticed that Automattic products tend to really try to think ahead in terms of a typical layout and what their audiences want, and that’s not a bad idea usually… But when the audience changes their mind and wants to go from UL’s to DL’s, inserting a DT becomes impossible and the function is immediately flawed by design. A Smarty type of engine avoids this all together.
Smarty is way too big and fat to include in either WP or BBP in my opinion. We’d be better off with a slimmed down version that’s used in CHBB, which I would LOVE to see implemented personally…
December 16, 2008 at 8:56 pm #70238In reply to: WordPress required??
csseur3
Memberno, you can use only bbpress if you want. WordPress is not required

bye
December 16, 2008 at 6:29 pm #67834In reply to: Get Current Forum ID?
reclaimyourskin
BlockedSorry guys, I thought my problem was resolved but it looks like i’ve spoke to soon.
The code _CK_ suggested below, worked wonders to add a new “on” class on my forum links:
<li<?php if ($current_forum_id=get_forum_id()) {echo " class='on'";} ?>>
Problem!
The trouble is that the unique “on” class is being displayed on every forum link, when I need it to only display when i’m viewing forum 2 for example. Basically, i need a unique css class and current forum marker so the user knows which forum they are currently viewing.
Below is the souce code for all of forum.php (if anyone has time to have a quick look i’d really appreciate it).
<?php bb_get_header(); ?>
<h3><?php forum_name(); ?> Forum</h3>
<ul id=”forumnav”>
<li<?php if ($current_forum_id=get_forum_id()) {echo ” class=’on'”;} ?>>” title=”Latest homepage”><span>Latest<img src=”images/white-arrow.gif” style=”padding: 0 0 3px 5px” width=”10″ height=”5″ border=”0″ /></span>
<li<?php if ($current_forum_id=get_forum_id()) {echo ” class=’on'”;} ?>>forum/forum2″ title=”Forum 2″><span>Forum 2</span>
<li<?php if ($current_forum_id=get_forum_id()) {echo ” class=’on'”;} ?>>forum/forum3″ title=”Forum 3″><span>Forum 3</span>
<li class=”<?php echo $class;?>”>forum/forum3″ title=”Forum 3″><span>Forum 3</span>
<?php if ( $topics || $stickies ) : ?>
<table id=”latest”>
<tr>
<th><?php _e(‘Topic’); ?> — <?php bb_new_topic_link(); ?></th>
<th><?php _e(‘Posts’); ?></th>
<th><?php _e(‘Last Poster’); ?></th>
<th><?php _e(‘Freshness’); ?></th>
</tr>
<?php if ( $stickies ) : foreach ( $stickies as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><?php bb_topic_labels(); ?> <big>“><?php topic_title(); ?></big></td>
<td class=”num”><?php topic_posts(); ?></td>
<td class=”num”><?php topic_last_poster(); ?></td>
<td class=”num”>“><?php topic_time(); ?></td>
</tr>
<?php endforeach; endif; ?>
<?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><?php bb_topic_labels(); ?> “><?php topic_title(); ?><?php topic_page_links(); ?></td>
<td class=”num”><?php topic_posts(); ?></td>
<td class=”num”><?php topic_last_poster(); ?></td>
<td class=”num”>“><?php topic_time(); ?></td>
</tr>
<?php endforeach; endif; ?>
</table>
<div id=”viewdiv”>
<ul id=”views”>
<li class=”view”>” class=”rss-link”><?php _e(‘<abbr title=”Really Simple Syndication”>RSS</abbr> feed for this forum’); ?>
</div>
<div class=”nav”>
<?php forum_pages(); ?>
</div>
<?php endif; ?>
<?php if ( bb_forums( $forum_id ) ) : ?>
<h2><?php _e(‘Subforums’); ?></h2>
<table id=”forumlist”>
<tr>
<th><?php _e(‘Main Theme’); ?></th>
<th><?php _e(‘Topics’); ?></th>
<th><?php _e(‘Posts’); ?></th>
</tr>
<?php while ( bb_forum() ) : ?>
<?php if (bb_get_forum_is_category()) : ?>
<tr<?php bb_forum_class(‘bb-category’); ?>>
<td colspan=”3″><?php bb_forum_pad( ‘<div class=”nest”>’ ); ?>“><?php forum_name(); ?><small><?php forum_description(); ?></small><?php bb_forum_pad( ‘</div>’ ); ?></td>
</tr>
<?php continue; endif; ?>
<tr<?php bb_forum_class(); ?>>
<td><?php bb_forum_pad( ‘<div class=”nest”>’ ); ?>“><?php forum_name(); ?><small><?php forum_description(); ?></small><?php bb_forum_pad( ‘</div>’ ); ?></td>
<td class=”num”><?php forum_topics(); ?></td>
<td class=”num”><?php forum_posts(); ?></td>
</tr>
<?php endwhile; ?>
</table>
<?php endif; ?>
<?php post_form(); ?>
</div> <!– End Content –>
<?php bb_get_footer(); ?>
Thanks again sambauers, _CK_ and other mods – you’re doing a great job.
December 16, 2008 at 4:34 pm #70123In reply to: bbPress 1.0-alpha-4 released
lorenzocoffee
Memberhi all, hi cookye/code Godness.
I’m a small useless human with many needs,
greatest one now it is NOT to have blog users sharing login,
but it’s only and ‘simply’ to ‘automatically’ import IN BBpress
Wp’s posted articles (even not the old ones)
Would this new beta help in that,given my WP config (2.7) has not
1 or more requested ash /salt/pepper/ things?
Your…faithfully
If working solution will come up
I’ll commit to start english class too.
December 16, 2008 at 3:05 pm #70241ganzua
MemberHi Sam! thanks for your answer;
A my-languages directory would probably be the way to go.
Well, then bb-config.php needs to have last lines changed
; // Change this to localize bbPress. A corresponding MO file for the
// chosen language must be installed to bb-includes/languages.
// For example, install de.mo to bb-includes/languages and set BB_LANG to 'de'
// to enable German language support.
define('BB_LANG', '');I tried a my-languages and a bb-languages folder but no way.
Can you link to the language files you were trying to use?
I had an old .mo file stored in my hard drive. I think it was for bbpress 0.7 or a previous version, not sure.
December 16, 2008 at 2:54 pm #70235In reply to: Will a template engine be used (e.g. smarty)?
Ipstenu (Mika Epstein)
ModeratorUsing Gallery (which uses Smarty) is mostly an annoyance. Getting layouts to work as I want in Smarty is harder than hjust mucking around with CSS, I’ve had to hack code which to me defeats the purpose. Also you have to purge your template cache every time you make a change to the layout, which is a pain.
Smarty’s a nice idea, but it’s ONE MORE thing to learn for a PHP/SQL driven site.
December 16, 2008 at 2:40 pm #70240Sam Bauers
ParticipantIt should be possible to load both language files, in fact some changes were made to WordPress to address the problem specifically.
Can you link to the language files you were trying to use?
* Side note: We should probably move where languages are stored. A
my-languagesdirectory would probably be the way to go.December 16, 2008 at 2:35 pm #69998In reply to: Windows (Apache2/PHP/5.2.6/MySQL5.1.30)
Sam Bauers
ParticipantWell, that’s different…

But I just realised you are using bbPress 0.9 – the bb_mail() function has been replaced in 1.0-alpha with one more like wp_mail() in WordPress.
It was replaced in part because people had problems sending from Windows environments. You have probably just pinpointed the cause of that. Just a few months too late unfortunately!
For now I would just hack the core of 0.9 if I were you – it is unlikely to see any more updates. The replacement function in 1.0 should take care of this, although I would appreciate it if you could test 1.0-alpha for the same problem if you have some time.
December 16, 2008 at 2:05 pm #70227In reply to: ETA of bbPress 1.0 ?
Ipstenu (Mika Epstein)
ModeratorThey’re no where near the point where they want to pimp a finalized product. Personally, I’ve seen far too many projects like this fail because they promoted themselves before they were ready. Right now, even though there is a stable version, the whole site is pretty much a big public test. There’s too much going on to be able to guess a date, and based on the past, if you held a gun to my head, I’d make things up. Which is what developers do when our bosses want to know how long it will take to build the next toy for our companies. We don’t know, sometimes. Creativity (and yes, coding is just that) is hard to measure.
So. It’ll be done when it’s done. Not by years end. Hopefully us posters can help hammer out the big issues to get them to a live 1.0 version sooner, but it’ll take time
December 16, 2008 at 1:51 pm #69939In reply to: bbpress is slow like godaddy says?
Sam Bauers
ParticipantSo in summary…
No, bbPress is not slow like GoDaddy says.
December 16, 2008 at 1:44 pm #70234In reply to: Will a template engine be used (e.g. smarty)?
Sam Bauers
ParticipantThere are no plans nor do I think their should be.
The premise of Smarty is screwy to me.
There is some idea that out there somewhere are “template developers” that aren’t allowed to touch “teh sacred PHP”. So we need an abstracted templating language so that they can do loops and conditionals in their HTML templates.
I don’t believe these people actually exist and that if they do, they should just use PHP and be trained to a point where they are trust-worthy.
99% of Design should be held in the CSS now anyway. The code/display separation thing has moved up a level these days.
December 16, 2008 at 5:22 am #4441Topic: Installing bbPress 1.0 Alpha 4
in forum Installationbrik182
MemberDB Error in bb_insert_topic: Incorrect integer value: '' for column 'topic_id' at row 1INSERT INTO bb_topics (
topic_id,topic_title,topic_slug,topic_poster,topic_poster_name,topic_last_poster,topic_last_poster_name,topic_start_time,topic_time,topic_open,forum_id) VALUES (”,’Your first topic’,’your-first-topic’,’1′,’admin’,’1′,’admin’,’2008-12-16 05:10:50′,’2008-12-16 05:10:50′,’1′,’1′)This problem has been around since the previous 1.0 alpha releases. The installation would say that it was successful but it would not create a topic as that error in the last stage would indicate.
The first forum is created and it says there is 1 post but upon clicking said forum it presents you with a “New Topic in this Forum” form. When you post a new topic, it gives you an error: “This topic has been closed.”
Apache 2.2.10
MySQL 5.1.0
PHP 5.2.6
Windows Server 2003
Database Collation: utf8_general_ci
December 16, 2008 at 12:03 am #70208In reply to: How to get users to be able to post in forums
s7icky
MemberI used that one
sorry about that i think it has something to do with the user roles maybe im not really sure
December 15, 2008 at 11:29 pm #4442Topic: Will a template engine be used (e.g. smarty)?
in forum Installationnewsjunkie
MemberCurious to know if plans exist to ever use a templating engine like Smarty in order to separate logic for design.
So that no more code and HTML are in the same file
December 15, 2008 at 8:27 pm #70195In reply to: adding scripts to header
chrishajer
ParticipantHow about using the full URI to the javascript? In your script tags, you can use a template tag to add the template path including where you stored the files. Once you are sure they’re referenced properly and actually being loaded, you can go from there.
<script type="text/javascript" src="<?php bb_active_theme_uri(); ?>js/jquery.js"></script>
<script type="text/javascript" src="<?php bb_active_theme_uri(); ?>js/jquery.accordion.js"></script>
<script type="text/javascript" src="<?php bb_active_theme_uri(); ?>js/jqq.js"></script>And when you say “doesn’t work so far” do you mean it’s like the javascript is just not there, no action, or something else?
December 15, 2008 at 8:23 pm #70203In reply to: How do I change font of Hot Tags?
chrishajer
ParticipantThe default install has a single topic (“Your first topic — First Post. Woot!”) that is tagged
bbPress. If you deleted that but the tag persists, you might need to go into the admin and Manage > Recount/bb-admin/site.php. There is one checkbox there that says “DELETE tags with no topics. Only functions if the above checked.” Try that.December 15, 2008 at 5:22 pm #4439Topic: Sanitizing user names
in forum Troubleshootingganzua
MemberHi!
I have an old issue with bbpress-wppress integration that I can’t solve.
I use this wp-plugin to sanitize user names;
What this plugin does is that whenever a user registered as “Joe” tries to log in as “joe”, “jOe”… can login.
However bbpress is not compatible with this plugin, when activited bbpress reports this error;
Catchable fatal error: Object of class stdClass could not be converted to string in
wampwwwwordpresswp-includesformatting.php on line 453In formatting.php line 453 obviously we have wordpress function sanitize_user and it seems bbpress doesn’t like to have this function modified.
I just wanted to ask if anybody knows another way to sanitize usernames because it is a pain to have all the time people complainig that they can log in because they registered as “Joe” and try to access with “joe”
December 15, 2008 at 5:10 pm #70116In reply to: bbPress 1.0-alpha-4 released
ganzua
MemberHi!
I’m giving a try to a deep integration. I want to load bbpress in my wordpress theme so I have a modified bbpress kamukei where I load wp header, sidebar and footer.
I installed bbpress 1.04a, I activated the new plugin, edited wp-config.php as plugin required, I founded that all this still didn’t load wp header and I modified bbpress bb-config.php with;
define('WP_BB', true);
if ( !defined('DB_NAME') ) {
require_once( dirname(__FILE__) . '/../wp-config.php');
}Now, it seems everything works ok; bbpress loads wp-header, I have access to bbpress control panel, both, admin and users can post, I can log out… I’m going to keep my beta-testing and I’ll further report but I think Sam did it
so CONGRATULATIONS. I’m not sure that I’ll want to load bbpress functions into wordpress so far because what I need is all the contrary; to load wordpress into bbpress so I can have a very simple and integrated forum. However, having the bbpress control panel integrated into the wordpress panel would be great.
The idea of bbpress as a plugin is very nice but Sam is totally right when he stated that we have a stronger foundation as a stand alone. Perhaps that little plugin as a “bridge” is the way to go.
December 15, 2008 at 3:57 pm #70115In reply to: bbPress 1.0-alpha-4 released
Ipstenu (Mika Epstein)
ModeratorOkay, I made a ‘double’ cookie by doing this:
$bb->sitecookiepath = '/blog/';but it still won’t let me be logged into BOTH at once. Grr. I can be logged into WP and WPAdmin, or BB and BBAdmin and WPAdmin, but never BB and WP
If I don’t modify the bb-config file, I can’t log in at all to bbPress. Am I the only one who has WordPress loaded in a subdirectory, with the index kicking back to the main root? That’s about the only thing I have left to try and I really don’t want to screw up my permalinks.
Of possible relevance, the logged_in cookie never gets removed from my cookie jar on Firefox when I log out of bbPress OR WordPress.
Edit: Or maybe I’m just a frackin’ idiot.
I repasted in the Auth Keys and now it’s working… Dude. I keep telling people at work that the average IQ drops 50 points between Thanksgiving and New Years (which is how I explain people making boneheaded mistakes). The new guy asked ‘Does that mean us to?’ and I said “Of course! Watch, you’ll make the stupidest, most obvious screw up in your life in a week or so.” Today was mine, apparently.
I’m going to hang my head in shame.
December 15, 2008 at 2:31 pm #70113In reply to: bbPress 1.0-alpha-4 released
Ipstenu (Mika Epstein)
Moderatorconfigure the WordPress plugin and also follow it’s instructions to modify the wp-config.php file in WordPress.
Did that.
Further to this, you should clear out any manual settings you have made to bb-config.php in bbPress and re-check your settings in the “WordPress integration” page in bbPress admin.
Did that.
Then clear all your cookies and retest.
Did that (went in to Firefox’s cookies and after logging out, whacked everything from my domain).
Result: Login is not shared as I think it should be.
If I login on bbPress I can get into my WordPress admin area, but I do not show up as logged in on the WordPress ‘regular’ side. If I go to comment, it says I’m not logged in.
Also, if I have this line in, I can’t log in to both at the same time:
$bb->logged_in_cookie = 'wordpress_logged_in_<long string>';I think clearly something’s wrong on my end, but damned if I can sort out what!
EDIT!
I watched my cookies as I logged into bbPress after being logged into WordPress.
WordPress makes two entries for
wordpress_logged_in_<long string>! Both have ‘Domain’ of.domain.net, and then path of/and/blog/bbPress has one entry and it has Host of
domain.net(no leading . ) and path of/I fixed the host/domain part by setting
$bb->cookiedomain = '.domain.net';but I’m pretty convinced this double existence of the logged_in cookie is what’s screwing me up.December 15, 2008 at 11:34 am #70110In reply to: bbPress 1.0-alpha-4 released
the_Wish
MemberAlright I figured it out now for my case.
In wp-config.php I had to add both lines
define('COOKIE_DOMAIN', '.domain.com');
define('COOKIEPATH', '/');as opposed to just
define('COOKIEPATH', '/');which the WP Plugin suggests to do.
The WP Integration Settings in the bbP Admin section got this part right but not the Plugin Settings in WP.
Anyways it’s working now all the way. Great achievement Sam!
-
AuthorSearch Results