newtech1 (@newtech1)

Forum Replies Created

Viewing 23 replies - 26 through 48 (of 48 total)
  • In reply to: Forum default

    @newtech1

    Participant

    I only have one forum. It is called Fishing Report Forum. It makes no sense to me when you go into Topic Attributes why there is even an option for __ No forum ___ under Forum:

    If you are creating a topic in a bulletin board/forum why would it not go into a forum instead of no forum.

    There is no way in code to remove the ___No forum___ option under Topic Attributes?

    My car has always been Fishing Report Forum and never No forum, so want to stick with my Fishing Report Forum car, not go to a train. 🙂

    @newtech1

    Participant

    I understand completely. Makes sense.
    I will have to find a plugin that makes it so I can limit permissions and capabilities per user role.
    There is Permissions Pro and Capabilities Pro plugins that give me all that I need but sadly they do not support ‘topic’ posts. Do you know of any other plugins?

    BTW
    I have ACF to work great for me in the backend. All I need to do is put this code in content-single.php Maybe this will help somebody else who is using ACF with BBPress
    `?>
    YOU CHOOSE HOW MUCH INFORMATION YOU ENTER<br>
    Catch Date & Time: <?php the_field( ‘catch_date_time’ ) ; ?><br>
    Anglers: <?php the_field( ‘anglers’ ) ; ?><br>
    Weather: <?php the_field( ‘weather’ ) ; ?><br>
    Fish Caught: <?php the_field( ‘fish_caught’ ) ; ?><br>
    Kept or Released: <?php the_field( ‘kept_or_released’ ) ; ?><br>
    Lake Point Marker: <?php the_field( ‘lake_point_marker’ ) ; ?><br>
    Water_Features: <?php the_field( ‘water_features’ ) ; ?><br>
    Speed: <?php the_field( ‘speed’ ) ; ?><br>
    Fish Depth: <?php the_field( ‘fish_depth’ ) ; ?><br>
    Lake Depth: <?php the_field( ‘lake_depth’ ) ; ?><br>
    Method Used: <?php the_field( ‘method_used’ ) ; ?><br>
    Lure & Color: <?php the_field( ‘lure_color’ ) ; ?><br>

    Image:
    <?php
    $image = get_field(‘image’);
    if( !empty( $image ) ): ?>
    ” alt=”<?php echo esc_attr($image[‘alt’]); ?>” />
    <?php endif; ?> <br>

    <br>
    <br>
    Fishing Location: <?php the_field( ‘location’ ) ; ?><br>
    <?php
    $location = get_field(‘location’);
    if( $location ): ?>
    <div class=”acf-map” data-zoom=”13″>
    <div class=”marker” data-lat=”<?php echo esc_attr($location[‘lat’]); ?>” data-lng=”<?php echo esc_attr($location[‘lng’]); ?>”></div>
    </div>
    <?php endif; ?>

    <style type=”text/css”>
    .acf-map {
    width: 100%;
    height: 400px;
    border: #ccc solid 1px;
    margin: 20px 0;
    }

    If there was a way to make this code or another code to work in the frontend posting topics I would be thrilled to death. BUT ACF will not help me for BBPress and BBPress will not help me for ACF. If I knew code more I am sure I could figure it out. It cannot be that hard.

    In reply to: Hide posts number

    @newtech1

    Participant

    Update:
    I put the following code in the customized css for one website and it removed the Voices column, but on another website it did not remove the voices column. Yes, I cleared all cache and used GeoPeeker to make sure it was not a cache issue.
    `li.bbp-topic-voice-count {
    display: none !important;
    }

@newtech1

Participant

I thought another solution was to just put the shortcodes in the wp-content/plugins/bbpress/templates/default/bbpress/content-single-forum.php file but the shortcodes do not work.

@newtech1

Participant

