Search Results for 'code'
-
AuthorSearch Results
-
February 14, 2014 at 9:52 am #142490
In reply to: css problem..
Robin W
Moderatortake out the word div !
.bbp-search-form { display:none !important; }February 14, 2014 at 9:43 am #142488In reply to: Change of date for freshness
Robin W
ModeratorGreat, glad to hear you’re fixed, and have just added the code to one of my forums. One of those moments when you see something and think “that looks better”!.
February 14, 2014 at 4:39 am #142480In reply to: Change of date for freshness
Robin W
Moderatorso the answer is
function short_freshness_time( $output) { $output = preg_replace( '/, .*[^ago]/', ' ', $output ); return $output; } add_filter( 'bbp_get_time_since', 'short_freshness_time' ); add_filter('bp_core_time_since', 'short_freshness_time');Drop this into your functions file
February 14, 2014 at 4:31 am #142479In reply to: Few issues with BBpress installation
Robin W
ModeratorThink it’s as simple as
is_bbpress()
so try
<div class="breadcrumbs"> if(function_exists('bcn_display') && is_bbpress()) { bcn_display(); }</div>Haven’t checked the syntax, I’ll let you do that
February 14, 2014 at 12:41 am #142473In reply to: WP_Query post type topic help
hitkid
Participantthanks @robin-w !
I’ve tried to use all the avatar functions found in the documentation in the wp_query(), but none are working. I’ve tried it locally with newer updates of buddypress/bbpress and live with a fresh install and nothing.
This is the actual tag I want to use:
<?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?>They work perfectly in the mychild/bbpress/loop-single-topic.php , but I just can not get it to work in the query! Is there anything I am missing, or doing wrong?
Thanks for the help!
February 13, 2014 at 8:45 pm #142469In reply to: Few issues with BBpress installation
boriskamp1991
ParticipantOk,thanks for that!
I need to add this code somewhere:
<div class="breadcrumbs"> <?php if(function_exists('bcn_display')) { bcn_display(); }?> </div>It is for displaying the breadcrumbs.
When I add it to header.php in my theme, the breadcrumbs appear on allll my pages. I dont want that, I want them ONLY on forum related pages, how can I achieve this?February 13, 2014 at 8:19 pm #142468In reply to: ERROR: Are you sure you wanted to do that?
Peter J. Herrel
ParticipantBumped into this while developing locally, a solution is to filter the requested url in
bbp_verify_nonce_request:add_filter( 'bbp_verify_nonce_request_url', 'my_bbp_verify_nonce_request_url', 999, 1 ); function my_bbp_verify_nonce_request_url( $requested_url ) { return 'http://localhost:8888' . $_SERVER['REQUEST_URI']; }February 13, 2014 at 3:42 pm #142464In reply to: Change of date for freshness
virusek89
Participantbbp_get_time_sinceI found it in these files
bbpress\includes\topics\template-tags.php
bbpress\includes\replies\template-tags.php
bbpress\includes\forums\template-tags.php
bbpress\includes\common\widgets.php
bbpress\includes\common\functions.phpNow what I need to edit to remove the rest of the decimal?
I want to ask because I am a beginner in php
February 13, 2014 at 2:19 pm #142460In reply to: Change of date for freshness
John James Jacoby
KeymasterYou’ll want to filter the output of
bbp_get_time_since; it’s the function responsible for humanizing timestamps. You’ll probably want to perform a string replacement starting at the comma, and append your own ‘ago’ at the end.February 13, 2014 at 2:15 pm #142459Topic: css problem..
in forum TroubleshootingDavid2013
ParticipantHi i just dont know whats wrong…
when i work with firebug on css for forum page is ok but when i add to do css wont work…
#bbp-search-form div { display: none !important; }is format type wrong?
Thanks, David
February 13, 2014 at 12:05 pm #142450KostRev
ParticipantThanks. I sort of figured that out after removing my custom templates. Not sure where I got the code for form-topic.php because it was very different from the default and that made the difference.
Thanks for the tip on the shortcode. That alone would have helped some of my troubleshooting.
February 13, 2014 at 6:39 am #142443In reply to: Translate to Swedish
Stephen Edgar
KeymasterYou want to use the
/devbranch of both projects:https://translate.wordpress.org/projects/bbpress/dev/sv/default
https://translate.wordpress.org/projects/buddypress/dev/sv/defaultOn each of the above pages select ‘.mo’ from the dropdown at the bottom of the page and click export.
Rename each file to
buddypress-sv.mo&bbpress-sv.mo
The extra instructions on the BuddyPress site might also help, I’ll try to get the bbPress updated soon also.
February 13, 2014 at 5:42 am #142440Robin W
ModeratorI thought that’s what it did in default mode.
If you are using shortcodes, then you have options
[bbp-topic-form] – Display the ‘New Topic’ form where you can choose from a drop down menu the forum that this topic is to be associated with.
[bbp-topic-form forum_id=$forum_id] – Display the ‘New Topic Form’ for a specific forum ID.Otherwise come back with a url where this isn’t happening
Robin W
Moderatoryes,
Dashboard>settings>forums>forum root slug to change the urls and breadcrumbs – just change forums to what you want it to say
Tp change the forum heading on the forums list, make a copy of
wp-content/plugins/bbpress/templates/default/bbpress/loop-forums.php
and place this in a folder
/wp-content/themes/%your-theme%/bbpress/
see https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum-part-3/ for a tutorial on this subject
Then edit line line 19 which says
<li class="bbp-forum-info"><?php _e( 'Forum', 'bbpress' ); ?></li>to
<li class="bbp-forum-info"><?php _e( 'Elephant', 'bbpress' ); ?></li>and it will say elephant instead of forum.
February 13, 2014 at 5:26 am #142438In reply to: "New Topic" form on separate page
Robin W
Moderatoryou can use the following shortcodes in a page or post
[bbp-topic-form]
Display the ‘New Topic’ form where you can choose from a drop down menu the forum that this topic is to be associated with.[bbp-topic-form forum_id=$forum_id]
Display the ‘New Topic Form’ for a specific forum ID.February 13, 2014 at 4:48 am #142437In reply to: Forum Index Scrunched
Robin W
Moderator‘Thats the odd part, they are both using the default…and switching between the various different templates doesn’t seem to modify it. The theme has an internal setting that allows you to dictate how many ‘columns’ are shown. I can get it to show full page if I switch that around, but then my article page is also shown full (one column) I’m looking at the code further to try and figure out how to isolate one from the other’
Think that’s the route to go.
bbPress looks at the root of your theme for “bbpress.php” as a page template. if it doesn’t find it, it’ll use your themes “page.php”.
It sounds like your “page.php” page (whatever it’s called), has a parameter to set the columns, so within this they’ll be an “if” statement which is setting this.
What I think you need to do is as suggested in my first post. Copt the page file and call it “bbpress.php”. You should be able to find in that file where it is using the setting to create the columns and take this out. Alternately look in the twentyfourteen theme for the full page template and compare this to your file. You should be able to cobble the two together to get it to work.
If none of that works, (or alternately!) contact the theme developer to see if they have a solution.
February 13, 2014 at 4:39 am #142436In reply to: Form To Forum Post
Robin W
ModeratorSuspect that there are values in a “forum” post that you need to populate.
I suspect (but don’t know) that the forum will be a category, and the topics will be posts. Therefore you need to link your topic to it’s forum so need to link the post to it’s category.
Try searching round phrases such as “wordpress post category in database” which got me a bunch of articles eg
‘I guess the developers don’t visit their own forum anymore?’ – sounds critical, the developers are busy developing – remember this is all free stuff, and no-one pays their, or indeed my time to do this. They do regularly visit, but I would not expect to get a load of development advice for free to do something that is not in significant demand. Even writing this took ten minutes !
I hope you find a solution, and in the spirit of free open source, post the solution when you get it. I’ll add it to the codex, so that others can benefit.
Regards
Robin
February 13, 2014 at 3:58 am #142435In reply to: Integrating with Zendesk
Stephen Edgar
KeymasterI haven’t seen any integration with Zendesk but checkout this awesome tutorial by @mordauk (@pippinsplugins)
http://code.tutsplus.com/tutorials/using-bbpress-as-a-support-forum–wp-28877
February 13, 2014 at 3:56 am #142434In reply to: Replies under selected Posts in a Topic
Stephen Edgar
KeymasterYou would need to make some custom templates
See https://codex.bbpress.org/theme-compatibility/
And there are a few other docs here https://codex.bbpress.org/
February 13, 2014 at 3:52 am #142432In reply to: Translate to Swedish
Stephen Edgar
KeymasterSee this https://codex.bbpress.org/bbpress-in-your-language/
It’s the same process for both bbPress & BuddyPress
February 12, 2014 at 11:30 pm #142430Topic: shortcode change
in forum Troubleshootingjslom
ParticipantHello,
I am using the shortcode [bbp-topic-form forum_id=599] to display a form that will post to forum id 599.
I noticed the shortcode is using the form-topic.php template file to output.
What I want to do is have it use a modified version of the form-topic.php template file, but only for the shortcode.
How can I achieve this?
Thanks!
February 12, 2014 at 10:00 pm #142429In reply to: Forum Index Scrunched
thefruitnation
ParticipantSo I’ve found its specific to the url.. if its
http://www.thefruitnation.com/forums/It scrunches it up
Anything else like http://www.thefruitnation.com/forums1/ keeps it full width
I’m sure this has to do with the
Forum Root Slug
as it is set to ‘forums’ I just cant figure out how its correlated
I guess I can get around this by changing the page that I use the shortcode for index on to not share the same forums slug.. I thought this was needed, but perhaps thats my problem? Should it matter or any insight if this would effect url building/seo
February 12, 2014 at 9:43 pm #142427In reply to: Forum Index Scrunched
thefruitnation
ParticipantThats the odd part, they are both using the default…and switching between the various different templates doesn’t seem to modify it. The theme has an internal setting that allows you to dictate how many ‘columns’ are shown. I can get it to show full page if I switch that around, but then my article page is also shown full (one column) I’m looking at the code further to try and figure out how to isolate one from the other
February 12, 2014 at 6:30 pm #142424In reply to: Form To Forum Post
jslom
Participant$sql="INSERT INTO wp_posts (post_type, post_parent, post_title, post_content, post_author) VALUES ('$_POST[forum]','$_POST[forumid]','$_POST[1]','$_POST[2]','$_POST[3]')";This is the code im using to get my form to post to the db, and it still does not create the topic even though it populates
February 12, 2014 at 10:55 am #142412In reply to: Distinct forum users and admin users
barnabe
ParticipantBut with this code, when there is an error (like username already exists), the redirect is not effective.
This excellent tutorial helped me to fix that : Redirect to custom page after login or register fails
-
AuthorSearch Results