Search Results for 'code'
-
AuthorSearch Results
-
April 20, 2014 at 2:59 pm #145266
Topic: Favorite and subscription, undefined
in forum Troubleshootingjerryskate
ParticipantHi! Im having a problem with undefined call for Subscribe and favorites on threadreplys. Seems to be a known issue, but i can’t figure out how to fix it. Im using the BBpress starter theme from epicwebs, and i found this thread describing the problem: https://bbpress.org/forums/topic/help-me-to-solve-clicking-favorite-and-subscribe-problem/
I have fiddled around with the changes to functions-php he is linking to github, but can’t get it right. If i delete everything in the bbpress.functions it works, but everything looks shit, of course. If i change the while file to the new functions.php as a whole, it works but all styling is crazy off.
Was wondering anyone knows what part of the code controls this so maybe i can change just that part?
Regards,
JerryApril 19, 2014 at 5:00 pm #145232In reply to: Moderator Unable To Post To Forum: iPhone iPad
Matoca
ParticipantI was using a specific bbPress tinyMCE plugin, but I disabled that over a week ago when you mentioned that there may be some issues with it. Was it successful? I don’t know, you can read my moderator’s varied results above. When I had originally added the plugin it was specifically so moderators could edit photo size in the forum and not have to go into the dashboard to do that. I still ask my moderators to always be logged in when they are posting. If it is as simple as asking my moderator with the iphone issues to not log in when she needs to post replies or start topics, that is what we will do.
The latest upgrade WP 3.9 has ver 4.0 tinyMCS in it. See:
So, rather than confuse my troubleshooting, I have no tinyMCE plugins installed. Whatever tinyMCE capabilities 3.9 has is what I now have.
When I am logged in, on the text tab there are the standards plus insert/edit link, url img, code and close tags, the same as we are seeing on this forum.
On the visual tab, logged in, in addition to the standards there is undo, redo, add link, remove link and insert/edit image. Perfect, exactly what I wanted for the moderators.
When I am not logged in there are only the standard fields for name, email and website and add message. There are no text or visual tabs. I have the Nextgen gallery plugin for Upload Photos so that solves the issue of users wanting to post photos. They go directly into a specific gallery and I get an email telling me that something has been uploaded and needs approving.
I have Post Formatting in the forum tools settings unchecked for “Add toolbar & buttons to text areas to help with HTML formatting.” So that is probably why they are not allowed to have visual or text tabs. I do not require registration for posting. If I have trouble with someone I can put their IP on a blacklist. Akismet works well.
But it’s only been a couple of days since I upgraded to 3.9. The developer of the theme I am using has notified me that he is also reworking his theme so that may change things as well.
Once my moderator gets back in touch with me I will post here. Perhaps this WP upgrade has solved the problems with iPhone and iPad?
my best, matocaApril 19, 2014 at 4:38 pm #145230In reply to: Removing Dividers When Viewing a Category
tharsheblows
ParticipantI’m not quite clear on your code, so can’t help with the last piece.
As I mentioned, I did it differently and specific to the forum I was working on which has categories with forums but no sub-forums and one single forum without a category. I don’t think this will help you unless you decide to try something different but this is what I did – in loop-forums.php replace the while loop with :
<?php while ( bbp_forums() ) : bbp_the_forum(); ?> <?php if( !bbp_is_forum_category() ) { bbp_get_template_part( 'loop', 'single-forum' ); } else { bbp_get_template_part( 'loop', 'single-categories' ); } ?> <?php endwhile; ?>and then I made a loop-single-categories.php https://bbpress.trac.wordpress.org/attachment/ticket/1958/loop-single-categories.php
April 19, 2014 at 4:13 pm #145229In reply to: Removing Dividers When Viewing a Category
DeanGrey
ParticipantWhat the image shows is already using Bob1nz’s provided code. Bob1nz’s seems to not correct the issue like Lynq’s does. I am aware that Lynq has made some code available on github but I don’t know what to modify to get those to go away. I have worked my way to getting everything else the way I want it, this is just the last piece.
April 19, 2014 at 3:44 pm #145225In reply to: How do I add timestamp to posts within a topic?
tharsheblows
ParticipantYep – use get_post_time() – https://codex.wordpress.org/Template_Tags/get_post_time
function mjj_post_reply_date(){ printf('<div class="mjj-post-date">'); $reply_id = bbp_get_reply_id( $reply_id ); printf( get_post_time( get_option( 'date_format' ), false, $reply_id, true ) ); printf('</div>'); } add_action ('bbp_theme_before_reply_content', 'mjj_post_reply_date') ;April 19, 2014 at 3:33 pm #145223In reply to: How do I add timestamp to posts within a topic?
Majijiboo
ParticipantThanks. It works. Is there a way to only show the date and not the hour/minute? Maybe using code similar to the below could help?
function short_freshness_time( $output) { $output = preg_replace( '/, .*[^ago]/', ' ', $output ); return $output; }April 19, 2014 at 3:29 pm #145222In reply to: Moderator Unable To Post To Forum: iPhone iPad
tharsheblows
Participant@Matoca it sounds like you’re still using tinyMCE? Do you have something like this in your functions file –
function bbp_enable_visual_editor( $args = array() ) { $args['tinymce'] = true; return $args; } add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );(from https://codex.bbpress.org/enable-visual-editor/ )
I might be confused (if we had signatures and I used signatures on forums mine would be “I might be confused”) but I wouldn’t think you’d have a text / visual tab on the non-tinyMCE editor, would you?
If it were me, I’d also try disabling “Post Formatting” in Settings -> Forums in the admin area. I have no clue whatsoever if that would work though, it’s just something I’d try.
I’m really interested to see what works! My guess is that something will end up working but we’ll never quite know what did it.
April 19, 2014 at 3:07 pm #145220In reply to: How do I add timestamp to posts within a topic?
tharsheblows
ParticipantYou can use bbp_reply_post_date for it – it will give you “August 4, 2012 at 2:37 pm”. I mean, it would give you that for posts on Aug 4, 2012 at 2.37pm and similar things for other dates.
But you want to style it a bit, so something like:
function mjj_post_reply_date(){ printf('<div class="mjj-post-date">'); bbp_reply_post_date(); printf('</div>'); } add_action ('bbp_theme_before_reply_content', 'mjj_post_reply_date') ;April 19, 2014 at 2:22 pm #145216In reply to: Register / Login or Username
tharsheblows
ParticipantOh good – I have this in a header – it’s about the same but $user_identity is the display name rather than the login. This explains the different global variables from get_currentuserinfo() – https://codex.wordpress.org/Function_Reference/get_currentuserinfo . Just in case you want the full reference – I hadn’t really looked at it before and noticed we used different variables and wondered why and thought you might be interested too. 🙂
<?php if ( is_user_logged_in() ) { ?> <span class="break-me"> Welcome, <?php global $user_identity; get_currentuserinfo(); printf('%s', $user_identity); ?>! </span> <span class="break-me"> <a href="<?php echo wp_logout_url( get_permalink() ); ?>" title="Logout">Log out?</a> • <a href="<?php echo bbp_get_user_profile_url(get_current_user_id()); ?>" name="Your profile and posts">Your profile</a> </span> <?php } ?>April 19, 2014 at 8:04 am #145209In reply to: Register / Login or Username
Sascha.H
ParticipantWell this is now my solution. Seems ok
<?php if ( ! is_user_logged_in() ) { wp_nav_menu( array( 'theme_location' => 'Register or Login' ) ); } else { global $current_user; get_currentuserinfo(); $current_user->user_login; echo "Logged in as: ";?> <a href="<?php echo get_edit_user_link(); ?>"> <?php echo $current_user->user_login; ?> </a> <?php } ?>April 18, 2014 at 2:45 pm #145204In reply to: edit on the Front-end doesn't work anymore
bustel
ParticipantAfter a long search I found a solution for my problem…
instead of:
$uri = bbp_get_reply_edit_url( $r['id'] );
set:
$uri = $_SERVER['REQUEST_URI'].( '/../../../give-reaction/' . $r['id'] . '?edit=1' );
on line: 1923April 18, 2014 at 2:05 pm #145202In reply to: edit on the Front-end doesn't work anymore
bustel
ParticipantAnd if i set it to:
$uri = ( '?edit=1' );
then I get the topic to change and not the reply….April 18, 2014 at 2:02 pm #145201In reply to: edit on the Front-end doesn't work anymore
bustel
ParticipantIt works for the topics but not for the replies, I don’t know why it doesn’t work…
I have tested with
1)
$uri = ( '/?edit=1' );
in the topic: http://www.mysite.com/?edit=1
it isn’t correct
it go to the home of the site, that’s it.2)
$uri = bbp_get_reply_edit_url( $r['id'] ) . '?edit=1';
in the topic: http://www.mysite.com/map/map/1827/edit/?edit=1
and it isn’t correct eather…
it says: The page you requested could not be found.April 18, 2014 at 8:06 am #145189In reply to: How do I add timestamp to posts within a topic?
Majijiboo
ParticipantThanks for responding. I made the below code and unfortunately didn’t work. When you have time in a week or 2, would love to know what went wrong. Thanks.
function post_time ( $output) { $output = preg_replace( '/, .*[^ago]/', ' ', $output ); echo $output; } add_action ('bbp_theme_before_reply_content', 'post_time') ;April 18, 2014 at 3:01 am #145185In reply to: change forum sidebar
April 18, 2014 at 2:59 am #145184In reply to: How do I add timestamp to posts within a topic?
Robin W
Moderatorbasically you’d need to cut some code to display the date/time, put it in a function that echo’s it, and then hook it to the following action
add_action (‘bbp_theme_before_reply_content’, ‘your_function’) ;
see
sorry am up to my armpits in other code, or I’d cut it for you !
April 17, 2014 at 4:13 pm #145174In reply to: Basic syntax question for items like this <
Robin W
Moderatorshould read
<p><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>edit" >Amend Profile/Change password</a></p>sorry, wordpress tends to not like code, and keeps trying to edit it !
have amended the codex !
April 17, 2014 at 3:53 pm #145172In reply to: edit on the Front-end doesn't work anymore
bustel
ParticipantDo the same thing for:
edit function: bbp-reply-edit-link
in the file: wp-content/plugins/bbpress/includes/replies/template.phpon line 1922
// Get uri // $uri = bbp_get_reply_edit_url( $r['id'] ); $uri = ( '?edit=1' );April 17, 2014 at 3:45 pm #145171In reply to: edit on the Front-end doesn't work anymore
bustel
Participant// Get uri // $uri = bbp_get_topic_edit_url( $r['id'] ); $uri = ( '?edit=1' );April 17, 2014 at 1:44 pm #145168Topic: Basic syntax question for items like this <
in forum TroubleshootingMajijiboo
ParticipantIs the syntax for this
<a href=""<?php">edit" >Amend Profile/Change password</a>suppose to be this<a href="&"<?php">edit">Amend Profile/Change password</a>? Thanks.April 17, 2014 at 11:28 am #145163Halo Diehard
Participant@foxden-vixen That’s awesome you figured it out! Often it is hit and miss for me too.
I use FireFox FireBug and right-click, “Inspect Element” anywhere on a webpage and it tells me what that element is called. The “Read More” element on your page is called a.readmore and the ‘display none’ css should work for that. Maybe:
.forum-archive a.readmore { display: none; }I should encourage you to start a new thread for topics that don’t go with the topic you are in, though 🙂
April 17, 2014 at 10:42 am #145161In reply to: creating a child-theme
Robin W
Moderatorwhich parts of the plugin do you want to re-write?
You will always be prompted for bbpress updates, so no code you write will be lost by mistake.
If it is templates that you want to alter, then copy only the ones you alter to
wp-content/your-theme/bbpress
see
https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum-part-3/ section 3of it’s functions, then you should change these using filters see
April 17, 2014 at 9:32 am #145160In reply to: creating a child-theme
Sascha.H
ParticipantWell the problem isnt that i cant install it. Actually i had installed both plugins but i dont want to rewrite the plugin code because when the plugins will be updated my code will be overwrited thats why i want a child-theme but i dont know which parts from the plugin in which folder.
1. Thank you
2. The Problem is the basic URL is http://www.myurl.de/forums/forum/test and when i disable the thickbox its http://www.myurl.de/forum/test. But i want zero tags before. And when i delete the forum field and save than it appears again.April 17, 2014 at 9:00 am #145157foxden-vixen
BlockedThe site is back up today and I tested it out. It did not work the way you wrote the code.
.forum-archive DIV.sidebar.right, .bbpress .single-forum DIV.sidebar.right, .bbpress .single-topic DIV.sidebar.right { display: none !important; }should be
.forum-archive DIV.sidebar.right, .bbpress.single-forum DIV.sidebar.right, .bbpress.single-topic DIV.sidebar.right { display: none !important; }Just taking out the spaces between bbpress and single worked. The syntax was incorrect.
One other stupid question…at the bottom of the main page, which I guess now is called the archive page, there is the “read more” tag. How do I get rid of that? Doesn’t that have to do with the loop?
April 17, 2014 at 8:40 am #145155In reply to: Full Width for bbpress forums root page
Robin W
Moderatorfind your themes full width page template and then follow the instructions below to get bbpress to use it
-
AuthorSearch Results