Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Avatars problem

Asked Modified Viewed 1,722 times
P
pekelpiel
P
Every shadow No Matter How Deep, Is Threatened By Morning Light.
  • Member, joined since
  • Contributed 139 posts on the community forums.
  • Started 37 threads in the forums
  • Started this discussions
asked
Member

hi

avatars is nit displaying when a member leaves a comments on new news posted. Did i miss a setting or something? please help
0 replies

15 posts

S
Sveinungs
S
  • Veteran Member, joined since
  • Contributed 935 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

Per default, the avatars will only show in forum and in profile.php (and of course edit_profile.php)

I belive there is a modification you can do to to have the avatars also on comments.

For your question - you are not missing a setting.
0 replies
P
pekelpiel
P
Every shadow No Matter How Deep, Is Threatened By Morning Light.
  • Member, joined since
  • Contributed 139 posts on the community forums.
  • Started 37 threads in the forums
  • Started this discussions
answered
Member

any idea how to edit this profile.php?

any help will be greatly appreciated

0 replies
S
Sveinungs
S
  • Veteran Member, joined since
  • Contributed 935 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

I see you have problem with the avatar uploads itself (from you other post).
So I have to ask:

Have you made any changes to your files?
Have you installed any infusions?
Is all your files CHMOD as they should be?

There's no help modifing "edit_profile.php" or "profile.php". You need to track down the reason for avatars not working first.

Could you be so kind to provide a link to your site?
0 replies
P
pekelpiel
P
Every shadow No Matter How Deep, Is Threatened By Morning Light.
  • Member, joined since
  • Contributed 139 posts on the community forums.
  • Started 37 threads in the forums
  • Started this discussions
answered
Member

can i pm it to you
0 replies
S
Sveinungs
S
  • Veteran Member, joined since
  • Contributed 935 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

If there are strong reasons why you can not post it here, then yes - you can PM it :)
0 replies
P
pekelpiel
P
Every shadow No Matter How Deep, Is Threatened By Morning Light.
  • Member, joined since
  • Contributed 139 posts on the community forums.
  • Started 37 threads in the forums
  • Started this discussions
answered
Member

avatars is uploading and displaying in the profile, the problem is how do i get avatars to show on commnets on the main page - (not in forums)
0 replies
S
Sveinungs
S
  • Veteran Member, joined since
  • Contributed 935 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

OK - read my first reply in this thread - it don't work this way per default.

Have not tried this, but you'll need to edit the file
"includes/comments_include.php"

If you search a bit on this site, maybe somebody have already done this.
The MODS site is also a good place to look for this function/mod.
0 replies
W
WEC
W
WEC 10
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 5 threads in the forums
answered
Veteran Member

In includes\comments_include.php:

Find:

$result = dbquery(
      "SELECT tcm.*,user_name FROM ".DB_PREFIX."comments tcm
      LEFT JOIN ".DB_PREFIX."users tcu ON tcm.comment_name=tcu.user_id
      WHERE comment_item_id='$cid' AND comment_type='$ctype'
      ORDER BY comment_datestamp ASC"
   );


Replace with:

$result = dbquery(
      "SELECT tcm.*,user_name, user_avatar FROM ".DB_PREFIX."comments tcm
      LEFT JOIN ".DB_PREFIX."users tcu ON tcm.comment_name=tcu.user_id
      WHERE comment_item_id='$cid' AND comment_type='$ctype'
      ORDER BY comment_datestamp ASC"
   );    // , user_avatar added


Find:

if ($data['user_name']) {
            echo "<a href='".BASEDIR."profile.php?lookup=".$data['comment_name']."'>".$data['user_name']."</a>";
         }


Replace with:

if ($data['user_name']) {
            echo "<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$data['user_name']."' width='50' height='50'>&nbsp;&nbsp;<a href='".BASEDIR."profile.php?lookup=".$data['comment_name']."'>".$data['user_name']."</a>";    // <img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$data['user_name']."' width='50' height='50'>&nbsp;&nbsp; added
         }

0 replies
P
pekelpiel
P
Every shadow No Matter How Deep, Is Threatened By Morning Light.
  • Member, joined since
  • Contributed 139 posts on the community forums.
  • Started 37 threads in the forums
  • Started this discussions
answered
Member

i did this and now my site is down, cant view any posts.....help please
0 replies
P
pekelpiel
P
Every shadow No Matter How Deep, Is Threatened By Morning Light.
  • Member, joined since
  • Contributed 139 posts on the community forums.
  • Started 37 threads in the forums
  • Started this discussions
answered
Member

i have tried to change it back, still not working, here is the comments include php file. help please

