Recent Topics

1 Nov 23, 2012 16:55    

I am using 4.1.5 using evopress. I just want the visitor comments (once published) to show by default. I tried tweaking the _item_feedback.inc.php with no luck. The feedback link does work at the bottom of posts, but since I'm not getting many comments I'd just like the option to display them as the visitor enter the blog page right beneath the post.

Thanks!
John

2 Nov 23, 2012 22:12

Have you checked if _item_feedback.inc.php is included on the page where you want the feedback to be displayed?

3 Nov 24, 2012 14:24

Sorry if I multi-posted - my connection is not the strongest and it flips up and down alarmingly. My blog is under bagofkinves.com
I enjoy using b2evolution - my last blog Sailingserenity.com used it and I'm trying to get some of the same functionality going, but it's uphill going. Since I'm not an expert, if you could please give me the path where I should drip the _item_feedback.inc.php as well as the actual code to put into which specific file to include, I think it'd help a lot.

Also - could I please make a suggestion to make this an option in the dashboard? I could have sworn I saw it there on the last blog I put up.

Again, thank you very much for your time and effort in this. I appreciate you getting back to me.

-J

If I add the include to my blog3.php, and then put include _item_feedback.inc.php into the same directory I get an error:
"Please don't access this page directly". When I leave the include in blog3.php but then remove that file from the same directory it goes back to showing the comments/feedback as a link at the bottom.
Is there another way I should include the file? Did I put the include into the correct file (i.e. the actual blog page)?

<?php
/**
 * This is a stub file for displaying a b2evolution blog.
 *
 * A stub file is used to anchor a particular blog in a particular location of your website.
 * More info: {@link http://manual.b2evolution.net/Stub_file}
 *
 * b2evolution - {@link http://b2evolution.net/}
 * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
 * @copyright (c)2003-2011 by Francois Planque - {@link http://fplanque.com/}
 */

include ('_item_feedback.inc.php');
# First, select which blog you want to display here!
# You can find these numbers in the back-office under the Blogs section.
# You can also create new blogs over there. If you do, you may duplicate this file for the new blog.
$blog = 3;

# You could *force* a specific skin here with this setting: (otherwise, default will be used)
# $skin = 'custom';

# This setting retricts posts to those published, thus hiding drafts.
# You should not have to change this.
$show_statuses = array();

# Here you can set a limit before which posts will be ignored
# You can use a unix timestamp value or 'now' which will hide all posts in the past
$timestamp_min = '';

# Here you can set a limit after which posts will be ignored
# You can use a unix timestamp value or 'now' which will hide all posts in the future
$timestamp_max = 'now';

# Additionnaly, you can set other values (see URL params in the manual)...
# $order = 'ASC'; // This for example would display the blog in chronological order...

/**
 * That's it, now let b2evolution do the rest! :)
 * Note: if you put this file in a subdirectory, you will need to adjust the path below, for example:
 * require_once dirname(__FILE__).'/../conf/_config.php';
 */
require_once dirname(__FILE__).'/conf/_config.php';

require $inc_path.'_blog_main.inc.php';
?>

4 Nov 25, 2012 03:47

No, it's not the right file. You need to include it at the proper place in the proper template of the skin you are using.

I can't tell you specifically because I don't have access to the source code from where I am right now.

5 Nov 25, 2012 12:21

Okay, well since I'm using evopress, would it be under: /public_html/blog/skins/evopress/index.main.php ?

I did try to modify it as you posted in a different thread like so but no joy:

<?php
/**
 * This is the main/default page template.
 *
 * For a quick explanation of b2evo 2.0 skins, please start here:
 * {@link http://manual.b2evolution.net/Skins_2.0}
 *
 * The main page template is used to display the blog when no specific page template is available
 * to handle the request (based on $disp).
 *
 * @package evoskins
 * @subpackage evopress
 */
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );

if( version_compare( $app_version, '4.0.0-dev' ) < 0 )
{ // Older 2.x skins work on newer 2.x b2evo versions, but newer 2.x skins may not work on older 2.x b2evo versions.
	die( 'This skin is designed for b2evolution 4.0.0 and above. Please <a href="http://b2evolution.net/downloads/index.html">upgrade your b2evolution</a>.' );
}

// This is the main template; it may be used to display very different things.
// Do inits depending on current $disp:
skin_init( $disp );


// -------------------------- HTML HEADER INCLUDED HERE --------------------------
skin_include( '_html_header.inc.php' );
// Note: You can customize the default HTML header by copying the generic
// /skins/_html_header.inc.php file into the current skin folder.
// -------------------------------- END OF HEADER --------------------------------


// ------------------------- BODY HEADER INCLUDED HERE --------------------------
skin_include( '_body_header.inc.php' );
// Note: You can customize the default BODY header by copying the generic
// /skins/_body_footer.inc.php file into the current skin folder.
// ------------------------------- END OF HEADER --------------------------------
?>



<div class="top_menu top_menu_narrow top_menu_<?php echo $Skin->get_setting( 'sidebar_position' ); ?>">
	<ul>
	<?php
		// ------------------------- "Menu" CONTAINER EMBEDDED HERE --------------------------
		// Display container and contents:
		skin_container( NT_('Menu'), array(
				// The following params will be used as defaults for widgets included in this container:
				'block_start' => '',
				'block_end' => '',
				'block_display_title' => false,
				'list_start' => '',
				'list_end' => '',
				'item_start' => '<li>',
				'item_end' => '</li>',
			) );
		// ----------------------------- END OF "Menu" CONTAINER -----------------------------
	?>
	</ul>
