Search Results for 'code'
-
AuthorSearch Results
-
March 12, 2015 at 9:12 pm #159552
In reply to: jump to last reply
Robkk
Moderatori think this should do it
you would probably need to add more code around it.
<?php bbp_last_topic_reply_permalink ?>March 12, 2015 at 8:59 pm #159550In reply to: Admin role unable to view topic post
Robkk
Moderatorcreate a bbpress.php from your page.php file or single.php and remove any useless information like comments code.
reply back if you need more help or it doesnt work.
March 12, 2015 at 3:32 pm #159537wpgerd
ParticipantHello,
I installed a new bbpress 2.5.5 and noticed, that there is no space between the breadcrumb and the subscription-toggle:
How can I add some space? With CSS or in the code? What’s the better way?
Thanks for help in advance!Gerd
March 12, 2015 at 2:42 pm #159535In reply to: Problem with noreply-email
wpgerd
ParticipantHello Robkk,
thanks for your reply. At first I thought it was WP Better Emails or MailPoet Newsletter. I deaktivate this plugins, but the same.
Now I used a fresh Testinstallation of WP, installed bbpress and the same. If someone subscribe to forum, I got a Mail delivery failed notice.I try a little search and found in this file \wp-contetnt\plugins\bbpress\includes\common\functions.php this code:
// Strip tags from text and setup mail data
$topic_title = strip_tags( bbp_get_topic_title( $topic_id ) );
$reply_content = strip_tags( bbp_get_reply_content( $reply_id ) );
$reply_url = bbp_get_reply_url( $reply_id );
$blog_name = wp_specialchars_decode( get_option( ‘blogname’ ), ENT_QUOTES );
$do_not_reply = ‘<noreply@’ . ltrim( get_home_url(), ‘^(http|https)://’ ) . ‘>’;// For plugins to filter messages per reply/topic/user
$message = sprintf( __( ‘%1$s wrote:// Strip tags from text and setup mail data
$topic_title = strip_tags( bbp_get_topic_title( $topic_id ) );
$topic_content = strip_tags( bbp_get_topic_content( $topic_id ) );
$topic_url = get_permalink( $topic_id );
$blog_name = wp_specialchars_decode( get_option( ‘blogname’ ), ENT_QUOTES );
$do_not_reply = ‘<noreply@’ . ltrim( get_home_url(), ‘^(http|https)://’ ) . ‘>’;// For plugins to filter messages per reply/topic/user
$message = sprintf( __( ‘%1$s wrote:So I think, the email will be generatet of bbpress. How can I prevent this Mail delivery failed notice?
Gerd
March 12, 2015 at 2:15 pm #159534crazedsanity
ParticipantIt looks like the code, by default, sends the message to “noreply@” followed by the domain, with all the intended recipients in the BCC field. I end up getting 3-6 bounces per message due to the “delayed” notifications. It thought it would go away after someone (else) had subscribed to the topic, but that is simply not the case.
The code needs to be only slightly more sophisticated:
1.) it should NOT send an email if there are no recipients (because… logic)
2.) the “from” address should be “noreply@<domain>” or otherwise configurableI’ll see if I can work up a patch if I’ve got sufficient free time (unlikely, but I’ll try). Anybody know the who/how/where of it?
March 12, 2015 at 11:20 am #159528In reply to: German Translate Plug-IN
wpgerd
ParticipantHello,
here you find informations about the two versions of language files: https://codex.bbpress.org/bbpress-in-your-language/german-deutsch-de/
You don’t need a plugin.I used the DU-version of David Decker. But I think both versions work well. If you want to change something use poedit.
Gerd
March 12, 2015 at 11:02 am #159527nolimit966
ParticipantHi,
I have bbp_get_user_post_count($user_id) being echoed in my loop-single-reply.php and its not showing the total posts number at all. Is this the correcnt way to do it?
<?php echo 'Topics: '. bbp_get_user_post_count($user_id);?>Thanks
March 12, 2015 at 4:49 am #159518In reply to: Trying to make my plugin compatible
Robin W
ModeratorMost of the filters are held in the templates that are located as follows :
wp-content/plugins/bbpress/includes/forums/template.php
wp-content/plugins/bbpress/includes/topics/template.php
wp-content/plugins/bbpress/includes/replies/template.php
wp-content/plugins/bbpress/includes/users/template.php
wp-content/plugins/bbpress/includes/search/template.phpThere are two typically filters, one on the final function usually within the ‘return’, and one that mimics wordpress’s ‘before’ filters
from the docsNear the beginning of many functions we find :
// Parse arguments against default values $r = bbp_parse_args( $args, array( 'before' => '<ul class="bbp-forums-list">', 'after' => '', 'link_before' => '<li class="bbp-forum">', 'link_after' => '', 'count_before' => ' (', 'count_after' => ')', 'count_sep' => ', ', 'separator' => ', ', 'forum_id' => '', 'show_topic_count' => true, 'show_reply_count' => true, ), 'list_forums' );This is a common format throughout bbPress, and indeed is similar to a function used throughout wordpress.
It uses a function called
bbp_parse_argsto create a filter against all the arguments.The filter created is in the format
bbp_before_followed by X followed by_parse_argsThe X is the third argument from thebbp_parse_argsfunction – if you look at the code above you’ll see that it is actually
bbp_parse_args ($args, Array(...), 'list_forums' )so in the last line we see
list forumswhich is the X above . In practice this is the function without the bbp start bit.so an array filter for
bbp_list_forumsisbbp_before_list_forums_parse_args
and for saybbp_get_topic_paginationwould be
bbp_before_get_topic_pagination_parse_argsMarch 11, 2015 at 10:28 pm #159512In reply to: A Login/Logout link in another menu
Robkk
Moderatortry using this plugin, use the logout link from this plugin and use a custom login link for the bbPress login shortcode if you want.
March 11, 2015 at 9:33 pm #159506In reply to: Remove forum navigation button – Highwind Theme
Robkk
Moderatorcreate a bbpress.php file and put it in your child theme , the default file bbPress is using has some extra code for post navigation that should be for blog posts.
you can also use CSS
#bbpress-forums .navigation-post { display:none; }March 11, 2015 at 9:06 pm #159502In reply to: Enable participants to delete their own posts?
Robkk
Moderatorthis is a pretty common request here
there might be issues where you cant add the permissions to work on only the participants created topics only though.
i suggest searching the forums try finding topics only in the past 1-2 years past that will probably be unusable code.
other than that go to http://jobs.wordpress.net/
March 11, 2015 at 9:00 pm #159499In reply to: less distance – left margin between threaded replies
Robkk
ModeratorI think there is a need for a small tutorial on editors, root folders and ftp access for starters, I remember being very intimidated by my root folders at first.
there are so many editors that you can use , basic editing are very close to normal text editors so it shouldnt be a problem.
Root folders WordPress explains here …kind of. going behidn that should be host files that you should never touch unless you are very advanced, and know what you are doing.
codex.wordpress.org/Determining_Plugin_and_Content_Directories
Explaining FTP , idk there are usually tutorials on using FTP on the host providers website, and also searching in google how to set it up and learning is not that hard to do.
https://codex.wordpress.org/FTP_Clients
https://codex.wordpress.org/Using_FileZillaMarch 11, 2015 at 8:47 pm #159498In reply to: Rev Slider/Image in Forum Header
Robkk
Moderatorare you using shortcodes in templates or pages??
March 11, 2015 at 8:45 pm #159497In reply to: Hide the profile of a certain member
Robkk
Moderatormaybe using conditionals in the user profile templates (copy these to a child theme) would do it.
it might is_single_user() then array the guest accounts user ID to hide the user profile information
March 11, 2015 at 8:35 pm #159496In reply to: Display last topic poster name
Robkk
Moderatorthis is what the freshness column is using
<?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id() ) ); ?>March 11, 2015 at 7:20 pm #159486In reply to: Best anti spam plugin
Robkk
Moderatorfor registrations i use bruteprotect it helps out alot.
bruteprotect + akismet = <3
plus combine that with bbPress’s spam control functions (throttle posting/time to edit)
bbpress uses the comment moderation settings https://codex.bbpress.org/moderation-and-blacklisting/
so combine that with the blacklist.txt from here and you should be fine
March 11, 2015 at 7:08 pm #159485In reply to: How do I extract a topic/reply excerpt?
Robkk
Moderator@nolimit966 i think you can use
<?php bbp_topic_excerpt(); ?>place this in loop-single-topic.php and you should see it.March 11, 2015 at 5:35 pm #159474Topic: Users unable to register and login
in forum Troubleshootingrbrynest
ParticipantWhenever a new user tries to register or login to my site, it just shows a white page with “blocked” written on it.
I am using bbPress forum plugin and have the “Allow anyone to register” checked.
My register page is using the register shotcode and as a login I use the (bbpress) login widget in a sidebar.
I have checked for conflicts by deactivated all plugins but bbpress and switched to the default twentytwelve theme to see if this fixes. Unfortunately with negative results.
Any idea what’s going on?
Register URL: http://www.oppfraavgrunnen.no/registrer-deg/
Login URL: http://www.oppfraavgrunnen.no/bbpress/Thanks in advice
Regards
RuneMarch 11, 2015 at 3:31 pm #159472In reply to: Forum Page ID’s
Alice Kaye
ParticipantHaha, that certainly would make things easier on everyone (myself included). The biggest issue here is that, without an account you cannot see the forums due to the way my site’s permission system is set up. So if you need to see code, let me know and I’ll give you the test account login information. 🙂
Forum Setup:
Final Fantasy XIV (FFXIV Background)
– General Discussion
– The Forge
– The Golden Quill
– Journals
– Ultima EX
All of the sub forums currently have the FFXIV handcoded into the CSS section so their backgrounds are also FFXIV. However, whenever a post is made in any of these forums, my base site background is the one showing. If possible, it would be great if any forum posts made in any of these specific forums had the correct corresponding background.The same goes with my Guild Wars 2 section which has a Guild Wars 2-based background.
The thing is, I’m not sure if this is at all possible.
Hoping that I’ve explained that well. 🙂
March 11, 2015 at 9:14 am #159464In reply to: Forum Page ID’s
Alice Kaye
ParticipantI tried to reply the other day but every time I hit submit, everything would disappear and it wouldn’t post my reply. Oi.
So firstly I wanted to say thank you to both of you for all of the help and support with everything. You guys got me on the right track which was GREAT!
The code that ended up working for me was:
.postid-37 #fixed-background { background: url('http://www.heartwoodgaming.com/wp-content/uploads/2015/02/gw2-background.jpg') !important; }I was hoping that by changing the page ID background for each forum, that the subsequent posts would also have that background, but it didn’t pan out. I’m curious if this is possible in some way? It’s tough to imagine via CSS simply because the pages generate when created, so it would have to be based on a forum ID (in my head), rather than a simple postID.
Do you guys have any thoughts on this at all?
Again, thanks for the help and sorry I couldn’t reply sooner. It just wouldn’t let me! 🙁
March 9, 2015 at 10:16 pm #159434In reply to: Recent replies in a page instead of a widget
Robkk
Moderatorthere is no shortcode for recent replies
you could try this??
https://wordpress.org/plugins/amr-shortcode-any-widget/
you could follow this tutorial to create a recent replies shortcode , i tried it and i didnt get the results i wanted before
http://www.daggerhart.com/bbpress-recent-replies-shortcode/
other things you could do is use get template part, then make a shortcode for a template
https://codex.wordpress.org/Function_Reference/get_template_part
you could do some custom query in a new template , put a custom sidebar in the template and place the widget there.
then if you want follow this tutorial to use get_template with a shortcode
kovshenin.com/2013/get_template_part-within-shortcodes/
March 9, 2015 at 9:13 pm #159429In reply to: Modifying bbpress
inventorgeorge
ParticipantThank you robkk:
I will dig into this. The shortcode should make this very simple.Regards,
GeorgeMarch 9, 2015 at 9:07 pm #159427In reply to: Modifying bbpress
Robkk
Moderatorfollow this guide here is part 1
part 2 is linked toward the very bottom
but you can create a blank page and have it use the same forum archive slug as you set in settings>forums.
for example create a page called Forums , the end slug should be the default /forums and it should lead you to your forum archive.
an alternative is to use the forum archive shortcode
[bbp-forum-index]
March 9, 2015 at 7:04 pm #159422In reply to: bbPress 2.5.5
Corey – The Theme Foundry
ParticipantOk, it looks like the problem is partly in our theme, but there is a change in 2.5.5 not mentioned in the changelog that is triggering the issue. It seems to be related to this:
https://bbpress.trac.wordpress.org/ticket/2607
We have a check on
WP_Query->is_searchthat is returning true in the topic and reply loops when I believe it should be returning false. The resolution of the above ticket was supposed to fix this same issue…March 9, 2015 at 6:26 pm #159420In reply to: bbPress 2.5.5
Corey – The Theme Foundry
ParticipantAfter updating from 2.5.4 to 2.5.5,
bbp_has_topics()is returning false on our single forum template, andbbp_has_replies()is returning false on our single topic template (both in cases where these functions should be returning true). Nothing in the 2.5.5 changelog seems relevant to this, so I’m at a loss as to what is causing this behavior… -
AuthorSearch Results