Search Results for 'code'
-
AuthorSearch Results
-
August 12, 2008 at 5:11 pm #3791
Topic: 1.0 Alpha – Wp Integration messed logins
in forum Installationganzua
MemberHi!
This is just a comment just in case it helps because I had to remove again bbpress.
I tried to integrate 1.0 Alpha with Wp following the bbpress installer and after installation finished, admin login was all messed.
First, bbpress changed my wp admin password. I re-set the old password from bbpress control panel and everything seemed to work fine again but next, whenever I tried to login in wordpress I had to log-out from bbpress.
Hope developers consider a better bbpress-wp integration for 1.0 final
August 12, 2008 at 4:00 pm #66040In reply to: WordPress + bbPress Integration 101
csseur3
Memberhi,
for the wp-config.php file in wordpress, it is:
define(‘COOKIE_DOMAIN’, ‘.website.org’);
or
define(‘COOKIE_DOMAIN’, ‘website.org’);
?
thanks

Fred
August 12, 2008 at 3:51 pm #66808chrishajer
ParticipantYou take all that code that howtogeek pasted and put it into a file called “replacebbmail.php” or something. To make php code into a bbPress plugin, it needs to have a header. The header needs to look something like this (change the values to something meaningful to you):
<?php
/*
Plugin Name: Swift Mailer
Plugin URI: http://www.example.com/ (doesn't really matter)
Description: Replace bb_mail with Swift Mailer
Author: You
Author URI: http://www.example.com/
Version: 0.1
*/Then, paste the code that howtogeek showed at the end of that file. In the end, it will look something like this.
<?php
/*
Plugin Name: Swift Mailer
Plugin URI: http://www.example.com/ (doesn't really matter)
Description: Replace bb_mail with Swift Mailer
Author: You
Author URI: http://www.example.com/
Version: 0.1
*/
if ( !function_exists('bb_mail') ) {
function bb_mail($to, $subject, $content, $headers=''){
require_once('PATH_TO/Swift/lib/Swift.php');
require_once('PATH_TO/Swift/lib/Swift/Connection/Sendmail.php');
$swift =& new Swift(new Swift_Connection_Sendmail("/usr/sbin/sendmail -bs"));
$from = new Swift_Address("noreply@mysite.com","My bbPress Forums");
$message =& new Swift_Message($subject, $content);
if ($swift->send($message, $to, $from)) {return true;}
else{ echo "Message failed to send to ".$to." from ".$from;}
$swift->disconnect();
}
}
?>The name of the file does not matter really. Save that new file in bb-plugins. Now activate your new plugin in the admin section of your bbPress site.
You will need to configure it before activating it to make sure it works (setting up the path to swift mailer and setting the auth stuff if you need to.)
August 12, 2008 at 3:43 pm #66807chrissydunno
Memberthanks guys .. but how do you ‘make howtogeek’s code into a plugin’
where does his code go? registration-settings.php? how?
i can install swiftmailer of course, just not sure what else needs to change in current bbpress configurations
August 12, 2008 at 3:31 pm #3790Topic: Integration into existing Login-System
in forum Pluginsreiswaffel2000
MemberHi,
Im trying to integrate bbPress 0.9.0.2 into my existing Login-System.
The Problem is, that I use sessions instead of cookies to send the user’s information from one page to another.
I want to be logged into bbPress when logging into the main Page of main website (not bbPress
) via session.. Is this Possible? If yes, could anybody please help me?I’m trying to find a way to solve this problem for days..
Greetings from Germany,
reiswaffel2000
August 12, 2008 at 2:33 pm #66821In reply to: how to detect plugins incompatible with bbPress 1.0
_ck_
Participantbb-ratings has this problem:
https://plugins-svn.bbpress.org/bb-ratings/tags/0.8.5/bb-ratings.phpas you can see on/around line 205
August 12, 2008 at 9:52 am #66323In reply to: Integrate a memberlist by default
csseur3
MemberAnd I think you are missing the people who will say “oh, we need a plugin for just that! I can’t imagine the others! “
I have already twenty plugins activated, some of which, as memberlist, which does not change of code (or very little) and they can be integrated safely by default.
In place of a plugin, a checkbox in the options natives would be better, no?
As WordPress 2.7 perhaps we should integrate the most simple and the most popular plugins by default, no?
I thought about it to ensure the development of bbPress and enable it to compete with others. And if there is more interested users = more visitors for the sites of the plugins creators on their “donate” link lol: p
Please, think at the question^ ^ or create a “plugin integration poll” :p
Bug fixes are good. New features, too.
August 12, 2008 at 7:15 am #66806_ck_
ParticipantIt really is that simple – just make HowToGeek’s code into a plugin and install swiftmailer:
https://bbpress.org/forums/topic/trick-to-fix-some-email-problems-with-08x-plugins-on-09x#post-15776
That reminds me to fix some of my plugins so they use bb_mail() instead of mail() directly.
August 11, 2008 at 9:55 pm #64024In reply to: Merge registration pages
Hellweaver666
MemberThanks chrishajer – that’s just what I need it. I had tried the other hidden field, expecting that to work…
August 11, 2008 at 8:59 pm #64023In reply to: Merge registration pages
chrishajer
ParticipantInstead of this WordPress function:
<?php wp_register(); ?>You would have a link to bb-login.php. Then bb-login handles the whole thing. In the login form, you would add that hidden form field to redirect then after login, as explained here.
https://bbpress.org/forums/topic/heres-a-trick-to-redirect-user-back-to-topic-after-login#post-14268
August 11, 2008 at 8:53 pm #64022In reply to: Merge registration pages
mattbaehr
MemberHow do I change the reg links? In my theme, here is the reg code:
<li id="meta" class="widget">
<h2><?php _e('Members') ?></h2>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>
</li>What would I do to get it to redirect to the bbpress registration page?
August 11, 2008 at 7:04 pm #66792In reply to: Theme directory
thion
MemberBesides – there’s no point to make a theme directory if there are no themes. Not many people are doing layouts for bbPress and if they’re doing, then it’s really hard work – I know something about it as I’m making “Halloween Evening” theme for bbPress right now…
August 11, 2008 at 6:28 pm #3779Topic: Theme directory
in forum Themescsseur3
MemberHello,
like the theme directory of wordpress.org, it is possible to have a theme directory in bbpress.org ?

