Search Results for 'code'
-
AuthorSearch Results
-
December 22, 2006 at 5:55 am #52195
In reply to: Template of this forum??
weirdtherapy
Memberthe easiest way would be a link to a zip to download it I think

I just tried to piece it together with the information from the sourcecode … and I think it might be done, but for me it looked easier to build it new.
The CSS file as jonlandrum metioned would be a start for it, but it’s still a bit of work to do because it doesn’t use all the same id’s (like rap instead of wrapper).
December 22, 2006 at 2:01 am #50206In reply to: About Freshness
ryuuguu
MemberI wrote a quick plugin to correct this it is at
http://www.ryuuguu.com/wordpress/2006/12/22/correcting-bbpress-freshness-1/
you will need to edit
$hours=-18;
[code]
to find the right number for your offset[code]
$hours=-18;
to find the right number for your offset
[code]
to find the right number for your offset
December 22, 2006 at 1:01 am #52785In reply to: Undefined Fucntion_e() problem.
cgavin
MemberRight, cant fix the timezone as I have no idea what time zone it is in. Its 3000 miles away.
Cant be bothered with this – clicking a topic redirects me to my WordPress homepage? Eh?
Then it says the admin user I created and logged in as 10 mins ago doesnt exhist anymore. Riight.
Think I’ll stick with something more mature.
See you when bbpress gets there init.

Thanks again, but I dont have anymore time to waste ..
I just spunked 3 hrs on this! Thats more than enough ..
December 22, 2006 at 12:51 am #52784In reply to: Undefined Fucntion_e() problem.
cgavin
MemberFun fun fun.
December 22, 2006 at 12:47 am #52783In reply to: Undefined Fucntion_e() problem.
chrishajer
ParticipantAlso, the config.php editing thing was addressed for version .74 here:
https://trac.bbpress.org/ticket/477
<strong>Description</strong>There are many common errors made when editing config.php.
We can check for these errors prior to installation refuse to install if things are out of whack.
It’s not an install script, but it does at least validate the config. It won’t prevent the errors but it will catch them.
December 22, 2006 at 12:39 am #52791In reply to: WP/BB Integration Admin problem
chrishajer
ParticipantI have WP and bbPress integrated and have no problem logging in as admin in WP then also being admin in bbPress. I have the opposite problem (not really a problem): when I log into bbPress as a normal user, and I try to access wp-admin, it gives me an error about not having sufficient permissions. In wp-admin > users, I edited the permissions for the “normal” bbPress user, and he can act as admin at WP now. Never tried to admin bbPress as that user…
I think it’s probably something else: I did not require the hack you are suggesting to make this work.
In bbPress, does it say:
Welcome, admin! View your profileĀ» (Admin | Logout)up top?
If it does, clicking the Admin link there will take you to the bbPress dashboard. Is that not happening for you?
December 22, 2006 at 12:22 am #52780In reply to: Undefined Fucntion_e() problem.
cgavin
MemberNevermind, I fixed it.
Just kidding.
I hate it when people dont post how.

