Search Results for 'code'
-
AuthorSearch Results
-
August 23, 2008 at 2:50 pm #67125
In reply to: bbsync broken – plugin like it? BB 1.0
benzilla069
MemberYeah I’m currently just messing about with it at the moment, I’ve stripped it down to what I believe are the bare essentials… please note I don’t have any PHP experience but I do have other languages like C under my belt so I’m getting the hang of it ok.
<?php
/*
Plugin Name: WordPress to BBPost hacked by Ben
*/
add_action('publish_post', 'bensyncpost', 999 );
/* CORE */
function load_bb() {
global $bb, $bbdb, $bb_current_user, $page, $bb_cache,
$posts, $bb_post, $post_id, $topics, $topic, $topic_id,
$forums, $forum, $forum_id, $tags, $tag, $tag_name, $user, $user_id, $view,
$del_class, $bb_alt;
}
function bensyncpost( $post_id ) {
global $bbdb, $wpdb, $current_user;
$post = wp_get_single_post( $post_id );
if( !load_bb() )
return false;
bb_set_current_user( $current_user->ID );
$post_title = $bbdb->escape( $post->post_title );
$post_text = benprepposttext( $post->post_content, get_post_meta( $post_id ) );
if( !$link_exists ) {
bennewtopic( $post_id, $post_title, $post_text );
}
}
function bennewtopic( $post_id, $post_title, $post_text ) {
$topic_id = bb_new_topic( $post_title, 2, $tags );
$reply_id = bb_new_post( $topic_id, $post_text );
/* if( $topic_id && $reply_id ) {
felmetalink( $post_id, $topic_id );
$r = true;
}*/
return $r;
}
function benprepposttext( $post_text) {
remove_filter('pre_post', 'encode_bad');
remove_filter('pre_post', 'bb_encode_bad');
remove_filter('pre_post', 'bb_filter_kses', 50 );
remove_filter('pre_post', 'allow_images_encode_bad', 9 );
remove_filter('pre_post', 'allow_images', 52 );
return $post_text;
}
?>I got rid of the error, but it’s not propogating to the correct forum(I used the forum ID of 2 and I also tried just plain old “Site Posts” as the forum) need to debug some more, fel do you recognise anything plainly wrong with my hacked up code?
August 23, 2008 at 2:15 pm #3869Topic: Cookies of WordPress for BBPress
in forum Troubleshootingramym
MemberHello,
I just managed uploading and installing BBPress in a subdirectory of WordPress. Everything works just fine, and when you sign up on WordPress, you will also be able to log in with that account on BBPress, but there’s one problem:
When you log in on WordPress, and you go to BBPress, you have to log in again. So, members have to sign in 2 times, on the same account, one time for WordPress and one time on BBPress.
I’m running WordPress 2.6. In wp-config.php there was no SECRET_KEY. There was an AUTH_KEY and a SECURE_AUTH_KEY, but there was a BB_SECRET_KEY in bb-config.php. So, what should I do in wp-config.php?
I tried to define SECRET_KEY myself, but that didn’t work. The ‘code’ in SECRET_KEY in wp-config.php is the same as BB_SECRET_KEY in bb-config.php, but it still doesn’t work.
I hope it’s a little clear what my problem is.
Thanks,
Ramy
August 23, 2008 at 10:28 am #66929In reply to: Doing Integration, can’t login in bbpress
fel64
MemberIs there a problem with your wordpress install too?
To fix bbpress, you need phpmyadmin or a similar tool. Login, go to your bbpress database. Not certain what it’s like on 0.9, but you probably need to go to the bb_topicmeta table and perform a search (or browse through) to find a record where the
meta_keyiswp_table_prefix. Try deleting that record. Without that setting I think bb would look for its own users again.August 23, 2008 at 8:04 am #3867Topic: In which File or table are WordPress Integration infos ?
in forum Installationorizine
MemberJust to explain why
i’ve made a new installation, but i’ve made a mistake in the Prefixe db of my WP installation, and i would like to modify it is it possible?
August 22, 2008 at 7:51 pm #67108In reply to: Too many homepage queries
thion
Member155?! Whoh, and I’m worried about 18 queries in my still-in-development plugin
.It would be much easier to say anything if there would be any link…
August 22, 2008 at 9:00 am #67097In reply to: New Theme: bb_modmat
_ck_
ParticipantNice first try, I’ve put it here so you can see some of the issues:
http://bbshowcase.org/forums/?bbtheme=bb-modmat
One problem I noticed is your hard coded the feed icon image on several of the templates to point to your site – you’ll want to change that to the local image (calculate it based on the
bb_get_option('uri')or use a CSS background image instead )August 21, 2008 at 11:04 pm #3854Topic: [1.0 trunk] Display any type of media : how to ?
in forum Requests & Feedbacklstelie
MemberHello,
I’d like to be able to use in my forum posts, any type of medias, pictures of course but also video (flash code)
How can I do this ?
Thanks in advance
August 21, 2008 at 4:49 pm #66699In reply to: bbPress 1.0 alpha
lstelie
Member@ _ck_
Any series of steps you do via phpmyadmin can be saved in sql code and made into a converter. Give me the sql commands and I’ll make you a script.
In fact I’m not by far enough PHP and sql fluently to use sql commands.
My SimplePress forum is rather young so I don’t have thousands of messages (274 in fact).
I proceed in a very manual way :
On my Mac / Firefox I have 4 tabs, the old forum, the BBPress forum, the Old forum phpmyadmin and BBpress php myadmin
I copy a message in the old forum, craete a new message in BBpress then correct in phpmyadmin the time poster id and so on.
Old forum :
http://luc.saint-elie.com/echanges/
BBpress 1.0 install
http://luc.saint-elie.com/bbpress/
Its long but it works.
Luc
August 21, 2008 at 3:54 pm #66880In reply to: Blank Screen
chrishajer
ParticipantThe problem with editing your bb-config.php and posting it here is that you likely edited out anything in a password or secret key that is causing you a problem. So posting the edited version is mostly useless.
You use the
php -l bb-config.phpfrom a Linux command line. The edited version you posted here checks out fine, but I suspect your live, unedited version does not.August 21, 2008 at 3:40 pm #66698In reply to: bbPress 1.0 alpha
_ck_
ParticipantThere is at least one person I found via google who has done the simple:press conversion but they didn’t say how. I suspect it was the phpbb2 process.
Any series of steps you do via phpmyadmin can be saved in sql code and made into a converter. Give me the sql commands and I’ll make you a script.
August 21, 2008 at 2:29 pm #66878In reply to: Blank Screen
hanjra
Membercode<?php
// ** MySQL settings ** //
define(‘BBDB_NAME’, ‘*******’); // The name of the database
define(‘BBDB_USER’, ‘*****’); // Your MySQL username
define(‘BBDB_PASSWORD’, ‘******’); // …and password
define(‘BBDB_HOST’, ‘localhost’); // 99% chance you won’t need to change these last few
define(‘BBDB_CHARSET’, ‘utf8’); // If you are *upgrading*, and your old bb-config.php does
define(‘BBDB_COLLATE’, ”); // not have these two contstants in them, DO NOT define them
// If you are installing for the first time, leave them here
// Change BB_SECRET_KEY to a unique phrase. You won’t have to remember it later,
// so make it long and complicated. You can visit https://www.grc.com/passwords.htm
// to get a phrase generated for you, or just make something up.
// If you are integrating logins with WordPress, you will need to match the value
// of the “SECRET_KEY” in the WordPress file wp-config.php
define(‘BB_SECRET_KEY’, ‘*************************************’); // Change this to a unique phrase.
// If you are running multiple bbPress installations in a single database,
// you will probably want to change this.
$bb_table_prefix = ‘bb_’; // Only letters, numbers and underscores please!
// 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’, ”);
/* Stop editing */
if ( !defined(‘BB_PATH’) )
define(‘BB_PATH’, dirname(__FILE__) . ‘/’ );
require_once( BB_PATH . ‘bb-settings.php’ );
?>
That is my bb-config.php
August 21, 2008 at 12:15 pm #66877In reply to: Blank Screen
chrishajer
ParticipantSounds like you have a syntax error in the secret keys or cookie path that is creating trouble for bbPress creating the cookies. Line 188 of pluggable.php (in the 0.9.0.2 release, anyway) looks like this:
setcookie($bb->authcookie, $cookie, $expire, $bb->cookiepath, $bb->cookiedomain);Can you post your bb-config.php with as little editing as possible? There’s probably something wrong in that file.
Alternatively, check bb-config.php with the php command:
[~pimpforum ] php -l bb-config.php
No syntax errors detected in bb-config.phpThat’s an L, like php -L, but lowercase, in the command.
August 20, 2008 at 1:19 pm #67045In reply to: plugins on as default for users?
chrishajer
ParticipantI think each plugin is going to be different. In general though, if the plugin needs to be activated by a user by changing a setting, I don’t know how you could modify the plugin to default to already on.
I think it will be different for each plugin though. I don’t use any of those plugins, so I’m not sure. If you post the URL for each plugin, maybe someone can look at the code and see if it’s possible to default them to active for everyone.
August 20, 2008 at 11:06 am #66584In reply to: bbPress Top 100 – August ’08 update
djp
Membermy site has more posts than the lower half of the listing. Why’m I not in there?
http://www.mastercleanse.co.za/forum/
username: bbpress
Login: bbpress
just asking…
August 19, 2008 at 10:00 pm #67084In reply to: Theme – Modding Kakumei – Thread Zone Error
marcoapaulo
MemberYes, I found that in the sign options I’ve chosen something wrong
my bad… But still… if someone dont have a sig, and post something like, one or two lines of text, the error appear…
Lets just hope the members have much to talk, or at least, use the sign for something

