TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 330
  • Total: 330

[Block] Number of replies at recent topics block

Started by johnkal, June 08, 2009, 08:19:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mick

Wow...... that did the trick.    Thank you. ;)

IchBin

$topic['num_replies'] and $topic['num_views'] are both available in that context.

You can add them where ever you'd like.

alhaudhie

its cant be done... can u send the complete one.. tq.. i have several times...

IchBin

Put this code right after the $what=ssi_recentTopics('20', NULL, 'array'); line. Please copy and paste the text that is displayed when you view the page after you have saved the change. You'll then want to remove this line.
echo '<pre>', print_r($what) ,'</pre>';

alhaudhie

#24
Quote from: IchBinâ„¢ on October 10, 2009, 05:15:00 AM
Put this code right after the $what=ssi_recentTopics('20', NULL, 'array'); line. Please copy and paste the text that is displayed when you view the page after you have saved the change. You'll then want to remove this line.
echo '<pre>', print_r($what) ,'</pre>';

sorry coz i dont know what to do...

IchBin

Nevermind, I tested everything for you. Numreplies and Numviews is not available in the SSI unless you were to make modifications to the SSI.php file. If you don't want to do that, I would look for a code snippet that does what you want. If you don't care, then let us know and we'll let you know what changes you need to make to your file.

jebong

sorry.. coz im reg new acc coz wrong email change in profile.

back to the topic.. for me now.. better if i can get help to change ssi.php file . tq

IchBin

Open SSI.php and find your way to the recentTopics function.

Find this code:
m.posterTime, ms.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, b.ID_BOARD, b.name AS bName,

Replace with this code:
m.posterTime, ms.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, b.ID_BOARD, b.name AS bName, t.numViews, t.numReplies,

Find this code:
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',

Add after that line:
'numViews' => $row['numViews'],
'numReplies' => $row['numReplies'],


Now you can use $topic['numViews'] and $topic['numReplies'] in your code to get those numbers.

jebong

#28
TQ.. got it with litle editing. TQ

Now im trying to put msg icon... can i? and how to put it?  i mean post topic icon.. hot topic - very hot topic and etc..


IchBin

I'm not sure how the icon's are created at the moment, but I do know that $topic['icon'] is available in this code.

This website is proudly hosted on Crocweb Cloud Website Hosting.