Jump to content
php.lv forumi

IPB news script


suport

Recommended Posts

<?php
$forums = "foruma ceļš"; // foruma atraðanâs
$limits = "3"; // limits
$forumaID = "2"; // foruma id no kura jâvelk ârâ jaunumi
$host = "hosts"; // parasti localhost
$dbname = "DB"; //  db name
$dbuser = "user"; // db username
$dbpass = "pass"; // db user pw
$link = mysql_connect($host, $dbuser, $dbpass)
or die("Neizdevas piekonekteties ?: " . mysql_error());
mysql_select_db($dbname) or die("neizdevas piekonekteties ?");
mysql_query("text/html; charset=utf8"); //  charseti


// dabonam datus no DB
$kverisdivi = mysql_query("SELECT * FROM ibf_topics WHERE forum_id=".$forumaID." ORDER BY start_date DESC LIMIT ".$limits."") or die(mysql_error());
echo "<h1></h1>";
// izvadam jaunumus
while($row = mysql_fetch_array( $kverisdivi )) {
 $rowis = mysql_fetch_array( mysql_query("SELECT * FROM ibf_posts WHERE topic_id = ".$row['tid']." ORDER by post_date LIMIT ".$limits.""));
 $datums = $row['start_date'];
 $piev_datums = date("d/m/Y ",$datums);
   echo "<c href=\"$forums/index.php?showtopic=".$row['tid']."\">".$row['title']."</c> <strong>".$row['description']."</strong><br />";
   echo "<div>".$rowis['post']."</div><br /><hr>";
   echo "<div><span style='color:black'>Pievienots:</span> $piev_datums | <span style='color:black'>Autors:</span> <a href=\"$forums/index.php?showuser=".$row['starter_id']."\">".$row['starter_name']."</a> | <span style='color:black'>Komentari:</span> (<a href=\"$forums/index.php?showtopic=".$row['tid']."&view=getlastpost\">".$row['posts']."</a>) | <hr><br>";






   echo "";

}

 

Ka shadam kodam varetu pievienot to lai kometetu nevis IPB foruma ieksha bet uzspiezhot atveras tai pasha lapa jaunums un apaksha komentari ?

 

Varbut kads var uzskriptot :D

Link to comment
Share on other sites

suport, es vēl saprastu, ja tu palūgtu atrast kādu bugu, vai paprasītu kādu vispārīgu skriptu, bet specifiski kodēt kko tikai priekš tevis un papildināt/modificēt tavu lapu ar jaunu funkcionalitāti, tas tiešām ir maksas pasākums

Link to comment
Share on other sites

suport, es vēl saprastu, ja tu palūgtu atrast kādu bugu, vai paprasītu kādu vispārīgu skriptu, bet specifiski kodēt kko tikai priekš tevis un papildināt/modificēt tavu lapu ar jaunu funkcionalitāti, tas tiešām ir maksas pasākums

5 ls verts vareetu buut tas script ja ?

Link to comment
Share on other sites

  • 4 months later...
  • 2 years later...

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...