<?php
/*---------------------------------------------------+
| PHPFusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| Comments system developed by CrappoMan
| email: simonpatterson@dsl.pipex.com
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../index.php"); exit; }

include LOCALE.LOCALESET."comments.php";

function showcomments($ctype,$cdb,$ccol,$cid,$clink) {

   global $settings,$locale,$userdata,$aidlink;
   
   if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) {
      $flood = false;
      if (dbrows(dbquery("SELECT $ccol FROM ".DB_PREFIX."$cdb WHERE $ccol='$cid'"))==0) {
         fallback(BASEDIR."index.php");
      }
      if (iMEMBER) {
         $comment_name = $userdata['user_id'];
      } elseif ($settings['guestposts'] == "1") {
         $comment_name = trim(stripinput($_POST['comment_name']));
         $comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
         if (isNum($comment_name)) $comment_name="";
      }
      $comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
      $comment_smileys = isset($_POST['disable_smileys']) ? "0" : "1";
      if ($comment_name != "" && $comment_message != "") {
         $result = dbquery("SELECT MAX(comment_datestamp) AS last_comment FROM ".DB_PREFIX."comments WHERE comment_ip='".USER_IP."'");
         if (!iSUPERADMIN || dbrows($result) > 0) {
            $data = dbarray($result);
            if ((time() - $data['last_comment']) < $settings['flood_interval']) {
               $flood = true;
               $result = dbquery("INSERT INTO ".$db_prefix."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
               if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
                  if (iMEMBER) $result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
               }
            }
         }
         if (!$flood) $result = dbquery("INSERT INTO ".DB_PREFIX."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')");
      }
      redirect($clink);
   }

   tablebreak();
   opentable($locale['c100']);
   $result = dbquery(
      "SELECT tcm.*,user_name FROM ".DB_PREFIX."comments tcm
      LEFT JOIN ".DB_PREFIX."users tcu ON tcm.comment_name=tcu.user_id
      WHERE comment_item_id='$cid' AND comment_type='$ctype'
      ORDER BY comment_datestamp ASC"
   );



   if (dbrows($result) != 0) {
      $i = 0;
      echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
      while ($data = dbarray($result)) {
         echo "<tr>\n<td class='".($i% 2==0?"tbl1":"tbl2")."'><span class='comment-name'>\n";
         if ($data['user_name']) {
            echo "<a href='".BASEDIR."profile.php?lookup=".$data['comment_name']."'>".$data['user_name']."</a>";
         }




            echo $data['comment_name'];
         }
         if ($data['comment_smileys'] == "1") {
            $comment_message = parsesmileys($data['comment_message']);
         } else {
            $comment_message = $data['comment_message'];
         }
         $comment_message = nl2br(parseubb($comment_message));
         echo "</span>\n<span class='small'>".$locale['041'].showdate("longdate", $data['comment_datestamp'])."</span><br>\n";
         echo $comment_message."</td>\n</tr>\n";
         $i++;
      }
      if (checkrights("C")) echo "<tr>\n<td align='right' class='".($i% 2==0?"tbl1":"tbl2")."'><a href='".ADMIN."comments.php".$aidlink."&amp;ctype=$ctype&amp;cid=$cid'>".$locale['c106']."</a></td>\n</tr>\n";
      echo "</table>\n";
   } else {
      echo $locale['c101']."\n";
   }
   closetable();
   tablebreak();
   opentable($locale['c102']);
   if (iMEMBER || $settings['guestposts'] == "1") {
      echo "<form name='inputform' method='post' action='$clink'>
<table align='center' cellspacing='0' cellpadding='0' class='tbl'>\n";
      if (iGUEST) {
         echo "<tr>
<td>".$locale['c103']."</td>
</tr>
<tr>
<td><input type='text' name='comment_name' maxlength='30' class='textbox' style='width:100%;'></td>
</tr>\n";
      }
      echo "<tr>
<td align='center'><textarea name='comment_message' rows='6' class='textbox' style='width:400px'></textarea><br>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('comment_message', '[b]', '[/b]');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('comment_message', '[i]', '[/i]');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('comment_message', '[u]', '[/u]');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('comment_message', '[url]', '[/url]');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('comment_message', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('comment_message', '[img]', '[/img]');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('comment_message', '[center]', '[/center]');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('comment_message', '[small]', '[/small]');\">
<input type='button' value='code' class='button' style='width:40px;' onClick=\"addText('comment_message', '[code]', '
');\">
<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('comment_message', '

Quote

', '
');\">
<br><br>
".displaysmileys("comment_message")."
</tr>
<tr>
<td align='center'><input type='checkbox' name='disable_smileys' value='1'>".$locale['c107']."<br><br>
<input type='submit' name='post_comment' value='".$locale['c102']."' class='button'></td>
</tr>
</table>
</form>\n";
} else {
echo $locale['c105']."\n";
}
closetable();
}
?>[/code]

EDIT: Code-tags inserted (PMM)
Edited by Christian on 09-01-2007 19:40,
0 replies
S
Sveinungs
S
  • Veteran Member, joined since
  • Contributed 935 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

If this caused your site to crash - reupload the orignal comments_include.php (from the downloaded core package) - and it'll be alright.
0 replies
P
pekelpiel
P
Every shadow No Matter How Deep, Is Threatened By Morning Light.
  • Member, joined since
  • Contributed 139 posts on the community forums.
  • Started 37 threads in the forums
  • Started this discussions
answered
Member

i realy do not undertsand, i am not as bright as you
0 replies
C
Christian
C
Best regards,
Christian Damsgaard Jørgensen.
  • Member, joined since
  • Contributed 125 posts on the community forums.
  • Started 4 threads in the forums
answered
Member

Quote

pekelpiel wrote:
i realy do not undertsand, i am not as bright as you

1. You can download the full package again, and overwrite your modified comments_include.php with the original file. Then it should be OK.

2. Unzip the attached one, and overwrite it. Then it should be OK, too ;)

You find the file, in your includes-folder.

If you need the modification, I'll look into it tonight.
0 replies
W
WEC
W
WEC 10
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 5 threads in the forums
answered
Veteran Member

This is the code changes posted above.
0 replies
P
pekelpiel
P
Every shadow No Matter How Deep, Is Threatened By Morning Light.
  • Member, joined since
  • Contributed 139 posts on the community forums.
  • Started 37 threads in the forums
  • Started this discussions
answered
Member

thank you very much, i almost had an heart atack, it works again thank u
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 15 posts
  • Votes 0 votes
  • Topic users 4 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet