Search Results for 'code'
-
AuthorSearch Results
-
February 2, 2018 at 3:07 pm #189857
In reply to: User Registration
Robin W
Moderatorwhen they first log on they are allocated the default role that you set in dashboard>settings>forums.
you can use the bbpress logon widget in a sidebar, use the shortcode [bbp-login] on a page or post, use any wordpress logion plugin or technique, or add a login to your menu using
February 1, 2018 at 2:03 pm #189826In reply to: This forum is empty
Robin W
Moderatorcreate a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpresswhere %your-theme-name% is the name of your theme
find
wp-content/plugins/bbpress/templates/default/bbpress/content-single-forum.php
Make a copy of this file, 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.php
bbPress will now use this template instead of the original
and you can amend thisso change line 26 from
<?php bbp_single_forum_description(); ?>to
<?php if (bbp_get_single_forum_description != 'This forum is empty.') bbp_single_forum_description(); ?>February 1, 2018 at 12:49 pm #189823In reply to: Display number of subscribers of a forum
Robin W
ModeratorThis is not as easy as I thought.
As a widget it can be shortcoded, but the version I currently have does need to do the calculation each time, which on a site with lots of forums and users could make the site slow.
Whereabouts on the site were you thinking of – eg in sidebar, at top of each forum, within the forum list etc.
February 1, 2018 at 12:45 pm #189822In reply to: Unable to Delete, Edit or Close *Some* Topics
Robin W
Moderatorhmm…
not sure what to suggest next.
I could code a quick ‘close topic’ shortcode, but that would be beyond free – contact me via my website if interested
Robin W
Moderatorbis bold
I is italic
B-quote puts a wordpress block around the text – exactly what is set by your theme
Del – is delete quotes
img is an image
ul is an unordered list
ol is an ordered list
li is a list item
code is code – stops the display from executing, just displays it
close tags – closes all open tagsFebruary 1, 2018 at 9:49 am #189815In reply to: Login Widget problem!
Robin W
Moderatorthat should work, but the code is not showing up in the browser, so it is not getting loaded.
February 1, 2018 at 5:08 am #189806In reply to: Login Widget problem!
Robin W
Moderatorwhere are you putting this code ?
January 31, 2018 at 7:11 pm #189796In reply to: Unable to Delete, Edit or Close *Some* Topics
Robin W
Moderatordon’t know what is happening
I’ve just looked at the core close topic code, and it just changes post_status to closed, although it goes via a whole bunch of code in a topic hander function which I haven’t been through line by line.
Suggest you try just changing the status directly in the db, and see if that fixes. You can always change it back !
January 31, 2018 at 4:58 pm #189786In reply to: Login Widget problem!
Robin W
Moderatortry
input[type=”text”] { width: 50% !important; } .bbp-login-form .bbp-password input { width: 50% !important; }January 31, 2018 at 12:21 pm #189772In reply to: button open close new topic form
Robin W
Moderatorhaving a button at the top which goes to the form at the bottom can be achieved by
dashboard>settings>bbp style pack>buttons
Having the from hidden is quite possible, but I don’t know of any already written code to do that
January 31, 2018 at 4:49 am #189762Topic: button open close new topic form
in forum Installationurphy73
ParticipantHello everybody
How can I delete or hide the “Create a new topic” form and replace it by a button ?
The button will open or dropdown the “new topic for”m
Do you know a plugin or a bit of code to do that properly ?
Thanks in advance
January 30, 2018 at 1:58 pm #189756In reply to: This forum is empty
Robin W
Moderatorgreat
than add this
//This function changes the text wherever it is quoted function rew_change_translate_text( $translated_text ) { if ( $translated_text == 'This forum is empty.' ) { $translated_text = 'new text'; } return $translated_text; } add_filter( 'gettext', 'rew_change_translate_text', 20 );Instead of ‘This forum is empty.’ you will get ‘new text’, so just change new text to what you want
eg change the line
$translated_text = 'new text';to
$translated_text = 'Categories listed below';– if you want it blank then have that line say
$translated_text = '';January 30, 2018 at 1:38 pm #189755In reply to: This forum is empty
chrtravels
ParticipantHi Robin,
In functions.php? I do know how to enter code there, via ftp or cPanel. I just don’t know what code to enter to solve for this. 🙂
Chris
January 29, 2018 at 12:00 pm #189730In reply to: Managing login to forum with a set list of emails
Robin W
ModeratorNothing I know of to do that – it could be coded but beyond free help.
January 28, 2018 at 7:39 am #189727In reply to: Noidex metatag to groups of pages
Pascal Casier
ModeratorHi @process_of_illumination ,
I see you have found the functions that you need.Try to avoid adding 5 functions if you can do it in 1, so at least change it to:
add_action( 'wp_head', 'casiepa_add_noindex' ); function casiepa_add_noindex() { if ( bbp_is_favorites() ) { wp_no_robots(); } if ( bbp_is_topic_tag() ) { wp_no_robots(); } if ( bbp_is_single_user_replies() ) { wp_no_robots(); } if ( bbp_is_single_user_profile() ) { wp_no_robots(); } if ( bbp_is_single_user_topics() ) { wp_no_robots(); } }Of course the shortest way would be:
add_action( 'wp_head', 'casiepa_add_noindex' ); function casiepa_add_noindex() { if ( bbp_is_favorites() || bbp_is_topic_tag() || bbp_is_single_user_replies() || bbp_is_single_user_profile() || bbp_is_single_user_topics() ) { wp_no_robots(); } }PS image removed.
January 28, 2018 at 12:41 am #189724In reply to: Display number of subscribers of a forum
chumtarou
ParticipantThanks very much Robin, great plugin and look forward to your future updates.
One of the reasons we are hoping to show how many subscribers each forum has is to help market the popularity to entice more subscribers. It would be great to have the option to add the shortcode in the main forum page.
Thanks very much!
January 27, 2018 at 6:27 pm #189723In reply to: Importing from Rainmaker; Topics’ post_parent = 0
Stephen Edgar
KeymasterThanks for the update, it was worth a try 😉
Are you getting the correct
post_parentnow with those changes you’ve made?The notes I added in reply to @liderxlt above I’m pretty sure will get that sorted for @liderxlt
I’m happy to look at any raw data or datebase dumps you have Mike, maybe a forum and/or topic WXR dump like that of which @liderxlt posted.
January 26, 2018 at 5:29 pm #189715In reply to: How to list Top Users by most topics?
Robin W
ModeratorJanuary 26, 2018 at 5:10 pm #189714In reply to: Display number of subscribers of a forum
Robin W
ModeratorI’ve just (today) released a new version of my “bbp topic count” plugin with a new shortcode which will show the top X users across the forums.
I’ll take a quick look to see if I can make this forum specific.
In the meantime take a look at
dashboard>settings>bbp topic count>shortcodes to see what it is and how to use it.
January 25, 2018 at 6:07 pm #189708Robin W
ModeratorI think I have code that fixes this in
January 25, 2018 at 5:45 pm #189705jsteckler1
ParticipantHi @casiepa,
I have failed in my attempt to set post_parent to _bbp_forum_id. Could you help me build on the code provided by @cjerrells perhaps? Though he was focused on replies, we were both experiencing the same issue on the front-end.
Or, alternatively, I am only using ONE forum. Is there any code I could use to force ALL topics created to be sent to a specified forum?
January 25, 2018 at 3:05 pm #189703crookie
ParticipantHi, I am using the TinyMCE Editor for my Forum. The Editor display only when I comment for a Topic. When I Edit a Post or create a new Topic, it doesn’t display. I have noticed that it shows an Error in both Pages (Edit Post & Create Topic) by Debug:
TypeError: d is undefined - tinymce.min.js:34:6212I would be happy if someone could Help.
January 25, 2018 at 12:22 pm #189702In reply to: Importing from Rainmaker; Topics’ post_parent = 0
Mike Costanzo
ParticipantStephen,
I’ll ask about the database schema, but since Rainmaker is proprietary software there’s no guarantee that I will be able to get it. Stay tuned.
Also, liderxlt asked if I was able to solve the problem. The answer is… kind of. Since I’m copying all of my content over from one site to another, in my desperation I ended up hacking the WordPress Importer plugin so that it does not look for conflicts in the
$post_parentvalue during import. This means that existing Post content will be overwritten if it shares the same$post_parentvalue, which would be an untenable solution in most cases. But since my content will be identical from site to site, I’m counting it as a necessary evil.Here is the snippet I excised from ‘wordpress-importer.php’:
if ( $post_parent ) { // if we already know the parent, map it to the new local ID if ( isset( $this->processed_posts[$post_parent] ) ) { $post_parent = $this->processed_posts[$post_parent]; // otherwise record the parent for later } else { $this->post_orphans[intval($post['post_id'])] = $post_parent; $post_parent = 0; } }Of course, I made these changes as a separate (cloned) plugin, so I also had to update the
register_importerfunction as well. That way I have access to the original Importer for non-Forum Posts and Pages.Like I said, this is a brute force hack, and not an elegant solution. If anyone has an elegant solution, I’m all ears. Thanks!
January 25, 2018 at 11:53 am #189701In reply to: Noidex metatag to groups of pages
Process of Illumination
ParticipantHi,
I think I understood a little how it works and came out with this:
add_action( 'wp_head', 'casiepa5_add_noindex' ); function casiepa5_add_noindex() { if ( bbp_is_favorites() ) { wp_no_robots(); } } add_action( 'wp_head', 'casiepa4_add_noindex' ); function casiepa4_add_noindex() { if ( bbp_is_single_user_replies() ) { wp_no_robots(); } } add_action( 'wp_head', 'casiepa3_add_noindex' ); function casiepa3_add_noindex() { if ( bbp_is_single_user_profile() ) { wp_no_robots(); } } add_action( 'wp_head', 'casiepa2_add_noindex' ); function casiepa2_add_noindex() { if ( bbp_is_single_user_topics() ) { wp_no_robots(); } } add_action( 'wp_head', 'casiepa_add_noindex' ); function casiepa_add_noindex() { if ( bbp_is_topic_tag() ) { wp_no_robots(); } }I tested it and it seems ok.
Do you think it is the correct procedure?
Thanks,
the Process
PS: could you please remove the picture with the link to my test site? Thanks 🙂
January 24, 2018 at 3:02 pm #189692jsteckler1
ParticipantHi @casiepa,
Thank you for jumping in!
Some additional details about my situation:
Upon submission of a specified Gravity Form, I am attempting to create a new topic under a specified forum (Forum ID: 31086).
While creating the new Topic was simple enough with the Custom Post add-on—which successfully created the Topic, including the body of the topic post, accordingly—the topic was being listed under “No Forum.” @cjerrells post got me closer, encouraging me to add another custom field named _bbp_forum_id with a default value of 31086 (the forum ID). After doing that, the assigned forum seemed to display correctly on the backend, but:
1) The breadcrumb would only display the forum after editing and resaving the post again
— It still will not, however, show on the front-end forum among the other forum topics
2) The topic would finally display correctly on the front-end among the other forum topics only after adding a reply to the topic post.
Here is a screenshot of my Gravity Form settings, as well as the code cjerrells kindly provided within my functions.php file. My ability to write php is still very elementary, and it seems a bit difficult to find a full list of bbPress actions and hooks, so I wasn’t sure exactly what needed to be altered to fit my needs.
I would be beyond appreciative if you could give it all a look and get back to me with any thoughts or ideas you may have.
-
AuthorSearch Results