Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 19,176 through 19,200 (of 32,500 total)
  • Author
    Search Results
  • #104094
    csabamarosi
    Member

    I’ve figured out that there were some PHP configuration issues with my XAMPP installation, so the error messages are gone now. Sad thing is, your code doesn’t output anything at all.

    #98991
    thebreiflabb
    Member

    If your wordpress and bbpress share the same database you can simply edit sidebar.php

    On the top of the file add:

    <?php require_once(ABSPATH."/forum/bb-load.php"); ?>

    This will give you access to the bbpress functions. (Edit to the path of your bbpress installation)

    Then where you are going to output your latest posts add this:

    <?php
    global $wpdb;
    $query = "SELECT * FROM bbp_topics WHERE topic_status='0' ORDER BY topic_time DESC LIMIT 6";
    $topics = $wpdb->get_results($query);
    $counter = 0;
    ?>

    This will find the latest posts, I do it this way so it won’t show the same topic several times if many posts have been made in the same topic. Also edit bbp_ to your bbpress db prefix.

    Finally to output simply add something similar to this:

    <div id="latest-posts" class="border">
    <h2>Latest forum posts</h2>
    <?php foreach($topics as $topic) : ?>
    <div class="<?php echo $counter % 2 ? "gray" : "white"; ?>"><a href="<?php topic_last_post_link($topic->topic_id); ?>"><?php topic_title($post->topic_id); ?></a></div>
    <?php $counter++; ?>
    <?php endforeach; ?>
    </div>

    Edit to your preference on html and css.

    #104091
    thebreiflabb
    Member

    If your wordpress and bbpress share the same database you can simply edit sidebar.php

    On the top of the file add:

    <?php require_once(ABSPATH."/forum/bb-load.php"); ?>

    This will give you access to the bbpress functions. (Edit to the path of your bbpress installation)

    Then where you are going to output your latest posts add this:

    <?php
    global $wpdb;
    $query = "SELECT * FROM bbp_topics WHERE topic_status='0' ORDER BY topic_time DESC LIMIT 6";
    $topics = $wpdb->get_results($query);
    $counter = 0;
    ?>

    This will find the latest posts, I do it this way so it won’t show the same topic several times if many posts have been made in the same topic. Also edit bbp_ to your bbpress db prefix.

    Finally to output simply add something similar to this:

    <div id="latest-posts" class="border">
    <h2>Latest forum posts</h2>
    <?php foreach($topics as $topic) : ?>
    <div class="<?php echo $counter % 2 ? "gray" : "white"; ?>"><a href="<?php topic_last_post_link($topic->topic_id); ?>"><?php topic_title($post->topic_id); ?></a></div>
    <?php $counter++; ?>
    <?php endforeach; ?>
    </div>

    Edit to your preference on html and css.

    #99175
    thebreiflabb
    Member

    I made it work in a way using this:


    <?php
    /*
    Plugin Name: BBTexCode
    Description: [tex][/tex] to image
    Plugin URI:
    Author: Sondre Kjøniksen
    Version: 1.00
    */

    function bb_tex_replace( $text ) {
    $text = preg_replace('/[tex](.*?)[/tex]/ie', "'<img src="/cgi-bin/mathtex.cgi?'.rawurlencode('$1').'" align="middle" />'", $text);
    return $text;
    }
    add_filter('post_text', 'bb_tex_replace');
    ?>

    Though I still have a problem, it seems bbpress strips backslashes when adding the post to the DB. Is it possible to do so bbpress skips stripping backslashes from [tex][/tex] tags? At the moment it works if I write double backslashes like: [tex]\LaTeX \frac12[/tex] But it is kind of annyoing having to type double every time.

    #104275
    thebreiflabb
    Member

    I made it work in a way using this:


    <?php
    /*
    Plugin Name: BBTexCode
    Description: [tex][/tex] to image
    Plugin URI:
    Author: Sondre Kjøniksen
    Version: 1.00
    */

    function bb_tex_replace( $text ) {
    $text = preg_replace('/[tex](.*?)[/tex]/ie', "'<img src="/cgi-bin/mathtex.cgi?'.rawurlencode('$1').'" align="middle" />'", $text);
    return $text;
    }
    add_filter('post_text', 'bb_tex_replace');
    ?>

    Though I still have a problem, it seems bbpress strips backslashes when adding the post to the DB. Is it possible to do so bbpress skips stripping backslashes from [tex][/tex] tags? At the moment it works if I write double backslashes like: [tex]\LaTeX \frac12[/tex] But it is kind of annyoing having to type double every time.

    #98990
    csabamarosi
    Member

    There is something wrong with your site, it says fatal error so the plugin is kinda unreachable. :)

    #104090
    csabamarosi
    Member

    There is something wrong with your site, it says fatal error so the plugin is kinda unreachable. :)

    #99223

    In reply to: bbpress AND buddypress

    intimez
    Participant
    #104323

    In reply to: bbpress AND buddypress

    intimez
    Participant
    #37363
    thebreiflabb
    Member

    I have installed BBcode lite, and I want to add my own custom bbcode tag, I tried making my own plugin to allow [tex][/tex], though I can still not fully understand the preg_replace() function. Would be greatly appriciated with some help.

    What I am trying to achieve is:

    [tex]some code here[/tex]…

    The code in between the tags get’s converted to <img class=”latex-image” src=”/path/image.cgi?#code goes here with urlencoding#” alt=”” />

    If it’s not too complicated to make the standard plugin to put code tags from the bbcode tags into additional pre tags when outputted, that would be great too.

    [code] tags into additional pre tags when outputted, that would be great too.

    #99160
    jjack1
    Member

    I fixed the issues with regard to the site not being accessible, but never got the bbpress forum to look right. I ended up uninstalling all of it. I’m not sure if I want to re-install it and start all over or not.

    There has to be an easier way to get the bbpress forum to have the same look and feel of a WP site. There’s just SO much information out there on how to supposedly do this, that it’s quite overwhelming! :(

    #104260
    jjack1
    Member

    I fixed the issues with regard to the site not being accessible, but never got the bbpress forum to look right. I ended up uninstalling all of it. I’m not sure if I want to re-install it and start all over or not.

    There has to be an easier way to get the bbpress forum to have the same look and feel of a WP site. There’s just SO much information out there on how to supposedly do this, that it’s quite overwhelming! :(

    Ramiuz
    Participant

    I´ve modifyed Kakumei to the limit of my knowledge. See yourself at http://www.michaeljackson.no/forum

    However, if I want to turn it into something different, I think the CSS is kind of clumsy made.

    If you change width on one thing – you have to change it on something like ten other definitions too. Width of content, background, padding, corners etc etc.

    So is there some other simplistic theme out there thats coded in a more unified way? Let´s say I want to change the size of the forum, I only want to input this ONCE, and have everything else fall in place automatically.

    I know this is possible with CSS, by using percentage in sizes, instead of static pixel definitions.

    Where can I find more BBPress themes anyway?

    #94903
    Erlend
    Participant

    @tyskkvinna the two projects are going to co-exist happily :) JJJ is the lead developer of bbPress and in the core development team of BuddyPress. The BuddyPress bundled forum as it stands will eventually be replaced by the bbPress plugin, supported by a migration script of course.

    More information in these threads:

    https://buddypress.org/community/groups/requests-feedback/forum/topic/is-the-approach-to-bbpress-plugin-buddypress-integration-up-for-debate

    https://bbpress.org/forums/topic/comparing-speed-differences-of-buddypress-with-or-without-bbpress-plugin

    #94902
    tyskkvinna
    Member

    I’m sorry for just barging into the conversation mid-way but is there going to be BuddyPress progress with this too? Or was that just an unrelated project? :)

    #94901
    wildkyo
    Member

    I’m waiting for an alpha release in order to update automatically, It will be awesome! :) Good job guys!

    @Willabee

    Is a problem of the javascript I think. We’ve to wait to a more stable release…

    #94900

    Was in Phoenix at WordCamp, and am working on the BuddyPress side of things as well. Updates will come this week. :)

    #37342
    WizenOak
    Member

    Hey guys,

    I’m currently putting together my first site using WordPress % bbPress (they are both linked etc).

    What i’m trying to do is display the 4 most recent active threads. By this, i do not mean the last 5 posts. I mean the latest 5 threads that have posts made in them. I hope that makes sense.

    E.g.

    [Thread Title] by [Original Poster]

    I came across a script which links my bbPress RSS feed to my WordPress custom template, here it is:

    <?php if(function_exists('fetch_feed')) {
    include_once(ABSPATH.WPINC.'/feed.php');
    $feed = fetch_feed('http://localhost/wordpress/bbpress/rss.php?forum=1');
    $limit = $feed->get_item_quantity(4);
    $items = $feed->get_items(0, $limit);
    }
    if ($limit == 0) echo '';
    else foreach ($items as $item) : ?>

    <ul class="latest">

    <li>

    <span class="title"><?php echo $item->get_title(); ?></span>

    </li>

    <?php endforeach; ?>

    I tried linking to “http://localhost/wordpress/bbpress/rss&#8221; etc but “http://localhost/wordpress/bbpress/rss.php?forum=1&#8221; was the only feed i could pick up. It doesn’t really matter though considering i’ll only have the single forum section anyway.

    Now, this produces the following on my WordPress template:

    Tigeran on “Your first topic”

    [Last Post Author] on [Thread Title]

    As stated before, i want it to appear like this:

    [Thread Title] by [Original Poster]

    I soon found out that i needed to edit the rss2.php file located in bbpressbb-templateskakumei folder as i’m using this template. Looking through it i came across this:

    <title><?php post_author(); ?> <?php _e('on')?> "<?php topic_title( $bb_post->topic_id ); ?>"</title>

    & changed it to this:

    <title><?php topic_title( $bb_post->topic_id ); ?> <?php _e('by')?> <?php post_author(); ?></title>

    But there is no change as it stays as the original. It’s like i cannot overwrite this file. Any help would be greatly appreciated.

    Thanks.

    #37339
    RichEdmonds
    Member

    Looking through the forum, I see there have been many problems surrounding the “pretty URL” configuration, namely the .htaccess. We seem to be experiencing the same issue, if we change permalinks to the last option for a complete listing, we receive a 500 server error (we don’t have a .htaccess at all from the installation for some reason). Manually creating a .htaccess file with the following (found this from the forums) seems to stop the 500 but then throws 404s when browsing the forums/topics/profiles etc.


    Options +FollowSymlinks

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /community/

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

    RewriteRule ^forum/([^/]+)/?$ /forum.php?id=$1 [L,QSA]

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

    RewriteRule ^topic/([^/]+)/?$ /topic.php?id=$1 [L,QSA]

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

    RewriteRule ^tags/([^/]+)/?$ /tags.php?tag=$1 [L,QSA]

    RewriteRule ^tags/?$ /tags.php [L,QSA]

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

    RewriteRule ^profile/([^/]+)/([^/]+)/?$ /profile.php?id=$1&tab=$2 [L,QSA]

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

    RewriteRule ^profile/([^/]+)/?$ /profile.php?id=$1 [L,QSA]

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

    RewriteRule ^view/([^/]+)/?$ /view.php?view=$1 [L,QSA]

    RewriteRule ^rss/?$ /rss.php [L,QSA]

    RewriteRule ^rss/forum/([^/]+)/?$ /rss.php?forum=$1 [L,QSA]

    RewriteRule ^rss/topic/([^/]+)/?$ /rss.php?topic=$1 [L,QSA]

    RewriteRule ^rss/tags/([^/]+)/?$ /rss.php?tag=$1 [L,QSA]

    RewriteRule ^rss/profile/([^/]+)/?$ /rss.php?profile=$1 [L,QSA]

    </IfModule>


    We experienced the same issue with Invision Power Board, but adding “Options +FollowSymlinks” corrected the problem and we were able to have sexy URLs. For bbPress, however, it seems to not make a shred of difference. We are aware of the correct .htaccess code being supplied via the permalinks section in the ACP, but we never get provided with such code. Every time we change the permalinks setting, we are hit by a 500. .htaccess files are not my strong point as you have more than likely guessed.

    The bbPress installation is located at /community while a WordPress installation (with working permalinks and .htaccess) is at root.

    Any help would be appreciated,

    Regards,

    Rich

    #37325

    Hi all

    My first “stupid” questions off many here on this forum ;-).

    This site BBpress.org is that made in wordpress and only the forum is bbpress?

    Thank you

    Anders

    #37323

    Topic: Subforums FrontPage

    in forum Themes
    zamajeni
    Member

    I read this topic million times to now, now I`ll just ask a little help from moderators.

    Here is my forum: http://www.gitariste.org/bbpress

    As you can see there are PLENTY of subforums. And i want to hide them, but to count the posts from subforums to original. Let me give you an explanation.

    FORUM Posts

    (forum) Tech-Stuff 2

    (sub-forum) Internet 4

    to look like this:

    FORUM Posts

    (forum) Tech-Stuff 6

    Which means, when i enter in Tech Stuff forum, i will see subforum and the posts in there.

    Here is the code of my front-page.php

    http://pastebin.com/9vtSvcEn

    (Just show me the code that I need to change to get my goal)

    Thxxxxx :D

    #37314

    Topic: Forum resize

    in forum Troubleshooting
    zamajeni
    Member

    I want a code that automaticly resize a form to the maximum width to any user and his monitor resolution. Something like there are no marines. Any code for that??

    Im using Kakumei theme (default).

    #99080
    koyuncu
    Member

    bump.. still can’t post on the plugins page :/ help?

    #104180
    koyuncu
    Member

    bump.. still can’t post on the plugins page :/ help?

    #99079
    koyuncu
    Member

    bump.. still can’t post on the plugins page :/ help?

Viewing 25 results - 19,176 through 19,200 (of 32,500 total)
Skip to toolbar