Search Results for 'code'
-
AuthorSearch Results
-
September 20, 2015 at 10:34 am #166915
In 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; }September 18, 2015 at 2:45 pm #166865In reply to: How to add user profile link to specific menu?
Robkk
ModeratorYou find this in your theme, most likely in the functions.php file, but it could be different depending on the theme. You would spot by the register nav menu function like what is listed in this page.
https://codex.wordpress.org/Function_Reference/register_nav_menus
If you have a free theme I could check it out and get the arguments you need.
If not there may be some arguments like menu slug that could help, but I need the name of the menu you are wanting to put the profile link in.
September 18, 2015 at 2:41 pm #166864In reply to: How to add user profile link to specific menu?
dayan89
ParticipantI’ve learned the code of theme locations tab and found the name of my top menu. It was “top-menu”

Now I have profile link in top menu. But how can I make it first item in menu, not last?
September 18, 2015 at 2:28 pm #166863In reply to: Results of the 2015 bbPress Survey
Robkk
ModeratorInteresting survey results!! I keep forgetting to comment my thoughts on this!!
I am surprised that theming bbPress is split between all three of the choices listed, I expected most people to rely on their custom built themes and theme compatibility of bbPress like last year. So it seems not just developers/knowledgeable coders know how to use bbPress with any theme.
I can see there is a small increase of developers creating sites with bbPress forums for others, but a decrease in users creating themes and plugins. So at least more developers are interested in bbPress, but I bet once the plugin and theme development guides are finally up, that there will be an increase in plugin and theme development.
There is an increase in multisite usage of bbPress, which is good to see.
I believe Gaming, Academic, and Music site types could possibly use an increase in site types using bbPress.
Users contributing to bbPress has seem to have lowered quite a bit, which is not good. Hopefully there are a few things that can change that. People are joining slack though, so there is that.
Desktop and Laptop is being mostly used by users, while they seem to want a better mobile experience. I will keep that definitely in mind as times are changing, and people browse while on mobile more than in the past.
I am surprised unread replies and quotes have dropped a tad for being a requested feature, but there are some great plugins that can add that functionality.
People want bbPress topics to replace WordPress comments more than ever.
There is a lot more positive feedback on the comments left in the survey listed at the very bottom on this. Which is very good. I also think these comments are one of the most important parts to pay attention to of the survey.
http://mercime.github.io/bbPress-2015-survey-results/
@mercime thanks for doing a wonderful job with the survey. 🙂September 18, 2015 at 2:09 pm #166860In reply to: Change meta/page title for user pages
project_subdomain
Participanttested commenting out above part several times which gave me correct titles and wrong titles when active. Did a systematic check then by deactivating plugins one after one and custom codes one after one and reversed, also refreshed the page title via backend (no caching in use). Nothing found to make the titles correct except commenting out above part.
I cannot reproduce it as well.September 18, 2015 at 1:48 pm #166859In reply to: Move Sticky Topic to Original Date?
Robkk
ModeratorHmm, the repair tools should have fixed it. There is even a repair tool named
Recalculate the sticky relationship of each topic
There is not really a setting for sticky topics, it is basically a post status similar to sticky posts in WordPress. The query for topics just displays sticky posts first then the rest of the topics after that.
Did you sort the topics differently by using a code snippet from this website, like sort topics by date or something different??
September 18, 2015 at 1:28 pm #166853In reply to: Forum notification extract
Robkk
ModeratorI think this plugin will allow you to customize how the notifications look in Settings > Forums. There might be shortcodes to change the content to use excerpt instead.
https://wordpress.org/plugins/bbpress-custom-reply-notifications/
September 18, 2015 at 12:56 pm #166848In reply to: Change from Mingle Forum
@mercime
Moderator@yolandal backup database and files, then check out the Mingle Forum importer https://codex.bbpress.org/getting-started/importing-data/import-forums/
September 18, 2015 at 12:49 pm #166846In reply to: Highlighting the author’s first reply to a topic.
Karthikeyan KC
Participant -
AuthorSearch Results