I am wanting my bbpress tags and bbpress search input form to display on my forum main page just below the bread crumbs.
This is what I understand to do.
A. Copy my page.php template from by theme folder. (..//wp-content/themes/fishingclub)
B. Rename it bbpress.php and upload to the theme folder.
(I do this and the forum main page displays properly.)
Here is the page,php code:

<?php
/**
 * The template for displaying all single pages
 *
 * @package WordPress
 * @subpackage FISHING_CLUB
 * @since FISHING_CLUB 1.0
 */

get_header();

while ( have_posts() ) { the_post();

	get_template_part( 'content', 'page' );

	// If comments are open or we have at least one comment, load up the comment template.
	if ( !is_front_page() && ( comments_open() || get_comments_number() ) ) {
		comments_template();
	}
}
get_footer();
?>

C. Since I want to display bbpress tags and bbpress I need to put these shortcodes in the bbpress.php template: [bbp-topic-tags] and [bbp-search], BUT the page crashes no matter where I put the shortcode.
D. I assume I must put some kind of coding before and after the shortcode. No idea what I need to do.

@newtech1

Participant

stupid me, I forgot I had made the forum private w=in a test I was doing, it works fine.

In reply to: Prevent topic replies

@newtech1

Participant

it works, thanks

@newtech1

Participant

@newtech1

Participant

That works. 🙂

In reply to: Prevent topic replies

@newtech1

Participant

Are you saying to replace the existing code in form-reply.php just with this code? If so my forum page is ‘page not found’.

<?php

/**
 * New/Edit reply
 *
 * @package bbPress
 * @subpackage Theme
 */

// Exit if accessed directly
defined( 'ABSPATH' ) || exit;

I believe this shoudk end with
<?
but it still does not work.

@newtech1

Participant

Are you saying that I am to replace all of the code in form-topic.php with just this code:
`<?php

/**
* New/Edit Topic
*
* @package bbPress
* @subpackage Theme
*/

// Exit if accessed directly
defined( ‘ABSPATH’ ) || exit;

if ( ! bbp_is_single_forum() ) : ?>

<div id=”bbpress-forums” class=”bbpress-wrapper”>

</div>

<?php endif;’

If so the when I go to my forum page it says ‘page not found’.

In reply to: Prevent topic replies

@newtech1

Participant

I need to clarify. I do not want the reply option to appear anywhere in the forum. I do not want the option for replies-just turn off the reply feature.

If I cannot turn off the reply form what file do I go into to remove the code for the reply form so it does not show up?

The problem with making topic closed is it greys out the topic title. I do not want the title to grey out. So if I cannot remove the reply form someway how can I prevent the title from turning grey when closed?

closed topic

In reply to: Prevent topic replies

@newtech1

Participant

Yes that is correct.

@newtech1

Participant

I found a code that works when inserted into …/wp-content/plugins/bbpress/templates/default/bbpress

<h6>Date: <?php the_field( ‘date’ ) ; ?></h6>
<h6>Fish Caught: <?php the_field( ‘fish_caught’ ) ; ?></h6>
<h6>Speed: <?php the_field( ‘speed’ ) ; ?></h6>

But it only displays if put in certain areas. Here is the closet area it displays to the topic content.

<?php bbp_single_topic_description(); ?>
<h6>Date: <?php the_field( ‘date’ ) ; ?></h6>
<h6>Fish Caught: <?php the_field( ‘fish_caught’ ) ; ?></h6>
<h6>Speed: <?php the_field( ‘speed’ ) ; ?></h6>
<h6>Water Features: <?php the_field( ‘water_features’ ) ; ?></h6>
<h6>Lure & Color: <?php the_field( ‘lure_color’ ) ; ?></h6>

<?php if ( bbp_show_lead_topic() ) : ?>

<?php bbp_get_template_part( ‘content’, ‘single-topic-lead’ ); ?>

I have tried putting it below either of these items and it will not dislay in the frontend.

<?php if ( bbp_show_lead_topic() ) : ?>

<?php bbp_get_template_part( ‘content’, ‘single-topic-lead’ ); ?

From what I can tell the code actually needs to be inserted in the single-topic-lead. I have tired inserting it everywhere within the single-topic-lead.php page but no matter where I put it, it does not show up. Here is where I think it needs to go:

<?php bbp_topic_author_link( array( ‘show_role’ => true ) ); ?>

<?php if ( current_user_can( ‘moderate’, bbp_get_reply_id() ) ) : ?>

<?php do_action( ‘bbp_theme_before_topic_author_admin_details’ ); ?>

<div class=”bbp-topic-ip”><?php bbp_author_ip( bbp_get_topic_id() ); ?></div>

<?php do_action( ‘bbp_theme_after_topic_author_admin_details’ ); ?>

<?php endif; ?>

<?php do_action( ‘bbp_theme_after_topic_author_details’ ); ?>

</div><!– .bbp-topic-author –>

<div class=”bbp-topic-content”>

<?php do_action( ‘bbp_theme_before_topic_content’ ); ?>

<?php bbp_topic_content(); ?>
<h6>Date: <?php the_field( ‘date’ ) ; ?></h6>
<h6>Fish Caught: <?php the_field( ‘fish_caught’ ) ; ?></h6>
<h6>Speed: <?php the_field( ‘speed’ ) ; ?></h6>
<h6>Water Features: <?php the_field( ‘water_features’ ) ; ?></h6>
<h6>Lure & Color: <?php the_field( ‘lure_color’ ) ; ?></h6>
<?php do_action( ‘bbp_theme_after_topic_content’ ); ?>
</div><!– .bbp-topic-content –>
</div><!– #post-<?php bbp_topic_id(); ?> –>

NOTE: What is strange is that if I delete the content-single-topic-lead.php file to make sure the page is not cached, it does not break the topic post which makes no sense to me.

Here is the actual topics page:https://thedoverfamily.com/gfwc/forums/topic/last-try/

@newtech1

Participant

The code you gave me to insert into functions.php causes a fatal crash.

@newtech1

Participant

A. I am getting to a fix to custom fields showing up in frontend on forum topics.
Here is a code that is working to an extent.

<h2>Anglers: <?php the_field(‘anglers’) ; ?></h2>

If I go to content-single-topic.php and I insert in either of these thre places it shows up in the frontend:

<?php else : ?>
<h2><?php the_field(‘anglers’) ; ?></h2>

<?php bbp_topic_tag_list(); ?>
<h2><?php the_field(‘anglers’) ; ?></h2>
<?php bbp_single_topic_description(); ?>
<h2><?php the_field(‘anglers’) ; ?></h2>
<?php if ( bbp_show_lead_topic() ) : ?>
<?php bbp_get_template_part( ‘content’, ‘single-topic-lead’ ); ?>
<?php endif; ?>

If I put the code after <?php bbp_get_template_part( ‘content’, ‘single-topic-lead’ ); ?> it does not show up.

B. After reviewing this code in content-single-topic.php, It appears I need to enter my custom field code in the single-topic-lead’ file. The reason I know this is if I delete

<?php bbp_get_template_part( ‘content’, ‘single-topic-lead’ ); ?>

in content-single-topic.php I ‘break’ the topic post page. However, to verify that I need to enter my custom field code into content-single-topic-lead.php I deleted the file from the server. Much to my surprise the topic content still shows up on the topic page. How can that be. I have cleared cache on my browser, tried different browsers, different computers and get same results. Any ideas?

@newtech1

Participant

I have added the following code into content-single-topic.php and the custom field does not show up in the topic contents on the front end.

<div class=”acf-view acf-view–id–151 acf-view–object-id–{object-id}”>

<!–$anglers$–>
<div class=”acf-view__row acf-view__anglers”>
<div class=”acf-view__label”>Anglers</div>
<div class=”acf-view__field”>$anglers$</div>
</div>
<!–$anglers$–>
</div>

[acf_views view-id=”151″ name=”Anglers”]

[acf_views view-id=”151″ object-id=”ANOTHER_POST_ID” name=”Anglers”]

@newtech1

Participant

From what I can tell it looks like this is the file I need to edit:
content-single-topic.php
But when I put the following code, nothing show ups on the frontend.

echo ‘Anglers: ‘ .get_field( ‘anglers’ );
echo ‘<br>Catch Date: ‘ .get_field( ‘date’ );
echo ‘<br>Time of Day: ‘ .get_field( ‘time’ );

Is this for sure the file that needs to be edited to show custom fields on the frontend?
If so, anybody have any idea of what code I should use? Again ACH says they do support other plugins so they will not help me out.

@newtech1

Participant

Did you figure out how to put custom fields within each topic post? I am trying to do so using the ACF plugin. Thus far I have been able to use ACF to put custom fields when a user logins and goes to dashboard post a topic. BUT I cannot get their answers to display within the frontend.

Here is the code but (I know it is correct because it will show up if I enter it in the page.php. Just do not know what forum page to insert code.

echo ‘Anglers: ‘ .get_field( ‘anglers’ );
echo ‘<br>Catch Date: ‘ .get_field( ‘date’ );
echo ‘<br>Time of Day: ‘ .get_field( ‘time’ );
echo ‘<br>Fish Caught: ‘ .get_field( ‘fish_caught’ );
echo ‘<br>Lake Point MarkerMarker: ‘ .get_field( ‘lake_point_marker’ );
echo ‘<br>Water Features: ‘ .get_field( ‘water_features’ );
echo ‘<br>Speed: ‘ .get_field( ‘speed’ );
echo ‘<br>Fish Depth: ‘ .get_field( ‘fish_depth’ );
echo ‘<br>Lake Depth: ‘ .get_field( ‘lake_depth’ );
echo ‘<br>Method Used: ‘ .get_field( ‘method_used’ );
echo ‘<br>Lures & colors: ‘ .get_field( ‘lure_color’ );

@newtech1

Participant

Back end

So I want the custom field to show up here on the Front-end:

FYI the following code displays the custom field in the Front-end on pages, page.php in the template.

echo ‘Lake Marker 2: ‘ .get_field( ‘lake_marker_point_2’ );

@newtech1

Participant

Note: where there is lake_marker_point in the coding above it is actually lake_marker_point_2.

@newtech1

Participant

I need this custom field in the front end of any topic post. I want it to show up underneath the bottom of the topic field.

Here is other code ACH generates. Not sure which one to use and what fle it is to be inserted into.

<div id=”view” class=”acf-view acf-view–id–57 acf-view–object-id–65″>
<div class=”acf-view__row acf-view__lake_marker_point”>
<div class=”acf-view__label”>Lake Marker Point</div>
<div class=”acf-view__field”>This is the marker location</div>
</div>
</div>

One more possible code:

echo ‘Lake Marker: ‘ .get_field( ‘lake_marker_point’ );

<div class=”acf-view__row acf-view__lake_marker_point”>
<div class=”acf-view__label”>Lake Marker Point</div>
<div class=”acf-view__field”>This is the marker location</div>
</div>

@newtech1

Participant

Did you ever get an answer from ACF? They never gave me an answer on how to make custom fields in bbPress topics to be displayed in the frontend. I also choose bbpress because they said it was compatible with bbpress.

Viewing 23 replies - 26 through 48 (of 48 total)