I left a ‘ in there after editing the config. It was unattached to anything.
Hence the error.
Again ^ re-iterating my suggestion that you take away the config editing at least superficially (ie you can if you really must) and have it as fields in a PHP form so you cant f*** it up.
December 21, 2006 at 11:56 pm #1140Topic: WP/BB Integration Admin problem
in forum Pluginsbakedlogdotcom
MemberI have successfully integrated WordPress and BBPress (http://bbpress.org/forums/topic/12?replies=25#post-2502) but I am having 1 problem..
When I log in as admin in BBPress, it seems to be logging me in with the ‘admin’ account from WordPress, and not giving it admin privileges on the BBPress system, (ie: i can’t go to /bb-admin to edit anything).
The only thing i can think of is somehow excluding the ‘admin’ account integration when you log into bbpress, something like
if ($user=='admin') { #skip integration }
Or is there something I am missing..?
Thanks,
-BHensley.com
-Bakedlog.com
December 21, 2006 at 11:19 pm #52778In reply to: Undefined Fucntion_e() problem.
cgavin
MemberI took the config down because it was publishing the entire file before the function error – ie all my passwords were freely advertised!

Anyway I tried again with a fresh config:
http://www.cjgavin.com/bbpress/bb-admin/install.php
Parse error: syntax error, unexpected T_VARIABLE in /home/virtual/site122/fst/var/www/html/bbpress/config.php on line 53
Better than undefined function.

(line 53) $bb->wp_home = ‘http://www.cjgavin.com’; // WordPress – Options->General: Blog address (URL) // No trailing slash
Whats wrong with that??
Lines 52 > 54:
$bb->;wp_table_prefix = ‘wp_;’
$bb->;wp_home = ‘http://www.cjgavin.com’;
$bb->;wp_siteurl = ‘http://www.cjgavin.com’;
December 21, 2006 at 11:10 pm #52777In reply to: Undefined Fucntion_e() problem.
chrishajer
ParticipantWhen I go here:
http://www.cjgavin.com/bbpress/
I get this:
There doesn't seem to be a config.php file. I need this before we can get started. Open up config-sample.php, fill in your details, and save it as config.php.Did you rename config-sample.php to config.php?
When I try to load config-sample.php directly, I get this error:
Parse error: syntax error, unexpected ':' in /home/virtual/site122/fst/var/www/html/bbpress/config-sample.php on line 53Maybe that colon is related to one of the wp_ URL lines (URLs must be quoted.)
Hang in there: you’re close.
December 21, 2006 at 10:47 pm #52773In reply to: search.php enhancement request
chrishajer
ParticipantI wonder if the problem with this line:
bb_get_user($bb_post->poster_id)->user_loginis related to this style syntax and could be fixed in a similar manner (if necessary):
December 21, 2006 at 10:25 pm #52772In reply to: search.php enhancement request
chrishajer
ParticipantUpdate: the above was working, but on the command line,
php -lcomplained:parse error, unexpected T_OBJECT_OPERATOR in… that lineI got this to work:
<?php _e(' by ') ?><a href="<?php user_profile_link($bb_post->poster_id); ?>"><?php echo get_user_name($bb_post->poster_id); ?></a>That’s what was suggested initially: I’ m not sure what I did wrong the first time around, but this is what is working now, with no parse errors. Thanks.
December 21, 2006 at 9:04 pm #52771In reply to: search.php enhancement request
chrishajer
Participant<?php _e(' by ')?><?php echo bb_get_user($bb_post->poster_id)->user_login ?>Returns the user’s name. Perfect. Thanks.
December 21, 2006 at 8:37 pm #52768In reply to: search.php enhancement request
ardentfrost
MemberTry this
echo bb_get_user($bb_post->poster_id)->user_loginOr you can try to do it the way topics do it and just use this:
post_author_link();That will also return the name as a link to their webpage.
Worth a try I guess.
December 21, 2006 at 8:29 pm #52767In reply to: search.php enhancement request
chrishajer
Participantbb_get_user($bb_post->poster_id)also did not work (does not error, just shows no output.)also
$bb_post->poster_iddoes not return anything either.December 21, 2006 at 8:25 pm #52766In reply to: search.php enhancement request
chrishajer
ParticipantThat does not work

Here is the code I am using:
<?php foreach ( $recent as $bb_post ) : ?><li><a href="<?php post_link(); ?>"><?php topic_title($bb_post->topic_id); ?></a><small> <?php _e('Posted') ?> <?php echo date(__('F j, Y, h:i A'), bb_get_post_time()); ?><?php _e(' by ')?><?php get_user_name($bb_post->poster_id) ?></small>
seems like it should work. It doesn’t error out, it’s just blank after the ” by “
Is there a list of functions, similar to the WP codex, where I could learn about them?
Thanks.
December 21, 2006 at 8:00 pm #52765In reply to: search.php enhancement request
ardentfrost
MemberYou should be able to do this:
get_user_name($bb_post->poster_id)Tell me if that doesn’t work.
December 21, 2006 at 7:54 pm #52774In reply to: Request: “Summon” plugin
ardentfrost
MemberNot a bad idea. It doesn’t seem like it’d be too hard, and I think you could probably gank a lot of the post notification code someone else wrote to do it.
December 21, 2006 at 5:09 pm #1135Topic: search.php enhancement request
in forum Requests & Feedbackchrishajer
ParticipantI’ve modified search.php a bit to make the results a little more readable (to my eye) and I was wondering how to get the poster name, to display with the results for recent posts and relevant posts.
I would like to display something like:
<a href="<?php post_link(); ?>"><?php topic_title($bb_post->topic_id); ?></a> <small><?php _e('Posted') ?> <?php echo date(__('F j, Y, h:i A'), bb_get_post_time()); ?></small> [BY MEMBER]
the [BY MEMBER] part, to get the name of the member who made the post that is listed is the part I need help with. Thank you.
December 21, 2006 at 3:17 pm #52760In reply to: Determine topic’s status
ardentfrost
MemberThe function
topic_resolved()echo’s back whether the topic is resolved, not resolved, or not a support question. You can even change what it echo’s by passing strings to the function.Otherwise you want the function
get_topic_resolved($id)which will return yes, no, or mu (for it is resolved, it’s not resolved, or it’s not a support question).But if you don’t like that method, you can always get it straight from the database… it’s just more work for the server that way.
December 21, 2006 at 2:52 pm #52755In reply to: Use the possibilities of the WP plugins …
Trent Adams
MemberNot very had to write plugins if you are a coder and look at pluggable.php as it uses a similar structure as WordPress. Right out of the box, bbPress may never work straight away with WP plugins without a core change in code.
Trent
December 21, 2006 at 9:45 am #52623In reply to: Plugin aint working, what am I doing wrong
Null
MemberFixed it myself. It was the:
FROM $bbdb->portal"that didn’t work. Changed it intoFROM ".$bb_table_prefix."portal"and added $bb_table_prefix; in the global as well and all seems to work fine now.Working code:
$pforum_id = $bbdb->get_var("SELECT pforum_id FROM ".$bb_table_prefix."portal");Thx for the suggestions given
Null
December 21, 2006 at 5:44 am #52731In reply to: Plugin – Memberlist *UPDATE*
ardentfrost
Membernaw, it’s ok. Spencer just gets the weirdest problems with stuff, but I still got it tested
December 21, 2006 at 4:14 am #49548In reply to: Plugins for WordPress integration
bakedlogdotcom
MemberI have successfully setup my site to integrate registrations/logins between wordpress on its own DB and domain (blog.bakedlog.com) and bbpress on its own DB and domain (forum.bakedlog.com).
Files:
WP: wp-content/plugins/bbpress-integration.php
BBP: my-plugins/wordpress-integration.php
- I can create a user in wordpress and log into bbpress with it.
- I can create a user in bbpress and log into wordpress with it.(although the default role set for wordpress does not let me write (how do i change this?))
However, I too cannot get cookies to authenticate between the two systems.
I have included the following in bbpress’s
config.php:$bb->cookiedomain = 'bakedlog.com';
$bb->cookiepath = '/';
I monitored the cookies created on my computer as I logged into each system, and noticed that bbpress was creating the cookie correctly, domain: bakedlog.com, while when I logged into wordpress it would set the domain on the cookie to blog.bakedlog.com.
So the problem is with WordPress..
Looking in WordPress’
wp-settings.phpI see:if ( !defined('USER_COOKIE') )
define('USER_COOKIE', 'wordpressuser');
if ( !defined('PASS_COOKIE') )
define('PASS_COOKIE', 'wordpresspass');
if ( !defined('COOKIEPATH') )
define('COOKIEPATH', $current_site->path );
if ( !defined('SITECOOKIEPATH') )
define('SITECOOKIEPATH', $current_site->path );
if ( !defined('COOKIE_DOMAIN') )
define('COOKIE_DOMAIN', '.' . $current_site->domain);
So, in WordPress’
wp-config.phpI inserted:// BBPRESS INTEGRATION
define('COOKIE_DOMAIN', 'bakedlog.com');
Clearing my cookies and logging into WordPress, I see the cookie domain is correct and matches my BBPress’.
But, there is still another problem, the cookies set by BBPress appends an md5 hash based on the site url and table prefix to the cookie’s name (ie: wordpressuser_bf17f59023eb22f…..) while WordPress’ cookie name is only: wordpressuser
I looked around in
bb-settings.phpand found:define('BBHASH', $bb->wp_siteurl ? md5($bb->wp_siteurl) : md5($bb_table_prefix) );
if ( !isset( $bb->usercookie ) )
$bb->usercookie = ( $bb->wp_table_prefix ? 'wordpressuser_' : 'bb_user_' ) . BBHASH;
if ( !isset( $bb->passcookie ) )
$bb->passcookie = ( $bb->wp_table_prefix ? 'wordpresspass_' : 'bb_pass_' ) . BBHASH;
So, the next step is to define $bb->usercookie and $bb->passcookie in BBPress’
config.php:// COOKIE SHARING WITH WORDPRESS
$bb->cookiedomain = 'bakedlog.com';
$bb->cookiepath = '/';
$bb->usercookie = 'wordpressuser';
$bb->passcookie = 'wordpresspass';
I cleared my cookies and tested it, VOILA! I can log into either section (bbpress or wordpress) and switch to the other without losing authentication!
==========SOLUTION===========
BBPRESS CONFIG.PHP:// COOKIE SHARING WITH WORDPRESS
$bb->usercookie = 'wordpressuser';
$bb->passcookie = 'wordpresspass';
WORDPRESS WP-CONFIG.PHP:// COOKIE SHARING WITH BBPRESS
define('COOKIE_DOMAIN', 'bakedlog.com');
==========********===========
Thats it I believe, let me know if it works for you or if you see anything I have done that could crash either program.
-BHensley.com
-Bakedlog.com
Trent Adams
MemberI would imagine that this will not occur in the core code. This is something that can be added through a plugin (as with image plugin) and will be worked on by members of this community as time progresses. It shouldn’t be too long for something like this to surface, but it will take a little time.
Trent
-
AuthorSearch Results