</div>

<div id="content" class="narrowcolumn">

	<?php
		// ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
		messages( array(
			'block_start' => '<div class="action_messages">',
			'block_end'   => '</div>',
		) );
		// --------------------------------- END OF MESSAGES ---------------------------------
	?>

	<?php
		// ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
		request_title( array(
				'title_before'=> '<h2>',
				'title_after' => '</h2>',
				'title_none'  => '',
				'glue'        => ' - ',
				'title_single_disp' => true,
				'format'      => 'htmlbody',
			) );
		// ------------------------------ END OF REQUEST TITLE -----------------------------
	?>

<?php

                // ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------

                if( $disp == 'posts' )

                {

                    $c = 1; // force display of comments

                    skin_include( '_item_feedback.inc.php', array(

                            'before_section_title' => '<h4>',

                            'after_section_title'  => '</h4>',

                            'disp_comment_form'       =>    false,  // prevent display of comment form

                        ) );

                }

                else

                {

                    skin_include( '_item_feedback.inc.php', array(

                            'before_section_title' => '<h4>',

                            'after_section_title'  => '</h4>',

                        ) );

                }

                // Note: You can customize the default item feedback by copying the generic

                // /skins/_item_feedback.inc.php file into the current skin folder.

                // ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------

            ?>

	<?php
		// -------------- MAIN CONTENT TEMPLATE INCLUDED HERE (Based on $disp) --------------
		skin_include( '$disp$', array(
			) );
		// Note: you can customize any of the sub templates included here by
		// copying the matching php file into your skin directory.
		// ------------------------- END OF MAIN CONTENT TEMPLATE ---------------------------
	?>

</div>


<?php
// ------------------------- SIDEBAR INCLUDED HERE --------------------------
skin_include( '_sidebar.inc.php' );
// Note: You can customize the default BODY footer by copying the
// _body_footer.inc.php file into the current skin folder.
// ----------------------------- END OF SIDEBAR -----------------------------


// ------------------------- BODY FOOTER INCLUDED HERE --------------------------
skin_include( '_body_footer.inc.php' );
// Note: You can customize the default BODY footer by copying the
// _body_footer.inc.php file into the current skin folder.
// ------------------------------- END OF FOOTER --------------------------------


// ------------------------- HTML FOOTER INCLUDED HERE --------------------------
skin_include( '_html_footer.inc.php' );
// Note: You can customize the default HTML footer by copying the
// _html_footer.inc.php file into the current skin folder.
// ------------------------------- END OF FOOTER --------------------------------
?>

6 Nov 25, 2012 21:04

I think it's posts.main.php

You can add some

<?php echo "hello"; ?>

statements here and there to find the right file by displaying "hello" in your blog. Once you find the right position and are bale to display "hello" then you try to display the comments at that place.

7 Nov 26, 2012 02:12

Modify your post loop as below (posts.main.php lines 104-115):

<?php
// Display message if no post:
display_if_empty();

while( $Item = & mainlist_get_item() )
{	// For each blog post:
	// ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
	skin_include( '_item_block.inc.php', array(
			'content_mode' => 'auto',		// 'auto' will auto select depending on $disp-detail
			'image_size'	 =>	'fit-400x320',
		) );
	// ----------------------------END ITEM BLOCK  ----------------------------
	$c = 1;
	// ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
	skin_include( '_item_feedback.inc.php', array(
			'before_section_title' => '<h3>',
			'after_section_title'  => '</h3>',
			'disp_comment_form'       =>    false,
		) );
	
	// Note: You can customize the default item feedback by copying the generic
	// /skins/_item_feedback.inc.php file into the current skin folder.
	// ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------
}
?>

8 Nov 26, 2012 02:29

But since comments may be very long; you might still wanna hide them as default and display on request by adding a show / hide button before comments

	skin_include( '_item_feedback.inc.php', array(
			'before_section_title' => '<h3>',
			'after_section_title'  => '</h3>',
			'disp_comment_form'       =>    false,
			'comment_list_start'   => '<button class="comment_button">Show / Hide comments</button><div class="allcomments">',
			'comment_list_end'     => '</div>',
		) );

and a one liner jquery

<script>
    jQuery(".comment_button").click(function () {
      jQuery(this).next(".allcomments").slideToggle("slow");
    });
</script>

9 Nov 26, 2012 15:10

BINGO ! And muchas gracias.
You folks have a great product and superlative support... thank you both very much.

Tilqicom :

sorry for asking the obvious, but on your show button example: do I put both of the code blocks right inside posts.main.php ? I'm super-cautious and always back up the file before changing, but I like to know where to cut on the dotted line.

Again, it would be spectacular if this were in dashboard somewhere!

Thanks,
John

10 Nov 26, 2012 15:18

johnserenity wrote:

BINGO ! And muchas gracias.
You folks have a great product and superlative support... thank you both very much.

Tilqicom :

sorry for asking the obvious, but on your show button example: do I put both of the code blocks right inside posts.main.php ? I'm super-cautious and always back up the file before changing, but I like to know where to cut on the dotted line.

Again, it would be spectacular if this were in dashboard somewhere!

Thanks,
John

You mean the jQuery code ? Yea you can put it inside posts.main.php, shouldnt matter.But you might wrap it with a

jQuery(document).ready(function() { 
//jquery code
});


Form is loading...