Search Results for 'code'
-
AuthorSearch Results
-
March 30, 2016 at 12:34 pm #173640
In reply to: Import from PhpBB Issues – WordPress database error
aaachiaki
ParticipantPascal, thank you for responding! Downloaded 2.6 and uploaded it without problem.
Went to import, and got a new error–>
WordPress database error: [Specified key was too long; max key length is 1000 bytes]
CREATE TABLE wp_bbp_converter_translator ( meta_id mediumint(8) unsigned not null auto_increment, value_type varchar(25) null, value_id bigint(20) unsigned not null default ‘0’, meta_key varchar(255) null, meta_value varchar(255) null, PRIMARY KEY (meta_id), KEY value_id (value_id), KEY meta_join (meta_key, meta_value) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ciMarch 30, 2016 at 11:06 am #173636dtmember
ParticipantHi, I just add the bbpress search code posted above by robkk, and it works too fine Some private topics are also show up. How could I use this search function but not include the private topic. Or maybe it could only shows the topic name but not content. Thanks
Is there anyone might able to solve this?
johnzoro
ParticipantNot sure if this is the right place.
On my normal pages in wordpress I have the option of using full width or having a sidebar.
Is there this option on bbpress or do you need to create a page, then post shortcode then modify that page to full width?
March 30, 2016 at 9:23 am #173632In reply to: Delete own posts
tech55541
ParticipantHello,
Where does this code go?Thanks.
March 30, 2016 at 8:27 am #173626In reply to: Importing Large Xenforo Forum
Stephen Edgar
KeymasterI’ve just added support to the XenForo importer to support deleted users.
https://bbpress.trac.wordpress.org/ticket/2922
If you update your 2.6-alpha via this zip file you’ll have that included for your import.
What this does is if a user has been deleted from XenForo their topics and replies are not actually deleted (they are kept to maintain context) but during import because that user no longer exists they cannot be imported and the topic/reply would then be attributed to the
anonymoususer. Now the topic/reply is still attributed to theanonymoususer but includes the original author name, basically the same way XenForo handled this.Edit: You can see the difference from when the
Member Twouser still existed and was imported per https://cloudup.com/c_epfx4Q4z8/f, I then deletedMember Twoand the result looks like this https://cloudup.com/cNnYv-3eSyl https://cloudup.com/c5iQ-iIOoW4March 30, 2016 at 6:28 am #173623In reply to: Importing Large Xenforo Forum
Stephen Edgar
KeymasterI’ve just got my copy of Xenforo up and running locally, I don’t have an issue with reply authors here, see this screenshot https://cloudup.com/c_epfx4Q4z8
Can you open up phpMyAdmin and run this SQL query on your Xenfor database:
SELECT convert(post.post_id USING "utf8mb4") AS post_id, convert(thread.thread_id USING "utf8mb4") AS thread_id, convert(post.thread_id USING "utf8mb4") AS thread_id, convert(post.user_id USING "utf8mb4") AS user_id, convert(post.message USING "utf8mb4") AS message, convert(post.post_date USING "utf8mb4") AS post_date FROM xf_post AS post LEFT JOIN xf_thread AS thread USING (thread_id) WHERE thread.first_post_id != post.post_idYou might have to change the following two lines if your database does not use
xf_as the forum prefix:From:
FROM xf_post AS post LEFT JOIN xf_thread AS threadTo:
FROM myprefix_post AS post LEFT JOIN myprefix_thread AS threadMarch 30, 2016 at 5:07 am #173620In reply to: bbpress login position
Pascal Casier
ModeratorHi Sander,
You seem to have the pro version of SKT healing touch theme, so I would propose to ask them what to put exactly, but you will have to load the sidebar first and then the content. An example (for genesis) is here: http://www.billerickson.net/code/move-sidebar-content/Pascal.
PS: Kom gerust op slack, HowTo staat op casier.eu/wp/slackMarch 30, 2016 at 4:19 am #173616In reply to: Delete own posts
LeGuerg
ParticipantHi,
This code allows the author of a topic/reply to trash his own posts. This way, there is no need to give a moderate capability to Participants.
Regards.
March 30, 2016 at 1:37 am #173604In reply to: change “forums” header
Pascal Casier
ModeratorHi Biorn,
Create a standard WordPress page and put the slug ‘forums’. Creating this page will override the standard page that comes out.
You can then add the [bbp-forum-index] shortcode on that page (see https://codex.bbpress.org/features/shortcodes/) and change the title of your page.
Pascal.
March 29, 2016 at 5:47 pm #173593In reply to: Delete own posts
tech55541
ParticipantHello there,
What exactly does this code do? Does it allow participants to delete or trash posts? That is my question.
I enable the capability for participants to delete posts, but they cannot delete if they cannot trash the post first. The only way for trash to show up is to enable the moderate capability which opens up way to many options. Is there any way to modify this code to only allow participants to trash their posts?Thanks.
March 29, 2016 at 5:42 pm #173592tech55541
ParticipantHello,
I would really appreciate it if someone could help me get this working. I understand it is going to take some coding, but that is what it is. A forum should not require this much coding to begin with. Why do the roles have to be so confusing? Remember, if normal people cannot understand how to do something by reading the codex, that creates more threads for the more advanced issues.I am pretty much a nonprofit organization with my blog and a small forum, I do not have money to pay a developer, so I am asking the wonderful volunteers here to please provide some assistance.
Thanks.
March 29, 2016 at 5:39 am #173570Topic: Delete own posts
in forum TroubleshootingLeGuerg
ParticipantHello,
I get an issue with the bbPress capabilities. My forum Participants are set with edit_replies, delete_replies, edit_topics, delete_topics capabilities, but they can not delete their own posts because the links are not displayed. Keymasters and Moderators have no problem since they are moderators on the whole forum.
So I checked the code in ./includes/topics/capabilities.php and includes/replies/capabilities.php and added the code below to fix the issue:
./includes/topics/capabilities.php, line 174 and
./includes/replies/capabilities.php, line 156// Moderators can always edit forum content } elseif ( user_can( $user_id, 'moderate' ) ) { $caps[] = 'moderate'; // -------------------------------- // User is author so allow edit if not in admin } elseif ( !is_admin() && ( (int) $user_id === (int) $_post->post_author ) ) { $caps[] = $post_type->cap->delete_posts; // -------------------------------- // Unknown so map to delete_others_postsSo my question is: is this intended ? Otherwise is there a fix planned for a next update?
Thank you for your help.
Regards.March 29, 2016 at 4:39 am #173567In reply to: Reverse Title Order
Pascal Casier
ModeratorHi,
Copy this code into your functions.php:function casiepa_bbp_has_topics() { $args['order'] = 'ASC'; // 'ASC' (Ascending), 'DESC' (Descending, Default) return $args; } add_filter('bbp_before_has_topics_parse_args', 'casiepa_bbp_has_topics' );Pascal.
March 29, 2016 at 3:29 am #173562In reply to: hide Home Menu on bbPress pages
Robin W
Moderatoryou need header.php
not the body part of the codeMarch 28, 2016 at 6:09 pm #173554In reply to: hide Home Menu on bbPress pages
stewmills
ParticipantTried the CSS route and could not get it to work.
So, in looking at Robin W suggestion I could not locate the exact section to wrap. I could not locate <div class=”header-area”> with a closing of </div>. Here is what I have (starting with the body section of my page code)
<body <?php body_class(); ?>> <?php if ( 'true' == $boxedlayout ) {echo '<div id="tt-boxed-layout">';}else{echo '<div id="tt-wide-layout">';} ?> <div id="wrapper" <?php if (is_page_template('template-homepage-3D.php') || is_page_template('template-homepage-jquery-2.php')) {echo 'class="big-banner"';} ?>> <div id="header" <?php if (is_page_template('template-homepage-3D.php')){echo "style='height: 560px;'";} ?>> <?php // show the toolbar if selected by the user : if ($ka_toolbar == "true"): ?> <div class="top-block"> <div class="top-holder"> <?php truethemes_before_top_toolbar_menu_hook();// action hook, see truethemes_framework/global/hooks.php ?> <?php if(has_nav_menu('Top Toolbar Navigation')): ?> <div class="toolbar-left"> <ul> <?php wp_nav_menu(array('theme_location' => 'Top Toolbar Navigation' , 'depth' => 0 , 'container' =>false )); ?> </ul> </div><!-- end toolbar-left --> <?php //if top toolbar menu not set, we show dynamic sidebar elseif(is_active_sidebar(1)): ?> <div class="toolbar-left"> <ul><?php dynamic_sidebar("Toolbar - Left Side"); ?></ul> </div><!-- end toolbar-left --> <?php endif; ?> <?php if(is_active_sidebar(2)): ?> <div class="toolbar-right"> <?php dynamic_sidebar("Toolbar - Right Side"); ?> </div><!-- end toolbar-right --> <?php endif; ?> <?php truethemes_after_top_toolbar_menu_hook();// action hook, see truethemes_framework/global/hooks.php ?> </div><!-- end top-holder --> </div><!-- end top-block --> <?php endif; //end if($toolbar == 'true') ?> <?php truethemes_before_header_holder_hook();// action hook, see truethemes_framework/global/hooks.php ?> <div class="header-holder"> <div class="rays"> <div class="header-area<?php if (is_search()) {echo ' search-header';} ?><?php if (is_404()) {echo ' error-header';} ?><?php if (is_page_template('template_sitemap.php')) {echo ' search-header';} ?>"> <?php // Website Logo if ($ka_logo_text == ''){ ?> <a href="<?php echo home_url(); ?>" class="logo"><img src="<?php echo $ka_sitelogo; ?>" alt="<?php bloginfo('name'); ?>" /></a> <?php }else{?> <a href="<?php echo home_url(); ?>" class="custom-logo"><img src="<?php echo get_template_directory_uri(); ?>/images/_global/<?php echo $ka_logo_icon; ?>" alt="<?php bloginfo('name'); ?>" /><span class="logo-text"><?php echo $ka_logo_text; echo '</span></a>';}?> <?php truethemes_before_primary_navigation_hook();// action hook, see truethemes_framework/global/hooks.php ?> <?php if(has_nav_menu('Primary Navigation')): ?> <nav> <ul id="menu-main-nav"> <?php wp_nav_menu(array('theme_location' => 'Primary Navigation' , 'depth' => 0 , 'container' =>false , 'walker' => new description_walker() )); ?> </ul> </nav> <?php endif; ?> <?php truethemes_after_primary_navigation_hook();// action hook, see truethemes_framework/global/hooks.php ?>March 28, 2016 at 5:03 pm #173552In reply to: Create similar topics to several forums at once
Pascal Casier
ModeratorAdd this in your functions.php or in a plugin:
add_filter( 'manage_edit-forum_columns', 'casiepa_edit_forum_column' ) ; function casiepa_edit_forum_column( $columns ) { $columns['id'] = __('ID'); return $columns; } add_action('manage_forum_posts_custom_column', 'casiepa_manage_forum_columns', 10, 2); function casiepa_manage_forum_columns($column_name, $id) { global $wpdb; switch ($column_name) { case 'id': echo $id; break; default: break; } // end switch }It will add the ID column when you go in your Dashboard to ‘Forums’.
Pascal.March 28, 2016 at 2:47 pm #173550In reply to: Importing Large Xenforo Forum
Wendell
ParticipantI reset the forum, then upgraded to bbpress 2.6 alpha, checked the “purge previous import” checkbox (just to be sure), then started the import process again and got this lovely error message:
“WordPress database error: [Specified key was too long; max key length is 1000 bytes]
CREATE TABLE blp_bbp_converter_translator ( meta_id mediumint(8) unsigned not null auto_increment, value_type varchar(25) null, value_id bigint(20) unsigned not null default ‘0’, meta_key varchar(255) null, meta_value varchar(255) null, PRIMARY KEY (meta_id), KEY value_id (value_id), KEY meta_join (meta_key, meta_value) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci”So I unchecked the purge option and tried again. It’s currently importing the users.
March 28, 2016 at 9:05 am #173536In reply to: Documented import from snitz access database
Stephen Edgar
KeymasterI’m guessing the
sync-all-reply-positionsfails because of some incorrect meta for the replies, theres also a few known issues with this tool timing out when used on sites with lots of replies.The
user-role-maprepair tool should work fine, no known issues with this one.What happens if you create a new user, just a new WordPress user, can that user login, create topics and replies etc? What happens if you now remove all the imported users and run this repair tool again, theoretically it would only be running on “native” WordPress users and not any imported users, (i.e. “admin” and “test user” only), does the repair tool still fail?
March 28, 2016 at 8:46 am #173533In reply to: phpbb importer not finding forums
Stephen Edgar
Keymaster@eoppegaard The database actually needs to be active in the same MySQL server your WordPress site is running on, not the same database, just available as a database in the MySQL server. Uploading the MySQL
.sqldump file or phpBB files to yor site will have no effect and will not work.Some of the docs here might also help you out.
@evildrome It might be easy for you, it’s not for me, if it was I’d have done it, if you’d be able to help out and help with some code for a solution to that that would be awesome.March 28, 2016 at 8:39 am #173532Stephen Edgar
KeymasterThere is a known issue with the
Recalculate the position of each replyrepair tool, even once it times out can you run it again? In theory the tool is working correctly but on larger batches it times out, running it again resumes from where it left off.March 28, 2016 at 8:37 am #173531Stephen Edgar
KeymasterAny chance you could talk to your webhost and have the MySQL version updated?
WordPress’ minimum requirements per https://wordpress.org/about/requirements/ are
WordPress also works with PHP 5.2.4+ and MySQL 5.0+which you are using but I suspect the phpMyAdmin warningYour PHP MySQL library version 5.1.49 differs from your MySQL server version 5.0.51a.you see are probably related to this issue.If your vBulletin database uses
utf8_mb4but your WordPress install is only usingutf8then you’ll run into issues. As Pascal pointed out with that link, you are using MySQL v5.0.x which doesn’t supportutf8_mb4, only MySQL v5.5.3 and above does.If the vBulletin database used
utf8rather thanutf8mb4then I’d expect the import to work just fine, but because of the different character sets and collation differences the only way around this I see is to resolve this by upgrading to at least MySQL v5.5.3.March 28, 2016 at 8:25 am #173530In reply to: Importing from vbulletin –> strange characters!
Stephen Edgar
KeymasterFor sure this would be related to the character set used.
Have you installed WordPress using the Greek language pack?
Any chance you could install WordPress using the same character set as the character set used by your Greek vBulletin install and try importing? Or maybe converting your vBulletin database to use a
utf8database?New WordPress installs use the character set
utf8_general_ci, previously WordPress would useutf8, the Greek locale your vBulletin install is usingMarch 28, 2016 at 2:10 am #173518pattz2016
ParticipantI am using BBpress recent topic widget and i reaslied that it only gives me an option of adding topic author and date. How can i add the recent answers category like it is on this forum? Is there a Plugin for that? If there is not, is there a code i can fix in my templates to get this fuctionality?
Many thanks,
March 28, 2016 at 1:41 am #173517In reply to: Uploading images without placing the text
elovkoff
ParticipantHi Rob, thanks for the advice. And thanks to everybody else who took the time to chime in.
You said: “Also I cannot seem to find the code in the bbPRess plugin responsibe for the no redirect to post after submit after using using this code.”
Anny pointers where would I look for it, or should I hire a dev to do that?When you refer to inline image upload – is that something that would require users to know how to use img html tags? Will it allow multiple image upolads too?
Thank you.
Elijah.March 27, 2016 at 8:57 pm #173509TKServer
ParticipantOk @tech55541 I’ve just added a short code option! See if you can get it to work!
-
AuthorSearch Results