Jump to content

Ipb Last Topic Skripts


JAKuT
 Share

Recommended Posts

Vot gribeju izdarit, bez nezinu kaa...

Man rada taa tas last topic skripts, kad uzraksta aiziet aiz taa ramisa tekst, bet es gribu ja ir liels teksts tad lai saisinas.

radisu ar piemeriem:

Tagad rada taa ja ir gars teksts

Un uztaisit lai rada, laiku kura pievieno, vai izlabo taja topica kaut ko.

Citadi rada visu laiku tikai 02:00

23:40 - LAlalalallalalaaalalallal un aiziet aiz ramisa..

Bet gribu lai ir taa, ja ir teksts lielaks par ramiti tad lai izskatas taa lai neiet ara no ramisa.

23:40 - llalalala...

Pats skripts:

<?php
// Noradi datus
$host = "localhost"; // db hosts
$dbname = "forum"; // DB
$dbuser = "root"; // db useris
$dbpass = ""; // db parole
?>
<?php
$platums = "100"; // platums (px)
$forums = "/f/"; // foruma url
$limits = "7"; // cik posti uzraadiisies
$link = mysql_connect($host, $dbuser, $dbpass)
or die("Nesanaaca piekonekteeties: " . mysql_error());
mysql_select_db($dbname) or die("Datubaze neekstiste");
mysql_query("SET NAMES UTF-8"); // NEAIZTIEC


$kverisdivi = mysql_query("SELECT posts, last_poster_name, last_poster_id, title, tid, forum_id, last_post FROM ibf_topics ORDER BY last_post DESC LIMIT ".$limits."");
echo "<div>";

while($row = mysql_fetch_array( $kverisdivi )) {
  $datums = $row['start_date'];
  $piev_datums = date("H:i",$datums);
echo "<p><b>$piev_datums - </b> <a style='text-decoration: none' href=\"$forums/index.php?showtopic=".$row[tid]."&view=getnewpost\" title=\"\">".$row[title]."</a><br></p>";
}
echo "</div>";

?>

Edited by JAKuT
Link to comment
Share on other sites

tadu erroru rada...

Warning: include() [function.include]: URL file-access is disabled in the server configuration in C:\AppServ\www\index.php on line 49

Warning: include(http://localhost/f/latest_posts.php) [function.include]: failed to open stream: no suitable wrapper could be found in C:\AppServ\www\index.php on line 49

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...