Search Results for 'code'
-
AuthorSearch Results
-
December 21, 2013 at 2:23 pm #140556
In reply to: Widgets and Side Bar not showing in Forum
Robin W
Moderatorok, plan b
upload the “widget logic” plugin
This lets you set widgets to appear in certain conditions
Once uploaded, using your normal sidebar, you can set when a widget appears
You’ll see a new box appear when you add/edit each widget saying “widget logic”. if you want it to appear on a forum page type
is_bbpress()
If you want the widget to appear on other pages, but not obn the forum page type!is_bbpress()
so you login widget would have the logicis_bbpress()
and appear only on forum pagesIf you didn’t want search on the forum page, you’d put
!is_bbpress()
on that widget and it will not appearDecember 19, 2013 at 7:52 am #140490In reply to: Kunena converter for bbPress 2.4
Stephen Edgar
KeymasterIn theory this is all you need to do, but please make sure you have a few backups of your database, after all these years you don’t want to lose everything now š
alter table the_table_name_you_want_to_convert engine=innodb;That’s the theory anyway, to enable you to use the ‘alter’ command you need to uncheck the following setting:
phpMyAdmin -> Settings -> Main Panel -> Table Structure -> Hide table structure actions
Then open a table, and click ‘Operations’ and in the ‘Table options’ section you will now see ‘Storage Engine’ where you can change this from
MyISAMtoInnoDBonce you click ‘Go’ you will a success or error message.December 19, 2013 at 7:23 am #140489In reply to: Kunena converter for bbPress 2.4
marshallarts
ParticipantHi Stephen – many thanks for your lengthy and considered reply. You are right that a lot of the php MySQL is over my head
I believe that the issue is that between 1.5.9 and 1.6 of kunena, the layout of the database changed in more ways than renaming the tables and therefore my old-style database won’t work. My information is in the jos_fb_ format
I have tried updating Kunena to a 1.6.x version however I’m hitting other problems with that –
Uncaught Exception: 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 ‘TYPE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci’ at line 9 SQL=CREATE TABLE
jos_kunena_version(idint(11) NOT NULL AUTO_INCREMENT,versionvarchar(20) NOT NULL,versiondatedate NOT NULL,installdatedate NOT NULL,buildvarchar(20) NOT NULL,versionnamevarchar(40) DEFAULT NULL, PRIMARY KEY (id) ) TYPE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci.I believe I need to change TYPE to ENGINE and have found one set of instructions for that, but they do not work so I’m backed into a different corner.
I put up a post on the kunena forum asking for help, even if I have to pay a few bucks for that – but really I only need the old database content to be transferred into the new database in the correct format, the rest of the site is to be scrapped – is it possible that the database tweaks can be done independently from upgrading the kunena installation? or can I tweak the importer to work with the jos_fb_ version – I don’t have the skills to do that but I suspect it’s a major job and probably unfeasible.
Your importer clearly works as intended and thank you for making it available, the problem I believe is most likely to be upstream but I won’t know until I can sort that bit out. Unless there is a way to make the database transfer (I can pay a wee bit) I’m not quite sure where to go next.
Many thanks
Paul
December 19, 2013 at 7:18 am #140488In reply to: bbPress Email Digest Hooks – help?
Stephen Edgar
KeymasterIt looks like you just paste that entire code into your themes
functions.phpfile and change the values to the ones you want šDecember 19, 2013 at 7:11 am #140487In reply to: Minification breaks bbPress Visual Editor
Stephen Edgar
KeymasterI’m not familiar with exactly what you need but bbPress JavaScript files typically live here:
/wp-content/plugins/bbpress/templates/default/jsfor the following 5 files:
editor.js,forum.js,topic.js,reply.js&user.jsDecember 19, 2013 at 6:41 am #140485In reply to: Remove default css
Stephen Edgar
KeymasterThe following should work, a few CSS & JavaScript changes came with bbPress 2.5 š
add_action( 'wp_print_styles', 'deregister_bbpress_styles', 15 ); function deregister_bbpress_styles() { wp_deregister_style( 'bbp-default' ); }December 19, 2013 at 6:24 am #140483In reply to: Limit search in scope
Stephen Edgar
KeymasterThis is a start…
https://gist.github.com/ntwb/8037110
add_filter ( 'bbp_before_has_search_results_parse_args', ntwb_bbpress_custom_search_results); function ntwb_bbpress_custom_search_results() { $default_post_type = array( bbp_get_forum_post_type(), bbp_get_topic_post_type(), bbp_get_reply_post_type() ); $args['post_type'] = $default_post_type; $args['orderby'] = 'date'; $args['ignore_sticky_posts'] = 'false'; $args['order'] = 'DESC'; return $args; }Just need to work out how to parse the other $args :/
https://bbpress.trac.wordpress.org/browser/trunk/includes/search/functions.php
https://bbpress.trac.wordpress.org/browser/trunk/includes/search/template.phpDecember 19, 2013 at 6:10 am #140482In reply to: Remove default css
Lynqoid
ParticipantAn easy way would be to follow this: https://codex.bbpress.org/theme-compatibility/
Then empty the bbPress CSS file, you can then use a caching plugin to mash css files together and limit requests so the extra file being requested wouldn’t hurt too much.
December 19, 2013 at 5:36 am #140480Topic: Remove default css
in forum Installationkoendb
ParticipantHi, I want to disable the default bbpress .css file. I searched through the forums and found several solutions, but none seem to work.
I used to deregister bbp-default-bbpress with the code below, but that doesn’t work anymore after the WP 3.8 upgrade.
add_action( 'wp_print_styles', 'deregister_bbpress_styles', 15 ); function deregister_bbpress_styles() { wp_deregister_style( 'bbp-default-bbpress' ); }WP 3.8
bbpress 2.5.1Thanks!
December 19, 2013 at 5:07 am #140478Stephen Edgar
KeymasterI think you will find the docs for that reference
the_contentin a WordPress context.For bbPress things are similar but the following best explains it though in this case it was related to Jetpack, the methodology is still the same though.
https://bbpress.org/forums/topic/social-media-share-button-missing/#post-125857
This wonāt work out of the box, and is by design. Jetpack hooks sharing options to the end of the āthe_contentā filter. bbPress doesnāt use this filter, because blog content doesnāt have the same rules as forum content does; they work differently. To make it work, Jetpackās sharing options would need to hook into
bbp_get_topic_contentandbbp_get_reply_contentinstead.Someone could write a piggyback function to do this, but it may be more difficult than this first step once youāve gotten this far. Replies donāt use the same āpremalinkā logic as topics, forums, pages, and posts do, since they are technically children of topics. There could be other quirks, too.
December 19, 2013 at 4:32 am #140473In reply to: How to Build Plugins for 2.5+
Stephen Edgar
KeymasterThe best place to start would be the WordPress Plugin Developer Center
https://wordpress.org/plugins/about/And checkout the bbPress Codex https://codex.bbpress.org/context/developer/
December 18, 2013 at 6:46 pm #140468Topic: Subscribe to Forum, HTML Responses
in forum Requests & Feedbackxmasons
ParticipantCurrently the new feature (bbPress 2.5) of Subscribe to Forum returns plain text email. Perhaps this was a conscious decision to implement it in that way. I’d implore either changing the content-type default to TEXT/HTML or be given an option within the admin settings.
Typically you would only need to add the following:
add_filter('wp_mail_content_type',create_function('', 'return "text/html";'));…before @wp_mail
December 18, 2013 at 8:29 am #140458Stephen Edgar
KeymasterYes, that was what I inferred by ‘back end’ & ‘front end’ that I tried it from both places that we can create topics, the front end and the back end.
The one thing I did do, that I have just tested against was I had copied and pasted the the ‘content’ from the back end to create the topic in the front end.
I just manually typed the following into the ‘front end’ for single quote
', double quote"and`
tilde symbols.

