Advertisement:

Author Topic: Aide pour modification de ss_recentPosts  (Read 5324 times)

Offline CasTle

  • Semi-Newbie
  • *
  • Posts: 36
Aide pour modification de ss_recentPosts
« on: December 05, 2004, 02:43:17 PM »
Bonjours

j'aurais voulus savoir si cela etait possible d'avoir une ptite icones lus/non lus lorsque que l'on utilise <?php ssi_recentPosts(); ?> et de remplacer le format de la date par [jj/mm/aaaa - h:m:s]
j'ai cherché un peu pour modifier l'apparence de ssi_recentPosts, et il n'y a plus que ca ou je n'ai pas trouvé la solution

voila a peu pret ce que j'ai fais:

       test de message  par CasTle Novembre 26, 2004, 11:51:55

et ce que je voudrais

       [jj/mm/aaaa - h:m:s] test de message par CasTle

Merci de votre aide

Offline Meriadoc

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,263
  • Gender: Male
  • For the world is changing
    • Philip Renich: Websites
Re: Aide pour modification de ss_recentPosts
« Reply #1 on: December 05, 2004, 05:18:35 PM »
la date est un option de chaque membre, mais tu peux le faire.
En SSI.php, retrouve à ligne 243
Code: [Select]
'time' => timeformat($row['posterTime']),et remplace avec
Code: [Select]
'time' => date('d/m/Y - H:i:s',$row['posterTime']),
puis tu iras: 05/12/2004 - 14:43:12

je rechererai de l'icones...
If I know the way home and am walking along it drunkenly, is it any less the right way because I am staggering from side to side? : Leo Tolstoy
Everything I know I learned from Calvin and Hobbes.
And patience is about the most useful thing you could ever have.  That and backups. : [Unknown]
If I choose to send thee, Tuor son of Huor, then believe not that thy one sword is not worth the sending. : Ulmo, Lord of the Waters - Unfinished Tales, by J.R.R. Tolkien

Offline CasTle

  • Semi-Newbie
  • *
  • Posts: 36
Re: Aide pour modification de ss_recentPosts
« Reply #2 on: December 05, 2004, 09:03:43 PM »
Merci meriadoc ca marche nikel

j'ai commencé a chercher pour l'icone lu/non lus et j'ai trouvé ca:

a la ligne 249 remplacer:
Code: [Select]
[', $post['board']['link'], ']
par:
Code: [Select]
';
if ($board['new'])
echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';

else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
echo '

cela a bien pour effet de me placer une icone devant la ligne des posts mais ne m'affiche que une des dernier post.


voila

@++

Offline CasTle

  • Semi-Newbie
  • *
  • Posts: 36
Re: Aide pour modification de ss_recentPosts
« Reply #3 on: December 06, 2004, 08:04:27 AM »
bon j'viens de voir en postant avec un autre compte que y'avais deja l'icone qui apparaissait lorsque le post n'est pas encore vu

donc c'est du tout bon

j'vais regardé pour que quand le post a ete lus ca affiche une autre icone

encore merci meriadoc

j'vous tiens au courant

@+++

Offline Meriadoc

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,263
  • Gender: Male
  • For the world is changing
    • Philip Renich: Websites
Re: Aide pour modification de ss_recentPosts
« Reply #4 on: December 06, 2004, 10:17:16 PM »
je suis heureux que la date marche
malheureusment, je n'ai pas comprendu tout que vous avez dit. Peut-etre que je suis fatigué (encore! ;)) ou c'est juste un peu plus difficile pour moi.
Si Ap2 peux le traduire pour moi ou vous aide lui-meme, c'est bon :)

Alors, je pense que vous avez une mesure de succès, mais il y a toujours une problème, mais c'est la problème je ne sais pas ;)
If I know the way home and am walking along it drunkenly, is it any less the right way because I am staggering from side to side? : Leo Tolstoy
Everything I know I learned from Calvin and Hobbes.
And patience is about the most useful thing you could ever have.  That and backups. : [Unknown]
If I choose to send thee, Tuor son of Huor, then believe not that thy one sword is not worth the sending. : Ulmo, Lord of the Waters - Unfinished Tales, by J.R.R. Tolkien

