Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'bbpress'

Viewing 25 results - 48,826 through 48,850 (of 64,514 total)
  • Author
    Search Results
  • #78854

    bbPress Exporter 0.1a

    exporter-bbpress.php

    <?php
    /*
    Plugin Name: Export
    Plugin URI: https://www.bbpress.org/
    Description: Allows administrators to export forum data.
    Author: Dan Larkin
    Version: 0.1 alpha
    Author URI: http://www.stealyourcarbon.net/
    */

    /**
    * Includes necessary files.
    */
    function export_init ()
    {
    require_once ('wfxp.php');
    require_once ('wfxp-bbpress.php');
    }

    /**
    * Executes all necessary functions to make the exportation happen.
    */
    function export_main ()
    {
    global $bbdb;
    export_init ();
    $bbxp = new WFXP_bbPress ($bbdb);
    $bbxp->db = $bbdb;
    $filename = 'bbpress' . date ('Y-m-d') . '.xml';

    $bbxp->write_header ($filename);
    $bbxp->write_users ();
    $bbxp->write_forums ();
    $bbxp->write_topics ();
    $bbxp->write_footer ();

    die ();

    }

    /**
    * Displays the admin export page.
    *
    * Gives a simple explanation of how the export file works and gives
    * users a nice shiny button to click.
    */
    function export_page ()
    {
    ?>

    <div class="wrap">
    <h2><?php _e ('Export') ?></h2>
    <p><?php _e ('When you click the button below, bbPress will generate an XML file for you to save to your computer.'); ?></p>
    <p><?php _e ('This file will contain data about your users, forums, topics, and posts. You can use the Import function of another bbPress installation or another compatible web forums software to import this data.'); ?></p>
    <form action="" method="get">
    <p class="submit">
    <input type="submit" name="submit" value="<?php _e ('Download Export File'); ?>" />
    <input type="hidden" name="exporting" value="true" />
    </p>
    </form>
    </div>

    <?php
    }

    /**
    * Adds export link to admin menu.
    */
    function export_add_admin ()
    {
    global $bb_submenu;
    $bb_submenu['content.php'][] = array (__('Export'), 'use_keys', 'export_page', 'exporter-bbpress.php');
    }

    if ('true' == $_GET['exporting'] )
    {
    add_action ('bb_init', 'export_main');
    }

    add_action ('bb_admin_menu_generator', 'export_add_admin');

    ?>

    wfxp.php

    <?php
    /**
    * Web Forums Data Export Class
    *
    * This class contains a number of functions used to take formatted
    * input and output it into a standard XML file for use in transporting
    * data between installations. Class extensions and plugins can be found
    * for various software.
    */
    class WFXP
    {

    /**
    * Instance of BPDB.
    */
    var $db;

    /**
    * Pseudonym for BPDB's get_results.
    *
    * This is a renaming of BPDB's get_results method to eliminate the need
    * for the second parameter by always returning an associative array.
    */
    function fetch ($query)
    {
    return $this->db->get_results ($query, 'ARRAY_A');
    }

    /**
    * Adds formatted user data to the output.
    */
    function add_user ($user)
    {
    ?>
    <user id="<?php echo $user['id']; ?>">
    <login><?php echo $user['login']; ?></login>
    <pass type="<?php echo $user['pass']['type']; ?>"><?php echo $user['pass']['pass'] ?></pass>
    <incept><?php echo $user['incept']; ?></incept>
    <status><?php echo $user['status']; ?></status>
    <?php
    if ($user['meta'])
    {
    foreach ($user['meta'] as $meta)
    {
    $this->add_meta ($meta, 'user');
    }
    }
    ?>
    </user>

    <?php
    }

    /**
    * Adds formatted forum data to the output.
    */
    function add_forum ($forum)
    {
    ?>
    <forum id="<?php echo $forum['id']; ?>" in="<?php echo $forum['in']; ?>">
    <title><![CDATA[<?php echo $forum['title']; ?>]]></title>
    <content><![CDATA[<?php echo $forum['content']; ?>]]></content>
    <?php
    if ($forum['meta'])
    {
    foreach ($forum['meta'] as $meta)
    {
    $this->add_meta ($meta, 'forum');
    }
    }
    ?>
    </forum>

    <?php
    }

    /**
    * Adds formatted topic data to the output
    */
    function add_topic ($topic)
    {
    ?>
    <topic id="<?php echo $topic['id']; ?>" author="<?php echo $topic['author']; ?>" in="<?php echo $topic['in']; ?>">
    <title><![CDATA[<?php echo $topic['title']; ?>]]></title>
    <incept><?php echo $topic['incept']; ?></incept>
    <status><?php echo $topic['status']; ?></status>
    <?php
    if ($topic['meta'])
    {
    foreach ($topic['meta'] as $meta)
    {
    $this->add_meta ($meta, 'topic');
    }
    }
    if ($topic['tags'])
    {
    foreach ($topic['tags'] as $tag)
    {
    $this->add_tag ($tag);
    }
    }
    ?>

    <?php
    foreach ($topic['posts'] as $post)
    {
    $this->add_post ($post);
    }
    ?>
    </topic>

    <?php
    }

    /**
    * Adds formatted post data to the output.
    */
    function add_post ($post)
    {
    ?>
    <post id="<?php echo $post['id']; ?>" author="<?php echo $post['author']; ?>">
    <title><![CDATA[<?php echo $post['title']; ?>]]></title>
    <content><![CDATA[<?php echo $post['content']; ?>]]></content>
    <incept><?php echo $post['incept']; ?></incept>
    <status><?php echo $post['status']; ?></status>
    <?php
    if ($post['meta'])
    {
    foreach ($post['meta'] as $meta)
    {
    $this->add_meta ($meta, 'post');
    }
    }
    ?>
    </post>

    <?php
    }

    /**
    * Adds formatted tag data to the output.
    */
    function add_tag ($tag)
    {
    ?>
    <tag><![CDATA[<?php echo $tag; ?>]]></tag>
    <?php
    }

    /**
    * Adds formatted meta data to the output.
    *
    * Indentation varies depending on what type of element the meta data
    * is being added to so as to make the output pretty.
    */
    function add_meta ($meta, $type)
    {
    if ('post' == $type)
    {
    ?>
    <meta key="<?php echo $meta['key']; ?>"><![CDATA[<?php echo $meta['value']; ?>]]></meta>
    <?php

    }
    else
    {
    ?>
    <meta key="<?php echo $meta['key']; ?>"><![CDATA[<?php echo $meta['value']; ?>]]></meta>
    <?php

    }
    }

    /**
    * Writes file headers.
    *
    * Writes HTTP headers and adds the XML declaration as well as
    * the top level container to the output.
    */
    function write_header ($filename)
    {
    header ('Content-Description: File Transfer');
    header ('Content-Dispositon: attachment; filename=' . $filename);
    header ('Content-Type: text/xml');

    echo '<?xml version="1.0" encoding="UTF-8" ?>';
    ?>

    <forums_data>

    <?php
    }

    /**
    * Adds the closing tag for the top level container to the output.
    */
    function write_footer ()
    {
    ?>
    </forums_data>
    <?php
    }

    }
    ?>

    wfxp-bbpress.php

    <?php
    /**
    * bbPress WFXP Extension
    *
    * This class includes functions necessary for bbPress to interface
    * with the WFXP class, allowing for exportation of bbPress data to
    * a standard XML file.
    */
    class WFXP_bbPress extends WFXP
    {
    /**
    * Fetches users from the database.
    */
    function fetch_users ()
    {
    return $this->fetch ('SELECT * FROM ' . $this->db->users . ' WHERE 1');
    }

    /**
    * Fetches forums from the database.
    */
    function fetch_forums ()
    {
    return $this->fetch ('SELECT * FROM ' . $this->db->forums . ' WHERE 1');
    }

    /**
    * Fetches topics from the database.
    */
    function fetch_topics ()
    {
    return $this->fetch ('SELECT * FROM ' . $this->db->topics . ' WHERE 1');
    }

    /**
    * Fetches posts from the database.
    */
    function fetch_posts ($topic_id)
    {
    return $this->fetch ('SELECT * FROM ' . $this->db->posts . ' WHERE topic_id="' . $topic_id . '"');
    }

    /**
    * Fetches user meta data from the database.
    */
    function fetch_user_meta ($user_id)
    {
    return $this->fetch ('SELECT meta_key, meta_value FROM ' . $this->db->usermeta . ' WHERE user_id="' . $user_id . '"');
    }

    /**
    * Fetches topic meta data from the database.
    */
    function fetch_topic_meta ($topic_id)
    {
    return $this->fetch ('SELECT meta_key, meta_value FROM ' . $this->db->meta . ' WHERE object_type="bb_topic" AND object_id="' . $topic_id . '"');
    }

    /**
    * Fetches topic tags from the database.
    *
    * Fetching topic tags requires multiple queries to
    * determine the relationships between terms and IDs.
    */
    function fetch_topic_tags ($topic_id)
    {
    $taxonomy_ids = $this->fetch ('SELECT term_taxonomy_id FROM ' . $this->db->term_relationships . ' WHERE object_id="' . $topic_id . '"');
    if ($taxonomy_ids)
    {
    foreach ($taxonomy_ids as $taxonomy_id)
    {
    $term_id = $this->fetch ('SELECT term_id FROM ' . $this->db->term_taxonomy . ' WHERE term_taxonomy_id="' . $taxonomy_id['term_taxonomy_id'] . '"');
    $tag = $this->fetch ('SELECT name FROM ' . $this->db->terms . ' WHERE term_id="' . $term_id[0]['term_id'] . '"');
    $tags[] = $tag[0];
    }
    }
    return $tags;
    }

    /**
    * Prepares retrieved user data for output.
    */
    function prep_user_data ($raw_user, $raw_meta)
    {
    $user['id'] = $raw_user['ID'];
    $user['login'] = $raw_user['user_login'];
    if (32 < strlen ($raw_user['user_pass']))
    {
    if (!strcmp (substr ($raw_user['user_pass'], 0, 4), '$P$B'))
    {
    $user['pass']['type'] = 'phpass';
    }
    else
    {
    $user['pass']['type'] = 'unknown';
    }
    }
    else
    {
    $user['pass']['type'] = 'md5';
    }
    $user['pass']['pass'] = $raw_user['user_pass'];
    $user['incept'] = $raw_user['user_registered'];
    $user['status'] = $raw_user['user_status'];
    $user['meta'][] = array ('key' => 'nicename', 'value' => $raw_user['user_nicename']);
    $user['meta'][] = array ('key' => 'email', 'value' => $raw_user['user_email']);
    $user['meta'][] = array ('key' => 'url', 'value' => $raw_user['user_url']);
    $user['meta'][] = array ('key' => 'display_name', 'value' => $raw_user['display_name']);
    if ($raw_meta)
    {
    foreach ($raw_meta as $raw_meta_entry)
    {
    $user['meta'][] = $this->prep_meta_data ($raw_meta_entry);
    }
    }
    return $user;
    }

    /**
    * Prepares retrieved forum data for output.
    */
    function prep_forum_data ($raw_forum)
    {
    $forum['id'] = $raw_forum['forum_id'];
    $forum['in'] = $raw_forum['forum_parent'];
    $forum['title'] = $raw_forum['forum_name'];
    $forum['content'] = $raw_forum['forum_desc'];
    $forum['meta'][] = array ('key' => 'slug', 'value' => $raw_forum['forum_slug']);
    $forum['meta'][] = array ('key' => 'order', 'value' => $raw_forum['forum_order']);
    return $forum;
    }

    /**
    * Prepares retrieved topic data for output.
    */
    function prep_topic_data ($raw_topic, $raw_meta, $raw_tags, $raw_posts)
    {
    $topic['id'] = $raw_topic['topic_id'];
    $topic['author'] = $raw_topic['topic_poster'];
    $topic['in'] = $raw_topic['forum_id'];
    $topic['title'] = $raw_topic['topic_title'];
    $topic['incept'] = $raw_topic['topic_start_time'];
    $topic['status'] = $raw_topic['topic_status'];
    $topic['meta'][] = array ('key' => 'slug', 'value' => $raw_topic['topic_slug']);
    $topic['meta'][] = array ('key' => 'open', 'value' => $raw_topic['topic_open']);
    $topic['meta'][] = array ('key' => 'sticky', 'value' => $raw_topic['topic_sticky']);
    if ($raw_meta)
    {
    foreach ($raw_meta as $raw_meta_entry)
    {
    $topic['meta'][] = $this->prep_meta_data ($raw_meta_entry);
    }
    }
    if ($raw_tags)
    {
    foreach ($raw_tags as $raw_tag)
    {
    $topic['tags'][] = $this->prep_tag_data ($raw_tag);
    }
    }
    foreach ($raw_posts as $raw_post)
    {
    $topic['posts'][] = $this->prep_post_data ($raw_post);
    }
    return $topic;
    }

    /**
    * Prepares retrieved post data for output.
    */
    function prep_post_data ($raw_post)
    {
    $post['id'] = $raw_post['post_id'];
    $post['author'] = $raw_post['poster_id'];
    $post['title'] = '';
    $post['content'] = $raw_post['post_text'];
    $post['incept'] = $raw_post['post_time'];
    $post['status'] = $raw_post['post_status'];
    $post['meta'][] = array ('key' => 'ip_address', 'value' => $raw_post['poster_ip']);
    return $post;
    }

    /**
    * Prepares retrieved tag data for output.
    */
    function prep_tag_data ($raw_tag)
    {
    return $raw_tag['name'];
    }

    /**
    * Prepares retrieved meta data for output.
    */
    function prep_meta_data ($raw_meta)
    {
    return array ('key' => $raw_meta['meta_key'], 'value' => $raw_meta['meta_value']);
    }

    /**
    * Fetches, prepares, and outputs user data using subroutines.
    */
    function write_users ()
    {
    $users = $this->fetch_users ();
    foreach ($users as $user)
    {
    $user_meta = $this->fetch_user_meta ($user['ID']);
    $user = $this->prep_user_data ($user, $user_meta);
    $this->add_user ($user);
    }
    }

    /**
    * Fetches, prepares, and outputs forum data using subroutines.
    */
    function write_forums ()
    {
    $forums = $this->fetch_forums ();
    foreach ($forums as $forum)
    {
    $forum = $this->prep_forum_data ($forum, $forum_meta);
    $this->add_forum ($forum);
    }
    }

    /**
    * Fetches, prepares, and outputs topic data using subroutines.
    */
    function write_topics ()
    {
    $topics = $this->fetch_topics ();
    foreach ($topics as $topic)
    {
    $topic_meta = $this->fetch_topic_meta ($topic['topic_id']);
    $topic_tags = $this->fetch_topic_tags ($topic['topic_id']);
    $topic_posts = $this->fetch_posts ($topic['topic_id']);
    $topic = $this->prep_topic_data ($topic, $topic_meta, $topic_tags, $topic_posts);
    $this->add_topic ($topic);
    }
    }

    }
    ?>

    It also has the Web Forum Export/Import Standard Validator, but I think this post is long enough already :P

    #78853

    @Olaf: it’s a set of PHP scripts in zip archives, don’t freak. Just badly formatted is all. And yes, I just checked that under Windows with an up-to-date anti-virus running. Haven’t got the time to check the PHP code itself mind you ;)

    @gerikg: it’s a plugin, which I think is intended to be a relatively universal data exporter between forums. How you import is a good question though.

    #78695
    eclipsenow
    Member

    Olaf, SMF 2.0 is nearly done. They’re down to RC1 or something now… many new features.

    kawauso, Well, it might complicate things for the programmers but wouldn’t it simplify things for us, the users? EG: People are starting to flock to Joomla’s “Kunena” forum because it is a plug-in that fits snugly inside the Joomla core and automatically makes use of all the Joomla user profiles etc. They’re integrating it with all the Joomla social stuff, so even though it is at a far earlier stage of development than bbpress, the end product will be the joomla equivalent of WP, Buddypress and BBpress all neatly rolled into one. I was chatting with one of the Kunena developers the other night and explained what I liked about old (dead) bbsync, and he said once J1.6 came out he’d have a look at integrating a similar function in K1.6. Sounds good.

    There are things I really love about WP! But the problems with BBpress remain:

    * too many plug-ins external to the core software just to get it to run normal forum functionality that comes ‘out of the box’ with most other forums, meaning too many 3rd party functions that might one day no longer be supported (like bbsync)

    * no bbsync

    * not an easy install plug-in to wp.

    #78852
    Olaf Lederer
    Participant

    don’t know what this is but be careful.

    I can’t open the files on Linux, but it might be some virus too (on a windows system)

    #76788
    Mark
    Member

    It works great if you’re running your forums as a sub-directory of your WP install, but it breaks as is if you’re trying to run your forums under a sub-domain.

    Anybody who happens to know a work-around, feel free to check out: https://bbpress.org/forums/topic/bbpress-in-a-subdomain-on-a-wpmu-install

    #74262
    Mark
    Member

    *one last bump*

    #76787
    batrachoid
    Member

    url?

    #78892
    batrachoid
    Member

    That last plugin hasn’t been updated since January and is only compatible up to wordpress 2.7. It only adds a default role to bbpress, but if you’ve matched your wordpress and bbpress roles, this isn’t necessary, if it ever was.

    A plugin should not be necessary in order for someone to register on a wordpress blog or on bbpress. Under the Settings/General you have a place to set the default role for new members; Subscriber, Administrator, Editor, Author, or Contributor for wordpress and those roles can be matched up to bbpress roles under Settings/WordPress Integration.

    aMember.com mentions wordpress integration but not bbpress on their site, so I think that might be the issue.

    #78504
    johnhiler
    Member

    If you can narrow down the bug report, it might be worth posting to trac?

    https://trac.bbpress.org/report

    #78891

    I’m afraid options-wordpress.php is just the bbPress/WordPress options page and a bit of code. bbPress functions are under the includes directories.

    #78769
    annejan
    Member

    I installed bbPress in the root of my website and WordPress is installed in the directory “/w”. Because I use WordPress functions in my bbPress theme I call the wp-blog-header.php in the bb-config.php with the following code:

    if ( !defined('ABSPATH') & !defined('XMLRPC_REQUEST')) {

    define('WP_USE_THEMES', false);

    include_once( '/home/forum/test/html/w/wp-blog-header.php' );

    header("HTTP/1.1 200 OK");

    header("Status: 200 All rosy"); }

    My .htaccess settings for WordPress:

    # BEGIN WordPress

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /w/

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule . /w/index.php [L]

    </IfModule>

    # END WordPress

    My .htaccess settings for bbPress:

    # BEGIN bbPress

    Options -MultiViews

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /

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

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

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

    RewriteRule ^forum/?$ / [R=302,L,QSA]

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

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

    RewriteRule ^topic/?$ / [R=302,L,QSA]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule ^.*$ /index.php [L]

    </IfModule>

    # END bbPress

    I hope you can help me. Thanks!!

    #78291
    gerikg
    Member

    selcyis email me.

    #31686
    gerikg
    Member
    #76786

    Okay, so every plugin seems to work fine. Except for BBcode Buttons. I have installed BBcode Lite for bbPress, then uploaded BBcode Buttons and activated it.

    The description of the plugin states: “Automatically adds an easy access button toolbar above the post textarea to allow quick tags in BBcode. “

    Well, no such thing appears for me.

    I run on the original, default theme so it should not be a problem.

    #78890
    wpJunkie
    Member

    Would it be in this file maybe? bb-admin/options-wordpress.php

    https://trac.bbpress.org/browser/trunk/bb-admin/options-wordpress.php

    Basically I want to make the inactive user to be a member by default.

    #78889
    wpJunkie
    Member

    I was thinking of editing a Core file, So I need to locate the file that makes the user a member instead of inactive.

    Any one know what file that might be?

    #78814
    gerikg
    Member

    Yeah, thank you anyway.

    #78888

    That plugin shouldn’t even be necessary. I’m not sure to be honest then, integration isn’t my strong point.

    #76785

    I’ll head over and install them right away. Thanks for the quick answers!

    #76784
    johnhiler
    Member

    This one will let you display post counts:

    https://bbpress.org/plugins/topic/post-count-plus/

    #78887
    wpJunkie
    Member

    So I disabled aMember and activated the plugin https://wordpress.org/extend/plugins/add-bbpress-default-role/

    Signed up for an account on http://example.com/wp-login.php?action=register

    And the user got added to the BBpress user list but no role is set, its set to Inactive.

    So its not aMember as far as I can tell. its something between WordPress and BBpress

    #76783
    gerikg
    Member

    Plugins

    1. bbPress Attachments + Allow Images

    3. BBcode Buttons + BBcode Lite for bbPress

    #21160

    Hello!

    I reccently had a problem with my site being hacked. I used SMF back then as forum, but when I got in to business of re-building the forum I got the advice to switch to bbPress (since I already used WordPress). The installation was smooth and it went fine.

    However, now when it is up I miss a couple of functions that I guess I need to install plugins to have. I want…

    1) …the users to be able to post images. The img-tag isn’t allowed from what I can see.

    2) …that all user would have a postcounter by the left field where their name is shown.

    3) …a possiblity to have buttons to display the tags for those who can’t write code. The usual mark a word, press a button and voilá! The word is bold.

    Those are the most pressing matters. Have you any suggestions to what plugins I should use?

    Thanks in advance!

    It is to some extent. It’s called “deep integration” and it seems to work for some people, but not for others.

Viewing 25 results - 48,826 through 48,850 (of 64,514 total)
Skip to toolbar