Search Results for 'test'
-
Search Results
-
HttpOnly cookies are a security advancement that is finally supported now by all major browsers (Firefox eventually got it right in 3.1, while IE 7 still has a bug but it generally works).
HttpOnly means a cookie cannot be read by javascript in the browser, only by the server (via PHP, etc.) This practically stops XSS exploits and makes it much harder if not impossible in most cases.
HttpOnly may “save your bacon” when a plugin has a security hole (like Private Messaging and bb-Reputation 0.0.5) and prevent a malicious script from forwarding your keymaster cookie to someone else via a XSS script.
I manged to get them to include HttpOnly in WordPress 2.7 and bbPress 1.0 but it’s still not in older WordPress or bbPress 0.9 because they worried about backward compatibility with some WordPress plugins that try to directly read the cookie (bad technique) instead of using server-side helpers.
However there are NO bbPress plugins that direct read the auth cookie and very few WordPress plugins still do this. I am not 100% positive how it will affect ajax but it shouldn’t because it’s still authorized on the server-side via PHP.
So if you’d like to try out HttpOnly on your bbPress 0.9, here’s how, it’s as simple as a mini-plugin. Note that if you are already using a cookie replacement plugin like my “Freshly Baked Cookies” or “Year Long Cookies” you will need to edit them instead of using the following (you can only use one cookie replacement plugin at a time).
I’d appreciate any feedback or experiences with this, especially if it causes problems:
Save this as
_HttpOnly.phpand upload into yourmy-plugins/directory:<?php
/*
Plugin Name: HttpOnly Auth Cookie
*/
function wp_set_auth_cookie($user_id, $remember = false) {
global $bb;
if ( $remember ) {
$expiration = $expire = time() + 1209600;
} else {
$expiration = time() + 172800;
$expire = 0;
}
$cookie = wp_generate_auth_cookie($user_id, $expiration);
do_action('set_auth_cookie', $cookie, $expire);
setcookie($bb->authcookie, $cookie, $expire, $bb->cookiepath, $bb->cookiedomain. '; HttpOnly' );
if ( $bb->cookiepath != $bb->sitecookiepath )
setcookie($bb->authcookie, $cookie, $expire, $bb->sitecookiepath, $bb->cookiedomain. '; HttpOnly' );
}
?>To prove it’s working, you CANNOT use the Firefox webdeveloper plugin because that looks at the cookie in Firefox’s chrome, not at the user level. What you have to do is
1. prove you can see your bbpress/wordpress cookie by typing or copying this to your browser address bar
javascript:alert(document.cookie);2. install the plugin
3. log out and then log in
4. again type or copy this to your browser address bar
javascript:alert(document.cookie);5. if it’s working, you should NOT see your wordpress/bbpress cookie in the alert
Currently the only plugin I am aware of that tries to read the cookie directly in WordPress is the
WP-UserOnlineplugin from GamerZ, and he may have even fixed that by now in the newest versions. However there may be others, so test your setup.Topic: Plugin @ ForumMatrix
Not a great title but it’s after 3am here.
I remembered in October last year _ck_ posted a link to ForumMatrix and it’s information on BBpress:
http://www.forummatrix.org/show/bbPress
Now, if it’s not someone involved with the project that keeps ForumMatrix up to date, then i’m very sorry for asking but right now i find it a good source of “where we’re at”, but ee seem to have PLUGIN listed in every box. The thing is, i dont think we have plugins for some of this stuff.
For example, where is the WYSIWYG plugin?
According to forum matrix BBpress has plugins for Full BBcode, WYSIWYG editor, nested quotes, syntax highlighting, multiple file attatchments, acl, blacklist, warnings, suspensions, ip-block, audit logging, user reports, rating/karma system, custom profile fields, split threads, calendar, pruning , archiving, export private messages, lo-fi view.
Thing is, i dont see any working plugins that do those jobs. Now, i’m more than happy to admit that i may be wrong (be great if i was), but i do find the whole current plugin page a bit of a mess (given that the latest plugins, latest talked about plugins, and the highest rated plugins are generally quite similar).
Any help in finding working plugins that BBpress is supposed to have would be really helpful

Thank you all
Hello,
Next days (or weeks) I sill start a new project. It will take long to develop and probably it will be finished later this year. I think it will 6 months or a bit more. It must be integrated with the latest version of WordPress.
So, I’m thinking about starting the project with the 1.0 alpha versions. I know it’s not as stable or secure as 0.9.x but hope it will be later this year. I’ve seen there are lots of changes from 0.9 to 1.0 and perhaps will be easiest to merge the new 1.0 versions than 0.9 to 1.0…
What’s your opinion? It’s the best idea to start the project with the alpha version ? Or you would start it with 0.9x and in the future you will make all arrangements to upgrade it? Consider that it will be finished this year fall.
Thanks for your comments,
Txanny.
Topic: Amended Profile page
(profile.php in theme folder)
My users were asking for the ability to jump to the last post on the ‘User Activity’ area within their profile page. So I amended the page to use tables like the favorites listings do with two columns >
TOPIC > DETAILS
topic name > You replied 2 weeks ago. No replies since.
<?php bb_get_header(); ?>
<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php _e('Profile') ?></h3>
<div class="vcard">
<?php if ( $avatar = bb_get_avatar( $user->ID ) ) : ?>
<div id="useravatar"><?php echo $avatar; ?></div>
<?php unset($avatar); endif; ?>
<h2 id="userlogin"><span class="fn"><?php echo get_user_display_name( $user->ID ); ?></span> <small>(<span class="nickname"><?php echo get_user_name( $user->ID ); ?></span>)</small></h2>
<?php if ( $updated ) : ?>
<div class="notice">
<p><?php _e('Profile updated'); ?>. <a href="<?php profile_tab_link( $user_id, 'edit' ); ?>"><?php _e('Edit again »'); ?></a></p>
</div>
<?php elseif ( $user_id == bb_get_current_user_info( 'id' ) ) : ?>
<p>
<?php _e('This is how your profile appears to a logged in member.'); ?>
<?php if (bb_current_user_can( 'edit_user', $user->ID )) : ?>
<?php printf(__('You may <a href="%1$s">edit this information</a>.'), attribute_escape( get_profile_tab_link( $user_id, 'edit' ) ) ); ?>
<?php endif; ?>
</p>
<?php if (bb_current_user_can( 'edit_favorites_of', $user->ID )) : ?>
<p><?php printf(__('You can also <a href="%1$s">manage your favorites</a> and subscribe to your favorites’ <a href="%2$s"><abbr title="Really Simple Syndication">RSS</abbr> feed</a>.'), attribute_escape( get_favorites_link() ), attribute_escape( get_favorites_rss_link() )); ?></p>
<?php endif; ?>
<?php endif; ?>
<?php bb_profile_data(); ?>
</div>
<h3 id="useractivity"><?php _e('User Activity') ?></h3>
<div id="user-replies" class="user-recent">
<h4><?php _e('Recent Replies'); ?></h4>
<?php if ( $posts ) : ?>
<table id="favorites">
<tr>
<th><?php _e('Topic'); ?></th>
<th><?php _e('Details'); ?></th>
</tr>
<?php foreach ($posts as $bb_post) : $topic = get_topic( $bb_post->topic_id ) ?>
<tr<?php alt_class('replies'); ?>>
<td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
<td class="num">
<a href="<?php topic_last_post_link(); ?>">
<?php if ( $user->ID == bb_get_current_user_info( 'id' ) ) printf(__('You replied %s ago.'), bb_get_post_time()); else printf(__('Latest reply %s ago.'), bb_get_post_time()); ?>
<span class="freshness"><?php
if ( bb_get_post_time( 'timestamp' ) < get_topic_time( 'timestamp' ) )
printf(__('Latest reply %s ago'), get_topic_time());
else
_e('No replies since.');
?></span>
</a>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php else : if ( $page ) : ?>
<p><?php _e('No more replies.') ?></p>
<?php else : ?>
<p><?php _e('No replies yet.') ?></p>
<?php endif; endif; ?>
</div>
<div id="user-threads" class="user-recent">
<h4><?php _e('Topics Started') ?></h4>
<?php if ( $topics ) : ?>
<table id="favorites">
<tr>
<th><?php _e('Topic'); ?></th>
<th><?php _e('Details'); ?></th>
</tr>
<?php foreach ($topics as $topic) : ?>
<tr<?php alt_class('topics'); ?>>
<td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
<td class="num">
<a href="<?php topic_last_post_link(); ?>">
<?php printf(__('Started: %s ago.'), get_topic_start_time()); ?>
<span class="freshness"><?php
if ( get_topic_start_time( 'timestamp' ) < get_topic_time( 'timestamp' ) )
printf(__('Recent reply: %s ago.'), get_topic_time());
else
_e('No replies.');
?></span>
</a>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php else : if ( $page ) : ?>
<p><?php _e('No more topics posted.') ?></p>
<?php else : ?>
<p><?php _e('No topics posted yet.') ?></p>
<?php endif; endif;?>
</div>
<div class="nav">
<?php profile_pages(); ?>
</div>
<?php bb_get_footer(); ?>I hate it when something so easy is giving me problems. I have a link to my search page… mysite.com/myforum/search.php… like that. And it works fine, except the font color on the search form itself is a gray or reddish color and it doesn’t go with my dark blue layout… I need the font to be white. With CSS I’ve got the font set to white everywhere else, even the search results are white, but the form itself is not so you can barely read it.
I’ve tried editing the color with CSS, regular html, I’ve been in my search.php in my forum root and my search.php in my template, and I’ve been in my search-form.php file, and no matter what I do… I can only get the font to change in firefox… for some reason in ie6, which should be illegal to use, the font it not white.
I simply added <font color=”white”></font> to the form, and again, it works in firefox, but when I test it with ie6 it doesn’t work. Why?
I even tried adding a new div… I added <div id=”searchcolor”>search form code here</div> then in my CSS file I have #searchcolor {color:white;}, but even that doesn’t work. Nothing seems to change the form font color in ie6.
This is frustrating because it’s something SO simple! Font color!
I want to get the latest version, but I was wondering what would actually go wrong with it.
I mean dont you just develope it further from 0.9 which was stable…. so.. it should be fine. i mean what could go wrong with it?
Hey guys,
I just installed bbpress at http://www.halifamous.com/staff for writers of a new blog to discuss ideas for the site. I am able to view the main forum page, and get into the admin section. The problem is that I’m getting a blank page any time I try to click through to the test post or into the ‘Introductions’ forum section I created. I also get a blank page when I try to access my user profile.
I haven’t touched the code. Any idea why this might be happening?
Thanks,
Greg
