Search Results for 'code'
-
AuthorSearch Results
-
June 10, 2009 at 6:29 am #74251
In reply to: MU 2.7.1 bbPress rc-2 (trunk) integration
Sam Bauers
Participantdid you set the WP_AUTH_COOKIE_VERSION ?
For WP 2.7 it needs to be…
define('WP_AUTH_COOKIE_VERSION', 1);June 10, 2009 at 6:23 am #74253In reply to: bbPress in a subdomain, on a WPMU install?
Sam Bauers
ParticipantTotally possible, we do it on WordPress.com
Easiest approach is to setup a new virtual host for that subdomain before your WPMU virtualhost in Apache. You can then catch it before it goes to the WPMU install which usually catches all subdomains.
You can also do it from the same virtualhost for a thrill. That does require some .htaccess hackery. This is how WordPress.com is done.
NB: these rules are for bbPress 0.9 and are supposed to catch all our localised forum domains – it also may not work for everyone. The important part of the rules to note is the skip (S=30) rule at the start.
# Skip forum rules if not in *.forums.wordpress.com
RewriteCond %{HTTP_HOST} !^(.+.)*forums.wordpress.com
RewriteRule .* -
# Forum rules
# If you change the total number of rules, the skip rule above must be updated too
RewriteRule ^/?$ /bbpress/ [L]
RewriteRule ^bb-admin$ /bb-admin/ [R,L]
RewriteRule ^bb-admin/(.*)$ /bbpress/bb-admin/$1 [L,QSA]
RewriteRule ^bb-images/(.*)$ /bbpress/bb-images/$1 [L,QSA]
RewriteRule ^bb-includes/js/(.*)$ /bbpress/bb-includes/js/$1 [L,QSA]
RewriteRule ^([^/]+).php(.*)$ /bbpress/$1.php$2 [L,QSA]
RewriteRule ^forum/([^/]+)/page/([0-9]+)/?$ /bbpress/forum.php?id=$1&page=$2 [L,QSA]
RewriteRule ^forum/([^/]+)/?$ /bbpress/forum.php?id=$1 [L,QSA]
RewriteRule ^forum/?$ /bbpress/ [R,L]
RewriteRule ^topic/([^/]+)/page/([0-9]+)/?$ /bbpress/topic.php?id=$1&page=$2 [L,QSA]
RewriteRule ^topic/([^/]+)/?$ /bbpress/topic.php?id=$1 [L,QSA]
RewriteRule ^topic/?$ /bbpress/ [R,L]
RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ /bbpress/tags.php?tag=$1&page=$2 [L,QSA]
RewriteRule ^tags/([^/]+)/?$ /bbpress/tags.php?tag=$1 [L,QSA]
RewriteRule ^tags/?$ /bbpress/tags.php [L,QSA]
RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ /bbpress/profile.php?id=$1&page=$2 [L,QSA]
RewriteRule ^profile/([^/]+)/([^/]+)/?$ /bbpress/profile.php?id=$1&tab=$2 [L,QSA]
RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ /bbpress/profile.php?id=$1&tab=$2&page=$3 [L,QSA]
RewriteRule ^profile/([^/]+)/?$ /bbpress/profile.php?id=$1 [L,QSA]
RewriteRule ^profile/?$ /bbpress/profile.php [L,QSA]
RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ /bbpress/view.php?view=$1&page=$2 [L,QSA]
RewriteRule ^view/([^/]+)/?$ /bbpress/view.php?view=$1 [L,QSA]
RewriteRule ^rss/?$ /bbpress/rss.php [L,QSA]
RewriteRule ^rss/topics/?$ /bbpress/rss.php?topics=1 [L,QSA]
RewriteRule ^rss/forum/([^/]+)/?$ /bbpress/rss.php?forum=$1 [L,QSA]
RewriteRule ^rss/forum/([^/]+)/topics/?$ /bbpress/rss.php?forum=$1&topics=1 [L,QSA]
RewriteRule ^rss/topic/([^/]+)/?$ /bbpress/rss.php?topic=$1 [L,QSA]
RewriteRule ^rss/tags/([^/]+)/?$ /bbpress/rss.php?tag=$1 [L,QSA]
RewriteRule ^rss/profile/([^/]+)/?$ /bbpress/rss.php?profile=$1 [L,QSA]
RewriteRule ^rss/view/([^/]+)/?$ /bbpress/rss.php?view=$1 [L,QSA]
# If you add more forum rules then you must update the skip rule above them as wellJune 9, 2009 at 10:47 pm #57465In reply to: *seamless* wordpress integration
alvarix
MemberAfter reading some more posts on login difficulties, I found that removing
require_once('../wp-blog-header.php');allows me to login. But I need that, to get my header and footer.June 9, 2009 at 9:59 pm #57464In reply to: *seamless* wordpress integration
alvarix
MemberI was able to perform an integration (not db just a seamless design) using Kenzor’s method:
...in the header I have only:
<?php get_header(); ?>
In the footer I have only:
<?php get_footer(); ?>However I am not able to login. It takes me to the Add New Topic page without having logged me in.
This is what I added to my bb-config file, apart from it’s own db config
if (file_exists('../wp-blog-header.php'))
require_once('../wp-blog-header.php');
else
if (file_exists('../../wp-blog-header.php'))
require_once('../../wp-blog-header.php');Any advice greatly appreciated,
alvar
June 9, 2009 at 4:03 pm #74247In reply to: Pretty Permalinks (once again…)
chrishajer
ParticipantIt appears your domain is hosted at 1&1 Internet. If so, you might need to add this to the
top of your .htaccess file:
Options -MultiViewsI have domains with 1&1 and I needed to do that to make the rewrite rules work for me.
June 9, 2009 at 3:56 pm #74241In reply to: Fatal Error
chrishajer
ParticipantThe
bbpressdirectory does not go inside the WordPresspluginsdirectory. You probably want it here/home/ironogre/public_html/worldsworkshop/bbpress/and you will access it at http://www.worldsworkshop.com/bbpress/ . See if that works for you. Also, you can rename the bbpress directory to something else, like forums or community or something. That part of the URL is visible to the public, so make it meaningful to you.June 9, 2009 at 3:33 pm #74239In reply to: Warning on line 177 of db-mysql.php
madeck
MemberI’ve updated. The bug is still there. I got it fixed by putting into comment
<?php endif; echo "<!--"; do_action('topicmeta'); echo "-->"; ?>I did that because I think that was around where the error occured.
June 9, 2009 at 3:10 pm #74249In reply to: SMTP mailer for bbPress
Ipstenu (Mika Epstein)
ModeratorYou already have a post for this: Registration Email setup – To User along with Password
You don’t need to make multiple posts, that’s spamming