Offline Alexandre P.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,044
  • Gender: Male
    • LivreSansPage
Re: Aide pour modification de ss_recentPosts
« Reply #5 on: December 06, 2004, 11:11:44 PM »
Présentement, une icône pour marquer qu'un message est non lu est affiché.  Castle aimerait ajouter une autre image à côté de ceux déjà lus.

Presently, an icon is displayed next to the topic title when the subject has not been read.  Castle would like to add another image to indicate a read subject.
Aucun support par M.P., courriel ou messagerie instantanée / No support by P.M., email or I.M.

Offline Meriadoc

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,263
  • Gender: Male
  • For the world is changing
    • Philip Renich: Websites
Re: Aide pour modification de ss_recentPosts
« Reply #6 on: December 07, 2004, 12:46:15 AM »
thanks :)

castle, peux vous me donnez votre code?
If I know the way home and am walking along it drunkenly, is it any less the right way because I am staggering from side to side? : Leo Tolstoy
Everything I know I learned from Calvin and Hobbes.
And patience is about the most useful thing you could ever have.  That and backups. : [Unknown]
If I choose to send thee, Tuor son of Huor, then believe not that thy one sword is not worth the sending. : Ulmo, Lord of the Waters - Unfinished Tales, by J.R.R. Tolkien

Offline CasTle

  • Semi-Newbie
  • *
  • Posts: 36
Re: Aide pour modification de ss_recentPosts
« Reply #7 on: December 07, 2004, 06:00:04 PM »
voila le code tel qu'il est maintenant

Code: [Select]
function ssi_recentPosts($num_recent = 8, $exclude_boards = array(), $output_method = 'echo')
{
global $context, $settings, $scripturl, $txt, $db_prefix, $ID_MEMBER, $user_info, $modSettings, $options;

// Find all the posts.  Newer ones will have higher IDs.
$request = db_query("
SELECT
m.posterTime, m.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, m.ID_BOARD, b.name AS bName,
IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'] ? '1 AS isRead, 0 as logTime' : '
IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) >= GREATEST(m.posterTime, m.modifiedTime) AS isRead,
IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) AS logTime') . "
FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? "
LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = m.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = m.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '') . "
WHERE b.ID_BOARD = m.ID_BOARD" . (empty($exclude_boards) ? '' : "
AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")") . "
AND $user_info[query_see_board]
ORDER BY m.ID_MSG DESC
LIMIT $num_recent", __FILE__, __LINE__);
$posts = array();
while ($row = mysql_fetch_assoc($request))
{
// Censor the subject.
censorText($row['subject']);

// Build the array.
$posts[] = array(
'poster' => array(
'id' => $row['ID_MEMBER'],
'name' => $row['posterName'],
'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => strlen(un_htmlspecialchars($row['subject'])) > 0 ? htmlspecialchars(substr(un_htmlspecialchars($row['subject']), 0, 1) . '...') : $row['subject'],
'time' => date('d/m/y - H:i',$row['posterTime']),
'timestamp' => $row['posterTime'],
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . ';topicseen#msg' . $row['ID_MSG'],
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] . '">' . $row['subject'] . '</a>',
'new' => !empty($row['isRead']),
'newtime' => $row['logTime']
);
}
mysql_free_result($request);

// Just return it.
if ($output_method != 'echo' || empty($posts))
return $posts;

echo '
<table border="0" class="ssi_table">
<tr>
<th align="left">auteur</th>
<th align="left">topics</th>
<th align="left">date</th>
</tr>
';
foreach ($posts as $post)
echo '
<tr>
<td>[', $post['poster']['link'], ']</td>
<td valign="top">
<a href="', $post['href'], '">', $post['subject'], '</a>
', $post['new'] ? '' : ' <a href="' . $scripturl . '?topic=' . $post['topic'] . '.from' . $post['newtime'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>', '
</td>
<td align="right">
', $post['time'], '
</td>
</tr>';
echo '
</table>';
}

