Search Results for 'code'
-
AuthorSearch Results
-
April 10, 2016 at 7:22 pm #173948
In reply to: How to mark topic as featured?
Robkk
ModeratorWell not a bbPress specific plugin, but there are a few plugins that can work with custom post types (bbPress uses custom post types).
A plugin I found and tested is called NS Featured Posts, but like I said many other plugins could possibly work too.
After installing the plugin make sure to go to Settings > NS Featured Posts and make sure to add the topic custom post type from bbPress in the plugin’s settings.
Now we can go to Topics > All Topics and see a new column that says Featured. Make sure to click the checkbox near the topic you would want to feature.
Now we are going to make a custom view to display these featured topics in a topic list, and also be able to display them in pages with a shortcode.
Add this php code snippet into your child themes functions.php or insert this snippet into a custom plugin like functionality.
This function displays about 10 featured topics on a single page, change 10 to whatever you want.
function rkk_register_featured_view() { bbp_register_view( 'featured', __( 'Featured Topics' ), array( 'meta_key' => '_is_ns_featured_post', 'meta_value' => 'yes', 'posts_per_page' => '10', 'max_num_pages' => '1'), false ); } add_action( 'bbp_register_views', 'rkk_register_featured_view' );Now in a custom page or widget area that has a widget text area that can handle shortcodes, insert this shortcode.
[bbp-single-view id='featured']`April 10, 2016 at 6:53 am #173942In reply to: Regenerate BBPress post times
Pascal Casier
ModeratorIn MYSQL with phpmyadmin you would be able to do it. If you would need to add e.g. 4 hours, the idea would be :
WARNING: Backup your database before doing things
WARNING: This is just a starting point, not a real query to launch on your DBUPDATE poststable SET postfield = DATE_ADD(postfield, INTERVAL 4 HOURS) WHERE postfield < '2016-04-01 08:20:00';So in the WHERE you need to put the datestamp when you have done the timezone switch.
Pascal.
April 10, 2016 at 5:53 am #173938Pascal Casier
ModeratorHi,
You will have to go with{ position: relative ; top : 0px ; }Pascal.
April 9, 2016 at 3:00 pm #173923Valery Kondakoff
ParticipantThe issue seems to be related to ‘bbl-author-avatar’ class. But I still can not find any reasons, why avatar suddenly ‘jumps’ to the upper left on small screens…
The only (ugly) workaround I found until now is to hide avatars on the small screens:
@media screen and (max-width: 375px) { .bbp-author-avatar { display: none; } }Any other ideas? Thank you.
April 8, 2016 at 4:37 pm #173904In reply to: Overriding !important in bbPress CSS?
Robkk
ModeratorYou can put this bbPress default themes CSS from the plugin into a folder called css in your child theme and edit the css file to your liking.
April 8, 2016 at 12:16 pm #173899In reply to: Overriding !important in bbPress CSS?
Bet Hannon
ParticipantHi Pascal! Thanks for your quick reply!
Unfortunately, no — these forums are locked down to only approved users.
The CSS is in /plugins/bbpress/templates/default/css/bbpress.css, line 896:
/* =Stickies -------------------------------------------------------------- */ .bbp-topics-front ul.super-sticky, .bbp-topics ul.super-sticky, .bbp-topics ul.sticky, .bbp-forum-content ul.sticky { background-color: #ffffe0 !important; font-size: 1.1em; }I need to change that background color. But I’m not a CSS ninja, and I’m not sure how to override that !important from the default plugin CSS. This is when adding a 2nd !important to trump the first would be handy. 🙂
April 8, 2016 at 10:59 am #173895Pascal Casier
ModeratorHi, you see this message because your debug is on. This specific message is
not a reala minor issue, but it could mean you have somewhere access control issues.See https://codex.bbpress.org/bbp_setup_current_user/was-called-incorrectly/
Pascal.
April 8, 2016 at 10:55 am #173892Topic: Overriding !important in bbPress CSS?
in forum TroubleshootingBet Hannon
ParticipantI need to override the default CSS color for
.bbp-topics-front ul.super-sticky, .bbp-topics ul.super-sticky, .bbp-topics ul.sticky, .bbp-forum-content ul.stickyBut the default color declaration has an !important in it. What’s the best way to fix this so my color will display? I know I could hack the plugin CSS, but that’s not the best option. 🙂
April 8, 2016 at 2:36 am #173884In reply to: Importing Large Xenforo Forum
Stephen Edgar
KeymasterYeah, I’m actually thinking it might be best to require the user (me) to manually move the images directory from the old site to the new site. Then, maybe just use the xenForo URL to the image to display it in the post. It “should” be safe since xenForo reduced the images based on admin settings when they were originally uploaded. Just some random thoughts from a guy not looking at import code. 😉
I can add a “generic” that would change
[ATTACH=full]872[/ATTACH]togeneric URLhttps:/example.com/attachment/872, you could then manually change thehttps:/example.com/attachment/part of that to anything you want for examplehttp://surveyorconnect.com/attachments/` and have that folder on your server serve up the attachments from there?I’m wondering if https://bbpress.dev4press.com would actually cure some of the bbcode issues automatically.
We actually use a pretty comprehensive BBCode library already during import it converts a huge amount of common BBCode code to native HTML for us, I think you’d find there are only a handful of custom BBCode’s not covered by this library and is why I add them manually.
p.s. I haven’t packaged up a new release with the changes just yet, but you can always get the latest version (with the above updates) from:
https://bbpress.trac.wordpress.org/browser/trunk/src/includes/admin/converters/XenForo.php
At the bottom of that page is a link to download the file in “original format” and that will get you the file, the link is dynamic and changes each revision so that’s why no direct link.
April 7, 2016 at 2:58 pm #173877In reply to: Not showing topics and topic content
skilletin
ParticipantThanks for your reply!
I have already found a solution to one of the other topics there for the same problem. At fault was the code inside Function.php – the function who exclude pages from search results. I remove it and now everything working fine. Thanks!
April 7, 2016 at 12:40 pm #173873In reply to: Importing Large Xenforo Forum
Wendell
ParticipantI’m not quite sure what to do with attachments as bbPress import system does not yet support attachments ¯\_(ツ)_/¯
Yeah, I’m actually thinking it might be best to require the user (me) to manually move the images directory from the old site to the new site. Then, maybe just use the xenForo URL to the image to display it in the post. It “should” be safe since xenForo reduced the images based on admin settings when they were originally uploaded. Just some random thoughts from a guy not looking at import code. 😉
I’m wondering if https://bbpress.dev4press.com would actually cure some of the bbcode issues automatically.
Also I’ve added support for YouTube, Daily Motion and Vimeo BBCode conversion
Sweet!
I’ve added some styling to the quotes now, so it wraps that quotes in “blockquote” and cites the authors name, e.g “wendellh wrote:”
That’s perfect. The post and member numbers are really just useless information at that point anyway. I don’t see any real importance in providing the links back to the quoted posts either. I mean, it would be really cool, but not a big deal.
Ah, I didn’t know about these types of posts, I’ve now done this, for topics/threads replies/posts that were “soft deleted” these are now imported with bbPress/WordPress “pending” status.
Thank you!
April 7, 2016 at 10:46 am #173865In reply to: Forum Subscriber Notification
Pascal Casier
ModeratorOkay, next step (based on previous issues), in between every step, try the email sending:
– Disable the asynchronous plugin
– Switch to a default theme like Twenty Fourteen
– Make sure you have NO custom code that you added in your template or function.php that could blockPascal.
April 7, 2016 at 7:26 am #173860In reply to: Sub Forum List Style
Pascal Casier
ModeratorHi,
You probably better work on the li directly:#bbpress-forums .bbp-forums-list li { }Did you have a look at https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#1-change-how-the-forum-list-displays ?
If you need something more, please paste the link of the site here and explain what you are looking for.
Pascal.
April 7, 2016 at 6:17 am #173857In reply to: Importing Large Xenforo Forum
Stephen Edgar
KeymasterProbably the most noticeable issue after the import are the attachments. They are basically a number with opening and closing ATTACH bbcodes.
I’m not quite sure what to do with attachments as bbPress import system does not yet support attachments ¯\_(ツ)_/¯
I could add some code to “hide” the BBCode whilst still keeping it as a refernce?
Also I’ve added support for YouTube, Daily Motion and Vimeo BBCode conversion
Then there are the quotes to other posts. These simply just come in as text and the post IDs don’t match those in bbpress. In xenForo, the quoted posts link back to the post that was quoted.
I’ve added some styling to the quotes now, so it wraps that quotes in “blockquote” and cites the authors name, e.g “wendellh wrote:”
For now we can’t link to the quoted post, this is on my radar to do but requires some pretty big changes, maybe bbPress 2.8.
I’ve also noticed that soft deleted posts (only viewable by mods and admins) in xenForo are coming in as public posts.
Ah, I didn’t know about these types of posts, I’ve now done this, for topics/threads replies/posts that were “soft deleted” these are now imported with bbPress/WordPress “pending” status.
April 6, 2016 at 7:19 pm #173853Topic: Sub Forum List Style
in forum Troubleshootinggdelle
ParticipantIm trying to create a sub forum list style.
Ive tried the bbstyle plugin and the various codes I found searching here.
Only one to work at all was this. But its not what I want. The theme is Kleo with bbpress/buddypress.
.bbp-forum-info a.bbp-forum-link {
display: block;
}
April 6, 2016 at 7:07 pm #173852Robkk
ModeratorUse this CSS to remove the box shadow for links in bbPress.
#bbpress-forums a { box-shadow: none; }April 6, 2016 at 1:11 pm #173846Topic: Forum Subscriber Notification
in forum Troubleshootingmadflute
ParticipantHi, I am new to WP so appreciate your patience.
I need to have BBP subscribers notified of new forum/topic and/or replies but not sure how to make it work. I’d had thought the fact each Forum has “Subscribe” option made me think it would notify by email out of the box.
SMTP is working. In fact, bbPress Notify (No-Spam) works, but it sends out to hardcoded recipients, not subscribers who chose to subscribe specific Forum.
Added issue here is I have 2 private groups. So the notification really has to be subscribers choice per Forum.
WP4.4.2
BBP 2.5.8
So far I have
AsynCRONous bbPress Subscriptions 2.1
bbP Manage Subscriptions 1.2.0
bbP private groups 3.1.9
bbP Toolkit 1.0.6
bbPress Notify (No-Spam) 1.10
Better Notifications for WordPress 1.3.9.5
topic subscribe 1.0I understand the bbPress Notify has paid plugins to respect the private group and user opt-out, but this is a non-profit organization and everything is coming out of my pocket.
Hope someone could point me to a right direction. Here is the URL
http://jazztokyo.org/forums/
but you won’t see all the forums in the private groups.Thank you in advance.
P.S., yes it is reproducible with TwentySixteen.
-Hiro
April 6, 2016 at 12:41 pm #173845In reply to: I think I found a bug in bbp_topic_subscription_link
berkelmudez
Participant@tharsheblows I don’t know if it matters but just letting you know that your code fixed this for me! thanks!
April 6, 2016 at 12:04 pm #173842In reply to: Importing Large Xenforo Forum
Wendell
ParticipantHey Stephen,
I really appreciate your help! 🙂
Probably the most noticeable issue after the import are the attachments. They are basically a number with opening and closing ATTACH bbcodes. For example:
[ATTACH=full]872[/ATTACH]
In xenForo, this links to attachments/photo-jpg.872Then there are the quotes to other posts. These simply just come in as text and the post IDs don’t match those in bbpress. In xenForo, the quoted posts link back to the post that was quoted. For example, here is an imported post with a quote:
http://surveyorconnect.com/portal/index.php/forums/topic/july-2015-photo-submittal/#post-1647874
and here is the original post in xenForo:
http://surveyorconnect.com/threads/july-2015-photo-submittal.323039/#post-331560I’ve also noticed that soft deleted posts (only viewable by mods and admins) in xenForo are coming in as public posts.
I realize I may be asking for too much, but I figure it doesn’t hurt to ask. 😉 I do understand though if it’s just not possible. I’ll keep looking around for other bbcodes as well.
Thanks!
April 6, 2016 at 11:28 am #173841Valery Kondakoff
ParticipantPascal, thank you for helping me!
By misaligned I was meant that the avatars are not on the same line as the user name. Your code solves this issue:
img.avatar.avatar-14.photo { margin-bottom: 0px !important; display:inline; }There is a side-effect though: the avatar gets underlined if you use ‘display:inline;’. If there is a way to remove the underline? ‘text-decoration: none’ does not seems to work.
Here is a link to the test forum with your code applied: http://rugby-forum.ru/wp3/forums/forum/test-forum/
Thank you!
April 6, 2016 at 10:41 am #173839Pascal Casier
ModeratorAnd
display:inline;
will show on 1 line… all depends what you want.April 6, 2016 at 10:37 am #173838Pascal Casier
ModeratorWhat do you mean with ‘misaligned’ ? Where do you want them ?
This will already get it away from the text:
img.avatar.avatar-14.photo { margin-bottom: 0px !important; }PS. Next time please include the link to you site because for CSS we always need to see the site itself.
April 6, 2016 at 8:49 am #173831Pascal Casier
ModeratorHi, welcome back.
If your subsite is on the same server, towards the same MySQL or MariaDB… then for the performance it will probably not help a lot.
Why not trying to go to the root of the issue and try to reduce the 10s loading to at least 8s so that the extra 2s from bbPress are not adding extra ?Please note that WordPress requirements/recommendations are on https://wordpress.org/about/requirements/
Some things to check first:
– Have you run all the repair tools of bbpress after import to be sure your structure is optimized ?
– Have you deactivated any not-needed plugin ? Is your theme ready for bbPress ?
– Are you using any cache mechanism to improve speed where possible ?
– Did you try to run performance tools like the P3 plugin performance profiler to narrow down the possible slow parts ?
– What score do you get on gtmetrix.com ? Or what did the pingdom tools indicate ?
– Is it for all people in the world the same ? Check with sucuri performance.
– Some further reading: https://codex.bbpress.org/getting-started/improving-performance/If it would come to database queries, also check these plugins:
– https://wordpress.org/plugins/query-monitor/
– https://wordpress.org/plugins/query-monitor-bbpress-buddypress-conditionals/Then of course there are a list of performance improvements that can be done on caching, offloading, … with plugins like W3 Total cache, batcache, WP Super Cache or other. Also check autoptimize and using cloudflare.
Also note that in the upcoming bbPress v2.6 (hopefully before the end of this year), a lot of focus went on possible performance issues.
Hope it helps,
Pascal.April 6, 2016 at 3:02 am #173824In reply to: Importing Large Xenforo Forum
Stephen Edgar
KeymasterAwesome 🙂
If you look at the phpBB and SMF importers they have near the end of the file a bunch of regular expressions for converting custom BBCode into native HTML for WordPress.
Get me a list of what you want copied from the SMF/phpBB importers to Xenforo and I’ll add them.
If you need more, or tweaks to them happy to help out here also.
April 5, 2016 at 9:53 pm #173821In reply to: Importing Large Xenforo Forum
Wendell
ParticipantTried the import again and saw some results I hadn’t seen before. The last several lines of the conversion said something about converting anonymous posts. That’s the first time it’s ever done that and it seems to have worked great. 🙂
Now I just have to find a way to convert all of the xenForo bbcode into something that will work in bbpress (such as image attachments).
Thanks for the help!
-
AuthorSearch Results