2 yabba Aug 29, 2008 12:17

Oh hey - thats nice! - does exactly what I want - Thanks ever so much!
Is it possible though to have the comments form itself not displayed - I tried setting 'disp_comment_form' => false, in _item_feedback.inc
and it did the trick -but
it also made it so the leave a comment links didn't work
urm, probably ... buggered if I can think of what it is off the top of my head though :p
¥
I am such a boob - either that or the last search for this info was influenced by too many Millers .... the answer is over in Skins - at least for nifty corners -
ok, nitfy corners, index.main.php around line 255, use this:
<?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) ---------------------
?>
Just so happens I'm using nifty corners - tho I don't see why it wouldn't work elsewhere.....
Yaaaay!
Um, once again its Miller time! :D
Hi,
I also try this trick to show comments on first page. It works for asevo skin but not for evocamp.
Does someone know why?
Mel
Edit: Forget it, I find why. I add in posts_main.php and it's fine.
Hi,
I tried this with asevo and it made my hole page go blank.
Would love to have this option on my blog. Any Advice?
What you add?
For Asevo, I just have to add this line
$c = 1; // force display of comments
It's around line 236 in index.main.php (I'm not sure, I think I modify also something else)
It give this
// ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
$c = 1; // force display of comments
skin_include( '_item_feedback.inc.php', array(
'before_section_title' => '<h4>',
'after_section_title' => '</h4>',
) );
Good luck!
Thanks mel_t
While THIS does indeed work, would love to take that extra step and hide the comment form, rather than having it show under each post. Tried CapnRob's code, but for some reason it is just not working...
You create a new file with an another name (copy from _item_feedback.inc.php to _item_feedback_noform.inc.php) and you remove this part. Don't forget to change name of your file in your index.main.php. It should work...
// ------------------ COMMENT FORM INCLUDED HERE ------------------
skin_include( '_item_comment_form.inc.php', array(
'disp_comment_form' => $params['disp_comment_form'],
'form_title_start' => $params['form_title_start'],
'form_title_end' => $params['form_title_end'],
'preview_start' => $params['preview_start'],
'preview_end' => $params['preview_end'],
'comment_template' => $params['comment_template'], // The template used for displaying individual comments (including preview)
) );
// Note: You can customize the default item feedback by copying the generic
// /skins/_item_comment_form.inc.php file into the current skin folder.
// ---------------------- END OF COMMENT FORM ---------------------
Hi mel_t,
Thanks for your assistance on this.... the only problem is now if someone wants to leave a comment there is no form available for them to fill out....
It doesn't have a link "let a comment"?? (scuse I don't know exact formulation, I have my b2evo in french ;-) )
Normally, if you keep your original _item_comment_form.inc.php intact, it should display the post+comment+form.
At least, I think so...
It does have a link to leave a comment but when you click on it it opens up a new page with the post and where the form should be is blank...
mel_t,
you said you got CapnRob's code to work in asevo... could you post your version of that same code so I can try it as I am also using asevo....
Oh.. I see, asevo skins does'nt have the same files than my evocamp skin since it have a file "single_main" where I leave the form.
I'm quite sorry, my actual knowledge is not enough to solve your problem. Maybe someone else could help?
Good luck,
Mélanie
Is there a way to allow comments to be displayed on one blog versus all?
I have tried everything from this site regarding enabling my comments to be seen on the main blog page at the bottom of the blog post..
... yet, it eludes me!
If someone is bored, or incredibly kind-hearted, if you wouldn't mind taking a look at my site?
p.s - I have no feedback.php, apparently, not sure if I need it or what I am supposed to put in it.
Thanks so much for all you guys do! :oops:
skins/[skin name]/index.main.php ( or posts.main.php ... whichever ), find a section of code that looks like this :
<?php
// ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
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) ---------------------
?>
and change it to look something like this :
<?php
$foo = array(
'before_section_title' => '<h4>',
'after_section_title' => '</h4>',
'disp_comment_form' => $c,
);
$c = 1;
// ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
skin_include( '_item_feedback.inc.php', $foo );
// 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) ---------------------
?>
¥
my skin avoecamp doesnt have this,,,,
FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE :'(
In that case, copy and paste the above code into your skins posts.main.php just after this section of code :
<?php
// List all tags attached to this post:
$Item->tags( array(
'before' => '<div class="posttags">'.T_('Tags').': ',
'after' => '</div>',
'separator' => ', ',
) );
?>
</div>
<!-- Paste the code from the previous post here -->
¥
I tried your suggestions for inserting the code into my .index and/or .posts and it still isn't working. It doesn't give me errors or anything, it just doesn't change.
I may just change my skin to rectify the issue..
Thank you Yabba for trying to help you angel! =D
What skin are you using?
¥
¥åßßå wrote:
What skin are you using?
¥
It is the MiamiBeachtheme skin, which I have modified (appearance-wise, the code hasn't changed much).
Thanks!
Well, it works for me :P ( [url=http://innervisions.org.uk/?tempskin=MiamiBeachBlogTheme]demo[/url] )
The only changes I made were in posts.main.php ( approx line 146 )
<?php
$c = 1;
// ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
skin_include( '_item_feedback.inc.php', array(
'before_section_title' => '<h4>',
'after_section_title' => '</h4>',
'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) ---------------------
?>
¥
Yaaay! Many stars from me to you! :D really, Thanks so much!!!
I don't suppose I could be even more picky and find a way to hide the mass of comments, so that only the number of comments show up initially, (ex: "3 comments" ) and the "3 comments" can be clicked on for an expanded view?
Then my nerdy process will be complete, and I will not bother anyone anymore. 8|
give an inch take a mile :|
Ok, all this goes in posts.main.php.
Change the top of the file to look a tad like this :
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
// newly added bit
require_js( '#jquery#' );
add_headline( '<script type="text/javascript">
//<![CDATA[
jQuery(document).ready(function(){
jQuery( ".feedbackText" ).click( function(){
var id = "feedback_"+jQuery( this ).attr( "id" );
jQuery( "#"+id).toggle( "slow" );
}).trigger("click");
});
//]]>
</script>');
// end of new bit
// This is the main template; it may be used to display very different things.
// Do inits depending on current $disp:
skin_init( $disp );
Then meander down to the bit you added last time and change that section to look like this :
<?php
if( $total = generic_ctp_number( $Item->ID, 'feedbacks', 'published' ) )
{
echo '<div><span class="feedbackText" id="for_item_'.$Item->ID.'">'.$total.' comments</span>'."\n";
echo '<div id="feedback_for_item_'.$Item->ID.'">'."\n";
$c = 1;
// ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
skin_include( '_item_feedback.inc.php', array(
'before_section_title' => '<h4>',
'after_section_title' => '</h4>',
'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) ---------------------
echo '</div>'."\n";
echo '</div>'."\n";
}
?>
¥
Yabba, really and truly-- thank you for teaching me that little ditty.
For some reason, after the changes.. now when I just casually go to the blog, it pops up the admin window that will access my hosting and all my root files. 8|
Since I can't have that happen, I'm changing the skin for now, until I can figure out what's going on, but I will be switching back as I do quite like what you've shown me with the comments!
Nevermind! I linked to a photo that required admin access in my blog, so it popped it up. Oh the amazing things we do when we're not technologically aware.
Anyhoo.. thanks again for everything. :lol:
No worries ;)
¥
This is quite confusing for someone who doesn't really know coding. Any chance to make it a widget or plugin or something? :)
It's a smidge hard to hack a skin from inside a plugin ;)
¥
I have been trying to figure out how to get comments to display on ASEVO but only when a comment has been posted. The only thing I have been able to do is get the "Post a Comment" form to display under every post. This is not what I am looking for. I am just trying to get comments to display when and if there are any.
Any assistance would be much appreciated!!
In that case, this is certainly the right thread to read ;)
¥
I have tried reading this, hacking the code, etc, but to no avail. Could you guide me in the right direction. Just want the comments inline as stated, but am using glossyblue skin. Tried adding the section of code:
<?php
$c = 1;
// ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
skin_include( '_item_feedback.inc.php', array(
'before_section_title' => '<h4>',
'after_section_title' => '</h4>',
'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) ---------------------
?>
in the posts.main.php but got a fatal error. Added it right before the post lists mode section and got this error:
Fatal error: Call to a member function can_see_comments() on a non-object in /home/xxx/public_html/xxx/xxx/skins/glossyblue/_item_feedback.inc.php on line 47
Thanks for any help.
Doc
It needs to go inside your post loop, not before it ;)
¥
Thank you. Worked perfect :p
Try adding $c = 1; before the skin_include() bit for _feedback.php
¥