Search Results for 'code'
-
AuthorSearch Results
-
July 16, 2008 at 5:51 pm #55405
In reply to: Pretty Permalinks Not Working
_ck_
ParticipantWait, so was this ever resolved after a year?
With WordPress in the root and bbPress in a sub-directory (ie. /forums/) can they both have pretty permalinks?
I have an idea if not – simple edit the webroot wordpress htaccess like so:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/forums/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>where
/forums/is the install path of bbpres underneath wordpress. Remember you still need the local htaccess for bbpress in it’s own folder.July 16, 2008 at 5:04 pm #65883In reply to: Hide login form on registration page
_ck_
ParticipantSure, if that really bothers you, with bbPress you can do almost anything if you get clever.
Edit the
login-form.phptemplate and wrap the entire<form></form>in something like this (untested)<?php if (bb_get_location()!="register-page") { ?>
<form blah blah blah
...
</form>
<?php } ?>July 16, 2008 at 4:05 am #65897_ck_
ParticipantOh wow I wonder when they slipped that in. Good find.
I bet it’s just copied from the WordPress code.
If you know how, you might want to stick that into TRAC (and if you have the time, check WordPress and it’s TRAC too)
July 16, 2008 at 3:21 am #3629Topic: getmypid() – often disabled on shared hosting systems
in forum Troubleshootingi_xiter
MemberIn bb-includes/class-phpass.php on line 43, bbpress uses getmypid() to create the randomstate for password hashes.
On shared hosting systems, getmypid() is disabled very often.
I replaced it with uniqid(), and bbpress didnt throw the WARNING anymore.
getmypid() does not return a unique value in all cases. Especiall when PHP is running as an apache module in shared hosting sytems. Also for this reason its much better to use uniqid().
uniqid() gives a 13 digits value. uniqid(”, true) even 23 digits. I think this should be good enough for the randomstate.

