Forum Replies Created
-
In reply to: i ask theme ?
and where did you get the pic from?
no problem !
It was quicker to code it than describe it.
Basically I’ve created a new widget called (rew) Login Widget
Copy all the below into your functions file
You’ll see that all it required was taking out the label, and putting ‘placeholder’ into the input line
I even changed lost password into forgot your password !
The go into widgets and you’ll see the new widget (rew) Login Widget
enjoy !
class Rew_Login_Widget extends WP_Widget { /** * bbPress Login Widget * * Registers the login widget * * @since bbPress (r2827) * * @uses apply_filters() Calls 'bbp_login_widget_options' with the * widget options */ public function __construct() { $widget_ops = apply_filters( 'rew_login_widget_options', array( 'classname' => 'bbp_widget_login', 'description' => __( 'A simple login form with optional links to sign-up and lost password pages.', 'bbpress' ) ) ); parent::__construct( false, __( '(rew) Login Widget', 'bbpress' ), $widget_ops ); } /** * Register the widget * * @since bbPress (r3389) * * @uses register_widget() */ public static function register_widget() { register_widget( 'Rew_Login_Widget' ); } /** * Displays the output, the login form * * @since bbPress (r2827) * * @param mixed $args Arguments * @param array $instance Instance * @uses apply_filters() Calls 'bbp_login_widget_title' with the title * @uses get_template_part() To get the login/logged in form */ public function widget( $args = array(), $instance = array() ) { // Get widget settings $settings = $this->parse_settings( $instance ); // Typical WordPress filter $settings['title'] = apply_filters( 'rew_widget_title', $settings['title'], $instance, $this->id_base ); // bbPress filters $settings['title'] = apply_filters( 'rew_login_widget_title', $settings['title'], $instance, $this->id_base ); $settings['register'] = apply_filters( 'rew_login_widget_register', $settings['register'], $instance, $this->id_base ); $settings['lostpass'] = apply_filters( 'rew_login_widget_lostpass', $settings['lostpass'], $instance, $this->id_base ); echo $args['before_widget']; if ( !empty( $settings['title'] ) ) { echo $args['before_title'] . $settings['title'] . $args['after_title']; } if ( !is_user_logged_in() ) : ?> <form method="post" action="<?php bbp_wp_login_action( array( 'context' => 'login_post' ) ); ?>" class="bbp-login-form"> <fieldset> <legend><?php _e( 'Log In', 'bbpress' ); ?></legend> <div class="bbp-username"> <input type="text" name="log" placeholder = "Username" value="<?php bbp_sanitize_val( 'user_login', 'text' ); ?>" size="20" id="user_login" tabindex="<?php bbp_tab_index(); ?>" /> </div> <div class="bbp-password"> <input type="password" name="pwd" placeholder = "Password" value="<?php bbp_sanitize_val( 'user_pass', 'password' ); ?>" size="20" id="user_pass" tabindex="<?php bbp_tab_index(); ?>" /> </div> <div class="bbp-remember-me"> <input type="checkbox" name="rememberme" value="forever" <?php checked( bbp_get_sanitize_val( 'rememberme', 'checkbox' ), true, true ); ?> id="rememberme" tabindex="<?php bbp_tab_index(); ?>" /> <label for="rememberme"><?php _e( 'Remember Me', 'bbpress' ); ?></label> </div> <div class="bbp-submit-wrapper"> <?php do_action( 'login_form' ); ?> <button type="submit" name="user-submit" id="user-submit" tabindex="<?php bbp_tab_index(); ?>" class="button submit user-submit"><?php _e( 'Log In', 'bbpress' ); ?></button> <?php bbp_user_login_fields(); ?> </div> <?php if ( !empty( $settings['register'] ) || !empty( $settings['lostpass'] ) ) : ?> <div class="bbp-login-links"> <?php if ( !empty( $settings['register'] ) ) : ?> <a href="<?php echo esc_url( $settings['register'] ); ?>" title="<?php esc_attr_e( 'Register', 'bbpress' ); ?>" class="bbp-register-link"><?php _e( 'Register', 'bbpress' ); ?></a> <?php endif; ?> <?php if ( !empty( $settings['lostpass'] ) ) : ?> <a href="<?php echo esc_url( $settings['lostpass'] ); ?>" title="<?php esc_attr_e( 'Forgot Your Password', 'bbpress' ); ?>" class="bbp-lostpass-link"><?php _e( 'Forgot Your Password', 'bbpress' ); ?></a> <?php endif; ?> </div> <?php endif; ?> </fieldset> </form> <?php else : ?> <div class="bbp-logged-in"> <a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>" class="submit user-submit"><?php echo get_avatar( bbp_get_current_user_id(), '40' ); ?></a> <h4><?php bbp_user_profile_link( bbp_get_current_user_id() ); ?></h4> <?php bbp_logout_link(); ?> </div> <?php endif; echo $args['after_widget']; } /** * Update the login widget options * * @since bbPress (r2827) * * @param array $new_instance The new instance options * @param array $old_instance The old instance options */ public function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags( $new_instance['title'] ); $instance['register'] = esc_url_raw( $new_instance['register'] ); $instance['lostpass'] = esc_url_raw( $new_instance['lostpass'] ); return $instance; } /** * Output the login widget options form * * @since bbPress (r2827) * * @param $instance Instance * @uses BBP_Login_Widget::get_field_id() To output the field id * @uses BBP_Login_Widget::get_field_name() To output the field name */ public function form( $instance = array() ) { // Get widget settings $settings = $this->parse_settings( $instance ); ?> <p> <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" /></label> </p> <p> <label for="<?php echo $this->get_field_id( 'register' ); ?>"><?php _e( 'Register URI:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'register' ); ?>" name="<?php echo $this->get_field_name( 'register' ); ?>" type="text" value="<?php echo esc_url( $settings['register'] ); ?>" /></label> </p> <p> <label for="<?php echo $this->get_field_id( 'lostpass' ); ?>"><?php _e( 'Lost Password URI:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'lostpass' ); ?>" name="<?php echo $this->get_field_name( 'lostpass' ); ?>" type="text" value="<?php echo esc_url( $settings['lostpass'] ); ?>" /></label> </p> <?php } /** * Merge the widget settings into defaults array. * * @since bbPress (r4802) * * @param $instance Instance * @uses bbp_parse_args() To merge widget settings into defaults */ public function parse_settings( $instance = array() ) { return bbp_parse_args( $instance, array( 'title' => '', 'register' => '', 'lostpass' => '' ), 'login_widget_settings' ); } } add_action( 'widgets_init', function(){ register_widget( 'Rew_Login_Widget' ); });In reply to: Custom Roles & Capabilitieswill be at least tomorrow evening before I look at again, but the code does seem to work on my test stite with twenty ten, although I don’t know why it didn’t immediately !
In reply to: Moving Forums Root to sub pageBut when I do that, the the breadcrumbs no longer work.
//69.195.124.253/~ctwocndo/wp-content/uploads/2015/02/brokenBreadcrumb.jpg
(I am sure the “Forums” in this image are truly the “connect/forum”)ok if you click that breadcrumb – I mean the forums bit, where does it go?
If to forums, then we just need to add a breadcrumb before it to go to the connect page
If not where does it go?
Come back with that answer
ok, no easy filters, are you ok at coding, ie getting some code and amending it. If so i’ll come back with more info
In reply to: Custom Roles & CapabilitiesCome back if you rae still having problems tomorrow, but the code you posted works with bbpress !
In reply to: Custom Roles & Capabilitiesok, not sure why, but my code is now working without me changing, but I did shutdown all browsers and reload from scratch and that seemed to fix.
I can now change role capabilities at will, but initially like you the changes did not take effect.
by the by if you have several sessions in one browser they will take capabiliites of another session, so have you admin in say IE and your user you are testing in say Chrome !
In reply to: Custom Roles & Capabilitiesit may be just me, it’s getting late but yes I can change the user to member, but it’s not altering the capabilites, I switched everything to false and I can still edit, but as I say it’s late and I’m probably not doing something right – I’ll take another look tomorrow.
Also you’re using buddypress as well, does this give you the secondary roles you mention?
In reply to: Moving Forums Root to sub pageyes the damn spam filter on this site gets overly keen – not my site I’m just a helper here so can’t change that.
two links or two images seems to be the limit – try that !
In reply to: Custom Roles & CapabilitiesHmmm.. I’ve just spent some time playing with this code, and it’s not really working.
It is quoted in lots of sites inc http://gawainlynch.com/customising-dynamic-roles-in-bbpress-2-2/
But as far as I can see you get the member role, but the site default role capabilities – can’t work out why at the moment. What is you site default, and would that make sense?
In reply to: Custom Roles & Capabilitieswhat other plugins do you have?
In reply to: i ask theme ?I don’t know what your question is, please state it more clearly
In reply to: Forum WidthIn reply to: How to add custom colors for each Role ?Sorry, using css don’t know how to do that. As before it would I think involve a rewrite of the function bbp_reply_author_link
And lastly, how to modify the css so that I can display the role as its displayed here on this website, ie., role covered in a box.
just add
background-color : green ;
to your
#bbpress-forums div.bbp-forum-author .bbp-author-role-admin, #bbpress-forums div.bbp-topic-author .bbp-author-role-admin, #bbpress-forums div.bbp-reply-author .bbp-author-role-admin { etccode above
In reply to: Import ForumsNo bbpress doesn’t need these, so if you have a backup of them, then yes they can be deleted.
ok, there’s a conflict there between something
what theme and other plugins are you running?
In reply to: Moving Forums Root to sub pageYou’d be filtering the function
bbp_get_breadcrumb
in
bbpress\includes\common\template.php
to put an extra link in
In reply to: Moving Forums Root to sub pageI have to confess that I’m not quite sure what you are trying to achieve?
Is it just to have another page in the breadcrumb flow
In reply to: Log In ProblemsEmails not working can be caused by many factors. Try working through the following :
Spam filters
You should be aware that many spam filters strip messages that do not come from the correct address. So if your site is mysite.com and your email address in wordpress settings>general is fred@gmail.com then it is likely that messages will be dumped in transit. You need to set up email to come from your site egfred@mysite.com, your hosting provider can help if needed.
Host Provider
Talk to your host provider about why emails are being strippedIn reply to: Add content under threads?no it can be done by this
so
create a post (you’ll delete this after, this is just temporary) and put what you want in the content, including nay images, and get it looking like you want it. you can’t have any single quotes (‘) but can have double quotes (“).
Then switch to ‘text’ view – top right of the content box. This will take you into html mode, and the ‘code’ we need will be there.
Copy all this code into the $content = bit in the code above. It must have a ‘ at either end, and a ; at the end so you will end up with
$content = ‘ whatever the text you copied is in here ‘ ;
then save and upload, and delete the post when you are happy it works.
Come back if any of that doesn’t work, and if you do and are happy to make it public let me know what you have pasted in there so I can make sure it’s right
In reply to: Forum WidthThat link works, so not sure why you are not able to access it
Another route to this
Click Documentation above
scroll down until you find
‘Functions files and child themes – explained! ‘ and click@crystalleeanne that might be difficult, as the textarea is only acted on upon submitting the form.
Can you explain what you are trying to achieve
That’s interesting, no it should show all the time.
Can you check that activating / disabling makes it appear/disappear?
In reply to: Log In ProblemsTry https://wordpress.org/plugins/check-email/
to see if your email is working