Snaip3Rs Posted January 15, 2010 Report Share Posted January 15, 2010 labdien es mēģinu jaunumu skriptam pielikt klāt tādu līniju, kā bildē lai nebūtu pliks virsraksts, bet būtu arī bildīte apakšā un vēlētos noņemt tās līnijas kas ir zem laik kas rakstijis un komentāri! meklēju kautkur kur ir jau tāds sataisīts, bet nekā! :( <?php $forums = "http://lockerz.hostplex.lv/f/"; // foruma atra?anas $limits = "5"; // limits $forumaID = "17"; // foruma id no kura javelk ara jaunumi $host = "localhost"; // parasti localhost $dbname = "db"; // db name $dbuser = ""; // db username $dbpass = ""; // 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("SET NAMES 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()); // 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'><img src='http://lockerz.hostplex.lv/web/bildes/laiks.png'/></span> $piev_datums | <span style='color:black'><img src='http://lockerz.hostplex.lv/web/bildes/user.png'/></span> <a href=\"$forums/index.php?showuser=".$row['starter_id']."\">".$row['starter_name']."</a> | <span style='color:black'><img src='http://lockerz.hostplex.lv/web/bildes/koment.png'/></span> (<a href=\"$forums/index.php?showtopic=".$row['tid']."&view=getlastpost\">".$row['posts']."</a>) <hr><br>"; echo ""; } ?> Quote Link to comment Share on other sites More sharing options...
Evi Posted January 15, 2010 Report Share Posted January 15, 2010 To dara ar CSS nevis php: p{ border-bottom:1px solid #333; } Quote Link to comment Share on other sites More sharing options...
yeahz Posted January 15, 2010 Report Share Posted January 15, 2010 <?php $forums = "http://lockerz.hostplex.lv/f/"; // foruma atra?anas $limits = "5"; // limits $forumaID = "17"; // foruma id no kura javelk ara jaunumi $host = "localhost"; // parasti localhost $dbname = "db"; // db name $dbuser = ""; // db username $dbpass = ""; // 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("SET NAMES 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()); // 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 "<h1 style=\"background: url(dir/url.png) repeat-x; height: 20px; color:red;\"><a href=\"$forums/index.php?showtopic=".$row['tid']."\">".$row['title']."</a> <strong>".$row['description']."</strong></h1>"; echo "<div>".$rowis['post']."</div><br />"; echo "<div><span style='color:black'><img src='http://lockerz.hostplex.lv/web/bildes/laiks.png'/></span> $piev_datums | <span style='color:black'><img src='http://lockerz.hostplex.lv/web/bildes/user.png'/></span> <a href=\"$forums/index.php?showuser=".$row['starter_id']."\">".$row['starter_name']."</a> | <span style='color:black'><img src='http://lockerz.hostplex.lv/web/bildes/koment.png'/></span> (<a href=\"$forums/index.php?showtopic=".$row['tid']."&view=getlastpost\">".$row['posts']."</a>) <br>"; } ?> un kas tas par "<c href=''>"? nomainīju uz "a href". Quote Link to comment Share on other sites More sharing options...
Kemito Posted January 15, 2010 Report Share Posted January 15, 2010 nu c`moon - CSS dara visus brīnumus! Gribi līnjas sev apkārt? izmanto iekš CSS veikto piedāvajumu - border: 1px solid #krasas_kods; Utml. http://w3schools.com - CSS Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted January 15, 2010 Author Report Share Posted January 15, 2010 Jā to es zinu, bet es nemāku apvienot css ar php uzreiz ja ir kāda kļūda viņš met error virsu! Un nesanāca tā līnija nerādās! :( Quote Link to comment Share on other sites More sharing options...
2easy Posted January 15, 2010 Report Share Posted January 15, 2010 ļoti draudzīga lapa tev ir izdevusies. uzklikšķinot uz vnkārša linka pirmajā lapā, saņemu šo Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted January 15, 2010 Author Report Share Posted January 15, 2010 Nē man tur biku ir japielabo ar utf8 un arī kada img jaieliek a man forums ir uz /f/ un kā jau jūs redzat man tā linija ir tikai augšā bet gribējās lai ir zem katra virsraksta! :( Quote Link to comment Share on other sites More sharing options...
yeahz Posted January 15, 2010 Report Share Posted January 15, 2010 pamaini tak šo līniju uz sev vajadzīgo un viss būs. echo "<h1 style=\"background: url(dir/url.png) repeat-x; height: 20px; color:red;\"><a href=\"$forums/index.php?showtopic=".$row['tid']."\">".$row['title']."</a> <strong>".$row['description']."</strong></h1>"; Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted January 15, 2010 Author Report Share Posted January 15, 2010 Es jau nomainiju bildes linku, bet nekā nav! :( jo citu nezinu ko tur mainīt! Quote Link to comment Share on other sites More sharing options...
yeahz Posted January 15, 2010 Report Share Posted January 15, 2010 seko līdzi saviem ceļiem uz bildi. echo "<h1 style=\"background: url(web/bildes/news.png) repeat-x; height: 20px; color:red;\"><a href=\"$forums/index.php?showtopic=".$row['tid']."\">".$row['title']."</a> <strong>".$row['description']."</strong></h1>"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.