Search Results for 'code'
-
AuthorSearch Results
-
December 13, 2014 at 12:52 am #155517
In reply to: Remove lines between forums & topics
Talabrina
ParticipantO M G !
Thank you so much, both of you!The codes were not working, but when I change the border to 0, it worked !
(@jmodine Yes, I got a child theme already :3)
December 12, 2014 at 8:32 pm #155512In reply to: Search by user
Matthew How About
ParticipantHello Wookey,
Recently I’ve done code for this. This is not the best way to search, because the user can enter a display name instead of user login so it will not work. If someone in the future will know how to get user id from first and(or) last name I’ll be thankful.First add this input field to page with search box (remember to put it inside <form> tag)
<input type="text" name="bbp_search_by_user" placeholder="Input searched username" value="" />That snippet doesn’t worked for me, so i made it in different way. I base on @netweb (Stephen Edgar) plugin, which is very similar to sevenspark code. Just added couple things like GET field, add query args if username is set and thats it.
add_filter ( 'bbp_before_has_search_results_parse_args', 'ha_custom_search_by_username'); function ha_custom_search_by_username() { //Get username from input on search page $username = $_GET['bbp_search_by_user']; $default_post_type = array( bbp_get_forum_post_type(), bbp_get_topic_post_type(), bbp_get_reply_post_type() ); //check if empty if(!empty($username)){ //Make ID from username $user = get_user_by('slug', $username); $user_id = $user->ID; $args['author'] = $user_id; } $args['post_type'] = $default_post_type; $args['orderby'] = 'date'; $args['posts_per_page'] = '5'; $args['ignore_sticky_posts'] = 'false'; $args['order'] = 'DESC'; return $args; }Add this to function.php
December 12, 2014 at 7:28 pm #155510In reply to: Forum landing page link in site menu – how?
jmodine
Participantthe solution to this is built in WordPress not not in bbpress. First make sure you have an actual page called forums then use short code to mate it your main forums index page. Once that is confirmed check your permalinks and make sure they are not on default. ( I usually use post name). Now your forums page should be showing as a page on your site. Then go to custom menu Dashboard>appearance>menus once there you can create many different menus and label where they will show up, or even call them through the widget area. But for your particular problem find the one called Main(top primary menu) then just add the pages you want to show up on that menu and delete the ones you don’t want to show up. (Be sure to uncheck automatically add top level pages).
December 12, 2014 at 7:09 pm #155509In reply to: Remove lines between forums & topics
jmodine
Participantchanging it to 0 would be best. Just make sure you are using a child theme. If you aren’t you will lose the changes with the first update to bbpress or your theme. you can find child theme info on the codex or use this plug in to create it for you If you already have a child them just add the code above to your style.css in you child theme. It will override the bbpress css I would just recommend commenting off the css so its easy to find if you need to add more changes.
December 12, 2014 at 6:59 pm #155508Topic: Topic View problem
in forum Troubleshootingjmodine
ParticipantThis has been a difficult one for me. I have multiple forums on my site dealing in multiple categories.
When I click any of the forums to view topics there are topics from other forums showing. exampleForum A
topic 1 (has)
topic 2 (has)Forum B
topic 1 (has)
topic 2 (has)when clicked Forum B to view topics, forum A topics show up like so
Topic 1 (from forum A)
Topic 1 (from forum B) {organized according to freshness }
Topic 2 (from forum A)
Topic 2 (from forum B)What I want is when clicking forum A (or B) you see
Topic 1 (from correct forum only)
Topic 2 (from correct forum only)Now the topics being organized according to freshness I thought it was a freshness issue so I went changed some loops. I had no luck getting this not to happen. I have removed the freshness from every loop and every content then returned them to normal having no results.
If this is related to freshness then I am having a problem getting bbpress to read the custom loop-“tag”.php I have them placed in childtheme>bbpress which is how I was told this worked from the duccumentation. You can see the specific problem on this pageDecember 12, 2014 at 6:36 pm #155505jmodine
ParticipantThe easiest way is to do a custom CSS. make a child theme first i recomend this plug in “Child theme configuration” Down load the zip file once you chose your settgings. upload the child theme through dashboard> appearance > theme > add new then use a text editor and make a style.css for your theme (bbpress will be overridden with it) I use eclipse for a text editor but notepad will work in the style css add this code
(this came directly from my site so it has a few changes you can change anything you like on it for more customization) you can see my forums lay out here#bbpress-forums .bbp-forums-list li { display: none !important; min-height: 50px; font-size: 18px; border: 3px solid black; border-top: 8px solid #871A1A; boder-bottom-left-radius:5px; boder-bottom-right-radius:5px; boder-top-left-radius:5px; boder-top-right-radius:5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; margin-top: 10px; margin-bottom: 10px; } .bbp-forum-title{ display: block !important; font-size: 22px; font-weight: bold; border-top: 15px solid blue; boder-top-left-radius:5px; boder-top-right-radius:5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; margin-top: 10px; margin-bottom: 10px; } .bbp-topic-title { font-size: 16px !important; }Like I said any of these values are changeable and you can add more or take some out. hope this helps.
December 12, 2014 at 9:06 am #155491In reply to: Menu "Forum" disappeared for Moderator role
Dirk
ParticipantI deleted the user on a local test-installation with MAMP, where I could reproduce the problem. It made no difference.
Here is what I can see and do in WP frontend and backend:
Frontend
– Logged in as Keymaster, I can do everything. I can see all bbPress related menu items in the WP Toolbox on top of the page.
– Logged in as Moderator, I can see the bbPress related menu items Topic and Answer in the WP toolbox, but not Forum. I can start a new forum on a page with the shortcode [bbp-forum-form] as a child-forum (same behaviour as Keymaster starting a forum with this shortcode).
– Logged in as Contributor I don´t have any bbPress related menu item in the WP toolbox, but I can start Topics and answer in the forum itself.Backend (Dashboard)
– Logged in as Keymaster I have every bbPress menu item.
– Logged in as Moderator I only have Topics and Answers as menu items.
– Logged in as Contributor I don´t have a bbPress menu at all.For me it looks like every role has the corresponding capability, but the menu items of the role below, except the Keymaster.
What I also tried was changing capabilities with the plugin bbPress Advanced Capabilities and restoring the WP default capabilities with Capability Manager Advanced. No difference.
December 12, 2014 at 12:53 am #155486In reply to: Remove lines between forums & topics
Jeffro
ParticipantOn the homepage, you’ll want to look at the following code and either change the border to 0 pixels or change its color.
#bbpress-forums li.bbp-body ul.forum, #bbpress-forums li.bbp-body ul.topic { border-top: 1px solid #eee; overflow: hidden; padding: 8px; }The other borders on the homepage appear to be controlled by this code:
#bbpress-forums li.bbp-header, #bbpress-forums li.bbp-footer { background: none repeat scroll 0 0 #f3f3f3; border-top: 1px solid #eee; font-weight: bold; padding: 8px; text-align: center; }December 11, 2014 at 6:47 pm #155477In reply to: Logout Shortcode
Incoking
ParticipantIm trying this too on my site under the folder forum.
If you can see here on bbpress the code works that way in my caseSo my guess is that you can create a custom php for example http://www.mysite.com/logout which will redirect on a file like wp-login.php which will fetch the id from the user and then will do the redirect to the page you want.
December 11, 2014 at 12:37 pm #155444In reply to: Cannot access abc/forums
Robin W
Moderatorok, partial solution for you – I have done some further testing
In dashboard>settings>forums make the forum slug /forums
The create a page called ‘forum’ and put
[bbp-forum-index] into this. Save and view to make sure you can see this
Right now change the heading to ‘Forums’, the page slug will stay as forum, and as long as that doesn’t match the forum slug in settings it seems to be ok.
Then create a menu item for this page
That seems to function BUT the breadcrumbs will still go to the wrong place, so for the moment take these out
That will at least get you a working forum and recipe. All that’s missing are the breadcrumbs
Let me know how you get on
December 11, 2014 at 9:19 am #155439In reply to: Cannot access abc/forums
Robin W
ModeratorI’ve just tried having both these plugins on my test site, and can see exactly what you mean, my forums become archive posts just as yours did, and I’m using a shortcode so that way won’t work.
So definite conflict between how these two forums are using slugs, and I suspect that the recipe one is overwriting a forum one, but don’t know how, possibly via a filter on wordpress.
I’d suggest since the recipe plugin author will have far better knowledge (as he has slug settings in his plugin) that you go back with a fresh post, and explain that on a base theme (mine was twentyten) with just bbpress and his plugin and nothing else
http://www.mysite.com/forums takes you to blog archives page
and see what he comes back with
December 11, 2014 at 9:01 am #155437Robin W
Moderatorsee
https://codex.bbpress.org/bbpress-user-roles-and-capabilities/
for how to set up a custom roles that will let you do what you want
December 11, 2014 at 12:51 am #155420Topic: Logout Shortcode
in forum TroubleshootingEvolveWorkforce
ParticipantI want to add a logout option to my login page. I see the login shortcode. How can I add logout? Thanks.
December 10, 2014 at 8:20 pm #155417In reply to: Remove this code ? Look this link
Robkk
Moderatorits probably because the way you have it setup it is not in the header.
maybe this will work
a.bbp-forum-permalink, a.bbp-topic-permalink, a.bbp-reply-permalink { display: none; }if it doesnt try to look into the source code with inspect element and find a selector to put the before each a. link
December 10, 2014 at 4:52 pm #155411In reply to: Cannot access abc/forums
xprt007
ParticipantHi
The recipe plugin seems to have had separate issue in addition as its links where not accessible at the expected urls according to default settings.
That was dealt with.
Around that same time as I was first using that plugin & also setting up the bbpress forum is when I noted something wrong with bbforum forum at /forums.
That is when I turned to bbpress.
It seems to be the case as I found after repeated testing the other day as I now need to finish the site & hence visiting the issue again, that if you install bbpress first & use default settings, and later after activating recipepress reloaded,the recipe plugin links do not work.
I also discovered that if on the other side you deactivate bbpress, the existing recipe plugin links work.So to sum it up, this specific issue is still there, as described above.
If it was possible to use the short code method you suggested & still be able access bbforum settings from its admin page, etc, I would settle for that, but the time I last tried settting up a forum, I got the impression one has to use shortcodes all thru, with no equivalent centralized settings page, which made it rather complicated to administer the forums & have an overview.Of course better would be if there was no apparent conflict.
Regards
December 10, 2014 at 3:48 pm #155409In reply to: Replies can't be seen
kannued
ParticipantStephen, this was news as whenever I looked in import before, there was nothing referring to bbpress. So I checked out here, https://bbpress.org/forums/topic/import-bb-data-from-csv-file-to-bbpress-forum/. I reset everything to WP 4.0.1, and bbpress 2.5.4. and tried to follow through your instructions. But mapping fields was way too complicated for me since I would put down post-id but there wasn’t another column with a “map to”. I was ready to go back to bbconverter as the only problem I had was html code in the topics and replies which I would have to strip. Minor, as my old forum is not very big, but still tedious enough.
But then I tried this. I reset everything to WP 3.6 and bbpress 2.0.2. Checked the Tools > Import, and what do you know, there was a bbpress standalone link! Following through I converted everything over. Reviewed the test site: forums, topics, replies, voices, users, tags, and any stray html code in posts. WOW, everything was there, exactly where it should be, with exact content duplicated!
For any integration on bbpress standalone into wp, I highly recommend integrating with WP 3.6 and bbpress 2.02.
December 10, 2014 at 1:23 pm #155404Robin W
ModeratorThe underlying questions may be perfectly valid, since I am not clear about what you want I can’t say..
I suggest you post a new topic, and rather than post vague what you don’t like suggest what is needed.
On the speed front, the next release does have some plans to improve performance.
On nodal, finegrained permissions , I presume you have seen
https://codex.bbpress.org/bbpress-user-roles-and-capabilities/
https://codex.bbpress.org/bbpress-user-roles-and-capabilities/so please detail what further fine graining you would like
On ‘serious security’ again please specify what you see as needed, and what is lacking
December 10, 2014 at 6:03 am #155400In reply to: Cannot access abc/forums
xprt007
ParticipantHi
I’m back after a while. 😉
After a lot of research, enabling, disabling this & that, I discovered this issue only comes up if the recipepress reloaded plugin is activated.It is recommended for the main recipe page to be at /recipes.
If you first install this, then whatever you do, bbpress will not be accessible at the recommended & preferred /forums.
Instead as explained above, if you try to access the forums at /forums, whereas the url remains correct & pointing to /forums, the content of the blog front page is loaded & if I remember well, any latest forum content appears listed as one of the normal blog posts!I tried however to uninstall bbpress & disabled all other plugins, including the recipe plugin, then re-installed bbpress. The set up run normally & the forums were accessible at /forums. When I reactivated recipepress reloaded, all its links, including /recipes returned a page not found error. It is only when bbpress is disabled that the recipe pages are accessible again.
Conclusion: both plugins cannot run together, at least with default settings (?).
Quite perplexed regarding what to do next since the site has to shortly go online & both the recipe & forum sections are integral partS. I cannot put off the issue any longer.
In suggestion above, you suggested an alternative solution of using shortcodes.
I discovered at the that the forum I created, or at least it seemed works independent of the settings on the bbpress settings & admin pages & everything had to be done with shortcodes(?), or is there a possibility of an equivalent central admin area?
Or am I mistaken?Ideally, a solution to the apparent conflict between the 2 plugins would be great, but if it cannot be gotten (any time soon/at all), is there any equally easy way to manage forums created via shortcodes?
Some further guidance would be very much appreciated.
Regards
December 9, 2014 at 6:05 pm #155313In reply to: setting permissions on forum within a group
Robin W
ModeratorSorry for delay in replying – have been v. busy lately !
bbpress has a rich set of capabilities which you can use to create custom roles – read the attached and you should be able to create roles to suit your needs
https://codex.bbpress.org/bbpress-user-roles-and-capabilities/
December 9, 2014 at 5:51 pm #155311Topic: Forum menu disappeared for Moderator role
in forum TroubleshootingDirk
ParticipantHello,
I recently started to use bbPress v 2.5.4 with WP v 4.0.1.
Everything worked fine until I changed the user_login in of a user in the mySQL database, who had the bbPress moderator-role and started two forums before.
Now this user (and every other „moderator“) can´t see the menu-item „forum“ in the Dashboard anymore. Any other bbPress-role works like it should.
As a workaround I created a testpage with the shortcode [bbp-forum-form] and tried to start a new forum as „moderator“. It worked, but I only could start a child-forum under an existing parent. So the „keymaster“ has to change it to „parent“ everytime a „moderator“ starts a new forum.
That´s a wortkaround but not a solution.I found a post here in the forum https://bbpress.org/forums/topic/moderator-role-cant-create-or-manage-forums/, where you speak of a known issue, that a moderator can´t see the „forum“ menu in the dashboard anymore. The problem described there seems to be quite similar to mine but is 1 year old. So, is this issue solved in the meantime? And if not, perhaps my problem helps to address the issue.
Thanks for any assistance.
December 9, 2014 at 5:49 pm #155352pazzaglia
ParticipantI’ve searched these forums and found mostly technical replies from developers (I’m semi-technical so making up some code from scratch and knowing where to stick it is out of my league).
I’ve tried “Everything Search” which does not index topics.
I’ve tried free “Relevanssi” search which has a check-box for tpics but shows them as “not public” (https://wordpress.org/support/topic/does-relevanssi-search-include-bbpress-forms-topics-and-replies?replies=3)
I’ve tried various snippets that I found via google search – each with additions to functions.php a couple don’t work, and a third actually works, but it blanks-out the topic pages (the page is still there but the text of the topic and replies is missing).
I’ve enabled Jetpack “omnisearch” which has no options but still doesn’t show the topics in the search results.
Please point me to where I can find information to modify my WordPress, Theme, or BBPress installation so that search results from the main form include topics!!!
Thank you!!!
L
P.S. My website http://www.hippressurecooking.com – I have lots of forum topics discussing Christmas Puddings but if you search for “pudding” on the main website all you get is the posts & pages with the word “pudding” and none of the topics with valuable info.
P.P.S. I have search enabled in the forums, but in addition to that I would like the results all in one place from the basic WordPress search that shows up on every page.
December 9, 2014 at 12:21 pm #155364In reply to: Integrate with Jetpack Markdown
jawittdesigns
ParticipantI still haven’t been able to find where the & character conversion is taking place, but I have managed to get it to work.
Here’s the class I’m using
class JPM_BBP_Support { /** * Initialize the class and set its properties. */ public function __construct() { add_action( 'plugins_loaded', array( $this, 'custom_jetpack_markdown_support' ) ); // Remove the back_code_trick filter remove_filter( 'bbp_new_reply_pre_content', 'bbp_code_trick', 20 ); remove_filter( 'bbp_new_topic_pre_content', 'bbp_code_trick', 20 ); remove_filter( 'bbp_new_forum_pre_content', 'bbp_code_trick', 20 ); remove_filter( 'bbp_edit_reply_pre_content', 'bbp_code_trick', 20 ); remove_filter( 'bbp_edit_topic_pre_content', 'bbp_code_trick', 20 ); remove_filter( 'bbp_edit_forum_pre_content', 'bbp_code_trick', 20 ); add_filter( 'bbp_get_reply_content', array( $this, 'custom_con_char' ), 6 ); add_filter( 'bbp_get_topic_content', array( $this, 'custom_con_char' ), 6 ); } /** * Replace instances of < and > * with < and > when pulling the content * from the databse to display * * @param string $content the content stored in the database * @return string the formated content */ public function custom_con_char( $content = '' ) { $content = str_replace( '<', '<' , $content ); $content = str_replace( '>', '>' , $content ); return $content; } /** * Add Markdown support for BBPress Froums */ public function custom_jetpack_markdown_support() { add_post_type_support( 'topic', 'wpcom-markdown' ); add_post_type_support( 'reply', 'wpcom-markdown' ); } } $jmp_bbp_support = new JPM_BBP_Support();December 9, 2014 at 7:27 am #155356Topic: Menu "Forum" disappeared for Moderator role
in forum TroubleshootingDirk
ParticipantHello,
I recently started to use bbPress v 2.5.4 with WP v 4.0.1.
Everything worked fine until I changed the user_login in of a user in the mySQL database, who had the bbPress moderator-role and started two forums before.
Now this user (and every other „moderator“) can´t see the menu-item „forum“ in the Dashboard anymore. Any other bbPress-role works like it should.
As a workaround I created a testpage with the shortcode[bbp-forum-form]and tried to start a new forum as „moderator“. It worked, but I only could start a child-forum under an existing parent. So the „keymaster“ has to change it to „parent“ everytime a „moderator“ starts a new forum.
That´s a wortkaround but not a solution.Deactivating all plugins made no difference., also changing the capabilities with “bbPress Advanced Capabilities”.
I found a post here in the forum “Moderator role can’t create or manage Forums”, where you speak of a known issue, that a moderator can´t see the „forum“ menu in the dashboard anymore. The problem described there seems to be quite similar to mine but is 1 year old. So, is this issue solved in the meantime? And if not, perhaps my problem helps to address it.
Thanks for any assistance.
December 9, 2014 at 5:50 am #155353In reply to: BBP Results Showing in WordPress search
pazzaglia
ParticipantI used the first code snippet above in my functions.php with ‘post’,’page’,’topic’ in the array. It DID show the topics in search results BUT, unfortunately, it blanked-out my topic page (no topic or reply text just the title and reply form).
However, I took a chance and installed the super-old “Search bbPress” plug-in and edited the script to NOT add ‘replies’ to the search results and it worked!
Thought I’d share my experience in case anyone else has been hunting for a solution to this for weeks, like me.
Ciao,
L
December 8, 2014 at 9:54 pm #155336In reply to: Background color not affecting padding?! (seemingly)
Robkk
Moderatorfirst remove all the CSS code you just posted , from where you are putting this custom css
it looks all jenky..haha
im going to use most of the CSS code i posted here
/* header and footer that says AUTHOR , POSTS , VOICES, TOPICS , FORUMS */ #bbpress-forums li.bbp-header, #bbpress-forums li.bbp-footer { background: #000 !important; border-top: 1px solid #eee; font-weight: bold; padding: 8px; text-align: center; } /* this is the background of the forums and topics that display the title, the freshness stats and so on. */ #bbpress-forums li.bbp-body ul.forum, #bbpress-forums li.bbp-body ul.topic { border-top: 1px solid #eee; overflow: hidden; padding: 8px; background: #000; } /* this is the header that shows the post date and post ID */ #bbpress-forums div.bbp-forum-header, #bbpress-forums div.bbp-topic-header, #bbpress-forums div.bbp-reply-header { background-color: #000; } /* try to make these two different types of dark shades if you care about having an AB color pattern of replies/topics/forums. */ #bbpress-forums div.odd, #bbpress-forums ul.odd { background-color: #000; } #bbpress-forums div.even, #bbpress-forums ul.even { background-color: #000; }here is the code to remove the text decoration from the forum titles
.bbp-forum-title, .bbp-forum-title a { text-decoration:none; } -
AuthorSearch Results