xtemplate_comment - show avg score / # of users

Below is a the part I've edited from function xtemplate_comment to get:

a) the 'average comment moderation vote total' each comment has received

AND

b) the total number of votes each comment has received to show up at the end of the "submitted by" statement which gets printed out on all comments.

The good news is that the comment vote average is showing up wonderfully, the bad news is that for the life of me I can't get the "number of users who voted" on the comment to show up next to it (it always just displays "1" no matter if the comment has 0, 1, 2, 3 or more votes).

Basically, I know that the information I want to show involves the "users" field from the "comments" table in the database and that "users" itself is serialized, arrayed, etc. Beyond that, I'm over my head at this point and have tried to get this to work for many hours...

function xtemplate_comment($comment, $links = 0) {
  global $xtemplate;
$users = unserialize($comment->users);
  $xtemplate->template->assign(array (
    "new"          => t("new"),
    "submitted" => t("Submitted by %a on %b    (%c/%d)",
     array("%a" => format_name($comment),
              "%b" => format_date($comment->timestamp),
              "%c" => format_score($comment->score),
	      "%d" => count(format_commenttotal($comment->users - 1)))),

Sub Menu

I have created New Menu block add One Main Menu. There are sub menus if Main Menu. When I click on Main Menu page get display but not the submenus although these are enable and Main Menu showing that arrow symbol indicating submenus are presend.
When I have assing page tobe display for Main Menu which is not created means xyz , then page not found error get display and sub menus are also get display. But when there us page which is valide at that time there is problem.
Please give me solution.
Thanks

User error

user error: Table 'table_xyz'.page' doesn't exist
query: SELECT link, description FROM page WHERE nid = 35 in /www/f/mywebsite/htdocs/xyz/includes/database.mysql.inc on line 125.

Can some one point out the problem?

I just re installed Drupal 4.5.7 to existing database.

The many faces of Drupal

Hi,

to many of you the following link propably is not really breaking news, to some of you however, either if looking for Drupal web design inspiration or general information of what can really be achieved with Drupal, you might want to check out beloved del.icio.us for the tag "drupalsites". I stumbled upon this just by chance although I have been using the tag "drupalsites" myself for my own link collection quite often and I was SO amazed of the impressive richness and difersity of what Drupal can all be and become!

Dynamic Menu

I want to design menu blocks which should be dynamic. Means I want menu block such that some menus will be disable one page and some on another page.
If any one have solution please relpy me.

Password Blues

I installed Drupal on my local host. The database was not assigned a password. Drupal was showing error in line 31 of database.mysql.

So i took off the password parameter in the line 31.

Here is the new line

$connection = mysql_connect($url['host'], $url['user']) or die(mysql_error());
mysql_select_db(substr($url['path'], 1), $connection) or die('unable to select database');

Drupal works fine.....

Is it ok, or I am doing something wrong?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 4.5.x or older