Search Results for 'code'
-
AuthorSearch Results
-
January 24, 2008 at 1:50 am #61671
In reply to: User Registration
Sam Bauers
ParticipantLooks like it may be rejecting the mail due to the “From” email address being invalid. Try this code in a plugin and make sure your admin_email option is a valid email address:
<?php
if ( !function_exists( 'bb_mail' ) ) :
function bb_mail( $to, $subject, $message, $headers = '' ) {
if (!is_array($headers)) {
$headers = trim($headers);
$headers = preg_split('@r(?:n{0,1})|n@', $headers);
}
if (!count($headers) || !count(preg_grep('/^from:s/im', $headers))) {
if (!$from = bb_get_option('admin_email'))
if ($uri_parsed = parse_url(bb_get_option('uri')))
if ($uri_parsed['host'])
$from = 'bbpress@' . trim(preg_replace('/^www./i', '', $uri_parsed['host']));
if ($from)
$headers[] = 'From: "' . bb_get_option('name') . '" <' . $from . '>';
}
$headers = trim(join("rn", $headers));
return @mail($to, $subject, $message, $headers);
}
endif;
?>January 23, 2008 at 9:46 pm #2824Topic: Admin Links at top not working – example provided
in forum Troubleshootingmn8n
MemberI am logged in as admin synced with WP but cannot click the links to profile or logout
Latest WP and bbP
Here is the only location that appears relevant to me…. (not a php guy)
<p class="login">
<?php printf(__('Welcome, %1$s!'), bb_get_current_user_info( 'name' ));?> <?php bb_profile_link(); ?>
<small>(<?php bb_admin_link( 'after= | ' );?><?php bb_logout_link(); ?>)</small>
</p>Whatever that’s doing, it’s not writing any links for View profile, (Admin | Log out)
see it here http://www.homeinteriorart.com/hia/forum/ – unclickable

It IS writing the link as viewing the source shows…. but it’s unusable
January 23, 2008 at 8:40 am #62558In reply to: Your opinion: Profile above or to left of post?
Olaf Lederer
ParticipantHey trex33, the bigger forums are using vbulletin
vedmak
MemberThis is great excerpt , but i have 2 problems:
- excerpt don’t work with Sticky Topic
- how to make plugin from this code?
Thanks anyway livibetter.
January 22, 2008 at 9:15 pm #62571In reply to: Pre-Installation: Spam and User Numbers
Trent Adams
MemberThe spam post isn’t under moderation, but spam posts that are well written in WP are not either as they display immediately. I can tell you this though, on wordpress.com support forums there are very few “spambot” posts that make it past akismet. I have a couple small forums myself, but I have never had a post get past akismet except posts that don’t have any bad words or links which really “could be” real user posts. Even that number is pretty low. I have more problems with spam registrations, but livibetter’s “enhanced registration” plugin took care of that

Trent
January 22, 2008 at 9:15 pm #54861In reply to: wordpress integrate problem when enable BBLANG
Göran
MemberI inserted your code:
Code:include_once(BBPATH . BBINC . ‘streams.php’);
include_once(BBPATH . BBINC . ‘gettext.php’);in ‘bb-settings.php’ but it did not quite work. My blog http://www.goranlin.se/blogg/wordpress/ is slower and website adm disappeared. And my forum http://www.goranlin.se/blogg/wordpress/bbpress/
still do not show the posts from the blog which was planned. I use bbSync to try to get that, but no success so far.
January 22, 2008 at 7:21 pm #62564In reply to: How to have ‘latest discussions’ on WP front page
Trent Adams
MemberIf you search in https://wordpress.org/extend/plugins/ there is actually a plugin to do this for wordpress if I am not mistaken as well, but I use the way that chrishajer suggests myself as RSS feeds are easy to change and doesn’t require bbPress be in the same database

Trent
January 22, 2008 at 7:14 pm #54860In reply to: wordpress integrate problem when enable BBLANG
Göran
MemberI seems to have the same problem. I get
Fatal error: Cannot redeclare class streamreader in /mnt/home/_g/goranlin/www.goranlin.se/blogg/wordpress/bbpress/bb-includes/streams.php on line 26
I want both wp and bbpress to be translate so maybe I can put your code into ‘bb-settings.php’. Would that work?
January 22, 2008 at 7:14 pm #62569In reply to: Pre-Installation: Spam and User Numbers
Trent Adams
MemberAny guess on how much space say 100,000 users (spam and real) would take in actual database space? If it is a small amount, then why even worry about deleting them

