Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 27,676 through 27,700 (of 32,453 total)
  • Author
    Search Results
  • #60386
    mrhoratio
    Member

    I just found a blog post about this, where the author has made the code into a plugin. It’s available for download here:

    How to remove forum and topic keyword from bbpress url

    The author lists two minor issues here, which hopefully someone here can suggest a fix for:

    • The Link to BBpress admin board link does not work from main site. It redirects to home page. You will need to manually type the link to go inside.

    • In case you type something which does not exists as http://sitename.com/<bbpress-directory>/sdaksda it returns http://sitename.com/<bbpress-directory&gt:// . An extra slash.

    #56471
    mrhoratio
    Member

    Chris, you have a point. However the URL structure of forums and topics always begin with “forum” or “topic”. As in:

    http://www.example.com/bbpress/forum/pets-discussions/

    http://www.example.com/bbpress/topic/my-sweet-dog

    So it would seem that it should be possible to remove the “bbpress” from the URL without interfering with a WordPress installation.

    Having said that, I think the solution proposed in the thread I referred to in my last post (https://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done) is a much more elegant solution for shortening the bbPress URLs.

    #56469
    mrhoratio
    Member

    Just found an earlier thread which hits on a similar problem with shortening the bbPress URL:

    nicer slug url rewrite plugin (done!)

    In the thread’s example. In shows you how to shorten a url like:

    http://www.example.com/bbpress/forum/pets-discussions/topic/my-sweet-dog

    to:

    http://www.example.com/bbpress/pets-discussions/my-sweet-dog

    Now, if it could also be shortened to:

    http://www.example.com/pets-discussions/my-sweet-dog

    That would be even better.

    #56464
    mrhoratio
    Member

    Hi bobby, I tried out your hack in bbPress 0.9, and it doesn’t seem to work. Here’s what I did:

    I have my bbPress directory installed in a directory called “forums” in the root web directory. So the URL to access the forums’ home page is:

    http://www.example.com/forums

    and accessing a forum titled “test forum” is at this URL:

    http://www.example.com/forums/forum/test-forum

    a topic titled “test topic” is at this URL:

    http://www.example.com/forums/topic/test-forum

    I implemented your hack, and changed “forum” to “board” in the template-functions.php. I copied the rewrite rules from rewrite-rules.php and placed them into .htaccess file in the root web directory. I also added the two lines of code you suggested in that file:

    RewriteRule ^board/(.+)/page/([0-9]+)$ /forum.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^board/(.+)/?$ /forum.php?id=$1 [L,QSA]

    I also tried adding this to the rewrite-rules.php:

    RewriteRule ^board/([^/]+)/page/([0-9]+)/?$ <?php bb_option( 'path' ); ?>topic.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^board/([^/]+)/?$ <?php bb_option( 'path' ); ?>topic.php?id=$1 [L,QSA]

    When I go to this URL:

    http://www.example.com/board/test-forum

    I get a 404 error.

    However, when I go to this url:

    http://www.example.com/forums/forum/test-forum/

    It redirects and changes the URL in the address bar in the browser window changes:

    http://www.example.com/forums/board/test-forum/

    That also brings up a 404 page.

    Also, when I go this URL:

    http://www.example.com/topic/test-topic

    The URL works, but it redirects and changes the URL in the address bar in the browser window changes to:

    http://www.example.com/forums/topic/test-forum

    I am a little perplexed as to what is going on.

    #64842
    bobbyh
    Member

    Chris, I did disable plugins, but I hadn’t wrapped the Email Notifications plugin function call with a function_exists wrapper, so my active theme stopped working when I did so. I then oh-so-intelligently reasoned that this plugin couldn’t be the cause of the problem, so I moved on…

    I couldn’t just disable all plugins and test with a default theme because of the existence of private forums. Finally, I moved the database to a private test server (and used a HOST file) and went through all the plugins carefully one-by-one until the problem was fixed.

    Let my idiocy be a lesson for others: wrap your plugin function calls with function_exists wrapper! :-)

    #64849

    In reply to: Reply Bug

    bobbyh
    Member

    gerikg, I found your site and looked at a sample page. The href of the “log in” link is as follows:

    http://kiaspeed2.com/forum/bb-post.php&quot; enctype=&quot;multipart/form-data&quot; hack=&quot;bb-login.php

    It should just be this:

    http://kiaspeed2.com/forum/bb-login.php

    The text of this href comes from function post_forum inside /bb-includes/template-functions.php. Did you do a core hack of this function? If so, reversing it should fix your problem. Otherwise, one of your plugins has screwed up this function and it needs to be disabled…

    #64829
    bobbyh
    Member

    Lookfab, here’s a slight tweak to the default kakumei topic.php theme file that should do what you want:

    <ol id="thread" start="<?php echo $list_start; ?>">

    <?php $i = 0; ?>

    <?php foreach ($posts as $bb_post) : $del_class = post_del_class(); ?>

    <li id="post-<?php post_id(); ?>"<?php if ($i == 0) { echo 'class="firstpost"'; } elseif !($i % 2) { echo ('class="alt"'); }?>>

    <?php bb_post_template(); ?>

    </li>

    <?php $i++; ?>

    <?php endforeach; ?>

    </ol>

    You can then style the class “firstpost” using CSS to make it stand out however you want…

    I didn’t test this, but I think it should work either by itself or with a tweak or two.

    #56461
    bobbyh
    Member

    I did something similar, but it required a core hack. I renamed the second “forum” to “board”. It required two steps:

    1. With version 0.8.3, I modified line 363 of /bb-includes/template-functions.php to this:

    $link = bb_get_option( 'uri' ) . "board/" . $forum->$column . ( 1 < $page ? "/page/$page" : '' );

    2. I created an htaccess file by copying the text from /bb-admin/rewrite-rules.php, with two extra lines:

    RewriteRule ^board/(.+)/page/([0-9]+)$ /forum.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^board/(.+)/?$ /forum.php?id=$1 [L,QSA]

    #64840
    bobbyh
    Member

    Thanks Chris! All my PHP scripts were OK (no syntax errors), but eliminating one more possible cause is always helpful. :-)

    It turns out that this Email Notifications plugin (https://bbpress.org/forums/topic/plugin-post-notification?replies=44) was causing the problem. After disabling that plugin, there are no “delays in posting” and there is never a 500 error. There must be a scaling problem with the plugin that started after the tables hit a certain size…

    Thanks again for your help, Chris! :-)

    #64839
    chrishajer
    Participant

    How about configuring custom logging temporarily, just to be sure you are seeing the logged errors?

    http://us3.php.net/set_error_handler

    I think the delay in posting is not due to server load but due to this 500 error. It’s thinking about something then it fails.

    If the script had a syntax error, I would think it would fail more quickly. You can check all your php scripts for syntax errors if you have command line access if you do something like this:

    shell# find . -name "*.php" -print| xargs -n1 php -l

    (that’s “dash n one” and “php dash el”, lowercase L)

    Looks like you’re on CentOS so that should work OK.

    #64848

    In reply to: Reply Bug

    chrishajer
    Participant

    That’s pretty interesting. Not sure why it’s not working but I think you can cause a different problem by turning off CheckSpelling in you .htaccess file. That will cause it to fail outright, I think, rather than trying to find you a similarly named file. Put this at the top of a file called .htaccess in your forum root folder:

    CheckSpelling Off (not sure if the off needs to be capitalized or not.)

    See what errors you get after that. Worth a shot anyway.

    #64838
    bobbyh
    Member

    Thanks for thinking about my problem, Chris! :-)

    I don’t understand the problem either… I’m sure the PHP errors are being logged. I just triple-checked my httpd.include file, and it has this line: ErrorLog /var/www/vhosts/weddingbee.com/statistics/logs/error_log. This is the location that I’ve been looking for the PHP errors. There are other PHP notices/errors from this boards subdomain (mostly from bots looking for non-existent Front Page files), but nothing about this error.

    In the access_log, I do see lines like this:

    74.235.132.92 - - [06/May/2008:04:32:32 -0400] "POST /bb-post.php HTTP/1.1" 500 366 "http://boards.weddingbee.com/topic/second-guessing-everything" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727)"

    However, that’s not what we want…

    Last night, I did some searches and found this comment on php.net which said that the two reasons for a missing error in the error_log were “(1) you did not configure error_log output in php.ini, and (2) the script has a syntax error and did therefore not execute.” However, the script does appear to be executing at least partially, because the post/comment does post. Also, if you visit the bb-post.php page (http://boards.weddingbee.com/bb-post.php) directly, the page does execute (with a die).

    I too am confused by why the POST takes such a long time. The load average for the webserver and the database server are fairly low…

    #64836
    bobbyh
    Member

    I turned off permalinks (set it to false in config.php) and the error still occurred…

    #64032

    This code works fantastic! Thanks

    #3339
    bobbyh
    Member

    A few days ago, out of the blue, users of my bbpress forum reported that submitting a new topic/post resulted in an error. Previously, my bbpress forum was working perfectly. However, over the last few days, I have verified that if you submit a new post or leave a comment, the browser takes you to bb-post.php, where the page hangs. You can verify this on my forum using user “testuser” and password “test123”.

    There are a few weird things about this:

    • I hadn’t touched the server for some time prior to this sudden problem, so it’s weird that the problem started, since I hadn’t changed anything
    • I’ve been running two bbpress forums authenticated against the same WP user table. The problem is only with the first bbpress installation, while the second bbpress installation continues to work with no problems.
    • When you post, the browser returns a 500 internal server error, and doesn’t display a “die” message, e.g. “You need to actually submit some content!”
    • Although the browser returns a 500 internal server error, the posted content does go through.

    I’ve hand-inspected http://boards.weddingbee.com/bb-post.php, and it has exactly the same PHP code as http://classifieds.weddingbee.com/bb-post.php. I’ve tried everything I can think of… I disabled plugins and Akismet, and the problem didn’t go away. (I’ve turned them back on.)

    I’m using bbPress 0.83, with bb_db_version 788. I haven’t upgraded to bbPress 0.9.0.2 yet because I’ve integrated my WordPress 2.33 install with two bbPress installs and a Mediawiki install, and it will be a ton of work to reintegrate. However, that is the next step…

    Does anybody have any ideas? :-)

    #3337

    Topic: Insurgency.cz forum

    in forum Showcase
    ajvngou_
    Member

    I just use another theme and moddified, couse my code skills are not good. I moddified www theme too and i triyed create 1 nice theme for site and forum. I hope its ok now. I must change few things at code (size, avatars etc) but i hope its nice. its CZECH lang btw…

    http://www.insurgency.cz/bbpress

    #3333

    Topic: Profile hook/filter

    in forum Plugins
    Bloggsbe
    Member

    Hi!

    I’m working on a plugin that I want to show some info on the profile page. The only hook I’ve found that lets me do that is get_profile_info_keys, but that puts the info on top of the profile page (seems like it does it before the header) and where I actually want it.

    Anyone have any ideas on what I can use to get my “stuff” in the profile page?

    Regards,

    Rune

    #3282
    chilledfresh
    Member

    I’ve been running into cookies issues while trying to integrate bbPress into my existing WPMU site. My WPMU and bbPress installs are located in separate directories on my server (/blogs and /youngadults/forums).

    bbPress is currently setup so that when users log into the forums, they are automatically logged into WPMU as well. However, for some reason this is not working the other way around – if I log into WPMU first, I am not logged into bbPress.

    Does anyone know of a way to log into bbPress when going through the WPMU login?

    I am using the MD5 Insecurity and Mouldy Old Cookies plugins, along with this snippet of code in the bb-config.php file:

    $bb->usercookie = ‘wordpressuser’;

    $bb->passcookie = ‘wordpresspass’;

    chrishajer
    Participant

    In the database, the value is stored in the bb_topicmeta table. A record that has a meta_key of uri holds the value, I think. That is record #3 in my fresh installation. It might be different in yours. Just find the key of uri and the value is the one you want, I think.

    #3330
    antoniop
    Member

    I have had bbpress working on my doteasy account, and I decided to reinstall it – probably shouldn’t have :( When I contacted them, they informed me that they would try running the script and installing it…and I got this message back

    “Hello Antonio,

    This script appears to be incompatible with our hosting servers. Please try using a different script.”

    “The database failed to install. You may need to replace bbPress with a fresh copy and start again.”

    Now here is what happens when I try to install the script.

    Your site settings have been saved and we are now ready to complete the installation. So what are you waiting for?

    Then when I proceed to the final step I get this error.

    “Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, advancedsupport@doteasy.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.”

    At this point, if I refresh the page it goes back to the installer and I get this message ” bbPress Installation

    Welcome to the bbPress installer

    Step 1 – Database configuration

    « completed

    Step 2 – WordPress integration (optional)

    « skipped

    Step 3 – Site settings

    Installation complete!

    Show installation messages: “

    If I then go back to atriskstoriesofhope.com/bbpress it wants to go back through the installation. What should I do?

    #55403

    **update**: just found https://bbpress.org/documentation/faq/#pretty-permalinks

    after looking for days, don’t know why it took so long to find. this did the trick!


    Also having a problem with pretty permalinks. i am on bluehost with the following:

    wordpress 2.5.1 installed at example.com/blog

    bbpress 0.9.0.2 installed at example.com/bb

    i do have my wp akismet key applied in bbpress, but other than that no wp integration. bbpress works fine until i activate pretty permalinks. at that time, i can see all of my topics & stuff, but i just get 404 when i try to get to them.

    here’s an interesting thing i discovered: both installed to my site via SimpleScripts. WP works fine, but bb appears to have no .htaccess file at all. i do see one in attached to a theme, but that’s it, and apparently not useful there.

    since this seems to be the issue, sort of narrowed down, i created an .htaccess file using the code shown by jethro, but i know there’s something missing. it didn’t break my site, but i couldn’t even get to admin area to see if i could make the permalinks work.

    i’m not a programmer, but if anyone can tell me what code i need to have in the .htaccess file, i can make the file and upload it.

    thanks!

    #64778
    mrhoratio
    Member

    I did some more digging, and it looks a way to do is to not use BB_query at all, but to use $bbdb->get_results instead:

    $startdate=”20070602103049″;

    $enddate=”20080212090232″;

    $topics = $bbdb->get_results(“SELECT * FROM $bbdb->topics WHERE topic_start_time BETWEEN $startdate AND $enddate ORDER BY topic_start_time DESC”);

    #64663
    mykes
    Member

    This stuff is frustrating as all hell. It seems so simple until it doesn’t work out of the box and you spend hours trying to figure it out. Fix these kinds of problems and you’re golden!

    Anyhow, just downloaded and installed the latest wordpress mu and bbpress today.

    wordpress in DocumentRoot, and bbpress in DocumentRoot/forums/

    Both in mysql 5.x database named wordpress.

    When installing bbpress, I did not enable wordpress integration.

    I followed this checklist:

    1. You are running latest versions of WordPress (2.5.1) and bbPress (0.9.0.2)

    2. You have matched SECRET_KEY in wp-config.php with BB_SECRET_KEY in bb-config.php

    3. You have matched WordPress “secret” database option with bbPress “secret” database setting

    4. You have setup compatible cookie domains and paths in config files (see instructions in bbPress admin)

    5. You are successfully sharing user tables from WordPress with bbPress

    Everything seems to be right.

    BIG FIRST PROBLEM is I setup the roles on the wordpress integration page so “admin” is “key master.” As soon as I turn on integration, my old key master is gone and admin can login but is NOT key master. Google is my friend, most of the time, and I found a query to do by hand to fix it. This should be automatic in the install process of bbpress or turn on of integration, no?

    So I’m able to login to wordpress. I login to bbpress. My user’s password is wiped out in wordpress. I can do lost password thingy in wordpress and restore the password. When I navigate to /forums/ and login as my user, the password in wordpress is wiped out again. Oddly, I can login as my user at bbpress over and over again, no problem.

    notes:

    1) my user is a user I created on wordpress, and he has admin privs and thus key master privs in bbpress. I see the admin link in bbpress when I login. But when I do login, wordpress won’t accept this user’s password anymore. I either have to keep loging into wordpress as admin and resetting the user’s password or go through the forgot password by email process. Changing the user’s password in bbpress has no effect on wordpress.

    2) The integration forum in admin is confusing as all hell. Or maybe the installation process is not well documented. Maybe a page on your site about how to install the two together and get the integration working would be good. For example, should bbpress and wordpress share the same database? Not clear. The integration page asks for both a site url and a blog url, what’s the difference?

    3) Did anyone try doing a fresh install of both as part of your Q/A before releasing a latest version of bbpress?

    4) If I can’t get the password problem resolved, bbpress is the one to go, not wordpress.

    5) I probably should post some of this in multiple threads, but I doubt there’s any notification feature that would e-mail me if/should anyone reply to my posts :)

    6) I want to give bbpress every opportunity to replace my existing 20K+ member / 1.6M post message board site.

    mrhoratio
    Member

    How do I use bb_query to fetch all topics that were started within a given date range?

    Here’s an example found an example of a bb_query code on the bbPress blog:

    $topic_query = new BB_Query( ‘topic’,

    array(

    ‘topic_author’ => ‘mdawaffe’,

    ‘started’ => ‘2007-06’,

    ‘tag’ => ‘bbpress’,

    ‘order_by’ => ‘topic_start_time’

    )

    );

    $topic_query->results; // Here’s the array of topics the query returned.

    This shows how to get topics that where started on June 2007. But what if I wanted to get all topics that were started between June 2, 2007 10:30:49 PM and February 12, 2008 9:02:32 am?

    I think I may be missing something totally obvious. Any suggestions? I

    mrhoratio
    Member

    Is there a way to show a paginated list of front page stickies? In the default bbPress template file “front-page.php”, I found this code:

    <?php if ( $super_stickies ) : foreach ( $super_stickies as $topic ) : ?>

    <tr<?php topic_class(); ?>>

    <td><?php bb_topic_labels(); ?> <big>“><?php topic_title(); ?></big></td>

    <td class=”num”><?php topic_posts(); ?></td>

    <td class=”num”><?php topic_last_poster(); ?></td>

    <td class=”num”>“><?php topic_time(); ?></td>

    </tr>

    <?php endforeach; endif; // $super_stickies ?>

    It display a list of front page stickies, but it doesn’t have any pagination if you have a lot of stickies. I tried adding this:

    <?php forum_pages(); ?>

    But it doens’t work.

    Any suggestions on getting this to paginate?

Viewing 25 results - 27,676 through 27,700 (of 32,453 total)
Skip to toolbar