Jump to content

Lastest forum posts at main page (utf8 decoding)


ezor

Recommended Posts

I have lastest forum posts on my main site's page, and i need to decode it to utf8, im used to work with htmlentities only and have no clue about this code :

 

<table width="265px" height="85px" hborder="0" cellspacing="0" cellpadding="0" style='margin-top:0px;padding-left:0px;'><?php

if (!$user) { $niveau = 0; } else { $niveau = $user[1]; }

$sql_forums = mysql_query ("SELECT id FROM $nuked[prefix]_forums WHERE niveau <= $niveau");
while (list ($id) = mysql_fetch_array ($sql_forums))
{
	if (!isset ($where)) { $where = "WHERE forum_id='$id'"; }
	else { $where .= " || forum_id='$id'"; }
}

$sql_posts = mysql_query ("SELECT titre,auteur,thread_id,forum_id FROM $nuked[prefix]_forums_messages $where ORDER BY id DESC LIMIT 0,5");
while (list ($titre,$auteur,$tid,$fid) = mysql_fetch_array ($sql_posts)) {

$pseudo = $auteur; $titre = strtolower ($titre);

if (strlen($titre) > 35) { $titre = substr ($titre, 0,35) . '...'; }
if (strlen($auteur) > 15) { $pseudo = substr ($auteur, 0,15) . '...'; }

echo '<tr><td width="70%" style="padding-left:15px";>
		<a href="index.php?file=Forum&page=viewtopic&forum_id=' . $fid . '&thread_id=' . $tid . '">
			<span style="font-size:9px">'.stripslashes($titre).'</span>
		</a>
	</td><td width="30%" style="padding-left:10px";>
		<a href="index.php?file=Members&op=detail&autor=' . $auteur . '">
			<span style="font-size:9px">' . $pseudo . '</span>
		</a>
	</td>
</tr>';

}

?></table>

 

 

 

Thanks for any kind of help

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.