Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 28,376 through 28,400 (of 32,462 total)
  • Author
    Search Results
  • #56981

    Vili. I have Dan’s avatar thing working on my wordpress blog, and I have installed bbpress and have been having the hardest time getting the integration to work. I am not very familiar with php, so if you could tell me what I am doing wrong, I would be grateful.

    I have bbpress installed in a subfolder one level up from my wordpress install in a folder called ‘forums’. I read all the comments here, and have looked at the Function integration part of the “Integration with WordPress” post per your suggestion. I added the code:

    require_once(‘path/to/wp-blog-header.php’);

    to the bbpress config.php file, and it throws an error when I load bbpress. I have tried using ‘wp-blog-header.php’ and ‘/wp-blog-header.php’ and ‘/’ and even ‘ ‘ as the path to the file, and nothing works, it throws an error every time. I even tried a backslash! lol

    #60150
    citizenkeith
    Participant

    “I ported GamerZ’s useronline plugin for wordpress to bbpress awhile back. Been meaning to clean it up and release it one day.”

    Any news on this one? :-)

    #62317
    cart3r
    Member

    Thanks! 1st and 3rd things are resolved.

    I’ve been trying hundreds of different things/syntaxes to get the second item to work, but to no avail yet. I’m sure it must be the way I’m trying to code it (Full disclosure: I’m still trying to learn PHP).

    What I’m going for is as follows:

    Run the foreach, and then using array_shift(), grab the first item in the array, and then display just the post_text() that is contained within that array (assuming this is an array within an array)

    This what my code (stripped down) looks like:

    INITIAL POST:

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

    <?

    php array_shift();

    echo post_text();

    ?>

    <?php endforeach; ?>

    =====================================

    and then later on, when the responses are displayed:

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

    <?php echo post_text(); ?>

    <?php endforeach; ?>

    I was hoping the first initial post wouldn’t be displayed since array_shift() would have taken it out?

    Any help would be greatly appreciated…

    #62316
    fel64
    Member

    – You’d want to use forum_name( $topic->forum_id ).

    – I think so. If you look at the code you’ll see an array of posts, and by using array_shift() you can detach the first one and have some special template code just for that. Be sure to check it’s the first post of the topic, though, not just the first post of the page. Maybe a better thing to do would be to add a class to each post giving it a topic-specific number, so you can style topic-post-1 or whatever individually.

    – Where in your template I assume it says topic_posts(), replace that with echo( get_topic_posts() - 1 );

    #50392
    fooddude
    Member

    RCanine – that code works perfectly! Fixed the problem in titles and posts. Thanks!

    #2766
    cart3r
    Member

    Hello all,

    I recently dove into the exciting world of BBPress, and in the midst of working out a custom theme (tweaking structure as well), I was wondering if the following things were even possible to do, or are they more suited to be plugin requests?

    – attach forum name to latest topics of main page. ie I want to have a topic display like this:

    “Plugins | Lorem ipsum dolor sit amet”

    (where “Plugins” is the forum name and “Lorem ipsum dolor sit amet” is the topic, obviously.

    – Within each topic, separate the original post from the comments. I guess this is similar to how a blog entry is; with the entry featured at the top, and the comments displayed below and less prominently. It seems like the way BBPress is coded they can only be stacked on top of each other and have a similar design treatment?

    – Tweak post count so that if no has yet replied to a post it is “0” instead of “1”

    Hopefully these are just things that are right under my nose that I haven’t been able to figure out, but let’s see…

    Thanks!

    #2742
    benbeltran
    Member

    I recently changed my forum’s style and added some features:

    *Add youtube videos by using [youtube][/youtube] tags, instead of allowing the code to be written.

    *Allow [flash][/flash] to be added, using the temporadadepatos.net file uploader.

    *Friends system

    *Quite different profile page

    *Color fading Heatmap

    *A universal top bar (for the whole site) integrated to the forums where the login form is. Once logged in, it shows a random phrase each time you refresh.

    *Integration with my website (custom CMS, not based on wordpress). (For login and for showing community blog posts on the forum profiles).

    *Badges System

    The link is: http://temporadadepatos.net/foros/

    And here’s a link to a profile: http://www.temporadadepatos.net/foros/profile/ogu

    Tell me your opinions :D

    #62292
    fel64
    Member

    Yeah, lost your capabilities. Look in the wp_usermeta table and delete the entry with meta_key capabilities if I remember rightly.

    #2765

    Topic: cannot select DB

    in forum Installation
    bedfordbear
    Member

    sorry guys but looked through some of the other answers related to this and it goes way over my head.

    i created a mySQL dB through cpanel it’s called bbpress when i look at the databases then it is now called rogermby_bbpress do i use this full string as the dbname?

    same with the user bbadmin is now rogermby_bbadmin

    the password i entered when i made the db do i just add this (in plain text exactly) along with the other info above to the config.php file?

    when i look in my wp-config.php on one of my wordpress installs it uses the rogermby_wrdp1 as the database name and user!?

    i did all the simple steps but all i get is cannot select DB. i am installing on a subdomain xxx.yyyy.com is that an issue?

    ok forget that something changed and it works :) i have the same problem with wordpress sometimes if i leave a problem in the night and come back in the morning its fixed, you think my network operator or somebody caches something and i cant clear it?

    #62291
    basher
    Member

    Thanks fel64, I got through the setup now. :) I installed BBpress without WP integration because it told me that I’ll be able to do after install, in the admin menu.

    So I did. After install I logged in and went to the Integration with WordPress menu and filled in the required fields. After saving changes I couldn’t go back to the Admin menu, because the option went away.

    In the upper left corner it says: “Welcome, admin! View your profile (Log out)” Before integration there was an Admin option too to access the Admin menu.

    The only thing now I can do is to post into the default forum as a member. Any idea?

    #62290
    fel64
    Member

    Cool, going via options.php sounds good.

    When you integrate, you musn’t give them the same prefix or some tables will collide. You need to set these three in your config.php though, if you haven’t already. Obviously change them to your appropriate values, these are just mine.

    $bb->wp_table_prefix = 'wp_';  // WordPress table prefix.  Example: 'wp_';
    $bb->wp_home = 'http://localhost/wordpress'; // WordPress - Options->General: Blog address (URL) // No trailing slash. Example: 'http://example.com'
    $bb->wp_siteurl = 'http://localhost/wordpress'; // WordPress - Options->General: WordPress address (URL) // No trailing slash. Example: 'http://example.com'

    #62289
    basher
    Member

    Hi guys!

    I’m new to WP and BBpress too. So far I couldn’t integrate the forum into my WP install, but I found the secret value:

    I logged in as admin into WordPress, and visited the options menu. In the addressbar modified the options-general.php part of the url to options.php and it showed the secret value. Is that right or I did something wrong? :)

    With WP integration, at the third step of the bb install, I can’t select a Key master from the dropdown list because there’s no user listed. So I can’t finish the setup. At the first step, do I have to set the BB database table prefix to match my WP installs table prefix?

    #62297
    chrishajer
    Participant

    No, not avatars :)

    With WordPress, they include Hello which is an admin only plugin and it serves mostly to show how a plugin is done. It doesn’t affect the public site at all, and it’s not activated either. I would think a similarly benign plugin could be included, just so there is something there.

    #62277

    In reply to: Import/Export Work

    Sam Bauers
    Participant

    bbPress has a fledgling xml exporter. We had a discussion on IRC#bbpress recently about creating an importer of the same format.

    This would be great for migrations and backups, and if we wrote some code for other forum software to export to this same format, we would have greater ability to cross-grade.

    #62296
    fel64
    Member

    No, from the PHP docu glob only returns false when it encounters an error. No files found makes it return an empty array. (I don’t have any underscored files and it works for me, too.)

    But I agree with you, those folders should be in there by default. What plugins could be included that could be interesting to everyone? Avatars?

    #62295
    chrishajer
    Participant

    I’ve seen two or three seemingly unrelated problems pop up related to something like this:

    if ( is_callable( 'glob' ) )
    foreach ( glob(BBPLUGINDIR . '_*.php') as $_plugin )
    require($_plugin);

     

    Seems like if there are no underscore plugins, this fails. I don’t follow the code exactly, but further up in that file, it defines BBPLUGINDIR if it’s not already defined as (basically) my-plugins/. But this line just says “if glob is callable, then go through the directory for all underscore plugins”. What happens if there are no plugins there? This would return false, maybe, instead of an array?

    And, is there a good reason NOT to include a blank directory for my-templates and my-plugins? At least then people would know where to put stuff. I mean, what IS the reason? WordPress comes with wp-content/themes/ and wp-content/plugins/ directories, and by default, two themes and two plugins. That eliminates the possibility of something missing. Of course, people could delete those, but right off the bat, they wouldn’t and things would just work when they started out.

    At the very least, I think this should be fixed to have a conditional looking for underscore plugins before looping through them (i.e. if there are none, you can’t loop through them.)

    Maybe someone with a better read on it can explain to me exactly what’s happening.

    #2761
    Trent Adams
    Member

    I would really love it if we could have some discussion on import/export functions for bbPress. The only current way to move posts around would be an database dump and that is not really the best way ;) I was thinking about looking at the techsailor plugin for RSS import/export for wordpress and see if it would be possible to get bbPress into that format so you could even export bbPress and import as blog posts and comments (or vice versa). Obviously I would have trouble doing this with my minimal coding, but hopefully someone else has something to add!

    Thoughts?

    #61806

    In reply to: Moving bbPress

    Ben L.
    Member

    It doesn’t do much of anything to add define('COOKIE_DOMAIN', '.llamaslayers.net'); or define('COOKIE_DOMAIN', 'llamaslayers.net'); to the config.php file.

    Edit: It works to remove the values of $bb->wp_home and $bb->wp_siteurl

    #61805

    In reply to: Moving bbPress

    fel64
    Member

    For some reason bbPress seems to think your theme is in root. I’d ask you to set the theme again, but, you know, what with not being able to log in …

    so first of all, please add define('COOKIE_DOMAIN', '.llamaslayers.com'); to your config.php. Hopefully that’ll let you log in.

    #61802

    In reply to: Moving bbPress

    Ben L.
    Member

    It’s just $bb->uri that I have to update, right?

    #62248
    nook77
    Member

    I had wordpress installed, i removed WP and uploaded BBPRESS to the same directory, put in my mySQL info, and it worked. I havent changed any setting,

    but, i have actaully changed this already to fix another problem:

    Your error *sounds* like this one:

    https://bbpress.org/forums/topic/warning-invalid-argument-supplied-for-foreach-in-bb-settingsphp-on-line-173

    Site Management section under admin.

    Warning: Invalid argument supplied for foreach() in D:domainsrcct.bizwwwrootcrookedhook.netforumbb-adminplugins.php on line 7

    I have installed the online list plugin, and the print password to screen plugin. Could it be one of theses? If i check the forum, all the blugs are working properly.

    I think it could just be my very raw install of bbPRESS, maybe I just have to change a few settings.

    I’m running the latest version of BBPRESS

    Any help is most appreciated

    That fixed that one particular problem, but im still having the same problem with

    #58827
    ajg
    Member

    There is no additional space nor new line in front of the <?xml version="1.0"?> line in rss2.php

    This file is identical to the default (kakumei) theme rss2.php file

    I deleted the “old” and replaced it with the one from kakumei folder.

    And yes, I did upgrade to a newer version. ;)

    —-

    Update:

    It’s fine now. :)

    We had this _blah.php file in my-plugins dir that had just a typed space in it. I deleted it and now the rss feed is fine.

    Thanks for all your help

    I deleted the space from file and it’s fine now.

    #62222
    mazdakam
    Member

    hum such a good news some one finnaly wants to do what i want :)

    #62266
    mvh
    Member

    :) nice.

    btw, was it hard for you setting up pretty permalinks?

    #2756
    nook77
    Member

    Hey everyone I get this ERROR, when I try to open the Site Management section under admin.

    Warning: Invalid argument supplied for foreach() in D:domainsrcct.bizwwwrootcrookedhook.netforumbb-adminplugins.php on line 7

    I had a similar one after I upgraded, but I found a post with some code…after I put the new code in, everything worked.

    Any PHPers out their that can help?

    Cheers

Viewing 25 results - 28,376 through 28,400 (of 32,462 total)
Skip to toolbar