voila

Offline Meriadoc

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,263
  • Gender: Male
  • For the world is changing
    • Philip Renich: Websites
Re: Aide pour modification de ss_recentPosts
« Reply #8 on: December 07, 2004, 09:01:25 PM »
euh, le fonction n'est pas bon. dans l'array $parts[] il n'y a pas un sous-array board[], mais dans ma fichier, j'ai cette sous-array (comme: $parts['board']['link'])
Alors, je pense que tu as un tres modifié version de la fichier. Voici le fonction que j'ai.

Code: [Select]
// Recent post list:   [board] Subject by Poster Date
function ssi_recentPosts($num_recent = 8, $exclude_boards = array(), $output_method = 'echo')
{
global $context, $settings, $scripturl, $txt, $db_prefix, $ID_MEMBER, $user_info, $modSettings;

// Find all the posts.  Newer ones will have higher IDs.
$request = db_query("
SELECT
m.posterTime, m.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, m.ID_BOARD, b.name AS bName,
IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'] ? '1 AS isRead, 0 AS logTime' : '
IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) >= GREATEST(m.posterTime, m.modifiedTime) AS isRead,
IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) AS logTime') . "
FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? "
LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = m.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = m.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '') . "
WHERE m.ID_MSG >= " . ($modSettings['maxMsgID'] - 5 * $num_recent) . "
AND b.ID_BOARD = m.ID_BOARD" . (empty($exclude_boards) ? '' : "
AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")") . "
AND $user_info[query_see_board]
ORDER BY m.ID_MSG DESC
LIMIT $num_recent", __FILE__, __LINE__);
$posts = array();
while ($row = mysql_fetch_assoc($request))
{
// Censor the subject.
censorText($row['subject']);

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['ID_BOARD'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['ID_TOPIC'],
'poster' => array(
'id' => $row['ID_MEMBER'],
'name' => $row['posterName'],
'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => strlen(un_htmlspecialchars($row['subject'])) > 25 ? htmlspecialchars(substr(un_htmlspecialchars($row['subject']), 0, 22) . '...') : $row['subject'],
'time' => timeformat($row['posterTime']),
'timestamp' => $row['posterTime'],
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . ';topicseen#msg' . $row['ID_MSG'],
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] . '">' . $row['subject'] . '</a>',
'new' => !empty($row['isRead']),
'newtime' => $row['logTime']
);
}
mysql_free_result($request);

// Just return it.
if ($output_method != 'echo' || empty($posts))
return $posts;

echo '
<table border="0" class="ssi_table">';
foreach ($posts as $post)
echo '
<tr>
<td align="right" valign="top" nowrap="nowrap">
[', $post['board']['link'], ']
</td>
<td valign="top">
<a href="', $post['href'], '">', $post['subject'], '</a>
', $txt[525], ' ', $post['poster']['link'], '
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.from' . $post['newtime'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>', '
</td>
<td align="right" nowrap="nowrap">
', $post['time'], '
</td>
</tr>';
echo '
</table>';
}
Alors, j'ai lu le fonction, et il y a des code pour l'iconne nouvelle que tu as voulu.
Code: [Select]
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.from' . $post['newtime'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>', '
c'est après la titre... par default ssi_recentPosts() semble comme ça:

[General Discussion]      Welcome to SMF!  by Simple Machines *New*       November 23, 2004, 08:41:08 pm


*New* est un image...

alors, pour modifier comme tu veux...