Please consider to use uniqid() in future versions of bbpress.
thx for your attention
ix
July 15, 2008 at 11:00 pm #65872In reply to: WordPress 2.6 – problems logging in
_ck_
ParticipantThe trouble is that the developers on the WP side, in their wisdom
decided to re-use an existing cookie name for a new purpose and change the cookie path.The idea is higher security as the admin cookie in theory should only get transmitted when you are entering the admin section.
This is why you need to try deleting all your cookies (for your site) after installing WP 2.6
If that fails, try my
definefix above.Note that changing the cookie path to ‘/’ takes you back to the lower level of security that WP 2.5.1 and earlier had. There’s a particular WP mod who’s upset with me for even suggesting this but I figured the idea is to get you up and running ASAP first until they address this later.
Also, none of this truly fixes WP 2.6 to work properly with cookie integration with bbPress 0.9.0.2 – that’s going to require an upgrade on the bbPress side.
July 15, 2008 at 10:04 pm #65762In reply to: bbPress consulting – bit of help needed
724719
Inactivehey dbbpress1;
what do you mean exactly by
all of the redirects are causing me problems. I need the pages to return directly without redirecting to show new content.July 15, 2008 at 10:01 pm #65882In reply to: Where do I edit the “Welcome, user! Logout.
724719
Inactivego to the logged-in.php file in your template folder (e.g. http://www.yourdomain.com/yourforum/bb-templates/kakumei/logged-in.php)
you’ll find this piece of code. change it to your likin :-
<p class="login">
<?php printf(__('Welcome, %1$s!'), bb_get_profile_link(bb_get_current_user_info( 'name' )));?>
<?php bb_admin_link( 'before= | ' );?>
| <?php bb_logout_link(); ?>Good Luck!
Sway
July 15, 2008 at 9:48 pm #65227In reply to: wpmu 1.5.1 + bbpress 0902 Login Cookie Solved!
matjack1
Memberthank you!!
works also for me!
July 15, 2008 at 8:22 pm #55246In reply to: Check if a user is logged in?
parthatel
Memberchrishajer, the code you gave me worked. (I barely saw the “Y” in the “You are logged in” hiding behind my main content). So I guess that the code I tried before worked, only that it was hidden behind my main content so I didn’t see it.
Thanks.
July 15, 2008 at 8:15 pm #65870In reply to: WordPress 2.6 – problems logging in
750331
InactiveMy installation seems to work with just that slash “/” on it own, but at least it working. I added the below into my
wp-config.phpfile@define('ADMIN_COOKIE_PATH', '/');I have tried it with
'/blog/wp-admin'and that didn’t seem to work, at all.July 15, 2008 at 8:01 pm #55245In reply to: Check if a user is logged in?
chrishajer
Participantparthatel can you post your code here?
What function are you using to check if the user is logged in? Does it error out or does it just not display any content (if it does not error, then the function is probably a valid function.)
And showing one content for logged in members and other content for other members is pretty basic PHP:
<?php
if (bb_is_user_logged_in() ) {
echo "You are logged in.n";
}
else {
echo "You are not logged in.n";
}
?>I’m 99% certain that is the proper function name, and the code will work.
July 15, 2008 at 7:50 pm #65792In reply to: Integration Problems Now Can’t log in at all.
chrishajer
ParticipantThere is a table bb_usermeta (or whatever table prefix you used) that will have a record bb_capabilities and a meta_value of
a:1:{s:9:"keymaster";b:1;}. You need to find the account that has that value; that’s your keymaster account.With an integrated installation, I think the table will be wp_usermeta. To figure out what account it is first, look in the wp_users table and find the keymaster account, and then take the ID from there and check the wp_usermeta table for the proper capabilities.
I think with the proper ID, if it’s not 1, you can change the id in the “Fix Admin Access” to this ID and try the plugin again.
July 15, 2008 at 7:21 pm #55244In reply to: Check if a user is logged in?
parthatel
MemberThat doesn’t work when I add that to my WordPress (it has integrated functions). Nothing appears when I added the code. Also, what is the code to display content if user is logged in, else (if not logged in) display some other content.
July 15, 2008 at 7:09 pm #65862In reply to: Removing Registration
724719
Inactiveit usually goes as follows:-
`blahblah.com/forum/bb-templates/kakumei/login-form.php
note: – “kakumei is the theme name, you could try replacing it with the title of your theme your using”
find this snippet of code:-
<?php printf(__('<a href="%1$s">Register</a> or log in'), bb_get_option('uri').'register.php') ?>and replace it with
<?//php printf(__('<a href="%1$s">Register</a> or log in'), bb_get_option('uri').'register.php') ?>all you doing here is blocking out this code by putting the blocks “//” which means the code (link) to the registration page is will no longer be there.
Good luck
sway
July 15, 2008 at 6:42 pm #65869In reply to: WordPress 2.6 – problems logging in
_ck_
ParticipantOkay, some bbPress users may be able to get it to work with WordPress 2.6 by adding to your
wp-config.php@define('ADMIN_COOKIE_PATH', '/blog/wp-admin');where “blog” is your blog’s actual path. If it’s in the webroot, just take out “blog” entirely and leave
'/wp-admin'July 15, 2008 at 4:49 pm #65133In reply to: Private Messaging Extended
Null
MemberOk (just asking this cause i am working on a plugin myself), but how about the next step. I have this to create a table if it doens’t excist:
bb_register_activation_hook(__FILE__, 'bbmenu_install_check');
function bbmenu_install_check() {
global $bbdb;
$bbdb->hide_errors();
$installed = $bbdb->get_results("show tables like ".$bbdb->prefix."bbmenu");
if ( !$installed ) :
$bbdb->query(" CREATE TABLE IF NOT EXISTS <code>".$bbdb->prefix."bbmenu</code> (
<code>item_id</code> INT(3) NOT NULL AUTO_INCREMENT,
<code>item</code> varchar(50) NOT NULL default '',
<code>set</code> varchar(50) NOT NULL default '',
<code>page</code> varchar(50) NOT NULL default '',
<code>location</code> varchar(50) NOT NULL default '',
<code>order</code> int(9) NOT NULL default '0',
PRIMARY KEY (<code>item_id</code>)
)");
endif;
$bbdb->show_errors();
}But I also want to put some data in it:
"INSERT INTO$bbdb->menu` VALUES(DEFAULT, ‘Forums’, ‘active’, ‘index.php’, ‘front-page’, 0),
(DEFAULT, ‘Search’, ‘active’, ‘search.php’, ‘search-page’, 1),
(DEFAULT, ‘Statistics’, ‘inactive’, ‘statistics.php’, ‘stats-page’, 0);”;`
How to do this in the same query?
July 15, 2008 at 11:05 am #65861In reply to: Removing Registration
749549
InactiveI’m not terribly good with code, I was hoping there was a plugin or option I could use rather than editing each page because I’m sure I’ll mess something up! But if that’s how it must be, that’s how it must be…
July 15, 2008 at 10:51 am #65131In reply to: Private Messaging Extended
Null
MemberSo why not use:
$bbdb->privatemessagesor doesn’t this work anymore?July 15, 2008 at 7:43 am #65832In reply to: Infinite Loops on posts and profiles with IIS
737705
InactiveYeah I’ve tried what you’ve tried there with the re-directs and yep, it just dies.
But no meta-redirects are used in my sites at all. For experimentation I tried the domain with two different domain bindings, multiple domain bindings. But no difference.
I tried an older version of bbpress, same problem. I installed bbpress fresh into a different domain, same problem.
I noticed this guy here had a similar prob a while back:
But never said how he solved it, I might join up to his forum and ask him….
But yes this is driving me crazy…on a plus note when I finally fix it I can fresh install bbpress in about two minutes

Any other suggestions from folk greatly appreciated. And thanks for ongoing help Chris.
July 15, 2008 at 6:42 am #65788In reply to: Integration Problems Now Can’t log in at all.
chrishajer
ParticipantYou’re not using WPMU are you? I just noticed this in the first post:
mu cacheThat’s just a typo though, right? It was ‘my cache and cookies’?
July 15, 2008 at 6:40 am #65787In reply to: Integration Problems Now Can’t log in at all.
chrishajer
ParticipantThe CSS for .threadauthor looks like this:
overflow-x: hidden;
overflow-y: hidden;The end of a long username will just be hidden, that’s all. It’s not something to be fixed. In FF 2.0.0.15, I see hyperhook but if I resize the font, I can see more or less of the name. It’s just a layout thing. Long usernames would break the narrow layout without the overflow being hidden.
July 14, 2008 at 11:32 pm #65831In reply to: Infinite Loops on posts and profiles with IIS
chrishajer
ParticipantI see
So you turn on permalinks to prevent people from viewing anything and putting their request into an infinite loop. Got it.I see now that it’s still broken. Are you sure there is nothing causing a meta redirect? The only thing that stops the looping for me is to disable meta redirects in my browser. Other than that, it loops forever.
July 14, 2008 at 8:56 pm #65130In reply to: Private Messaging Extended
Detective
Member$bbdb->prefixis a string containing your installation db prefix.July 14, 2008 at 12:50 pm #65129In reply to: Private Messaging Extended
Null
MemberHI,
The installation file contains:
$bbdb->prefix."privatemessages"What does this prefix. do? Or where does it stand for? Is prefix the bb_ in the database? I believe not since $bbdb doest this already, so what is it?
Thanks
July 14, 2008 at 2:56 am #50096In reply to: Load Bbpress into WordPress
chrishajer
ParticipantYou need to add this to the top of your wp-config.php right after
<?php:require_once('/path/to/bbpress/bb-config.php');I would use the full server path to the bb-config.php file, not a relative path like
./bbpress/bb-config.php(rumor is that full paths work better) and not a URL likehttp://www.example.com/bbpress/bb-config.php(URLs won’t work at all here).That’s it, just one step. Good luck.
-
AuthorSearch Results