Guest User

Untitled

a guest
Dec 7th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.45 KB | None | 0 0
  1. REPLACE THIS
  2. »»»»»»»»»»»»
  3.  
  4. function get_thanks_topic_reput($topic_id)
  5. {
  6.     global $max_topic_thanks, $config, $phpbb_root_path, $template, $topic_thanks;
  7.     $template->assign_block_vars('topicrow.reput', array(
  8.         'TOPIC_REPUT'               => $topic_thanks[$topic_id],
  9.         'S_THANKS_TOPIC_REPUT_VIEW' => $config['thanks_topic_reput_view'],
  10.         'S_THANKS_REPUT_GRAPHIC'    => $config['thanks_reput_graphic'],
  11.         'THANKS_REPUT_HEIGHT'       => sprintf('%dpx', $config['thanks_reput_height']),
  12.         'THANKS_REPUT_GRAPHIC_WIDTH'=> sprintf('%dpx', $config['thanks_reput_level']*$config['thanks_reput_height']),
  13.         'THANKS_REPUT_IMAGE'        => ($config['thanks_reput_image']) ? $phpbb_root_path . $config['thanks_reput_image'] : '',
  14.         'THANKS_REPUT_IMAGE_BACK'   => ($config['thanks_reput_image_back']) ? $phpbb_root_path . $config['thanks_reput_image_back'] : '',  
  15.     ));
  16. }
  17.  
  18. WITH THIS
  19. »»»»»»»»»
  20.  
  21.  
  22. function get_thanks_topic_reput($topic_id)
  23. if (isset($topic_thanks[$topic_id]))
  24. {
  25.     global $max_topic_thanks, $config, $phpbb_root_path, $template, $topic_thanks;
  26.     $template->assign_block_vars('topicrow.reput', array(
  27.         'TOPIC_REPUT'               => $topic_thanks[$topic_id],
  28.         'S_THANKS_TOPIC_REPUT_VIEW' => $config['thanks_topic_reput_view'],
  29.         'S_THANKS_REPUT_GRAPHIC'    => $config['thanks_reput_graphic'],
  30.         'THANKS_REPUT_HEIGHT'       => sprintf('%dpx', $config['thanks_reput_height']),
  31.         'THANKS_REPUT_GRAPHIC_WIDTH'=> sprintf('%dpx', $config['thanks_reput_level']*$config['thanks_reput_height']),
  32.         'THANKS_REPUT_IMAGE'        => ($config['thanks_reput_image']) ? $phpbb_root_path . $config['thanks_reput_image'] : '',
  33.         'THANKS_REPUT_IMAGE_BACK'   => ($config['thanks_reput_image_back']) ? $phpbb_root_path . $config['thanks_reput_image_back'] : '',  
  34.     ));
  35. }
  36. else
  37. {
  38.     global $max_topic_thanks, $config, $phpbb_root_path, $template, $topic_thanks;
  39.     $template->assign_block_vars('topicrow.reput', array(
  40.         'TOPIC_REPUT'               => 0,
  41.         'S_THANKS_TOPIC_REPUT_VIEW' => $config['thanks_topic_reput_view'],
  42.         'S_THANKS_REPUT_GRAPHIC'    => $config['thanks_reput_graphic'],
  43.         'THANKS_REPUT_HEIGHT'       => sprintf('%dpx', $config['thanks_reput_height']),
  44.         'THANKS_REPUT_GRAPHIC_WIDTH'=> sprintf('%dpx', $config['thanks_reput_level']*$config['thanks_reput_height']),
  45.         'THANKS_REPUT_IMAGE'        => ($config['thanks_reput_image']) ? $phpbb_root_path . $config['thanks_reput_image'] : '',
  46.         'THANKS_REPUT_IMAGE_BACK'   => ($config['thanks_reput_image_back']) ? $phpbb_root_path . $config['thanks_reput_image_back'] : '',  
  47.     ));
  48. }
Add Comment
Please, Sign In to add comment