Forum Replies Created
-
In reply to: Oh, bother….can you spare a dime!?
the easiest way is
once activated go to
dashboard>settings>bbp style pack>Topics Index Styling and tick item 16 don’t show this message
if you want to do it using FTP then
find
wp-content/plugins/bbpress/templates/default/bbpress/feedback-no-topics.phptransfer this to your pc and remove
<div class="bbp-template-notice"> <ul> <li><?php esc_html_e( 'Oh, bother! No topics were found here.', 'bbpress' ); ?></li> </ul> </div>and save (this file must exist, but we just make it empty!)
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpresswhere %your-theme-name% is the name of your theme
Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/feedback-no-topics.phpbbPress will now use this template instead of the original
In reply to: bbPress Topics for Posts commentyes if I have got it right π
In reply to: Remove underline from Topicsno problem – glad you are fixed !!
In reply to: bbPress Topics for Posts commentπ
In reply to: Remove underline from Topicsmy mistake should be
main a { text-decoration: underline !important; } a.bbp-topic-permalink { text-decoration: none !important; }In reply to: User StatisticsAnyone coming new to this thread, I have added a revised version of this plugin to my site which can be downloaded from
This plugin is one which WordPress withdrew as it violated their guidelines (suspected to be listing users without login, but not certain).
You can download and use, but I offer no support or warranty that this code works !
In reply to: Remove underline from Topicsok your code is
main a { text-decoration: underline !important; a.bbp-topic-permalink { text-decoration: none: !important; }: ; }it should be
main a { text-decoration: underline !important; } a.bbp-topic-permalink { text-decoration: none: !important; }In reply to: bbPress Topics for Posts commentI’ve just updated the topics for posts plugin π
In reply to: Remove underline from Topicsis it still in there?
In reply to: User StatisticsI removed the trailing comma after βDESCβ.
good spot !
great – that should now be fine.
Since we have now added the ‘wp-approve…’ as a dependency, I’ll amend the version that I put on my site which will then match yours and then add this below.
In reply to: User Statisticsso in the statsistics plugin you are changing
$latest_user = get_users( array( 'number' => 1, 'fields' => array("user_login", "ID", "display_name"), 'orderby' => "registered", 'order' => "DESC", 'meta_key' => 'wp-approve-user', 'meta_value' => '1' ) );to
//set up $args with core arguments needed $args = array( 'number' => 1, 'fields' => array("user_login", "ID", "display_name"), 'orderby' => "registered", 'order' => "DESC", ) ; //add additional meta data to $args if wp-approve-user is active if (class_exists ('Obenland_Wp_Approve_User')) { $args ['meta_key'] = 'wp-approve-user' ; $args ['meta_value'] = '1' ; } //then do the lookup $latest_user = get_users($args) ;In reply to: User Statisticsok, so final amendment needed, as if you deactivate wp-approve-user then the latest user will be forevermore the last one you approved before decativating the plugin.
If you open the wp-approve-plugin you’ll see the core file wp-appprove-user.php
open this and you’ll see a line 29 which says
class Obenland_Wp_Approve_User extends Obenland_Wp_Plugins_V4 {so we know that the wp-approve-plugin sets up a class called ‘Obenland_Wp_Approve_User’, so we can use the existence of this class to know if wp-approve-use is active or not.
This is common to many plugins and a good way to ensure parts of code that use another plugin only fire if that plugin is active.
so now we can change the ‘get_uses’ to only add the meta_data is the class exists
//set up $args with core arguments needed $args = array( 'number' => 1, 'fields' => array("user_login", "ID", "display_name"), 'orderby' => "registered", 'order' => "DESC", ) ; //add additional meta data to $args if wp-approve-user is active if (class_exists ('Obenland_Wp_Approve_User')) { $args ['meta_key'] = 'wp-approve-user' ; $args ['meta_value'] = '1' ; } //then do the lookup $latest_user = get_users($args) ;In reply to: User Statisticsyes that should work.
If/when it does we’ll do a final amendment to make sure it still works should you deactivate the approve plugin
In reply to: Remove underline from Topicstry
a.bbp-topic-permalink { text-decoration: none: !important; }I’d add this after your css lines above.
In reply to: bbPress Topics for Posts commentI am just a guy who sites in his kitchen and writes code for enjoyment, and I like to try and help others on the forums.
I do not get paid to do this, I have no connection with bbpress and all code (inc wordpress and bbpress) is offered under OSF, which is that it is free, open source to allow others to amend it, and offered with no support and no warranty that it does anything.
bbpress authors are free to decide what they put in their code, as am I. I do not suggest what should be in bbpress, nor do I consider that they should take any notice of me.
The topics for posts plugin has not been updated for a while because the authors do not choose to do so, that is their right, it is free code offered at the point of publishing. You are free to learn php and update and amend it as you wish.
I am not author of topics for posts, I have just been granted access as I wish to update it, which I will do when I am ready to do so.
In reply to: User Statisticsok, so the function within that code that gets the latest user is this
$latest_user = get_users( array( 'number' => 1, 'fields' => array("user_login", "ID", "display_name"), 'orderby' => "registered", 'order' => "DESC" ) );so this function brings users ordered by registered – DESC means latest is listed first, and number=>1 means just retrieve one, so this gets the latest.
so we just need to add a lookup to say that this must also have meta ‘wp-approve-user’ set to 1 so we amend the function to
$latest_user = get_users( array( 'number' => 1, 'fields' => array("user_login", "ID", "display_name"), 'orderby' => "registered", 'order' => "DESC", 'meta_key' => 'wp-approve-user', 'meta_value' => '1' ) );This (untested) should work for your site.
I don’t plan to support this plugin, but am happy to have it on my site to allow others to use it.
Given that many many other plugins might set meta data it is not possible to cater for all, so I’ll just host the previous version. Anyone downloading will be via this thread so they can see how to update it to cater for the approve plugin.
In reply to: User Statisticsok, so does latest user only ever show 1?
looks like it – come back and I’ll help you with the next stepIn reply to: User Statisticsthat was exactly what I meant – now we know what changes, so to code we need to find out which user is being displayed and get that data.
so as you say it will be something like
$approve = get_meta_data ($user_id, 'wp-approve-user', true) ;presume you mean ‘latest user’ – not keen to load the plugin to my test site as I’m mid something else – so we just need the latest user who has been approved, or do you mean something else?
In reply to: User Statisticsyou will need to work out what the difference between an approved one and an unapproved on is – start with dashboard>users and see what you can find.
In reply to: Any way to change forum archives hyperlink?great – glad you are fixed
not unless you can find someone to write it for free π
In reply to: User Statisticsah, thanks for that !!
In reply to: User Statisticsno idea what guidelines it breaks to have been removed, I’ll take a quick look
In reply to: User Statisticsgreat – thanks for posting that – I’ll add it to my site as well as make available as a download
In reply to: How can I hide the form in bbp-single-forum?find
wp-content/plugins/bbpress/templates/default/bbpress/content-single-forum.phptransfer this to your pc and edit
find line 45
<?php bbp_get_template_part( 'form', 'topic' ); ?>and delete this line and save
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpresswhere %your-theme-name% is the name of your theme
Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/content-single-forum.phpbbPress will now use this template instead of the original