Search Results for 'code'
-
AuthorSearch Results
-
June 3, 2017 at 2:36 am #184610
In reply to: “get forum list” can’t find forums
Robin W
ModeratorJune 3, 2017 at 1:23 am #184609In reply to: Is there an API for bbPress
mapofemergence
Participant@tkserver please do keep me/us posted about your progress.
I’m not familiar with Angular JS, at all, but I’ve invested quite some thoughts on the frontend too; my implementation is a basic and quite old-school combo of PHP and AJAX jQuery but, still, that doesn’t mean I’m not aiming at a smart and fresh UX π
I’m very interested in hearing other people’s thoughts, both with regards to usage philosophy and in terms of code implementation. I firmly believe that’s the best (possibly the only) way to make the right choices, early in the development, for the backend to be generalized and robust enough to serve everybody’s requirements.
June 3, 2017 at 1:14 am #184608In reply to: Adding single topic title into meta title for SEO
ilovemetrics
ParticipantHi,
Thanks for the response. I’m not following how this would solve the problem, though. From what I can see of that filter, I need to pass in the topic title into this function, but I can’t get the topic title in functions.php early enough.
Here’s the function (in functions.php) I’ve created to modify the title in other ways needed (replace “Forum” with “Investment Groups” and replace mdash; with a hyphen as the main separator). This is where I’d want to incorporate the logic:
function theme_mod_title() { add_filter('document_title_separator', function() { return '$%'; }); remove_filter('pre_get_document_title', 'theme_mod_title'); $find = array( '/ \$% /', '/^Forums/' ); $replace = array( ' - ', 'Investment Groups' ); $title = wp_get_document_title(); // filter the title $ftitle = preg_replace($find, $replace, $title); NOT SURE HOW TO ACCOMPLISH THIS, BUT LOGIC NEEDED IS //if (on bbpress topic page){ $ftitle = bbpress topic title . ' - ' . $ftitle; //} return $ftitle; } add_filter('pre_get_document_title', 'theme_mod_title');The bbPress part is where I’m stuck. I’m not sure how to actually get the topic title early enough to pass it into the document title. This seems to be the only place I can actually set any new meta title tag logic, but I can’t tap into anything bbPress this early in the process.
Thanks again
June 2, 2017 at 11:29 pm #184607In reply to: Adding single topic title into meta title for SEO
Stephen Edgar
KeymasterHave you seen
bbp_new_topic_pre_title()inincludes/topics/functions.php?(There’s also
bbp_new_forum_pre_title()inincludes/forums/functions.php)June 2, 2017 at 9:18 pm #184605In reply to: Forum link stopped working
scrawny
ParticipantSame problem.
Site is running certified SSL and have had no issues with other plugins or wordpress itself.
Running PHP 7.1, latest version of bbPress
Problem exists in Firefox and Opera. Don’t use IE or Chrome.
Site is closed to public while in developement. Doesn’t seem to stop people accessing forum.
When clicking on Forums in Dashboard the url result is
https://mysimpleknitting.com/wp-admin/edit.php?post_type=forumMessage on page is:
The
mysimpleknitting.compage isnβt workingmysimpleknitting.com.comis currently unable to handle this request.When I attempt to access forums from url directly:
When I type in
https://mysimpleknitting.com/forums/The result is the same error.
Clicking on Forums in the Settngs brings up the proper bbPress page.
June 2, 2017 at 8:25 am #184600In reply to: Forums index does not work
Robin W
Moderatorok, you need to get this code into your site.
@media screen and (max-width: 400px) { .list-view .site-content .cat-links, .list-view .site-content .entry-content, .list-view .site-content .entry-summary, .list-view .site-content footer.entry-meta { display: initial !important; } }There are many ways to do this.
If you theme has a custom css area, you can put it in there
Otherwise you can look for a css plugin and add that
or you could install and activate my style pack plugin
and go to
dashboard>settings>bbp style pack>custom css and put the code in there
June 2, 2017 at 3:35 am #184589In reply to: Forums index does not work
Robin W
Moderatorline 2930 of your custom css file changes this for
@media screen and (max-width: 400px)using
.list-view .site-content .cat-links, .list-view .site-content .entry-content, .list-view .site-content .entry-summary, .list-view .site-content footer.entry-meta { display: none; }you need to add some custom css for instance
@media screen and (max-width: 400px) { .list-view .site-content .cat-links, .list-view .site-content .entry-content, .list-view .site-content .entry-summary, .list-view .site-content footer.entry-meta { display: initial !important; } }June 1, 2017 at 3:23 am #184550In reply to: Forum width
Robin W
Moderatorok that’s firmly theme related, but I’ll give you a starter and let you play
Put this in your theme’s custom css area, presuming it has one
.section-inner { width: 1200px; } .content { width: 65%; } .sidebar { width: 27.5%; }and then just play with the numbers to get what you want
May 31, 2017 at 10:40 pm #184543In reply to: Uninstall Breaks My Wp Admin
core12dev
ParticipantOne of the first things I attempted. Renaming does the same as “deactivating” the plugin. There are no other bbPress related plugins.
It is acting like a script issue where the Admin functions aren’t finding the proper variables. But I’m not a pro coder… just a logic guy.
May 31, 2017 at 6:36 am #184528In reply to: Is there an API for bbPress
mapofemergence
ParticipantHi @TKServer, I’m glad you revamped this topic.
Although since my last post I didn’t work further on the code, I’m still very much interested in the discussion.
Originally, I was going in the same direction that you just suggested but, ultimately, I thought that a separate API would be desirable for a variety of reasons.I can name the ones I thought of, but I’m sure others might have even stronger (and more educated) motivations:
- the most general and obvious: a separate API makes you less dependant on certain builtin constraints of WP API and let you take design decision which are more tightly connected with bbPress specifically; even though bbPress leverages WP’s custom post types and tags, there’s a higher layer of abtraction (read: forum functionality) which implies a whole set of requests for which the existing endpoints’ structure is not ideal
- depending on what info you want to get with a single request, the default WP API queries might not serve the scope well (ie. they could force the user to make multiple queries where just one would be desirable and sufficient; also, where multiple database calls are required, it might not provide those in the best performing way)
- from a user standpoint, I believe it is better to offer schemas (and filters) which reflect more the semantics of a forum, than the ones of a blog; I believe you can still build those custom terms in the existing API, but it might become confusing soon, and in my opinion you’d loose the advantage of staying with a single API, anyway
- additionally (and actually the main reason for me personally), I see bbPress as part of an ecosystem, with WP and BuddyPress. Since BuddyPress already went for a separate API, I thought it would make sense to do the same with bbPress, keeping things clean and separate. Utlimately, the ideal would be to have the bbPress API live with the bbPress plugin itself, so that the development of the two can progress together (and therefore be more efficient and optimised, both ways)
- finally, speaking of bbPress BuddyPress, there’s an area where the two plugins overlap (bb forums in BP groups); I believe it is already a non-trivial problem to solve in a separate API and it would likely be even more complicated to try and stay within the WP limits; I was mentioning this in another post too, which I believe is still awaiting approval from moderators (please pardon me if I dare poking them here, once more) π
Again, this is just my opinion; there are probably pros and cons in both options and I’d be more than happy to hear from anyone who’s more bbPress-savvy than I am.
Cheers,
s t eMay 28, 2017 at 8:19 am #184475In reply to: Moving bbpress from localhost to online server
srjmukherjee2
ParticipantNo it didn’t work.
More Information :
My htaccess looks like this : (Do I need to make any changes here?)php_value max_execution_time 500 php_value upload_max_filesize 64M php_value post_max_size 80M php_value memory_limit 128M # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress <IfModule mod_security.c> SecFilterEngine Off SecFilterPost Off </IfModule>And in my bbpress forum user settings the forum root is set to
<b>forums</b>May 26, 2017 at 2:14 pm #184440In reply to: Media (image) Topic Below
Robin W
Moderatorhappy to do this one last one
.post-content table, .comment-content table { clear: none; max-width: 70%; }May 26, 2017 at 10:33 am #184434Topic: Issues with German translated language files
in forum Troubleshootingwci
ParticipantHi support team,
I was trying to use your translatetion instructions but unfortunately it has not worked on my case.
1. I downloaded files mo./po. (Go to https://translate.wordpress.org/projects/wp-plugins/bbpress)
2. renamed them accordingly “bbpress-de_DE”
3. uploaded to my server folder “wp-content/languages/buddypress”But still are not working. Any ideas?
Screen shot – https://www.screencast.com/t/Ke8sEFj5Looking forward to your help.
BR, Alex
May 26, 2017 at 3:28 am #184419In reply to: Post replies are going the full width of the page
Robin W
Moderatornot a css problem, but a div one
the content should be contained like this
<div class="bbp-reply-content"> <p>dsfgdsfdf</p> </div>but on your site you have
<div class="bbp-reply-content"> </div> </div> </li> <li></li> <p>There is a bill named by congress </p> etc.so you are closing the content div and another div before your post content
not sure what you are doing – have you amended any templates?
or is your theme doing this – as a test try another theme to se if it persists
May 25, 2017 at 9:09 am #184413In reply to: Restrict links only for registered users.
virusek89
ParticipantThank you, the code works properly π
May 24, 2017 at 1:50 pm #184399In reply to: Previous Viewed instead of Breadcrumbs
Robin W
Moderatorok, try
enable the root breadcrumb in
dashboard>settings>bbp style pack>breadcrumbs
so that you’ve disabled breadcrumb home and breadcrumb current
Then in custom css have
.bbp-breadcrumb-root::before { content: "Back to "; } .bbp-breadcrumb-forum { display : none ; }May 24, 2017 at 8:37 am #184398In reply to: Previous Viewed instead of Breadcrumbs
forums1234
ParticipantRats! Almost!
Unfortunately, this solution returns to a third page created by bbPress that displays the entire forum, which is great but not what I need.
I need it to return to the previous “page” that I created with the forum shortcode that got them to that particular topic. This way, members could go from host page to topic, back to host page and to second topic, and back to the host page and to a third topic.
This would open unimaginable opportunities for web designers for creativity. For instance, hosting multiple forums on the same page without any need for navigation.
May 24, 2017 at 8:09 am #184397In reply to: Nofication of topics and replies
sharlene_c
ParticipantI am having this problem also. Not getting email notifications as should be according to https://codex.bbpress.org/features/subscriptions/
Is there anything else that needs to be checked? so that subscribers are notified of new posts and new comments.
May 24, 2017 at 3:07 am #184385In reply to: Reload page after login
Robin W
Moderatortry adding this to your theme’s functions file
add_filter( 'bbp_redirect_login', 'rew_ignore' ); function rew_ignore () { $url = '' ; return $url ; }May 23, 2017 at 4:38 pm #184370In reply to: Previous Viewed instead of Breadcrumbs
Robin W
Moderatorsimplest way is to install my style pack
https://wordpress.org/plugins/bbp-style-pack/
navigate to
dashboard>settings>bbp style pack>breadcrumbs
disable breadcrumb home, breadcrumb Root, and breadcrumb current
This just leaves the ‘previous’ showing
then put this into the custom css tab of my plugin
.bbp-breadcrumb-forum::before { content: "Back to "; }The breadcrumb will then become ‘back to xx’ with xx being whatever they came from
May 23, 2017 at 5:19 am #184356In reply to: Media (image) Topic Below
Robin W
Moderatorput this into your custom css
#bbpress-forums div.bbp-topic-content img, #bbpress-forums div.bbp-reply-content img { max-width: 70%; }May 23, 2017 at 3:16 am #184349In reply to: Query error
bjorngus
ParticipantOk, i have something that seems to work, try it out if you want to, feel free to give me feedback on it.
function fix_default_search_string_is_bool($args) { //bbpress gives FALSE as search string causing no replys to show, this fixes it. if ($args['s'] === false) { unset($args['s']); } return $args; } add_filter('bbp_after_has_replies_parse_args', 'fix_default_search_string_is_bool');May 22, 2017 at 9:27 pm #184348In reply to: bbpress notify and role scoper integration
guruprasadmulay
ParticipantHi Robin, If it is small code change. I would like to work on it and customize it for my site.
Thanks
GuruMay 22, 2017 at 3:59 am #184321Topic: How do you widen a forum when a sidebar is used
in forum Themessemperaye
ParticipantI’ve been searching for a very long time and all I can find is how to hide a sidebar, or make a full width page. I need to keep my sidebars in my forums, but they are causing the forums to be rather small to the point where it’s almost hard to read. I’ve tried this:
#sidebar-left .widget, #sidebar-right .widget {
margin: 0 0 1em;
}But I think I might need something else to force the forum wider because the code above did nothing for me.
May 21, 2017 at 10:58 pm #184311Topic: bp activity filter options
in forum Troubleshootingpossip
Participanthey, hope you’re well.
i could need some help on fixing my filter options in the activity stream for topics and replies. they just don’t filter, i’m still seeing everything
This is what i found:
function activity_filter_options() { ?> <option value="<?php echo $this->topic_create; ?>"><?php esc_html_e( 'Topics', 'bbpress' ); ?></option> <option value="<?php echo $this->reply_create; ?>"><?php esc_html_e( 'Replies', 'bbpress' ); ?></option> <?php }I’m pretty bad at php, but i have a feeling there must be something wrong. π tried changing topic_create to bbp_topic_create, but no. Can you help me? π
-
AuthorSearch Results