Closed (fixed)
Project:
Facebook-style Statuses Comments
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2010 at 10:51 UTC
Updated:
20 Jan 2011 at 13:14 UTC
Jump to comment: Most recent file
Comments
Comment #1
icecreamyou commentedComments are rendered using a theme function which you will need to override. Look in your theme; if there is a file called "template.php" then open it, if the file doesn't exist then create it and put this in it:
If you're creating the file, don't include the closing
?>tag. If you're adding this to a file that already exists, don't include the opening or closing<?php ?>tags. You will also probably want to use CSS to make the picture display inline, e.g.:For more info about overriding theme functions, see http://drupal.org/node/173880#function-override and http://drupal.org/node/457740
I think I will probably make this theme function into a template eventually, which will make it slightly easier to override. However, that won't happen for awhile.
Comment #2
baff commentedThanks a lot
Comment #4
johnhesston commentedHi IceCreamyou, how would I make user_picture use a preset imagecache picture?
I'm using this code in template.php, but it doesn't work. What am I doing wrong? Please help if you have the time.
function waffles_fbssc($author, $timestamp = NULL, $referer = NULL) {
$output = '
$output .= theme('imagecache', 'thumbnail', $author->picture, $alt, $title, $attributes);
$output .= '
'."\n";
if ($timestamp) {
$output .= $timestamp ? '
'."\n" : '';
$output .= $referer ? '
'."\n" : '';
}
$output .= '
'."\n";
return $output;
}
Comment #5
icecreamyou commentedjohnhesston, your question is different than the topic of this issue. Feel free to open a new one. In the future, unless you are absolutely sure that the old issue is identical to your new one and the old issue was not resolved, please open a new issue instead of reopening a closed one and give links to similar older issues you found when searching.
Comment #6
glitz commentedAfter following these instructions exactly, I am getting the following when going to my site...
Fatal error: Cannot redeclare theme_fbssc_item() (previously declared in /home2/pulsepos/public_html/sites/all/modules/fbssc/fbssc.module:140) in /home2/pulsepos/public_html/sites/all/themes/zeropoint/template.php on line 741
i made sure the php tags were not included in this already created file
Is this just releated to the theme I using, Or is there something in the code I need to change. I would really like to get users avatars to appear in fbssc
Comment #7
glitz commentedComment #8
icecreamyou commentedtheme_fbssc_item() is the function you have to override. In your template.php it should be declared as either MYTHEMENAME_fbssc_item() (recommended) or MYTHEMEENGINE_fbssc_item().
Comment #9
glitz commentedany luck with this? I have comments to appear but need a smaller version I have stored in image cache
Comment #10
GolDRoger commentedHi Ice, can I ask you a question please?
I've used your script and declaring correctly the funcion in
function framework_fbssc_item($comment, $classes = array(), $destination = '') {
(framework is my currently theme in use)
but nothing happens adding this in template.php, post are appearing without the thumbnail of the post commenter (for the images i use the default drupal system, not cck or other).
Maybe i have to do something other to make it working?
That's strange because when i add in the view poster picture, the image appear.
thx
Comment #11
GolDRoger commentedSorry i forgot to attach the image
Comment #12
GolDRoger commentedProblem solved, I've discovered why it wasn't appearing. Just runned update.php and pics was showed near posts.
Comment #13
Michsk commentedIce: dont get mad at me, i know you wanted a new issue but i really think we can keep this in here.
Here's howto use imagecache.