Code: [Select]
// Recent post list:   [board] Subject by Poster Date
function ssi_recentPosts($num_recent = 8, $exclude_boards = array(), $output_method = 'echo')
{
global $context, $settings, $scripturl, $txt, $db_prefix, $ID_MEMBER, $user_info, $modSettings;

// Find all the posts.  Newer ones will have higher IDs.
$request = db_query("
SELECT
m.posterTime, m.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, m.ID_BOARD, b.name AS bName,
IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'] ? '1 AS isRead, 0 AS logTime' : '
IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) >= GREATEST(m.posterTime, m.modifiedTime) AS isRead,
IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) AS logTime') . "
FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? "
LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = m.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = m.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '') . "
WHERE m.ID_MSG >= " . ($modSettings['maxMsgID'] - 5 * $num_recent) . "
AND b.ID_BOARD = m.ID_BOARD" . (empty($exclude_boards) ? '' : "
AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")") . "
AND $user_info[query_see_board]
ORDER BY m.ID_MSG DESC
LIMIT $num_recent", __FILE__, __LINE__);
$posts = array();
while ($row = mysql_fetch_assoc($request))
{
// Censor the subject.
censorText($row['subject']);

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['ID_BOARD'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['ID_TOPIC'],
'poster' => array(
'id' => $row['ID_MEMBER'],
'name' => $row['posterName'],
'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => strlen(un_htmlspecialchars($row['subject'])) > 25 ? htmlspecialchars(substr(un_htmlspecialchars($row['subject']), 0, 22) . '...') : $row['subject'],
'time' => date('d/m/Y - H:i:s',$row['posterTime']),
'timestamp' => $row['posterTime'],
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . ';topicseen#msg' . $row['ID_MSG'],
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] . '">' . $row['subject'] . '</a>',
'new' => !empty($row['isRead']),
'newtime' => $row['logTime']
);
}
mysql_free_result($request);

// Just return it.
if ($output_method != 'echo' || empty($posts))
return $posts;

echo '
<table border="0" class="ssi_table">';
foreach ($posts as $post)
echo '
<tr>
<td align="right" nowrap="nowrap">
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.from' . $post['newtime'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>', '
', $post['time'], '
</td>
<td align="right" valign="top" nowrap="nowrap">
[', $post['board']['link'], ']
</td>
<td valign="top">
<a href="', $post['href'], '">', $post['subject'], '</a>
', $txt[525], ' ', $post['poster']['link'], '
</td>
</tr>';
echo '
</table>';
}

maintenant, on as...

New  23/11/2004 - 20:41:08      [General Discussion]      Welcome to SMF!  by Simple Machines



je pense que je n'ai pas été très comprendable (clear), mais essaye le dernier morceau de code.

-Merry
If I know the way home and am walking along it drunkenly, is it any less the right way because I am staggering from side to side? : Leo Tolstoy
Everything I know I learned from Calvin and Hobbes.
And patience is about the most useful thing you could ever have.  That and backups. : [Unknown]
If I choose to send thee, Tuor son of Huor, then believe not that thy one sword is not worth the sending. : Ulmo, Lord of the Waters - Unfinished Tales, by J.R.R. Tolkien

Offline CasTle

  • Semi-Newbie
  • *
  • Posts: 36
Re: Aide pour modification de ss_recentPosts
« Reply #9 on: December 08, 2004, 08:40:31 AM »
nan meriadoc c'est pas ca, la tu me propose de changer l'endroit ou est affiché "news", ce que je sais ^^.  mais c'est pas grave j'ai plus  besoin de faire comme ca ^^ la simple icone "news" me suffit.

oui j'ai supprimé le array board car la presentation que j'ai ne l'utilise pas donc inutile de le garder ^^


voila merci meriadoc

Offline Meriadoc

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,263
  • Gender: Male
  • For the world is changing
    • Philip Renich: Websites
Re: Aide pour modification de ss_recentPosts
« Reply #10 on: December 08, 2004, 05:36:16 PM »
desole, voici le fonction encore, avec on/off icons. le donne un coup d'oeil.
peut-etre tu dois faire de travaille sur le HTML, le hauteur de la table ou position de l'image nouveau...