I am also using a clean install and the Twenty Thirteen theme so like yourself I am a little perplexed as to why we are seeing something different.
December 18, 2013 at 5:28 am #140454In reply to: Forum Size
Lynqoid
ParticipantYour background image doesn’t stretch full width, so you would have to look at either making it longer, or removing it and just have a solid colour.
The code can either go inside your style.css or if you want to do it properly you can follow the instructions here: https://codex.bbpress.org/theme-compatibility/ and then edit the files inside /css/ in your theme files.
December 18, 2013 at 5:26 am #140453In reply to: Change font color or background on bbpress
Lynqoid
ParticipantI would highly recommend looking into learning a little CSS, even a small amount can let you achieve a lot in bbPress and even WordPress.
Something you can do for example is:
#bbpress-forums { background-color: #ffffff; color: #000000; }– this is just an example.Good luck! š
December 18, 2013 at 5:24 am #140452In reply to: How to center the titles of the forums (in height)
Lynqoid
ParticipantI would recommend learning a bit of css, even a little CSS lets you do amazing things with bbPress and even WordPress!
Some like:
bbp-title { line-height: 20px; }This is just an example. I don’t know the exact html of your website.Good luck!
December 18, 2013 at 4:54 am #140451In reply to: unable to edit profile in [bbp-register] page
December 18, 2013 at 4:52 am #140450In reply to: unable to edit profile in [bbp-register] page
Rollsjoyce
ParticipantI removed the following text (between the dots) from the user-details.php
Now it is no longer possible to edit the profile in the bbpress profile overview. But when I want to update this plugin it will be possible to edit again. Do you have a better solution so it is still erased after an update of this plugin?<span class=ābbp-user-edit-linkā> ā¦..ā title=ā<?php printf( esc_attr__( āEdit %sās Profileā, ābbpressā ), bbp_get_displayed_user_field( ādisplay_nameā ) ); ?>ā><?php _e( āā¦.Editā¦..ā, ābbpressā ); ?> </span>December 18, 2013 at 3:16 am #140447In reply to: Forum Size
Subtopic
ParticipantAlso where to put the code haha.
December 18, 2013 at 12:23 am #140444In reply to: Show Sidebar in default bbp pages
Stephen Edgar
KeymasterIf your theme has a template with sidebar maybe
page.phpthen make a copy of that file and rename it tobbpress.phpDecember 17, 2013 at 9:27 pm #140441In reply to: participant can’t edit their posts
Stephen Edgar
KeymasterYou can try the ‘Remap existing users to default forum roles’ repair tool to see if that fixes the bbPress Roles: https://codex.bbpress.org/repair-forums/
I had a quick look at https://wordpress.org/plugins/role-scoper/ and they make no specific mention of supporting bbPress’ ‘Dynamic Roles’ and that could be where the core of the issue is.
Yes, Role Scooper is the issue and it appears there will be no longer further development or support:
https://wordpress.org/plugins/role-scoper/faq/
With the production release of Press Permit, is Role Scoper still supported?
Basic Role Scoper support (bug fixes but not necessarily plugin conflict resolution) will be provided while WP 3.6.x is the active WordPress version. Compatibility with WP 3.7 and beyond is not assured, as I do not plan any further unfunded development of the Role Scoper code base. Further development and support will be available on a consulting basis as indicated on agapetry.net, but I will encourage migration to Press Permit – a superior platform with a sustainable funding model.The good news is the new plugin ‘Press Permit’ does support bbPress’ Dynamic Roles š
https://wordpress.org/plugins/press-permit-core/
Customize bbPress forum permissionsDecember 17, 2013 at 9:07 pm #140439Stephen Edgar
KeymasterUpdated š
Subscriptions
Forum participants can elect to subscribe to a forum or topic. They will be notified when a new topic is created in a subscribed forum or a new reply is posted to a subscribed topic. Subscribed forums and topics will appear on their forum user profile.
https://codex.bbpress.org/forum-settings/December 17, 2013 at 9:01 pm #140438In reply to: How to make a forum Sticky in the main Forum Page
Stephen Edgar
KeymasterJust set the ‘Forum Order’ of your forums to whatever order you want them displayed in.
https://codex.bbpress.org/getting-started-with-bbpress/#creating-your-first-forum
December 17, 2013 at 8:02 pm #140437In reply to: Exclude specific forums in Recent Topics widget
kokocipher
Participantcould you share your code :3 ? Where do you copy the codes for the widgets?
December 17, 2013 at 7:54 pm #140436In reply to: Kunena converter for bbPress 2.4
Stephen Edgar
KeymasterCool, glad your taking a look at it.
“It seems to have appended an extre Re: in front of each (so they read Re:Re:Topic)”
The
Re:should only be added to the title of a reply, this should not be adding them to the topics and this shows that the SQL in the importer isn’t quite matching up with your database.The SQL queries below are based on the
Kunena1.phpimporter and use the prefixjos_as the table prefix for the bbPress importer.When the importer fails you should see an error message like the following:
WordPress database error: [Unknown column 'kunena_categories.locked1' in 'field list']In this particular case the importer was looking for
jos_kunena_categories.locked1wherejos_kunena_categoriesis the table name andlocked1is the field name. I used ‘locked1’ as a way to force an error to show the example, so if I knew my version of the database should be looking at the fieldlockedinstead oflocked1you can find the'from_fieldname' => 'locked1'inKunena1.phpand update that with the correct field mapping'from_fieldname' => 'locked',.Another way you can go about this is to jump directly into phpMyAdmin and test each of the following SQL queries, there are primarily four queries are as follows:
Again I used prefix
jos_for my database and you will need to change this to match your own database table prefix.Forums
SELECT kunena_categories.id AS id, kunena_categories.parent AS parent, kunena_categories.numTopics AS numTopics, kunena_categories.numPosts AS numPosts, kunena_categories.name AS name, kunena_categories.description AS description, kunena_categories.ordering AS ordering, kunena_categories.locked AS locked FROM jos_kunena_categories AS kunena_categoriesTopics
SELECT kunena_messages.thread AS thread, kunena_messages.catid AS catid, kunena_messages.userid AS userid, kunena_messages.ip AS ip, kunena_messages_text.message AS message, kunena_messages.subject AS subject, kunena_messages.time AS time, kunena_messages.locked AS locked FROM jos_kunena_messages AS kunena_messages INNER JOIN jos_kunena_messages_text AS kunena_messages_text ON kunena_messages_text.mesid = kunena_messages.id WHERE kunena_messages.parent = 0Replies
SELECT kunena_messages.id AS id, kunena_messages.catid AS catid, kunena_messages.thread AS thread, kunena_messages.ip AS ip, kunena_messages.userid AS userid, kunena_messages.subject AS subject, kunena_messages_text.message AS message, kunena_messages.time AS time FROM jos_kunena_messages AS kunena_messages INNER JOIN jos_kunena_messages_text AS kunena_messages_text ON kunena_messages.id = kunena_messages_text.mesid WHERE kunena_messages.parent != 0Users
SELECT users.id AS id, users.password AS password, users.username AS username, users.email AS email, users.registerDate AS registerDate FROM jos_users AS usersThat’s a bit to digest so I’ll leave it at that for now and it is probably as clear as mud unless you are a seasoned SQL junkie.
If anything I wrote above doesn’t make sense just ask away and remember š
https://en.wikipedia.org/wiki/No_such_thing_as_a_stupid_question -
AuthorSearch Results