Search Results for 'code'
-
Search Results
-
mod_rewrite and wp_redirect don’t seem to like each other. I’m running into problems with the wp_redirect functions in bbPress redirecting the page after the URL has been rewritten, so that the URL changes back to the longer form.
For example, this mod_rewrite rule:
RewriteRule ^profile/username forums/profile/username [L]
will rewrite:
http://www.example.com/profile/username
to:
http://www.example.com/forums/profile/username
Except, that after its been rewritten, bbPress forces a redirection via wp_redirect, causing the URL in the browser window to change to the longer form. Any suggestions?
Commenting out lines 2061 and 2062 in the bbPress functions.php file will stop wp_redirect from redirecting the page.
if ( $check != $uri && $check != str_replace(urlencode($_original_id), $_original_id, $uri) ) {
//wp_redirect( $permalink );
//exit;
}But this breaks authentication, and causes bbPress to think you are not logged in, even if you are.
I’m trying to integreate both the most recent wp posts and bb threads into a home (index) page.
You can see what I’m doing and where I am at with this attempt at: http://www.mealtrader.com/adbeef/
I get this error at the bottom of the page:
Fatal error: Call to undefined function query_posts() in …../public_html/adbeef/community/bb-templates/kakumei/home-page.php
I think it’s caused by my code not referencing the wp template, but I don’t know how to do that in PHP.
Any questions or ideas?
Thanks,
Hi, installed newer version of bbpress 0.9.2.
Problem: text entered between backtricks`treated as code. Width is larger than page width. look here
[img=http://img140.imageshack.us/img140/6366/88594514gy3.th.jpg]
There should be a scrollbar for the purpose of restricting width and hyper links shouldn’t be active. How can I do that?
Topic: My Private Forum
<—(Link)
for me and my Friends, it´s new
i pimped mikelothars scoun a little bit.
Is it possible to shorten a profile link such as:
http://www.example.com/forums/profile/username
to:
http://www.example.com/profile/username
or to:
http://www.example.com/username
or to:
http://my.example.com/username
or to:
http://username.example.com
Thanks in advance.
I have bbPress installed in a directory called “forums” on my web server. I have Pretty Permalinks enabled and working. To view the profile of a member, I can go to this URL:
http://www.example.com/forums/profile/membername
However, I would like the url to be:
http://www.example.com/profile/membername
I’ve tried writing a mod_rewrite rule which rewrites the latter to the former. However, instead of rewriting it, it redirect and exposes the URL. For example. Typing this into the browser:
http://www.example.com/profile/membername
Redirects to this, instead of rewriting it:
http://www.example.com/forums/profile/membername
Here is the mod_rewrite I am using:
<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks
RewriteRule ^profile/membername$ /forums/profile/membername [L]
</IfModule>If I change the rule to rewrite the URL to a simple text file, it rewrites properly and masks the URL. For example, this works:
<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks
RewriteRule ^profile/membername$ /forums/textfile.txt[L]
</IfModule>Another example, I wrote this rule, as a test, to rewrite a URL to the rewrite-rules.php file:
<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks
RewriteRule ^profile/membername$ /forums/bb-admin/rewrite-rules.php [L]
</IfModule>I type in this url into my browser:
http://www.example.com/profile/membername
And it redirects to ths instead:
http://test.doublebad.com/forums/
If I replace all the text in the rewrite-rules.php file with “test text”, then the URL rewrites properly.
So it seems that when you are rewriting and URL to a bbPress php file, it will always redirect instead of rewriting, which is quite annoying. I’m trying to trace in the bbPress functions and settings where this is occuring. But I’m having no luck.
Any suggestions?