Code: [Select]
// Recent post list:   [board] Subject by Poster Date
function ssi_recentPosts($num_recent = 8, $exclude_boards = array(), $output_method = 'echo')
{
global $context, $settings, $scripturl, $txt, $db_prefix, $ID_MEMBER, $user_info, $modSettings;

// Find all the posts.  Newer ones will have higher IDs.
$request = db_query("
SELECT
m.posterTime, m.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, m.ID_BOARD, b.name AS bName,
IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'] ? '1 AS isRead, 0 AS logTime' : '
IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) >= GREATEST(m.posterTime, m.modifiedTime) AS isRead,
IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) AS logTime') . "
FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? "
LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = m.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = m.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '') . "
WHERE m.ID_MSG >= " . ($modSettings['maxMsgID'] - 5 * $num_recent) . "
AND b.ID_BOARD = m.ID_BOARD" . (empty($exclude_boards) ? '' : "
AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")") . "
AND $user_info[query_see_board]
ORDER BY m.ID_MSG DESC
LIMIT $num_recent", __FILE__, __LINE__);
$posts = array();
while ($row = mysql_fetch_assoc($request))
{
// Censor the subject.
censorText($row['subject']);

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['ID_BOARD'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['ID_TOPIC'],
'poster' => array(
'id' => $row['ID_MEMBER'],
'name' => $row['posterName'],
'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => strlen(un_htmlspecialchars($row['subject'])) > 25 ? htmlspecialchars(substr(un_htmlspecialchars($row['subject']), 0, 22) . '...') : $row['subject'],
'time' => date('d/m/Y - H:i:s',$row['posterTime']),
'timestamp' => $row['posterTime'],
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . ';topicseen#msg' . $row['ID_MSG'],
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] . '">' . $row['subject'] . '</a>',
'new' => !empty($row['isRead']),
'newtime' => $row['logTime']
);
}
mysql_free_result($request);

// Just return it.
if ($output_method != 'echo' || empty($posts))
return $posts;

echo '
<table border="0" class="ssi_table">';
foreach ($posts as $post)
{
if (!$post['new'])
$newIcon = '<img src="' . $settings['images_url'] . '/on.gif" alt="' . $txt[333] . '" title="' . $txt[333] . '" border="0" />';
elseif ($board['children_new'])
$newIcon = '<img src="' . $settings['images_url'] . '/on2.gif" alt="' . $txt[333] . '" title="' . $txt[333] . '" border="0" />';
else
$newIcon = '<img src="' . $settings['images_url'] . '/off.gif" alt="' . $txt[334] . '" title="' . $txt[334] . '" border="0" />';

echo '
<tr>
<td align="right" nowrap="nowrap">
', $newIcon, '
', $post['time'], '
</td>
<td align="right" valign="top" nowrap="nowrap">
[', $post['board']['link'], ']
</td>
<td valign="top">
<a href="', $post['href'], '">', $post['subject'], '</a>
', $txt[525], ' ', $post['poster']['link'], '
</td>
</tr>';
}
echo '
</table>';
}
dis-moi comme il marche

-Merry

EDIT, voici un image du fonction pour moi... (attaché)
« Last Edit: December 08, 2004, 05:38:18 PM by Meriadoc »
If I know the way home and am walking along it drunkenly, is it any less the right way because I am staggering from side to side? : Leo Tolstoy
Everything I know I learned from Calvin and Hobbes.
And patience is about the most useful thing you could ever have.  That and backups. : [Unknown]
If I choose to send thee, Tuor son of Huor, then believe not that thy one sword is not worth the sending. : Ulmo, Lord of the Waters - Unfinished Tales, by J.R.R. Tolkien

Offline CasTle

  • Semi-Newbie
  • *
  • Posts: 36
Re: Aide pour modification de ss_recentPosts
« Reply #11 on: December 08, 2004, 06:46:16 PM »
ah yes merci merry

j'avais presque trouvé:

j'avais cherché a partir de ca:
Code: [Select]
  ';
if ($board['new'])
echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';

else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
echo '

enfin bon merci encore merry

@+++