Search Results for 'code'
-
AuthorSearch Results
-
September 22, 2015 at 7:53 am #166953
In reply to: CSS Questions – Borders and Width
aaron2310
ParticipantThanks for the reply Robkk.
#bbpress-forums li.bbp-header,
#bbpress-forums li.bbp-footer {
border-top: 1px solid #eee;
}#bbpress-forums li.bbp-body ul.forum,
#bbpress-forums li.bbp-body ul.topic {
border-top: 1px solid #eee;
}I’ve changed the hex code and added it to my style sheet but it doesn’t seem to be working. Do I want to edit the actual bbpress style directly?
Second question is tough for me to try to find what is causing the issue.
DId you do anything to make /forums page any different from your other pages??
Nope. It’s the same theme.
September 22, 2015 at 7:49 am #166952In reply to: CSS Questions – Borders and Width
Robkk
ModeratorI think these are the borders the plugin is missing the ability to customize.
#bbpress-forums li.bbp-header, #bbpress-forums li.bbp-footer { border-top: 1px solid #eee; } #bbpress-forums li.bbp-body ul.forum, #bbpress-forums li.bbp-body ul.topic { border-top: 1px solid #eee; }Second question is tough for me to try to find what is causing the issue.
DId you do anything to make /forums page any different from your other pages??
September 21, 2015 at 5:11 pm #166941In reply to: Profanity filter
Robkk
ModeratorI do not use the plugin, I just found it in the WordPress repository.
The plugin author has been active in the support forums in the past few weeks, so I assume people are using it still and with at least most with the latest version of WordPress.
You can contact the plugin author in their support forums if you have any concerns with the plugin working with the latest version of WordPress.
If a bbPress post contains a word that you put in the comment blacklist, the topic or reply will be marked as pending, and will be pending until moderation approval.
The plugin I linked to just replaces profanity words you list with characters such as ***
September 21, 2015 at 3:17 pm #166939In reply to: Some startup help in designing my own theme?
Robkk
ModeratorWhich one did you link me?
Robin’s plugin for just bbPress fields.
What I did, which seems to work fine for now…
Yeah I told you the WordPress code would work. If you want cleaner templates you may nee to use the hook.
bbp_theme_after_reply_author_detailsI might be saying very stupid things here (gotta learn some way), but I tried changing bbp_theme_before_topic_title to bbp_topic_class which is what my inexperienced self thought would do the trick, but it didn’t.
Oh, you are trying to make a post class. You can try this to see if it adds a new-topic post class to any new topics. I haven’t tested this though.
add_filter( 'bbp_get_topic_class','rkk_unread_topic' ); function rkk_unread_topic($classes) { $offset = 60*60*1; if ( get_post_time() > date('U') - $offset ) { $classes[] = 'new-topic'; return $classes; } }September 21, 2015 at 3:06 pm #166938In reply to: Html tags showing up in topics & replies
Robkk
ModeratorDoes it actually print the paragraph tags??
This is for any new topic/reply right??
You might possibly see if this is a plugin issue, maybe something that modifies Tinymce somehow?
You can also check to see if it is a theme issue also, or a possible code snippet in a child theme.September 21, 2015 at 9:11 am #166932In reply to: Phpbb imort
Stephen Edgar
KeymasterSounds like the issue I’ve got documented on the codex here:
September 20, 2015 at 10:59 am #166917In reply to: Some startup help in designing my own theme?
tkse
ParticipantThere is a plugin Robin made that can basically do that. There is also a different plugin for displaying BuddyPress profile fields
Which one did you link me? What I did, which seems to work fine for now is simply check for the_author_meta and display it if there’s anything there. I placed it within loop-single-reply.php without issues.
<div class="bbp-reply-author"> <?php do_action( 'bbp_theme_before_reply_author_details' ); ?> <?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?> <?php if ( bbp_is_user_keymaster() ) : ?> <?php do_action( 'bbp_theme_before_reply_author_admin_details' ); ?> <div class="bbp-reply-ip"><?php bbp_author_ip( bbp_get_reply_id() ); ?></div> <?php do_action( 'bbp_theme_after_reply_author_admin_details' ); ?> <?php endif; ?> <?php do_action( 'bbp_theme_after_reply_author_details' ); ?> <?php if(get_the_author_meta('twitter')): ?> <p>Twitter: <?php the_author_meta('twitter'); ?></p> <?php else: // do nothing endif; ?> </div><!-- .bbp-reply-author -->Yeah you do not have to leave the [status] and just leave the classes there so you can style with just CSS.
I can’t completely grasp what you’re saying here. Say if I wanna add the class “new-topic” instead of a “new” label. What would I change here?
function rk_new_topics() { $offset = 60*60*1; if ( get_post_time() > date('U') - $offset ) echo '<span class="new">[New]</span>'; } add_action( 'bbp_theme_before_topic_title', 'rk_new_topics' );I might be saying very stupid things here (gotta learn some way), but I tried changing bbp_theme_before_topic_title to bbp_topic_class which is what my inexperienced self thought would do the trick, but it didn’t.
September 20, 2015 at 10:58 am #166916In reply to: Set featured image for bbpress forum posts
yoshimitsu1234
ParticipantI tried various permutations and combinations. Following codes worked for me.
add_theme_support( 'post-thumbnails', array( 'post', 'forum', 'topic' ) ); add_post_type_support('post', 'thumbnail'); add_post_type_support('forum', 'thumbnail'); add_post_type_support('topic', 'thumbnail');September 20, 2015 at 10:34 am #166915In reply to: Some startup help in designing my own theme?
Robkk
ModeratorThe custom profile fields, what exactly do they do? I get that I can now add my Twitter handle from profile settings, but it’s not displayed anywhere on the site.
Yeah you have to manually place the any extra fields you want on the frontend of the user profile and and place the code in the template user-profile.php, that should be in your child theme for easy customization.
in user-profile.php you will already see an example of the user’s description field being displayed, and you would need to do some of the same procedure.
<?php if ( bbp_get_displayed_user_field( 'twitter' ) ) : ?> <p class="bbp-user-twitter"> <a href="<?php bbp_displayed_user_field( 'twitter' ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?>'s Twitter" rel="nofollow"> <?php bbp_displayed_user_field( 'twitter' ); ?> </a> </p> <?php endif; ?>I will probably put an example for user’s to place the links on their profile templates later on that guide.
I would love for it to be displayed beneath my avatar and username phpBB-style in topics, or at least on my visible forum profile.
Yep, there is a way to that too. I can’t remember much but I think it just involves a hook to place the data. There is a plugin Robin made that can basically do that. There is also a different plugin for displaying BuddyPress profile fields. You can dig around the plugins code if you want to see how he did it.
https://wordpress.org/plugins/bbp-profile-information/
This doable? Obviously I can’t use the_author_meta() in bbpress, so…
I think it is possible to just use the WordPress code with bbPress. bbPress is just a plugin of WordPress now.
Also, instead of adding labels to certain topics. Can I add classes so I can do changes in CSS?
Yeah you do not have to leave the [status] and just leave the classes there so you can style with just CSS.
September 20, 2015 at 9:11 am #166911In reply to: Some startup help in designing my own theme?
tkse
ParticipantThis works nicely. Sorry to bug you so much.
The custom profile fields, what exactly do they do? I get that I can now add my Twitter handle from profile settings, but it’s not displayed anywhere on the site. I would love for it to be displayed beneath my avatar and username phpBB-style in topics, or at least on my visible forum profile. This doable? Obviously I can’t use the_author_meta() in bbpress, so…
Also, instead of adding labels to certain topics. Can I add classes so I can do changes in CSS?
Thanks! 🙂
September 19, 2015 at 10:36 pm #166907In reply to: Few questions about BBPress
Robkk
ModeratorPretty permalinks should work fine in bbPress if you have set up the permalinks to use the post name structure in Settings > Permalinks.
https://codex.wordpress.org/Settings_Permalinks_Screen
I don’t think it would be a step backwards, I am not sure all that the vbSEO plugin did SEO wise, but I bet there is a WordPress plugin that works fine with bbPress.
There are two different vBull converters, vBulletin and vBulletin3. The last one is what you would want to use.
September 19, 2015 at 10:22 pm #166906In reply to: Right align the top menu items
Robkk
ModeratorNot really a bbPress related question, but use this.
ul#menu-secondary-menu { float: right; }Make sure to keep it bbPress related next time.
September 19, 2015 at 10:19 pm #166905In reply to: Facebook Meta Data
Robkk
ModeratorIt might be that bbPress does not have support for featured images, and the SEO plugins pull from the featured images.
I think you are the first to mention a feature request for a fallback image in bbPress.
There have been users that were suggesting a possibility for featured images for forums for forum thumbnails/icons. There is a neat little piece of code to that here.
http://www.kristarella.com/2013/04/bbpress-forum-icons/
There might be a way to get the forums featured image to and I guess set it as the child posts (topic) featured image, but right now I am not sure how to do that right now.
September 19, 2015 at 9:02 pm #166903In reply to: Adding design to page
Robkk
ModeratorI am not sure using Visual composer, but since bbPress has dynamic pages and not static WordPress pages, I am not sure a page builder will help much.
If you have a custom bbpress.php file in your theme you can add a banner to all bbPress pages or just the ones of your choice with some conditionals.
If you are adding the banners using a shortcode you can echo the shortcode like this.
<?php echo do_shortcode("[shortcode]"); ?>Just make sure to edit the bbpress.php file in your child theme and place the shortcode in the template.
September 19, 2015 at 8:46 pm #166901In reply to: Participant profile photos
Robkk
ModeratorI guess double check and make sure the email is the same.
https://en.gravatar.com/support/gravatar-locations/
You can also try and see if a plugin/theme is causing the issue.
September 19, 2015 at 2:08 pm #166895In reply to: Participant profile photos
Robkk
ModeratorThis guide should be helpful.
September 19, 2015 at 2:06 pm #166894In reply to: How to add user profile link to specific menu?
Robkk
ModeratorI am sure the profile menu link has a class in it that you can find in the source code using the dev tools, and from there you can just float it to the left with CSS.
something like
.class { float: left; }September 19, 2015 at 2:03 pm #166893In reply to: css advice needed for forum posts on mobile device
Robkk
ModeratorGive me a minute to finish creating some trac tickets for a mobile layout in bbPress. I am trying not to include everything one single trac ticket.
The mobile layout I was working on long ago was never really that great from what I can see now. It does take some points from other forum software though, but in just some areas it didn’t stay tidy well enough without causing a mess at 320px.
Just a sidenote this topic from what I can tell, the user I think enabled threaded replies which doesn’t have a responsive styles in the bbpress plugin. And what is already there for responsive styles for the replies do not work because of some markup bug caused by the threaded replies feature and possibly its walker code.
September 19, 2015 at 10:08 am #166881Topic: Adding design to page
in forum Troubleshootingsbskamey
ParticipantHi support,
I would like to add a banner design to the bottom of my topics and replies pages, but I’m not sure how I do this? What WordPress page do I use?
I am using Visual Composer.
http://sincebeingsingle.com/forums/forum/relationships/
I have done this with the main forum index page using the shortcode:
http://sincebeingsingle.com/insight/
Any help would be great!
Thanks,
KamSeptember 19, 2015 at 9:21 am #1668808ball106
ParticipantHello!
Here’s what I’m trying to achieve..
When user is logged in, I want to display topic activity from all forums user is subscribed to. I can live without paginated pages, so it can be for example, 10 recently active topics from all subscribed forums.
With this I can get a list of user subscribed forums:
$current_user = wp_get_current_user(); if ( bbp_get_user_forum_subscriptions( $current_user->ID ) ) { bbp_get_template_part( 'loop', 'forums' ); }So how to query recently active topics from currently logged in user subscibed forums?
I hope somebody can help me out with this. Thank you!
September 19, 2015 at 8:43 am #166879In reply to: Some startup help in designing my own theme?
tkse
ParticipantHere is a code snippet that will do what you are looking for though.
This gives me the 5 most recent topics in single-forum as well, not just the forum index/home page of the forum. I tried working around it, and also directly solve the problem but with no luck.
September 18, 2015 at 4:27 pm #166869In reply to: How to add user profile link to specific menu?
Robkk
ModeratorThe code I just gave you is not the same. I changed the theme location from primary to top menu. Did you try it??
If you link me to your site and use the code you just posted, I can probably make it where the profile link only shows on the top menu using CSS.
September 18, 2015 at 4:10 pm #166868Topic: Replacing “Freshness’ string for subforum loop
in forum TroubleshootingKarthikeyan KC
ParticipantI’ve successfully replaced the ‘freshness’ string to ‘last post’ for my forum index. I copied the
loop-forums.phptemplate and tweaked it so. The issue now is that it won’t work for the ‘sub forum’ index. I’m kinda tired after opening all the templates. Could anyone here tell me the template path for the ‘sub forum’ loop?September 18, 2015 at 4:03 pm #166867In reply to: How to add user profile link to specific menu?
dayan89
ParticipantI didn’t get. It’s same code you gave me above.
Can you please modify following code. This worked out for me before, but it added two links, to primary and to top-menu.
add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' ); function my_nav_menu_profile_link($menu) { if (!is_user_logged_in()) return $menu; else $current_user = wp_get_current_user(); $user=$current_user->user_nicename ; $profilelink = '<li><a href="/forum/profile/' . $user . '">Мой профиль</a></li>'; $menu = $profilelink . $menu; return $menu;September 18, 2015 at 2:56 pm #166866In reply to: How to add user profile link to specific menu?
Robkk
ModeratorTry this.
add_filter('wp_nav_menu_items','rk_bbp_menu_profile_link', 10, 2); function rk_bbp_menu_profile_link( $items, $args ) { if( is_user_logged_in() && $args->theme_location == 'top-menu') { $current_user = wp_get_current_user(); $user = $current_user->user_nicename; $profilelink = '<a href="/forums/users/' . $user . '/">Your Profile</a>'; $items .= '<li>' . $profilelink . '</li>'; } return $items; } -
AuthorSearch Results