Search Results for 'code'
-
AuthorSearch Results
-
May 18, 2014 at 9:43 am #146519
Brent Brooks
ParticipantHey Guys!
I am new to using BBpress. I have been learning a little bit each day and you guys rock!
My theme is DIVI from elegant themes.
Here is the start of my open forum:
http://blankstageproductions.com/forums/forum/bsp/When I went to see how the forum looked on my smartphone it looked odd. All the words are bunched up on the RIGHT side of the screen making it difficult to read. Is there a plugin or some CSS coded I can drop in? I have done several searches but may not be looking in the right place for this.
For CSS I have learned to drop in code using the ePanel in the theme. I found a thread here with code, copied it in and the code took pretty well. I still have so much to learn in terms of CSS and how to change it but figure as long as the ePanel works I should be good.
May 18, 2014 at 9:41 am #146518In reply to: Documented import from snitz access database
Stephen Edgar
Keymasterdear Stephen don’t be angry …english is not my language
Do not worry about that, I understand you fine 🙂
Edit: Your MySQL is Excellent 😉
Forums and Topic status = Done (
F_TOPICS&F_COUNT)Forum Topics and Replies Counts = Done (
T_REPLIES)Last Reply Date = Done (
T_LAST_POST)Due to limitations with the importer configuration we can’t include the
FORUM_TOTALSorFORUM_CATEGORYtables. You will need to manually reassign your your forum categories after importing, usually there is only a small number of these so this shouldn’t be much of an issue. The ‘Total’ Counts’ are also not actually needed, we do this slightly different and are recalculated by bbPress after the import has finished with the ‘Repair Tools’.Edit: After the import has finished we actually recount all the ‘counts’ so these are not very important to the import, they kind of just help a few things on the way.
May 18, 2014 at 6:10 am #146507In reply to: Documented import from snitz access database
gianjj
ParticipantTo know which Forum or Topic are open and permit to receive new Topic reply, we need this fields
Forum area
FORUM_FORUM => F_STATUS1=open | 0=closeSingle Topic
FORUM_TOPICS => T_STATUS1=open | 0=close===========
To know the categories we need to query the table
FORUM_CATEGORYwhere we haveCAT_IDUnique ID used to join inFORUM_FORUM => CAT_IDtable
CAT_NAMEas is …the name
CAT_STATUSneed a mention this field, Category locked = 0 | Category Open = 1Ex of query select for all category and related forum
SELECT FORUM_CATEGORY.CAT_ID, FORUM_CATEGORY.CAT_NAME, FORUM_FORUM.FORUM_ID, FORUM_FORUM.F_SUBJECT FROM FORUM_CATEGORY LEFT OUTER JOIN FORUM_FORUM ON FORUM_CATEGORY.CAT_ID = FORUM_FORUM.CAT_ID GROUP BY FORUM_CATEGORY.CAT_ID, FORUM_CATEGORY.CAT_NAME, FORUM_FORUM.FORUM_ID, FORUM_FORUM.F_SUBJECT===========
May 18, 2014 at 5:41 am #146506In reply to: Documented import from snitz access database
gianjj
Participantdear Stephen don’t be angry …english is not my language 😛
..however…FORUM_FORUM => F_TOPICS
This information is refer to all topics (Only Topic) in specific forum ex: “Forum_name => Total Number of topic”FORUM_FORUM => F_COUNT
This information is refer of all replies (Only Reply) in specific forum ex: “Forum_name => Total Number of replis”I think a sum of this two information give us a total like here, ex: “Troubleshooting => 30,051”
================
In this Table
FORUM_TOTALS, Snitz save information of whole BB, a sum of all replies and all topics
FORUM_TOTALS => T_COUNTwhole topic
FORUM_TOTALS => P_COUNTwhole replies================
About
FORUM_TOPICS => T_REPLIES
is this field Snitz save number of replies relate to single topic ex this one:
“Documented import from snitz access database” > “18 replies”================
with minor importance, also stored in this table
FORUM_TOPICSwe haveT_LAST_POST_AUTHORID value of last member have posted reply
ex: Last reply from: Stephen EdgarT_LAST_POSTdata value of last reply added (same format yyyymmddhhmmss)
ex: Last activity: 5 hours, 57 minutes agoT_LAST_POST_REPLY_IDID value of last reply added actually used for link in email (?)
ex: Post Link: https://bbpress.org/forums/topic/documented-import-from-snitz-access-database/#post-146492May 18, 2014 at 4:10 am #146503In reply to: Is there a plugin to add new forum roles to bbpress?
Robin W
Moderatorno plugin, but this page shows how to add them using code
(I haven’t quite finished it, but it should work!)
May 17, 2014 at 11:52 pm #146498In reply to: User profile pages not displaying correctly
Stephen Edgar
KeymasterOK, try this instead, put this code in the
bbpress.phpfile instead:<?php /** * bbPress wrapper template. */ get_header(); ?> <?php while( have_posts() ): the_post(); ?> <?php the_content(); ?> <?php endwhile; ?> <?php get_footer(); ?>May 17, 2014 at 10:54 pm #146493In reply to: User profile pages not displaying correctly
Stephen Edgar
KeymasterAh…. I know why, apologies for saying not cool 😉
Make a copy of your
page.phpfile and save it asbbpress.phpin your themes folder (you can usepage-sidebar.phpif you prefer) and then bbPress will ‘wrap’ all of it’s pages in that template for you.May 17, 2014 at 10:46 pm #146492In reply to: Documented import from snitz access database
Stephen Edgar
KeymasterThere are actually a couple more fields that can be added that I just realized are not in the Example.php file (which I will add)
Forum type – Is this a forum or category?
// Forum type (Category = 0 or Forum = 1, Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'forums_table', 'from_fieldname' => 'the_forum_type', 'to_type' => 'forum', 'to_fieldname' => '_bbp_forum_type', 'callback_method' => 'callback_forum_type' );Forum status, can new topics be created in the forum?
// Forum status (Unlocked = 0 or Locked = 1, Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'forums_table', 'from_fieldname' => 'the_forum_status', 'to_type' => 'forum', 'to_fieldname' => '_bbp_status', 'callback_method' => 'callback_forum_status' );Topic status – Can new replies be created for this topic?
// Topic status (Open or Closed) $this->field_map[] = array( 'from_tablename' => 'topics_table', 'from_fieldname' => 'the_topic_status', 'to_type' => 'topic', 'to_fieldname' => 'post_status', 'callback_method' => 'callback_topic_status' );May 17, 2014 at 10:25 pm #146491In reply to: Documented import from snitz access database
Stephen Edgar
KeymasterFirstly I only included the fields Robin had supplied, I do not have a copy of Snitz to test either. So I commented out but didn’t remove any of the code so that it would stand out and you could update any of these as needed which you have done.
The forum ‘counts’ I think you may have incorrect in your post above:
*_bbp_topic_count– The number of topics that are ‘publicly’ visible
*_bbp_reply_count– The number of replies that are ‘publicly’ visible
*_bbp_total_topic_count– The total number of topics (includes topics that are are unapproved or hidden)
*_bbp_total_reply_count– The total number of replies (includes replies that are are unapproved or hidden)A clearer explanation of each of these would be helpful and also are each of these fields in the
FORUM_FORUMdatabase table:
*F_TOPICS
*F_COUNT
*T_COUNT
*P_COUNTThe topic ‘counts’ is the same:
*_bbp_reply_count– The number of replies that are ‘publicly’ visible
*_bbp_total_reply_count– The total number of replies (includes replies that are are unapproved or hidden)A clearer explanation of
T_REPLIESwould be helpful and is this fields in theFORUM_TOPICSdatabase table?Whilst you answer those I’ll add Topic Author IP, Stickies and Member Status 🙂
May 17, 2014 at 9:52 pm #146487In reply to: Documented import from snitz access database
gianjj
ParticipantI forgot this, I’m migrating from Snitz Forums 2000 Version 3.4.06 🙂
Can find this information on Table:FORUM_CONFIG_NEWMay 17, 2014 at 9:49 pm #146486In reply to: Display unread posts distinctively
Stephen Edgar
KeymasterHere is our ‘Official’ stance on the ‘Unread’ feature/functionality:
https://bbpress.trac.wordpress.org/ticket/1937
The primary issue is performance, we have not seen a plugin that will work well for larger sites, if we implement this as a feature it must work for everyone who uses bbPress.
I just updated the list of ‘Unread’ type plugins I know of here:
May 17, 2014 at 9:44 pm #146485In reply to: Documented import from snitz access database
gianjj
ParticipantMember status
1 = Active
0 = No Active// User status. $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_STATUS', 'to_type' => 'user', 'to_fieldname' => 'user_status' );May 17, 2014 at 9:39 pm #146484In reply to: Documented import from snitz access database
gianjj
ParticipantStiky Status
1 = Stycky
0 = No Sticky// Sticky status (Stored in postmeta)) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_STICKY', 'to_type' => 'topic', 'to_fieldname' => '_bbp_old_sticky_status', 'callback_method' => 'callback_sticky_status' );May 17, 2014 at 9:33 pm #146483In reply to: Documented import from snitz access database
gianjj
Participantreally many thanks for your help….
On first look I see comments block of topic and reply count not supported in snitz… but is a mistake….. (is it ?)
// Forum topic count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_TOPICS', 'to_type' => 'forum', 'to_fieldname' => '_bbp_topic_count' ); // Forum reply count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_COUNT', 'to_type' => 'forum', 'to_fieldname' => '_bbp_reply_count' ); // Forum total topic count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOTALS', 'from_fieldname' => 'T_COUNT', 'to_type' => 'forum', 'to_fieldname' => '_bbp_total_topic_count' ); // Forum total reply count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOTALS', 'from_fieldname' => 'P_COUNT', 'to_type' => 'forum', 'to_fieldname' => '_bbp_total_reply_count' );And I’m Not sure what the difference is from this two information….. but there is a total replies per topic
// Topic reply count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_REPLIES', 'to_type' => 'topic', 'to_fieldname' => '_bbp_reply_count', 'callback_method' => 'callback_topic_reply_count' ); // Topic total reply count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_REPLIES', 'to_type' => 'topic', 'to_fieldname' => '_bbp_total_reply_count', 'callback_method' => 'callback_topic_reply_count' );There is also this 🙂
// Topic author ip (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_IP', 'to_type' => 'topic', 'to_fieldname' => '_bbp_author_ip' );This one is for replies
FORUM_REPLY > R_IPtnks
JMay 17, 2014 at 9:31 pm #146482In reply to: WYSIWYG editor with image upload for "Normal Users"
Stephen Edgar
Keymaster1) An easy WYSIWYG editor in bbpress for normal users(frontend).
You can enable the TinyMCE Visual Editor with instructions shown here:
2) With an image “upload” feature, but is not working like an attachment like “GD bbPress Attachments”.
I’m only aware of the “GD bbPress Attachments” plugin that offers this for bbPress, you should be asking in their support forums for any issues relating to why this plugin doesn’t work for you.
3) All the uploaded images will be separated by folder(user name or individual name for an user).
bbPress does NOT support attachments or media uploads ‘out of the box’
I would also suggest you also contact the “GD bbPress Attachments” support forum to request any enhancements you would like to see in the plugin.May 17, 2014 at 9:23 pm #146481In reply to: Error show in admin dashboard
Stephen Edgar
KeymasterSet WP_DEBUG to false
define('WP_DEBUG', false);in yourwp-config.phpfile, this is a known issue.More info on this:
https://bbpress.trac.wordpress.org/ticket/2309 https://core.trac.wordpress.org/ticket/24169
May 17, 2014 at 9:18 pm #146480Stephen Edgar
KeymasterIf you only have a few forums you could design a page with each forum title and below each forum title use the following shortcode
[bbp-single-forum id=$forum_id]e.g.
My Forums Page My First Forum [bbp-single-forum id=123] My Second Forum [bbp-single-forum id=456] My Third Forum [bbp-single-forum id=789]May 17, 2014 at 8:52 pm #146477In reply to: Documented import from snitz access database
Stephen Edgar
KeymasterbbPress doesn’t actually support the use of signatures ‘out of the box’.
What we can do though is still import that data and store it in the
wp_usermetatable, then if you do add a plugin that supports signatures in bbPress you can then copy that data (Using phpMyAdmin for example) from your imported database to however that plugin supports signatures.Simply add this field map:
// User Signature (Stored in usermeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_SIG', 'to_type' => 'user', 'to_fieldname' => '_bbp_snitz_user_sig' );Thus once you (if you do) add a plugin to support signatures to can then query against the
_bbp_snitz_user_sigfield directly with MySQL and update your user profile fields.I just added the above to the Gist also, you can see the changes via the ‘revisions’ link.
May 17, 2014 at 8:42 pm #146475In reply to: Documented import from snitz access database
gianjj
ParticipantOk STEPHEN, tomorrow I’ll try to config a new SNITZ.PHP with all information and run it!
(hope will be my friend hihihihi)Actually the only doubt is where store the signature, Snitz stored in
FORUM_MEMBERS > M_SIGAnd ….I think can be more helpful indicate which fieldname are required in bbp …may be ther is but I didn’t find it
Tnks
Bye JMay 17, 2014 at 8:28 pm #146473In reply to: Documented import from snitz access database
Stephen Edgar
KeymasterAnd just because I could and it was quick and easy, here is a copy of the
Snitz.phpbased on the latestExample.phpwith Robin’s fields mappings.https://gist.github.com/ntwb/2f057071dd05f9758570
You can also compare the revisions (Seeing the changes made from the source Example.php)
https://gist.github.com/ntwb/2f057071dd05f9758570/revisionsMay 17, 2014 at 7:54 pm #146471In reply to: Documented import from snitz access database
Stephen Edgar
KeymasterOne more thing, when making a custom importer always base it of the
Example.phpimporter, I keep that updated with examples and any other changes I make for bbPress.The latest (updated 3 days ago) is here:
https://bbpress.trac.wordpress.org/browser/trunk/src/includes/admin/converters/Example.phpAs Robin points out, you just delete/remove the sections or fields that are not applicable to your import e.g. ‘tags’ or if your database doesn’t include the ‘counts’ for topics in forums then remove that part in the forum section.
May 17, 2014 at 7:50 pm #146470In reply to: Documented import from snitz access database
Stephen Edgar
KeymasterCool, I just edited a couple of the posts above to wrap some code in ‘code’ tags to make things a little clearer 🙂
May 17, 2014 at 4:56 pm #146468In reply to: Can't change forum's index meta title
Robin W
Moderatorok, the answer is somewhere in this function
function bbp_title( $title = '', $sep = '»', $seplocation = '' ) { // Title array $new_title = array(); /** Archives **************************************************************/ // Forum Archive if ( bbp_is_forum_archive() ) { $new_title['text'] = bbp_get_forum_archive_title(); // Topic Archive } elseif ( bbp_is_topic_archive() ) { $new_title['text'] = bbp_get_topic_archive_title(); /** Edit ******************************************************************/ // Forum edit page } elseif ( bbp_is_forum_edit() ) { $new_title['text'] = bbp_get_forum_title(); $new_title['format'] = esc_attr__( 'Forum Edit: %s', 'bbpress' ); // Topic edit page } elseif ( bbp_is_topic_edit() ) { $new_title['text'] = bbp_get_topic_title(); $new_title['format'] = esc_attr__( 'Topic Edit: %s', 'bbpress' ); // Reply edit page } elseif ( bbp_is_reply_edit() ) { $new_title['text'] = bbp_get_reply_title(); $new_title['format'] = esc_attr__( 'Reply Edit: %s', 'bbpress' ); // Topic tag edit page } elseif ( bbp_is_topic_tag_edit() ) { $new_title['text'] = bbp_get_topic_tag_name(); $new_title['format'] = esc_attr__( 'Topic Tag Edit: %s', 'bbpress' ); /** Singles ***************************************************************/ // Forum page } elseif ( bbp_is_single_forum() ) { $new_title['text'] = bbp_get_forum_title(); $new_title['format'] = esc_attr__( 'Forum: %s', 'bbpress' ); // Topic page } elseif ( bbp_is_single_topic() ) { $new_title['text'] = bbp_get_topic_title(); $new_title['format'] = esc_attr__( 'Topic: %s', 'bbpress' ); // Replies } elseif ( bbp_is_single_reply() ) { $new_title['text'] = bbp_get_reply_title(); // Topic tag page } elseif ( bbp_is_topic_tag() || get_query_var( 'bbp_topic_tag' ) ) { $new_title['text'] = bbp_get_topic_tag_name(); $new_title['format'] = esc_attr__( 'Topic Tag: %s', 'bbpress' ); /** Users *****************************************************************/ // Profile page } elseif ( bbp_is_single_user() ) { // User is viewing their own profile if ( bbp_is_user_home() ) { $new_title['text'] = esc_attr_x( 'Your', 'User viewing his/her own profile', 'bbpress' ); // User is viewing someone else's profile (so use their display name) } else { $new_title['text'] = sprintf( esc_attr_x( "%s's", 'User viewing another users profile', 'bbpress' ), get_userdata( bbp_get_user_id() )->display_name ); } // User topics created if ( bbp_is_single_user_topics() ) { $new_title['format'] = esc_attr__( "%s Topics", 'bbpress' ); // User rueplies created } elseif ( bbp_is_single_user_replies() ) { $new_title['format'] = esc_attr__( "%s Replies", 'bbpress' ); // User favorites } elseif ( bbp_is_favorites() ) { $new_title['format'] = esc_attr__( "%s Favorites", 'bbpress' ); // User subscriptions } elseif ( bbp_is_subscriptions() ) { $new_title['format'] = esc_attr__( "%s Subscriptions", 'bbpress' ); // User "home" } else { $new_title['format'] = esc_attr__( "%s Profile", 'bbpress' ); } // Profile edit page } elseif ( bbp_is_single_user_edit() ) { // Current user if ( bbp_is_user_home_edit() ) { $new_title['text'] = esc_attr__( 'Edit Your Profile', 'bbpress' ); // Other user } else { $new_title['text'] = get_userdata( bbp_get_user_id() )->display_name; $new_title['format'] = esc_attr__( "Edit %s's Profile", 'bbpress' ); } /** Views *****************************************************************/ // Views } elseif ( bbp_is_single_view() ) { $new_title['text'] = bbp_get_view_title(); $new_title['format'] = esc_attr__( 'View: %s', 'bbpress' ); /** Search ****************************************************************/ // Search } elseif ( bbp_is_search() ) { $new_title['text'] = bbp_get_search_title(); } // This filter is deprecated. Use 'bbp_before_title_parse_args' instead. $new_title = apply_filters( 'bbp_raw_title_array', $new_title ); // Set title array defaults $new_title = bbp_parse_args( $new_title, array( 'text' => $title, 'format' => '%s' ), 'title' ); // Get the formatted raw title $new_title = sprintf( $new_title['format'], $new_title['text'] ); // Filter the raw title $new_title = apply_filters( 'bbp_raw_title', $new_title, $sep, $seplocation ); // Compare new title with original title if ( $new_title === $title ) return $title; // Temporary separator, for accurate flipping, if necessary $t_sep = '%WP_TITILE_SEP%'; $prefix = ''; if ( !empty( $new_title ) ) $prefix = " $sep "; // sep on right, so reverse the order if ( 'right' === $seplocation ) { $new_title_array = array_reverse( explode( $t_sep, $new_title ) ); $new_title = implode( " $sep ", $new_title_array ) . $prefix; // sep on left, do not reverse } else { $new_title_array = explode( $t_sep, $new_title ); $new_title = $prefix . implode( " $sep ", $new_title_array ); } // Filter and return return apply_filters( 'bbp_title', $new_title, $sep, $seplocation ); }a filter such as
function amend_title () { if ( bbp_is_single_forum() ) { $new_title['text'] = 'YA book forum' ; $new_title['format'] = esc_attr__( 'YA book Forum', 'bbpress' ); } return $new_title; } add_filter('bbp_before_title_parse_args', 'amend_title' );should sort it but doesn’t, and I’m too tired to work out why 🙂
Over to you !
May 17, 2014 at 4:43 pm #146466JBBoY
ParticipantHahaha It’s better easy, but the hard doesn’t scares me! Yeah it would be great to know your idea, because I’m completely lost.
You’re right about forum categories, I didn’t realise.I’ve tried with a code from this site who shows the last topics of all forums in a different table, but not the last (4?,5?,6?… variable who control the number ) topics in the same table. And not each topic under his Forum. 🙂
May 17, 2014 at 1:48 pm #146459In reply to: Can't change forum's index meta title
Robin W
ModeratorI think I understand
go into dashboard>settings>forums and change the slugs for forum root and single forum root. that will change the url
If you want to change the breadcrumb, then see
you can also set
‘home_text’ , ‘root_text’ and ‘current_text’
using this code
If that’s not what you are after – come back !
-
AuthorSearch Results