Search Results for 'code'
-
AuthorSearch Results
-
August 18, 2015 at 12:09 pm #165514
In reply to: bbPress Shortcode
Acs-Yt
ParticipantI’m sorry to ask, but as I’m very new to css & php, I really don’t know, where to paste this code.
But nevertheless, thanks for the code.
August 18, 2015 at 11:50 am #165509In reply to: SMF Import Help Needed
sharingsunshine_wp
ParticipantThanks for the code. I ran through the converter and this time it shows the correct topics and reply count until you actually look into each topic. All the topics I have checked are missing replies.
The user count is still double even though I checked purge and it said no cleanup necessary.
Looks like we are much closer so thanks for getting us there.
Do I need to do anything to the forum to make it ready? I do have some mods on it do they need to be removed? I didn’t see anywhere saying to remove them so thought I would ask.
August 18, 2015 at 10:37 am #165504In reply to: Add custom text fields to reply form
Robkk
ModeratorThe information for adding new fields for topics could be helpful for adding fields to the reply form too. You may need to just change the word topic in any hooks used to reply, or just any word with topic with reply in the code.
If you are just adding a simple text box for the reply form you can look over this example.
add_action ( 'bbp_theme_before_reply_form_content', 'bbp_extra_reply_fields'); function bbp_extra_reply_fields() { $waffle = get_post_meta( bbp_get_reply_id(), 'bbp_waffles', true); $pancake = get_post_meta( bbp_get_reply_id(), 'bbp_pancakes', true); echo '<fieldset class="bbp-form">'; echo '<p><label for="bbp_waffles">Waffles</label><br>'; echo "<input type='text' name='bbp_waffles' value='".$waffle."'></p>"; echo '<p><label for="bbp_pancakes">Pancakes</label><br>'; echo "<input type='text' name='bbp_pancakes' value='".$pancake."'></p>"; echo '</fieldset>'; } add_action ( 'bbp_new_reply', 'bbp_save_extra_fields', 10, 1 ); add_action ( 'bbp_edit_reply', 'bbp_save_extra_fields', 10, 1 ); function bbp_save_extra_fields($reply_id) { if (isset($_POST) && $_POST['bbp_waffles']!='') update_post_meta( $reply_id, 'bbp_waffles', $_POST['bbp_waffles'] ); if (isset($_POST) && $_POST['bbp_pancakes']!='') update_post_meta( $reply_id, 'bbp_pancakes', $_POST['bbp_pancakes'] ); } add_action('bbp_theme_after_reply_content', 'bbp_show_extra_fields'); function bbp_show_extra_fields() { $reply_id = bbp_get_reply_id(); $value1 = get_post_meta( $reply_id, 'bbp_waffles', true); $value2 = get_post_meta( $reply_id, 'bbp_pancakes', true); echo "Opinion on Waffles: ".$value1."<br>"; echo "Opinion on Pancakes: ".$value2."<br>"; }August 18, 2015 at 5:05 am #165497project_subdomain
ParticipantHi!
I’m trying to display different divs for all topics of specific forums.
Wrong:<?php if ( is_post(xyz) ) : ?> <div>..</div>or
<?php if ($forum_id=xyz) : ?> <div>..</div>Suggest to need to use
get_topic_idto get current topic ids?
Would be very happy for any help with this!August 17, 2015 at 10:29 pm #165494In reply to: SMF Import Help Needed
Robkk
ModeratorYou get the error from upgrading to 2.0.10??
Also I can see SMF’s changelog and it mentions this. This might have caused an issue, but it could possibly be a simple fix.
Fix for unsupported UTF8mb4 characters
Here is the current SMF.php importer in
/wp-content/plugins/bbpress/includes/admin/converters/SMF.phpYou can take a look at my gist file/download it and open in an IDE editor.
August 17, 2015 at 9:37 pm #165493In reply to: SMF Import Help Needed
sharingsunshine_wp
ParticipantI tried to find the code to actually see what is wrong with the sql statement. I followed these directions thinking the smf importer would be close by.
************
You can also make your own custom importer using the included Example.php located in /bbpress/includes/admin/converters/Example.php to setup an import from any SQL database.However, I don’t have a /bbpress folder at the root is it in another subfolder? Or, has it been changed since this page was created?
Thanks,
Randal
August 17, 2015 at 7:53 pm #165492Robkk
ModeratorThis custom CSS would help with your line-height issue.
#bbpress-forums div.bbp-forum-author, #bbpress-forums div.bbp-topic-author, #bbpress-forums div.bbp-reply-author { line-height: 2em; }August 17, 2015 at 7:36 pm #165490In reply to: I cannot display “bbp-topic-form” new-topic-0
Robkk
ModeratorYou cannot see the topic form when logged in??
Do you see any notices that show in the topic forms place??
You can try to see if there is a theme/plugin issue first.
August 17, 2015 at 7:28 pm #165489In reply to: bbPress Shortcode
Robkk
ModeratorTry this custom CSS to see if it would help make your forums full width.
@media and (min-width: 992px) { .bbpress .col-md-8 { width: 100%; } }Use this to completely remove the sidebar with CSS.
@media and (min-width: 992px) { .bbpress .col-md-4 { width: 0; display: none; } }August 17, 2015 at 6:47 pm #165485In reply to: add a "Featured Image" to a forum
Robkk
Moderator@goldlux does this work?? you of course need a way to set the featured image of a topic though.
add_post_type_support('topic', array('thumbnail')); function ks_topic_icons() { if ( 'topic' == get_post_type() ) { global $post; if ( has_post_thumbnail($post->ID) ) echo get_the_post_thumbnail($post->ID,'thumbnail',array('class' => 'alignleft topic-icon')); } } add_action('bbp_theme_before_topic_title','ks_topic_icons');August 17, 2015 at 3:59 pm #165478In reply to: SMF Import Help Needed
sharingsunshine_wp
ParticipantThanks for approving the post and I certainly will heed the links minimum from now on. I upgraded the later version and now I am getting this error.
Repair any missing information: Continue WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'users_profile_table.the_user_id = users_table.the_user_id WHERE users_table.the_' at line 1] SELECT convert(users_table.the_users_id USING "utf8mb4") AS the_users_id,convert(users_table.the_users_password USING "utf8mb4") AS the_users_password,convert(users_table.the_users_password_salt USING "utf8mb4") AS the_users_password_salt,convert(users_table.the_users_username USING "utf8mb4") AS the_users_username,convert(users_table.the_users_nicename USING "utf8mb4") AS the_users_nicename,convert(users_table.the_users_email_address USING "utf8mb4") AS the_users_email_address,convert(users_table.the_users_homepage_url USING "utf8mb4") AS the_users_homepage_url,convert(users_table.the_users_registration_date USING "utf8mb4") AS the_users_registration_date,convert(users_table.the_users_status USING "utf8mb4") AS the_users_status,convert(users_table.the_users_display_name USING "utf8mb4") AS the_users_display_name,convert(users_table.the_users_aim USING "utf8mb4") AS the_users_aim,convert(users_table.the_users_yahoo USING "utf8mb4") AS the_users_yahoo,convert(users_table.the_users_jabber USING "utf8mb4") AS the_users_jabber,convert(users_profile_table.the_users_id USING "utf8mb4") AS the_users_id FROM smf_users_table AS users_table INNER JOIN smf_users_profile_table AS users_profile_table USING users_profile_table.the_user_id = users_table.the_user_id WHERE users_table.the_user_id != -1 LIMIT 0, 100August 17, 2015 at 10:36 am #165465In reply to: Inserting Forum Element on Front Page
kachan64
ParticipantYou will have to use
<?php echo do_shortcode(‘[bbp-topic-index]‘); ?>With this code, you can insert it anywhere you want just like a regular HTML
August 17, 2015 at 3:58 am #165459In reply to: The subscribe has no spaces from breadcrums
Robin W
ModeratorTry adding !important – your theme may be overriding the settings viz
August 16, 2015 at 5:46 am #165440Topic: Add line breaks to frontend’s biographical info
in forum Troubleshootingproject_subdomain
ParticipantAs wordpress strips the break and text tags I’m looking for a solution to add line breaks to my bbp_user_decription div.
Here is what did not work:
1.) What I find everywhere is some sort of this added to functions.php:remove_filter('pre_user_description', 'wp_filter_kses');This does not work, also looking at wordpress’ recent incl/registration.php just saying this file is deprecated makes me think that this code should not get to work at all.
2.) Alternatively I looked through my themes’files and used
<?php echo nl2br(get_the_author_meta( 'user_description' )); ?>
in content.php. Or<?php echo nl2br(get_the_author_meta( 'description' )); ?>in my author.php3.) Tried 1) and 2) with bbp_ at the beginning of each decription’s part.
Nothing worked, break-or p-tags are just ignored.
Also, is there a secure way to add break-tags only?
Thanks for any help!August 15, 2015 at 8:25 am #165410In reply to: bbPress Shortcode
Robkk
ModeratorYou would need to follow this and create a bbpress.php file and then come back and I will help you with some CSS that you might need.
August 15, 2015 at 8:21 am #165409In reply to: New to bbPress – Help on Page Theme
Robkk
ModeratorIt looks like it is inheriting different templates for the forum archive and the single forums. From the looks of it the second image looks correct to me. It is displaying the title, but you have leftover post data from your theme like the extra breadcrumbs.
If you did create a bbpress.php rename it to something like bbpressa.php so that it won’t load anymore.
Now if you have what the file still installed, go to the forum archive or
/?post_type=forumand see if the page template is different from what the General Forum page has.The reason why I am saying do this, is to see if bbPress could be inheriting two different templates. It would make sense if the Forum archive would use page.php or even archive.php, and in some cases the single forum pages could be inheriting single.php.
August 15, 2015 at 6:57 am #165405In reply to: The subscribe has no spaces from breadcrums
Robkk
Moderatorwhoops sorry I messed up the CSS a little. I edited the code above try that now.
August 15, 2015 at 5:41 am #165397In reply to: New to bbPress – Help on Page Theme
Robkk
ModeratorYou can try that, but it usually only affects one specific page. Doing it this way means you have to put a shortcode for every bbPress page. It is easier in the end to just create a
bbpress.phpfile in your theme from yourpage.phpfile. You can also just tell me your theme (hopefully it is not paid) then I could just do it for you.August 15, 2015 at 4:05 am #165395In reply to: Get next and previous page in wp_header
Robkk
ModeratorNot entirely sure really but I have tested themes that add next and prev post nav links to bbPress on accident and it seems to work. You may need to add the php tag to the bbPress forum templates, maybe just output it in a bbpress.php file with a condtional to only show on single forums.
https://codex.wordpress.org/Function_Reference/posts_nav_link
August 15, 2015 at 3:27 am #165390In reply to: Importing a large vBulletin forum – in stages?
Robkk
ModeratorThere should be a vBull importer in bbPress.
The W3 Total Cache would help optimize bbPress. Of course it is more important to have high performance hardware on your site, use an opcode cache, possibly an object cache (the plugin helps add a backend file), and keeping your database tidy. Page cache can become a little tricky in some situations but it should be fine using w3 total cache with bbPres.
bbPress is translatable and there are translations for specific langauges.
bbPress could work in multilingual sites. It might be better to just allow your users to contribute their content in their language though. There is an issue using WPML though.
August 15, 2015 at 3:07 am #165388In reply to: How to share bbPress forum multisite
Robkk
ModeratorIs there anyway you could embed a forum into another page?
Not the whole bbPress forums like some Iframe embed like some other forums, you can use this shortcode to embed a single forum though.
[bbp-single-forum id=$forum_id]
Display a single forums topics. eg. [bbp-single-forum id=32]
To find the ID, add a plugin like Reveal IDs to help you out find the IDs of all your forums. After installing it go to Forums > All Forums and you should see each forums ID next to it.
There are of course other ways of finding a posts ID and you may not need to install the plugin, it is just better and easier for users.
August 15, 2015 at 2:48 am #165387In reply to: The subscribe has no spaces from breadcrums
Robkk
ModeratorThis should help.
/*styling to move 'Subscribe' to right hand side */ .single-forum .subscription-toggle { padding-left: 10px; }August 15, 2015 at 2:39 am #165386Robkk
Moderator1. Not entirely sure what the topic frame is, but I like how the title looks good on your site already.
2.
div.bbp-reply-header { clear: none; }If you need help styling your forums you may need to use the bbp style pack plugin. There are a lot of CSS styles on your site that I can see causing some minor issues with other areas on bbPress, like the Forum Header labels that say Topic and Freshness. You may also need to use a darker image/background for your single forum pages.
August 15, 2015 at 1:58 am #165385Stephen Edgar
KeymasterIf you select a different forum from the dropdown, e.g.
SMFwhat error do you get?Can you also try using an incorrect password, you should be seeing some kind of errors here rather than nothing each time.
August 14, 2015 at 11:38 pm #165381In reply to: several forum
Robkk
ModeratorYou might need to look into using LearnPress and this plugin. I think it should do what you want, but you may need to leave a support topic on the plugin’s below support forum just to make sure.
https://wordpress.org/plugins/learnpress-bbpress/
Or this might be custom development for a plugin.
But what you can do is at the bottom of each post just insert one of the single forum shortcodes.
Like this.
[bbp-single-forum id=$forum_id]You can find the forum id by using a plugin like Reveal IDs to make life easier, and all you have to do is go to Forums > All Forums in the WordPress backend to see all of your forums ids.
Same thing with topics if you to assign topics for each post.
-
AuthorSearch Results