Search Results for 'code'
-
Search Results
-
I’m moving a social site into BuddyPress and the forums used a now defunct DeluxeBB. It doesn’t seem to be one of the options for the Importer Tools. Do any of you know if the structure of DeluxeBB matches that of one of the options listed?
Here are the forums, threads, and posts tables which contain most of the information needed for this migration.
-- -- Table structure for table <code>deluxebb_forums</code> -- CREATE TABLE IF NOT EXISTS <code>deluxebb_forums</code> ( <code>ordered</code> int(5) DEFAULT '0', <code>cid</code> varchar(225) DEFAULT NULL, <code>name</code> varchar(225) DEFAULT NULL, <code>fid</code> int(6) NOT NULL AUTO_INCREMENT, <code>topics</code> varchar(225) DEFAULT NULL, <code>replies</code> varchar(225) DEFAULT NULL, <code>viewstatus</code> varchar(10) DEFAULT NULL, <code>poststatus</code> varchar(10) DEFAULT NULL, <code>replystatus</code> varchar(10) DEFAULT NULL, <code>lastpost</code> varchar(225) DEFAULT NULL, <code>lastpostby</code> int(10) DEFAULT '0', <code>description</code> tinytext, <code>lastpid</code> int(6) DEFAULT '0', <code>lastpidtime</code> varchar(255) DEFAULT NULL, <code>password</code> varchar(32) DEFAULT NULL, <code>userlist</code> mediumtext NOT NULL, <code>moderators</code> mediumtext NOT NULL, <code>ficon</code> varchar(25) NOT NULL, PRIMARY KEY (<code>fid</code>), KEY <code>cid</code> (<code>cid</code>), KEY <code>lastpostby</code> (<code>lastpostby</code>), KEY <code>lastpid</code> (<code>lastpid</code>) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=22 ; -- -------------------------------------------------------- -- -- Table structure for table <code>deluxebb_posts</code> -- CREATE TABLE IF NOT EXISTS <code>deluxebb_posts</code> ( <code>pid</code> bigint(10) NOT NULL AUTO_INCREMENT, <code>tid</code> bigint(10) NOT NULL DEFAULT '0', <code>author</code> int(10) NOT NULL DEFAULT '0', <code>subject</code> varchar(285) CHARACTER SET latin1 NOT NULL, <code>message</code> text NOT NULL, <code>picon</code> varchar(50) CHARACTER SET latin1 NOT NULL DEFAULT '', <code>postdate</code> int(10) NOT NULL DEFAULT '0', <code>ip</code> varchar(50) CHARACTER SET latin1 NOT NULL DEFAULT '', <code>smiliesoff</code> smallint(1) DEFAULT '0', PRIMARY KEY (<code>pid</code>), KEY <code>author</code> (<code>author</code>), KEY <code>tid</code> (<code>tid</code>,<code>postdate</code>,<code>ip</code>) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=495424 ; -- -------------------------------------------------------- -- -- Table structure for table <code>deluxebb_threads</code> -- CREATE TABLE IF NOT EXISTS <code>deluxebb_threads</code> ( <code>tid</code> bigint(10) NOT NULL AUTO_INCREMENT, <code>fid</code> int(5) NOT NULL DEFAULT '0', <code>author</code> int(10) NOT NULL DEFAULT '0', <code>subject</code> varchar(285) NOT NULL, <code>picon</code> varchar(50) NOT NULL DEFAULT '', <code>views</code> int(3) NOT NULL DEFAULT '0', <code>replies</code> int(3) NOT NULL DEFAULT '0', <code>closed</code> smallint(1) NOT NULL DEFAULT '0', <code>pinned</code> smallint(1) NOT NULL DEFAULT '0', <code>moved</code> int(10) unsigned DEFAULT '0', <code>flame</code> tinyint(1) NOT NULL DEFAULT '0', <code>lastpostby</code> varchar(255) NOT NULL DEFAULT '0', <code>lastpostdate</code> int(10) NOT NULL DEFAULT '0', <code>hiddenby</code> text NOT NULL, <code>likedby</code> text NOT NULL, PRIMARY KEY (<code>tid</code>), KEY <code>fid</code> (<code>fid</code>), KEY <code>pinned</code> (<code>pinned</code>), KEY <code>lastpostdate</code> (<code>lastpostdate</code>), KEY <code>author</code> (<code>author</code>), KEY <code>moved</code> (<code>moved</code>), KEY <code>ashouts</code> (<code>fid</code>,<code>tid</code>,<code>author</code>) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=406651 ;Hi all
I’m using a WP multisite. One of the sites is a bbpress forum.
On another site I’m pulling through the lastest post using the code below
The only thing I can’t seem to find is the shortcode to show an extract of the post.
Is there a shortcode to show an extract of the post.
<?php switch_to_blog( 3 ); $topics_query = array( 'author'=> 0, 'post_type'=> bbp_get_topic_post_type(), 'post_parent'=>'any', 'posts_per_page'=>3, //'post_status'=>join(',', array(bbp_get_public_status_id(), bbp_get_closed_status_id()), 'show_stickes'=> false, 'meta_key'=>'_bbp_last_active_time', 'orderby'=>'meta_value', 'order'=>'DESC', 'meta_query'=>array(bbp_exclude_forum_ids('meta_query')) ); $widget_query = new WP_Query($topics_query); if ($widget_query->have_posts()) : $widget_output = $before_widget; $widget_output .= $before_title . $title . $after_title; ob_start(); while ($widget_query->have_posts()): $widget_query->the_post(); $topic_id = bbp_get_topic_id($widget_query->post->ID); $author_link = bbp_get_topic_author_link(array('post_id'=>$topic_id, 'type'=>'both', 'size'=>60)); $forum_id = bbp_get_topic_forum_id($topic_id); ?> <div class="col-sm-4"> <div class="post"> <h4><a>"><?php bbp_topic_title($topic_id); ?></a></h4> <p class="date"><span><?php bbp_author_link($topic_id); ?></span> <?php bbp_topic_last_active_time($topic_id);?></p> <p> <!--show post extract--> </p> <a href="">Read more</a> </div> </div> <?php endwhile; endif; wp_reset_postdata(); ?>