Bye,
Fred
August 11, 2008 at 5:49 pm #66285In reply to: bbPress 1.0 alpha looks interesting
_ck_
ParticipantThere are radical internal changes in 1.0 with the switch to the BackPress core, not to mention the cookie changes and some major db function changes which consolidated all the meta tables into bb_meta. The code is untested against most plugins. It’s a much bigger change IMHO from 0.9 to 1.0 vs the older 0.8.3 to 0.9.0 change.
However I don’t think it will take much to get it the final stamp of approval, maybe even late this month or early next, depending how many more features Sam wants to put into it. There’s still a whole bunch of open tickets:
https://trac.bbpress.org/report/3
I just don’t want it to be rushed to an official release like 0.9 was, which was followed shortly by 0.9.0.1 and 0.9.0.2 and then 0.9.0.2 sp1 – that’s embarrassing and makes bbPress look amateur.
Let’s get it right this time – report those bugs at http://trac.bbpress.org
August 11, 2008 at 3:42 pm #64020In reply to: Merge registration pages
Hellweaver666
MemberYou can just change the register links in the wordpress template to point to the bbpress login and registration forms… that’s easy enough (you can even copy the login form code into the template directly and it seems to work).
The problem is, how to get users back to the URL they came from after they login (by default they seem to get bounced to the forum home page instead)… any ideas?
August 11, 2008 at 1:50 pm #66784In reply to: I think I broke my blog
chrishajer
ParticipantIf it’s this site http://famousbeats.net/ it’s 2.5.1:
<meta name="generator" content="WordPress 2.5.1" />August 11, 2008 at 1:38 pm #66737In reply to: Sitemap generator
chrishajer
ParticipantI have not seen the author around in a while. I would say if it’s not your work, you should not upload it to the extend section. I didn’t see it there already. Of course, someone could look at this plugin and extend it. It’s GPL2 licensed.
There was a problem with the plugin creating a site map when there are lots of posts; it slowed down posting. Maybe it could be fixed to allow creation of the sitemap via cron or via a GET request, rather than randomly when a post is marked favorite. There was also a problem with certain characters not being encoded in the URL if you’re not using permalinks.
Lots of work could be done to extend and improve the plugin, then it could be released and posted to the bbPress extend/plugins section.
August 11, 2008 at 11:46 am #66680In reply to: No $user_id on profile page?
thion
MemberI’ve already found the problem – I guess I’ve lost myself when trying to develop a plugin for both 0.9.0.2 and 1.0
. It’s working now and will be released today (I hope)…
August 11, 2008 at 11:29 am #66679In reply to: No $user_id on profile page?
_ck_
ParticipantThe user_id of the user on the profile page might be in
$user->IDtry
global $user; $user_id=$user->ID;($user is only available on the profile page)
August 11, 2008 at 10:06 am #65980In reply to: Why is integration so troublesome?
_ck_
ParticipantThis plugin is meant as a temporarily workaround until the bug can be fixed in WordPress – it will replace “anonymous” with the user login.
Install it on the WordPress side:
<?php
/*
Plugin Name: changes anonymous to member's login if display name missing (plugin for WordPress)
*/
function no_anonymous_members($author) { // this is a WORDPRESS plugin, not bbPress
global $comment;
if (empty($comment->comment_author) && !empty($comment->user_id)) {$user=get_userdata($comment->user_id); $author=$user->user_login;}
return $author;
} add_filter('get_comment_author', 'no_anonymous_members');
if ( !function_exists('get_userdata') ) :
function get_userdata( $user_id ) {
global $wpdb;
$user_id = absint($user_id);
if ( $user_id == 0 )
return false;
$user = wp_cache_get($user_id, 'users');
if ( $user ) {
if (empty($user->display_name)) {$user->display_name=$user->user_login;}
return $user;
}
if ( !$user = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->users WHERE ID = %d LIMIT 1", $user_id)) ) {
return false;
}
_fill_user($user);
if (empty($user->display_name)) {$user->display_name=$user->user_login;}
return $user;
}
endif;
?>(The real answer of course is to insert the user_login when the comment is posted, however I cannot find a suitable hook in WordPress’s
comment-template.phpso I am doing it by completely replacing the get_userdata function inpluggable.php)August 11, 2008 at 9:19 am #65979In reply to: Why is integration so troublesome?
_ck_
ParticipantI guess I can create some code to fix the display name issue in existing databases. Give me a few minutes.
update: actually it’s as simple as this in phpMyAdmin:
UPDATE wp_users SET display_name=user_login WHERE display_name=''or via a mini-plugin:
<?php
/*
Plugin Name: Fix Anonymous Members
*/
function fix_anonymous() {global $bbdb;
$bbdb->query("UPDATE $bbdb->users SET display_name=user_login WHERE display_name='' ");
} add_action('bb_init','fix_anonymous');
?>save as
_fix-anonymous.php(with leading underscore)you only need to upload and run bbpress once with it loaded (no activation required) and then delete the plugin or it will slow down bbPress.
I am now writing a WordPress plugin to fix this without having to duplicate all the names in the table which is a horrendous waste of space.
August 11, 2008 at 9:06 am #65978In reply to: Why is integration so troublesome?
_ck_
ParticipantWell we know what causes “anonymous” to show up, it’s because bbPress is not creating the display name for the user when the user registers on the bbPress side and then goes to use WordPress.
The question is, why is this suddenly happening when bbPress is supposed to create it already. This might be a question for Sam – but I hope he can reproduce the problem.
Did you add the above code to insert the display name?
I hope I didn’t lead you wrong by implying you should try 2.6 because that will be incompatible with bbPress 0.9
2.6 has compatibility with bbPress 1.0 alpha but a few plugins won’t work with the alpha yet (like bb-topic-views)
Oh and the display name persists in 1.0 alpha and is on line 487 in pluggable. I’ve filed a trac report:
August 10, 2008 at 10:50 pm #66731In reply to: installation problem, no theme or login!
chrishajer
ParticipantI don’t think iframes work very will with bbPress. Are you trying to put the forum in an iframe?
<frameset rows="100%,*" border="0" frameborder="no" framespacing="0">
<frame name="site" src="http://hlvdubs.iamanerd.org.uk/forum" marginwidth="0" marginheight="0" noresize scrolling="auto">
<noframes>
<body bgcolor="#ffffff">
</body>
</noframes>
</frameset>I think this is part or all of the problem. Don’t try to access bbPress from an iframe. You’ve got two different domains going on there.
August 10, 2008 at 9:00 pm #66729In reply to: installation problem, no theme or login!
jifop
Memberhmm, i’ve thrown it back up and its still dead

checking the source it seems ok
<link rel=”stylesheet” href=”http://www.hlvdubs.co.uk/forum/bb-templates/kakumei/style.css” type=”text/css”>
August 10, 2008 at 5:08 pm #60226In reply to: Google Analytics for bbPress
chrishajer
ParticipantYou don’t really need a plugin to install Google Analytics in your bbPress forum. Just paste the code from Google Analytics right before the closing </body> tag in your theme’s footer.php. No plugin required. I never understood the need for Analytics plugins for WordPress either. Editing a template file is pretty basic.
-
AuthorSearch Results