Search Results for 'code'
-
Search Results
-
Hi everybody!
I have users from several places in our service. That means there are also several bbpress- forums in use.
I am looking for a short code which shows the forums where a user has joined. Do you have any idea? That information is available on the Buddypress profile, but it needs some clicking and our users are frustrated.
It would be nice to place the short code on sidebar so users can go directly to the forum without clicking hassle 🙂
Thanks you in advance, bbpress is dynamite 🙂
Topic: CSS styling query
Hi
I have some queries and I wonder if you can help me get to the bottom of them. I would be grateful for your guidance. Here is the background.
I am using the latest bbPress plugin and I notice that the bbpress.css file is 1702 lines long.
I am using a premium theme (seos-video-premium) and even though I am using a child theme, I have noticed that my Support forum is actually using:
wp-content/themes/seos-video-premium/seos-video-premium/css/bbpress.css
I assume this is because there is no bbpress.css in my child theme css folder so it uses the themes one instead of the bbPress plugin’s one?
So I have two specific questions here.
1/ the bbpress.css file in the premium theme folder is actually 1408 lines of code. So it is 300+ lines shorter than the plugin version. To be honest, I was not expecting to find a bbpress.css file inside the theme. So what am I supposed to do? Simply replace the theme version with your plugin version?
2/ I have been trying to use a beta version of EnlighterJS Plugin (it is their beta that uses EnlighterJS v3. There was an issue with these styles:
#bbpress-forums div.bbp-topic-content pre, #bbpress-forums div.bbp-reply-content pre { display: block; line-height: 18px; margin: 0 0 24px; padding: 5px 10px; white-space: pre; overflow: auto; }
In their classes they have this styling:
.enlighter-default .enlighter-raw { display: none; min-width: 100%; line-height: inherit; font-size: 12px; font-family: inherit; margin: 0; padding: 0; white-space: pre-wrap; word-wrap: break-word; border: none; box-shadow: none; }
The HTML is:
<pre class="enlighter-raw">.textMaterial { /* Uncomment to hide the material */ /* display:none;*/ font-size: 10pt; font-style: italic; font-weight: 700; background-color: yellow; } .textMethod { /* Uncomment to hide the method */ /* display:none;*/ font-size: 10pt; font-style: italic; font-weight: 700; background-color: cyan; }</pre>
Notice that ttheir CSS style uses
display: none;
? The bbpress CSS filepre
class has adisplay:block;
. This causes a problem with the plugin I am trying to use.The author does not want to use
!important
because he says it is bad design. So how do we fix this? How can we allow bbpress to do what it wants withpre
and EnlighterJS do what it wants?I needed to restrict participant topic creation to selected forums but allow replies to all topics in all forums. I came up with this solution
function my_bbp_restrict_topic_creation( $can ) { $forum_id = array(18,22,56); //change your forum id if ( ! bbp_is_user_keymaster() && bbp_is_single_forum() && !in_array( bbp_get_forum_id(),$forum_id) ) { $can = false; } return $can; } add_filter( 'bbp_current_user_can_publish_topics', 'my_bbp_restrict_topic_creation' );
Participants can only create topics in the three forums with IDs 18,22,and 56. Whereas the KeyMaster can create topics in all forums.
Topic: bbPress and redirect_to
I have two websites running custom php to create Log In/Log Out entries on the menu.
The Log Out behavior is different on the two websites. I finally tracked down the problem to bbPress. The URL created by my custom code with w_logout_url() on the bbPress site includes:
&redirect_to=…where the URL created by the site without bbPress installed does not.
Disabling bbPpress removes the &redirect_to=… and reenabling bbPress makes the redirect_to return.
That leads me to believe bbPress is changing /setting this value somewhere, but I don’t see any choice to change that value in the bbPress settings?
add_filter( 'wp_nav_menu_items', 'ccc_add_loginout_link', 10, 2 ); function ccc_add_loginout_link( $items, $args ) { if (is_user_logged_in() && $args->theme_location == 'header-menu') { $items .= '<li><a href="'. wp_logout_url() .'">Log Out</a></li>'; } elseif (!is_user_logged_in() && $args->theme_location == 'header-menu') { $items .= '<li><a href="'. site_url('wpflogin') .'">Log In</a></li>'; } return $items; }
Thanks!!
Hi,
I don’t understand why it’s shown the pagination in user profile page.
I’m refering to this page: https://www.make4future.com/forums/users/giovanni/I was thinking of hiding it with css for example:
.pagination { display:none; }
But the question is:
what is it caused by ?
There is a better way to resolve the problem ?Thanks in advance !
Regards,
Giovanni.