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: 349
  • Total: 349

[BLOCK] Unanswered Topics Block

Started by shengton, September 26, 2008, 09:26:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

IchBin

Put your image after the end of the <div>. Putting your image inside the div will not work like that.
You have it like this:
<div<img><a>></div>

It should be like this:
<div><img><a></div>

JPDeni

Before your topics print out, add this:

echo  '<div style="width: 100%; height: 23ex;overflow: auto>';

at the end of your code, add this

echo '</div>';

alhaudhie

i try this.. but not success

echo  '<div style="width: 100%; height: 23ex;overflow: auto>'; <img src="http://tbn0.google.com/images?q=tbn:pQBIIcIWd2dZQM:http://i.pbase.com/u16/sutha/upload/5123820.bullet.jpg" /> <a href="' . $scripturl . '?

topic=' . $row['ID_TOPIC'] . '">' . $row['subject'] . '</a></li><br>';

echo '</div>';

JPDeni

You'll need to post your whole code so I can show you where to put it.

alhaudhie

YES.. this is..


global $db_prefix, $scripturl, $user_info, $modSettings;

$number_to_display = 4; // Change this if you want a different number to display. Use 0 to list all of them.
$most_recent_first = 0; // If you want to display the oldest first, change this to 0

if(!empty($modSettings['recycle_enable'])) $recycle_board = $modSettings['recycle_board'];
else $recycle_board = 0;

//////////////////////////////////////////

($most_recent_first == 1) ? $order = 'DESC' : $order = 'ASC';
($number_to_display == 1) ? $limit = '' : $limit = "LIMIT " . $number_to_display;

$query = db_query(
"SELECT m.subject, t.ID_TOPIC
FROM {$db_prefix}topics as t, {$db_prefix}messages as m, {$db_prefix}boards AS b
WHERE t.numReplies = 0
AND t.ID_FIRST_MSG = m.ID_MSG
AND t.ID_BOARD = b.ID_BOARD
AND $user_info[query_see_board]
AND b.ID_BOARD != $recycle_board
AND m.subject NOT LIKE '%MOVED:%'
ORDER BY RAND() " .
$limit, __FILE__, __LINE__);

while ($row = mysql_fetch_assoc($query))
  echo  '<div style="width: 100%; height: 23ex;overflow: auto>'; <img src="http://tbn0.google.com/images?q=tbn:pQBIIcIWd2dZQM:http://i.pbase.com/u16/sutha/upload/5123820.bullet.jpg" /> <a href="' . $scripturl . '?

topic=' . $row['ID_TOPIC'] . '">' . $row['subject'] . '</a></li><br>';

echo '</div>';

JPDeni


global $db_prefix, $scripturl, $user_info, $modSettings;

$number_to_display = 4; // Change this if you want a different number to display. Use 0 to list all of them.
$most_recent_first = 0; // If you want to display the oldest first, change this to 0

if(!empty($modSettings['recycle_enable'])) $recycle_board = $modSettings['recycle_board'];
else $recycle_board = 0;

//////////////////////////////////////////

($most_recent_first == 1) ? $order = 'DESC' : $order = 'ASC';
($number_to_display == 1) ? $limit = '' : $limit = "LIMIT " . $number_to_display;

$query = db_query(
"SELECT m.subject, t.ID_TOPIC
FROM {$db_prefix}topics as t, {$db_prefix}messages as m, {$db_prefix}boards AS b
WHERE t.numReplies = 0
AND t.ID_FIRST_MSG = m.ID_MSG
AND t.ID_BOARD = b.ID_BOARD
AND $user_info[query_see_board]
AND b.ID_BOARD != $recycle_board
AND m.subject NOT LIKE '%MOVED:%'
ORDER BY RAND() " .
$limit, __FILE__, __LINE__);

echo  '<div style="width: 100%; height: 23ex;overflow: auto>';

while ($row = mysql_fetch_assoc($query))
  echo '<img src="http://tbn0.google.com/images?q=tbn:pQBIIcIWd2dZQM:http://i.pbase.com/u16/sutha/upload/5123820.bullet.jpg" />
        <a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '">' . $row['subject'] . '</a><br>';

echo '</div>';

alhaudhie

i think this is not work. there is no scroller down. And the first topic dosnt have bullet.

JPDeni

It's because there's a missing quotation mark. Let's try it again.


global $db_prefix, $scripturl, $user_info, $modSettings;

$number_to_display = 4; // Change this if you want a different number to display. Use 0 to list all of them.
$most_recent_first = 0; // If you want to display the oldest first, change this to 0

if(!empty($modSettings['recycle_enable'])) $recycle_board = $modSettings['recycle_board'];
else $recycle_board = 0;

//////////////////////////////////////////

($most_recent_first == 1) ? $order = 'DESC' : $order = 'ASC';
($number_to_display == 1) ? $limit = '' : $limit = "LIMIT " . $number_to_display;

$query = db_query(
"SELECT m.subject, t.ID_TOPIC
FROM {$db_prefix}topics as t, {$db_prefix}messages as m, {$db_prefix}boards AS b
WHERE t.numReplies = 0
AND t.ID_FIRST_MSG = m.ID_MSG
AND t.ID_BOARD = b.ID_BOARD
AND $user_info[query_see_board]
AND b.ID_BOARD != $recycle_board
AND m.subject NOT LIKE '%MOVED:%'
ORDER BY RAND() " .
$limit, __FILE__, __LINE__);

echo  '<div style="width: 100%; height: 23ex;overflow: auto">';

while ($row = mysql_fetch_assoc($query))
  echo '<img src="http://tbn0.google.com/images?q=tbn:pQBIIcIWd2dZQM:http://i.pbase.com/u16/sutha/upload/5123820.bullet.jpg" />
        <a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '">' . $row['subject'] . '</a><br>';

echo '</div>';

alhaudhie


FERNSIDEâ„¢

Very nice.

Where would I look to make this show as a page, like the read/unread pages, and can this be set for a particular board?
eg..   questions/help board

Thank You :)

This website is proudly hosted on Crocweb Cloud Website Hosting.