Trent
January 22, 2008 at 1:09 pm #62548In reply to: Advice on integrating WP blog and bbPress in Swedish
Göran
MemberThanks for help. I am moving forward. I deleted both WP and bbPress and started again and made progress. The blog and the forum are integrated but I cannot get bbSync to work. Both work by temselves and I can log in with same id and password but cannot get posts into forum.
Installation:
Blog at http://www.goranlin.se/blogg/wordpress/
Forum at http://www.goranlin.se/blogg/wordpress/bbpress/
WordPress 2.3.2 installed 22 january 2008
theme WordPress Default 1.6 changed colors in head with panel
bbPress 0.8.3.1 installed 22 january 2008
sv_SE.mo for WP installed 22 january 2008
sv_SE.mo for bbPress installed 22 january 2008
bbSync version 0.94 installed 22 january 2008
bbSync gave message “It needs your config!
“I did that! succesfully I thought.
But when trying to write new post in blog:
Fatal error: Cannot redeclare class streamreader in /mnt/home/_g/goranlin/www.goranlin.se/blogg/wordpress/bbpress/bb-includes/streams.php on line 26
but going back to blog the new post is there but still not in Forum
line 24-26 in streams.php is:
// Simple class to wrap file streams, string streams, etc.
// seek is essential, and it should be byte stream
class StreamReader {
// should return a string [FIXME: perhaps return array of bytes?]
function read($bytes) {
return false;
I have no clue how to do anything about this! All help is welcome!
January 22, 2008 at 10:12 am #62562In reply to: how can I rebuild .htaccess?
Olaf Lederer
ParticipantOk Chris, thats the reason

yeah it works great (all my WP blogs are working the same way)
January 22, 2008 at 10:11 am #56116In reply to: New Topic Notification
Olaf Lederer
Participanton the plugin site here
January 22, 2008 at 3:21 am #62547In reply to: Advice on integrating WP blog and bbPress in Swedish
fel64
MemberYou do need a localisation file, but if one doesn’t come with the topic it’s typically the sort of thing you can do for yourself.
Some wp themes let you set the colour scheme in the admin panel (Mandigo for one), but it’s a fairly simple task to open the style.css file and change the hex colour-codes (once you understand what they are).
Having bb as a subdirectory of wp is a good start but it’s not necessary as far as I know. My wp install is in a folder /wordpress/, while bb is in the forums subdomain. This should be everything you need to know on integration: https://bbpress.org/documentation/integration-with-wordpress/
January 22, 2008 at 2:13 am #62561In reply to: how can I rebuild .htaccess?
chrishajer
Participantfinalwebsites: does it work? If so, that’s all you need. If permalinks are not working, then your server does not support
Options +MultiViewsand you need the longer explicit rewrite rules as generated bybb-admin/rewrite-rules.php.January 21, 2008 at 9:11 pm #62560In reply to: how can I rebuild .htaccess?
Olaf Lederer
Participant???
my .htaccess has only this single row:
Options +MultiViewsJanuary 21, 2008 at 9:09 pm #62556In reply to: Your opinion: Profile above or to left of post?
Olaf Lederer
Participantyeah the profile belongs to the left like in other forums (it’s not MS office 2007)
January 21, 2008 at 12:21 am #62478In reply to: May some one tell me what “_wpnonce” is for?
fel64
MemberA nonce is used to ensure that you’re coming from the right place and you weren’t tricked into submitting the data (basically to give continuity between starting and finishing an action). If the value is not given or wrong I’d expect bbPress not to post at all. You might be able to look through the code and see where it creates the nonce, then replicate that yourself.
January 20, 2008 at 6:54 am #62300shaythong
MemberIn bbPress version 0.8.3.1 open file: bb-admin/plugins.php and find:
if ( is_callable( 'glob' ) ) {
foreach ( glob(BBPLUGINDIR . '_*.php') as $_plugin ) {
$_data = bb_get_plugin_data( $_plugin );
$_plugins[$_plugin] = $_data ? $_data : true;
}
}Replace with:
if ( is_callable( 'glob' ) ) {
$pluginarray = glob(BBPLUGINDIR . '_*.php');
if ($pluginarray)
foreach ( $pluginarray as $_plugin )
require($_plugin);
}I’m not sure if this will work.
January 20, 2008 at 6:18 am #62522In reply to: difference between permalinks
chrishajer
ParticipantWell, AFAIK, bbPress only allows three values for permalinks: true, false and slugs. In config.php, there is a line (around line 27 in the current 0.8.3.1 release I think) that starts
$bb->mod_rewrite =. I think it works like this. Of course, you can try modifying your config.php and see for yourself as well.$bb->mod_rewrite = true;/bbpress/topic.php?id=526&page#post-6043
$bb->mod_rewrite = false;/bbpress/topic/526
$bb->mod_rewrite = 'slugs';/bbpress/topic/the-title-of-the-topic
January 18, 2008 at 6:03 pm #62471In reply to: Email address as user name?
flschen
MemberEven if I think that this is not intended to be so, it is more a feature than a bug.
If you use your email address as username every spambot can read it out. Therefore it’s just careless. I advise you not to use your email address as username.
January 18, 2008 at 5:33 pm #62386In reply to: New plugin: Auto Add Favorites
Olaf Lederer
Participantthe last needs some more code during the registration process…
I think this feature is needed to makes this plugin complete
January 18, 2008 at 11:20 am #62308In reply to: EMAIL WON’T SEND, FROM ANYHTING
Sam Bauers
ParticipantPut this in a plugin file and activate it. It’s a drop-in replacement for bb_mail() from the current trunk
<?php
/*
Plugin Name: Fix bb_mail function
Plugin URI:
Description: Temporary replacement for bb_mail() function
Author: Sam Bauers
Author URI:
Version: 0.0.1
*/
if ( !function_exists( 'bb_mail' ) ) :
function bb_mail( $to, $subject, $message, $headers = '' ) {
if (!is_array($headers)) {
$headers = trim($headers);
$headers = preg_split('@r(?:n{0,1})|n@', $headers);
}
if (!count($headers) || !count(preg_grep('/^from:s/im', $headers))) {
$from = parse_url(bb_get_option('uri'));
if ($from && $from['host']) {
$from = trim(preg_replace('/^www./i', '', $from['host']));
$headers[] = 'From: "' . bb_get_option('name') . '" <bbpress@' . $from . '>';
}
}
$headers = trim(join("rn", $headers));
return @mail($to, $subject, $message, $headers);
}
endif;
?>January 18, 2008 at 5:57 am #62307In reply to: EMAIL WON’T SEND, FROM ANYHTING
edwinfoo
MemberI have no backslashes (“”) at all in my pluggable.php file

However, while I have the same problem of NO OUTBOUND EMAIL when I tested, it must work sometimes because I got some new members yesterday that are posting. But I’ve got a bunch of others whose last log on was “NEVER”….hmmmm
Something is definitely wrong
January 17, 2008 at 9:32 pm #62384In reply to: New plugin: Auto Add Favorites
Olaf Lederer
ParticipantHi I changed this function:
function auto_add_favorit_profile() {
global $user_id;
if (bb_is_user_logged_in()) {
$checked = "";
$user = bb_get_user($user_id);
if (!empty($user->auto_add_favorit)) {
$checked = ' checked="checked"';
}
echo '
<fieldset>
<legend>Add my threads automatically to my favorites</legend>
<p>Check this option to add all your threads or threads where you have posted something to your favorite list.</p>
<table width="100%">
<tr>
<th width="21%" scope="row">Activate:</th>
<td width="79%">
<input name="edit_auto_add_favorit" id="edit_auto_add_favorit" type="checkbox" value="1"'.$checked.' />
</td>
</tr>
</table>
</fieldset>';
}
}please replace this function or download the updated version via the link above and tell me if it works (it works for me)
January 17, 2008 at 9:13 pm #62306In reply to: EMAIL WON’T SEND, FROM ANYHTING
Olaf Lederer
ParticipantI think that some mail headers are misformed, check the pluggable.php file in the include directory and replace the
nwithrn(not sure if this will help -
AuthorSearch Results