hi,

I imported a module "COUNT" which count the number of nodes in the database.. my problem is it displays like this

TOTAL BLOG: 34
but all I want is just the number. How am I supposed to do in order for me omit the word "TOTAL"?

Comments

pbarnett’s picture

In the file template.php in your theme folder, add the following -

<?php 
function phptemplate_count_render($data, $delta) {
  $content_type = variable_get('count_content_type_'. $delta, 'page');
  // $output =  "<div id='count_node'> Total ". t($content_type) ."  : ". t($data) ."</div>" ; // This is the original line from the module
  $output =  "<div id='count_node'> Total ". t($content_type) ."  : ". t($data) ."</div>" ;
  return $output;
}
?>

Note that the tags are not necessary; I've just added them here to get the syntax highlighting.

anwar_max’s picture

function phptemplate_count_render($data, $delta) {
  $content_type = variable_get('count_content_type_'. $delta, 'page');
  // $output =  "<div id='count_node'> Total ". t($content_type) ."  : ". t($data) ."</div>" ; // This is the original line from the module
  $output =  "<div id='count_node'>". t($data) ."</div>" ;
  return $output;
}

Best Regards
Mohammad Anwar

pbarnett’s picture

Oops! You're right - I totally forgot to remove the one word that the OP wanted to remove!

Too early in the morning here :-)

ghenson22’s picture

thanks for all the help!!!