Thanks
August 19, 2008 at 8:24 pm #67075In reply to: Redirect Loop after installation
danvollans
MemberMy issue is resolved. There was an issue with the user tables not collaborating, so I put WPMU 2.6 and bbPress 1.0 Alpha in separate databases, and followed _ck_’s tutorial on install. I also used the plugin for loss of admin access. Everything now works beautifully. (so far!
)WordPress:
http://blog.danvollans.com/wpmu/
bbPress:
August 19, 2008 at 8:17 pm #67082In reply to: Theme – Modding Kakumei – Thread Zone Error
marcoapaulo
MemberThanks for the quick answer

And yes… with a large amount of text, works just fine…
The forum can be found in here:
http://www.redcarpe.coresp.com/interpol/forum/
But its normal the signature dont appear? Because I thought: if the text isnt enough, the signature of the members could be the solution to this problem, since it adds more space to the post. But the signatures dont appear in every post, only in the first time the user reply in the thread… I use bbPress Signatures.
August 19, 2008 at 6:29 pm #66961In reply to: Mass email function
csseur3
Membernice, detective

but could you make a plugin with a graphic administration? now, there is a bit complicated to use for me and my other administrators lol :p
ck, what is better?
August 19, 2008 at 6:18 pm #67072In reply to: Redirect Loop after installation
danvollans
MemberEven deeper, this is a problem with the wordpress integration for me. I tried installing without integrating and it worked just fine. It’s possible that for me the integration must come afterwards..
August 19, 2008 at 5:40 pm #67070In reply to: Redirect Loop after installation
danvollans
MemberYeah, I have been looking for something similar. My error occurred actually in a different spot now that I remember. The issue that I was running into was when I created the KeyMaster user, I named it admin, foolishly. This came with an error saying that the user is already in my wordpress database so it could not create user “admin”. That is where the loop began. I have since cleared my cache, search history, and everything that you can clear in firefox including cookies.
I also tried this in Safari so it is most definitely not a browser related issue, or an issue with the actual bbPress, since this isn’t very common. It then must be a database issue, so I’ll continue to look into it.
Thanks for the ideas.
August 19, 2008 at 7:28 am #67060In reply to: how to include wordpress sidebar.php file in forums
chrishajer
ParticipantTo use WordPress functions inside bbPress, you need to do this:
https://bbpress.org/documentation/integration-with-wordpress/#functions (the Functions section at the bottom of that page). Be sure that include line is at the top of bb-config.php: right after the <?php is a good place for it.
That will allow you to use WordPress functions in a bbPress page (like
<?php get_sidebar(); ?>)Then, you need to include that function call in a bbPress template file (or files) where you want it to appear. You are responsible for making sure there’s room in the template for your sidebar.
August 18, 2008 at 7:51 pm #67018In reply to: error 404 when viewing forums
tronicscribe
Membergreat, thank you
that seems to have worked fine.
August 18, 2008 at 4:13 pm #67032In reply to: “Demo site” – wordpress integrations problem
chrishajer
ParticipantDid you look through all your files for that word? If it’s not in the files, then it’s encoded in the files (some WordPress themes have that base 64 encoded crap in the theme) or it’s coming from somewhere else, right?
I would try to find out where it’s coming from so you can figure out how to remove it.
August 18, 2008 at 2:29 pm #67028In reply to: “Demo site” – wordpress integrations problem
chrishajer
ParticipantYou need to put that include line at the very top of bb-config.php, right after
<?php. What happens if you do that?August 18, 2008 at 1:25 pm #67005In reply to: letter limit on user names
chrishajer
ParticipantYou can also add
overflow: hidden;to the .threadauthor section of your CSS. That just hides any portion of their username that is wider than the space in your template. This forum template is like that.
-
AuthorSearch Results