You probably don’t have email capabilities as a ‘server’ on your local machine. Have you ever installed websoftware that sends emails from localhost before?
June 9, 2009 at 3:05 pm #74238In reply to: Warning on line 177 of db-mysql.php
Ipstenu (Mika Epstein)
ModeratorI’d upgrade to 0.9.0.5 personally but you could try that too
June 9, 2009 at 2:32 pm #74237In reply to: Warning on line 177 of db-mysql.php
madeck
MemberbbPress version 0.9.0.4
PHP version 5.2.6
MySQL vesrion 5.0.67-community-log
Someone told me to change :
$this->rows_affected = mysql_affected_rows();for :
$this->rows_affected = mysql_affected_rows($this->dbh);June 9, 2009 at 1:37 pm #14937Topic: Pretty Permalinks (once again…)
in forum Troubleshootingstereopoly
MemberHey guys,
as many topics in this forum, this is another one concerning permalinks. I have read the FAQ here: http://bbpress.org/documentation/faq/#pretty-permalinks and I have tried both, using Options +MultiViews and also using the code generated by /bb-admin/rewrite-rules.php but I cannot seem to get my permalinks working.
http://www.mitstil.com/community is the link to my forums.
The bbpress installation will use pretty permalinks but my host calls it a 404! Please help!
June 9, 2009 at 4:19 am #74117Tynan Beatty
MemberThere’s no secret to it. All the info you need is in these forums. You mostly need to make sure that the […] in the following:
define('AUTH_KEY'[...]matchesdefine('BB_AUTH_KEY'[...]define('SECURE_AUTH_KEY'[...]matchesdefine('BB_SECURE_AUTH_KEY'[...]define('LOGGED_IN_KEY'[...]matchesdefine('BB_LOGGED_IN_KEY'[...]and
define('NONCE_KEY'[...]matchesdefine('BB_NONCE_KEY'[...]between your wp-config.php and bb-config.php.
Make sure you use different table prefixes for WP and bbP.
bb-config.php shouldn’t have anything extra defined in it past that, if you had left in WP2.8. Since you downgraded to 2.7 your bb-config.php needs to have
define('WP_AUTH_COOKIE_VERSION', 1);until you upgrade back to 2.8, at which point you need to remove that line again.Your wp-config.php needs to have
define('COOKIEPATH', '/wordpress/');where ‘wordpress’ is the path to wherever you installed WP, ordefine('COOKIEPATH', '/');if WP is in your site’s base folder.Visit the WP administration settings and fill out the bbPress Integration Plugin settings (but mind what I said above, you probably shouldn’t add what it suggests adding to your wp-config.php file).
Visit the bbP administration settings and fill out the WordPress Integration settings there as well.
As I said in the posts I linked earlier, everything works fine for me with WP2.8-RC1 or any of the betas, and bbP1.0-RC1, except that if users log in from bbP, they can’t log out from WP (which seems a somewhat trivial issue since I doubt many users will need to do that).
Hope you can get it working.
peace~
June 9, 2009 at 1:55 am #74114Atsutane
MemberNothing secret. My forum is on subdomain while my blog is on main domain.
All i need to do is define
define('COOKIE_DOMAIN', '.atsutane.net');anddefine('COOKIEPATH', '/');insidewp-config.phpAnd if you are using Bbpress 1.0 RC1 with WP 2.7.1, you need to defind this
define('WP_AUTH_COOKIE_VERSION', 1);inside bb-config.php.Another thing is, i let bbpress handle all registration and log in/log out process.
Hope this will help you
June 9, 2009 at 12:18 am #74210In reply to: Cannot begin installation
exchequer598
MemberHey thanks Ipstenu. I just tried removing this line:
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file= [L]And the installer is running. I guess this error is resolved (Though now I’m having trouble with Step 3 of the installation, which means I’m running over to another topic).
Thanks a lot
June 8, 2009 at 11:48 pm #74209In reply to: Cannot begin installation
Ipstenu (Mika Epstein)
ModeratorRewriteRule ^(.*/)?files/$ index.php [L]
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file= [L]What’s that for? It’s the only thing I don’t recognize.
June 8, 2009 at 6:42 pm #67734In reply to: Login using Facebook Connect
Shagalaga
MemberYeah give us facebook connect!

sry, i’m too stupid to program such a plugin myself xD
June 8, 2009 at 5:55 pm #74220In reply to: Good grief this is ridiculous! (URLs)
michael3185
MemberYay – got it! I removed the ‘fix nofollow & _blank’ code, and discovered how to add the _blank in by experimenting. bbPress wraps the URL in double quotes, so I used this;
Click here to get it.
Works fine. Just got to add the nofollow bit back in, though that affects forum spidering from what one of those other posts says. Well, at least I can open external links in a new window (or tab in Chrome). Thanks for the help!
I just re-added _ck_’s code to bb-tweaks;
add_filter(‘post_text’, ‘bb_rel_nofollow’);
but it isn’t adding the rel=”nofollow”. No worries though, this is fine;
Click here to get it.
June 8, 2009 at 5:47 pm #74219In reply to: Good grief this is ridiculous! (URLs)
chrishajer
ParticipantHow about posting it as HTML not bbCode, if it’s just you?
June 8, 2009 at 5:44 pm #74218In reply to: Good grief this is ridiculous! (URLs)
michael3185
MemberThanks, just installed that plugin, but it’s stripping out the URL. I posted;
Click here to get it.
and the other bb-tweak code I mentioned turned it into;
<ablah rel=”nofollow” target=”_blank”>Click here</ablah> to get it.
June 8, 2009 at 5:25 pm #74216In reply to: Good grief this is ridiculous! (URLs)
chrishajer
ParticipantThey don’t do anything because they don’t go anywhere. Take a look at the source (from the page you linked):
Get it at <a >http://www.google.co.uk/chrome.</a>Looks like your regex is stripping out the link altogether.
June 8, 2009 at 4:22 pm #74214In reply to: Good grief this is ridiculous! (URLs)
michael3185
MemberI’ve had a read through some of that (brain’s worn out!) but I don’t want to force all links to open new windows, just some to external sites. Users can go external, have a read, then close that window to return to my forum. So something like;
As none of the members know bbcode it’ll only be me doing it. Well, if I could get it working. Hmm… Sam’s code on one of those threads does it pre-post, so I guess that would work, unless I linked to another post, which I don’t want in a new window.
Ok, so… I added the following code from another post to my bb-tweaks.php;
// add nofollow to externa links only
function target_nofollow_external_only( $text ) {
$domain="travel-writers-exchange.com"; // domain to exclude from target and nofollow
// Strip ALL nofollow
$text = preg_replace('|<a>|iU','</a><a>', $text);
// Add back in when needed
$text = preg_replace('|</a><a>]+http
//))(?!([^>]+'.$domain.'))(.+)>|iU', '</a><a rel="nofollow">', $text);
return $text;
}
add_filter('post_text', 'target_nofollow_external_only',999);It stops my links from working somehow. They highlight, but don’t do anything when clicked. (Try http://mbforum.letsdoo.org/topic/if-your-web-browser-drives-you-mad).
June 8, 2009 at 2:56 pm #74213In reply to: Good grief this is ridiculous! (URLs)
chrishajer
ParticipantSo you want links that are in replied to open in a _blank window? Just certain ones, or every one automatically? This would make any link posted in a reply open in a new windows (i.e. adds
target="blank"to any link)”https://bbpress.org/forums/topic/open-links-in-new-window#post-15587
June 8, 2009 at 2:50 pm #74077In reply to: Confused about HTML Meta tags & SEO
chrishajer
ParticipantWhere were you expecting the keywords? Keyword meta tags belong in the
<head>section of the page. Are you talking about the admin interface or the source of the rendered page? I’m curious because I was thinking of using this as well.June 8, 2009 at 8:20 am #14927Topic: Jumpstarting the bbPress Codex
in forum Requests & Feedbackjohnhiler
MemberSam mentioned that he might set up a codex for us to start documenting bbPress… so I thought it might be useful to round up useful links with info we could cleanup for a bbPress codex:
Versions:
http://bbpress.org/forums/topic/new-stable-version-version-0905
http://bbpress.org/forums/topic/bbpress-10-release-candidate-1
http://bbpress.org/forums/tags/releases
WordPress and bbPress signin integration:
http://bbpress.org/forums/topic/wordpress-and-bbpress-integration-101
http://bbpress.org/forums/topic/basic-integration-screencast
Theme integration:
http://bbpress.org/forums/topic/seemless-wordpress-integration
php compatibility issues:
http://bbpress.org/forums/topic/warning-cannot-yet-handle-mbcs-in-html_entity_decode
http://bbpress.org/forums/topic/warning-cannot-yet-handle-mbcs-in-html_entity_decode-in-home2
Writing plugins:
http://bbpress.org/forums/topic/overwriting-template-functions
http://bbpress.org/forums/topic/list-of-hooksactions
Importing data:
http://bbpress.org/forums/topic/importing-from-phpbb
Translation:
http://bbpress.org/forums/topic/how-to-translate-bbpress-to-another-language
http://bbshowcase.org/forums/topic/bbpress-translation-internationalization-into-local-languages
Roles:
http://bbpress.org/forums/topic/adding-a-new-user-type?replies=6#post-9210
Miscellaneous FAQ’s:
http://bbpress.org/forums/topic/forums-started-39-years-ago
Please chime in and share what you’d like to see documented in a bbPress codex… and also, any links you’ve found particular valuable!
June 8, 2009 at 1:39 am #74208In reply to: Cannot begin installation
exchequer598
MemberI never saw even http://huddle.inversekarma.in/forums/index.php work!
Here’s my .htaccess in /huddle
RewriteEngine On
RewriteBase /
#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]
RewriteRule . index.php [L]
<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>And here’s the one in /huddle/forums
Options +MultiViews
Options +Indexes
IndexOptions ShowForbidden -
AuthorSearch Results