cmonlyy Posted February 20, 2010 Report Share Posted February 20, 2010 Sveicināti visi gign lietotāji. Es vēlos jums pajautāt vai nav kādam tāda IPB jaunumu skripta? Kā redzat viņam ir iekļauta bilde kura parādās pat bez bildes postā. Ja piemēram nav ievietota bilde rādās No image. Ja kādam ir tad ļoti ļoti lūdzu iedodat!!! Paldies jau iepriekš. Link to comment Share on other sites More sharing options...
DoubleT Posted February 21, 2010 Report Share Posted February 21, 2010 (edited) while(SELECT from jaunumi) { if(empty($bilde)) defaultā bilde; else bilde; viss cits šits } Edited February 21, 2010 by DoubleT Link to comment Share on other sites More sharing options...
sLIDe Posted February 21, 2010 Report Share Posted February 21, 2010 Kur teikts, ka tas ir no IPB? Link to comment Share on other sites More sharing options...
cmonlyy Posted February 21, 2010 Author Report Share Posted February 21, 2010 VIss man liek domat ka tas ir no IPB, bat ja nav tā tad lūdzu paskaidro man atpalikušajam tad no kurienes? =D Link to comment Share on other sites More sharing options...
KeeP oFf Posted February 21, 2010 Report Share Posted February 21, 2010 <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <?php $cfg['forum_path'] = 'forums'; //--- forum path $cfg['forums_id'][] = 2; //--- forum id $cfg['latest_pos'] = 'DESC'; //--- asc/desc $cfg['per_page'] = 3; //--- per page $cfg['news_limit'] = 0; //--- news limit $cfg['no_news'] = 'Nav pašlaik jaunumu'; //--- no news message $cfg['page_select'] = true; //--- pager $cfg['debug'] = false; //--- debug require_once($cfg['forum_path']."/conf_global.php" ); $mysql = mysql_connect($INFO['sql_host'], $INFO['sql_user'], $INFO['sql_pass']); if (!$mysql) { die("<b>mysql_connect()</b>: ".mysql_error()); } $select_db = mysql_select_db($INFO['sql_database'], $mysql); if (!$select_db) { die("<b>mysql_select_db()</b>: ".mysql_error()); } for ($i = 0; $i < count( $cfg['forums_id'] ); $i++ ) { $cfg['forum_id'] = $cfg['forums_id'][$i]; if ( $cfg['news_limit'] != "0" ) { $query = mysql_query( "SELECT t.tid, t.title, t.topic_firstpost, p.pid, p.topic_id, p.post_date, p.author_id, m.id, m.name, p.post, t.posts FROM ". $INFO['sql_tbl_prefix'] ."topics t, ". $INFO['sql_tbl_prefix'] ."posts p, ". $INFO['sql_tbl_prefix'] ."members m WHERE t.forum_id = '". $cfg['forum_id'] ."' AND t.tid = p.topic_id AND p.author_id = m.id AND p.pid = t.topic_firstpost ORDER BY p.post_date ". $cfg['latest_pos'] ." LIMIT ". $cfg['news_limit'] ); } else { $query = mysql_query( "SELECT t.tid, t.title, t.topic_firstpost, p.pid, p.topic_id, p.post_date, p.author_id, m.id, m.name, p.post, t.posts FROM ". $INFO['sql_tbl_prefix'] ."topics t, ". $INFO['sql_tbl_prefix'] ."posts p, ". $INFO['sql_tbl_prefix'] ."members m WHERE t.forum_id = '". $cfg['forum_id'] ."' AND t.tid = p.topic_id AND p.author_id = m.id AND p.pid = t.topic_firstpost ORDER BY p.post_date ". $cfg['latest_pos'] ); } if ( !$query ) { die( "<b>mysql_query()</b>: ". mysql_error() ); } $iNews = mysql_num_rows( $query ); $iRun = 0; $iCurrent = 0; if ( $iNews == 0 ) { echo "<center><span style=\"font-family: Tahoma; font-size: 13px\">". $cfg['no_news'] ."</span></center><br>"; } while ( $row = mysql_fetch_array( $query, MYSQL_NUM ) ) { if ( $cfg['debug'] == "true" ) { print_r( $row ); } $iRun++; if ( $iRun > ( $_GET['page'] - 1 ) * $cfg['per_page'] && $iCurrent < $cfg['per_page'] ) { $sTemplate = <<<EOT <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> <tr> <th class="thTop" height="20"><A NAME="<!-- TOPIC -->" title="<!-- TITLE -->"><FONT class="topic_title"><!-- TITLE --></FONT></a></th> </tr> <tr> <td class="row1" align="left" width="100%"> <font size="2px"> <B><!-- TIME --></B> Pievienoja <a href="<!-- FORUM -->/index.php?showuser=<!-- USER -->" title="Click Here For <!-- AUTHOR -->'s Profile!"><B><!-- AUTHOR --></B></a> <HR size="1" class="hr" /> <div align="left"><!-- POST --></div> </font> <HR size="1" class="hr" /> <span class="gensmall"> <div class="hrr"></div><div style="background-color: #fff;"><font size="1px"> <a href="<!-- FORUM -->/index.php?showtopic=<!-- TOPIC -->" title="View This Topic">» Lasīt vairāk «</a> [<!-- REPLIES -->] | <a href="<!-- FORUM -->/index.php?act=post&do=reply_post&f=6&t=<!-- TOPIC -->" title="Add A Reply To: <!-- TITLE -->" >» Pievienot komentāru «</a> | <a href="<!-- FORUM -->/index.php?showtopic=<!-- TOPIC -->&view=getlastpost" title="Click For Last Post Made!">» <IMG src="<!-- FORUM -->/style_images/1/lastpost.gif" alt="Click For Last Post Made!" valign="top" border="0" /> «</a> | <A HREF="java script:scroll(0,0);" title="Top Of Page">» Top «</A> </div></font> <HR size="1" class="hr" /> </span> </td> </tr> </table> <BR /> EOT; $sParsed = str_replace( array( "<!-- TITLE -->", "<!-- POST -->", "<!-- TIME -->", "<!-- AUTHOR -->", "<!-- REPLIES -->", "<!-- FORUM -->", "<!-- TOPIC -->", "style_emoticons/<#EMO_DIR#>", //SMILEY FIX "<!-- USER -->", "[indent]", "[/indent]", "class='quotetop'", "class='quotemain'", "class='codetop'", "class='codemain'" ), array( $row[1], $row[9], //date( "l, F j, Y h:i A", $row[5] ), date( "F m, Y", $row[5] ), $row[8], $row[10], $cfg['forum_path'], $row[0], $cfg['forum_path'] ."/style_emoticons/default", $row[7], "<blockquote>", "</blockquote>", "style='background: #E4EAF2; border: 1px dotted #000; border-bottom: 0; border-left: 4px solid #8394B2; color: #000; font-weight: bold; font-size: 10px; margin: 8px auto 0 auto; padding: 3px;'", "style='background: #FAFCFE; border: 1px dotted #000; border-left: 4px solid #8394B2; border-top: 0; color: #465584; padding: 4px; margin: 0 auto 8px auto;'", "style='background: #FDDBCC; color: #000; font-weight: bold; margin: 0 auto 0 auto; padding: 3px; width: 98%;'", "style='background: #FAFCFE; border: 1px dotted #000; color: #465584; font-family: Courier, Courier New, Verdana, Arial; margin: 0 auto 0 auto; padding: 2px; width: 98%;'" ), $sTemplate ); if ( $cfg['debug'] != "true" ) { echo $sParsed; } $iCurrent++; } } mysql_free_result( $query ); } mysql_close($mysql); if ( $cfg['page_select'] == "true" ) { if ( $_GET['page'] == "1" || $_GET['page'] == "" ) { echo "<span style=\"font-family: Tahoma; font-size: 13px\"><center><b><a style=\"text-decoration: none\" href=\"". $_SERVER['PHP_SELF'] ."?page=1\"></a></b>"; } else { echo "<span style=\"font-family: Tahoma; font-size: 13px\"><center><b><a style=\"text-decoration: none\" href=\"". $_SERVER['PHP_SELF'] ."?page=". ( $_GET['page'] - 1 ) ."\"></a></b>"; } for ( $i = 0; $i < $iNews / $cfg['per_page']; $i++ ) { if ( $i == $_GET['page'] - 1 || ( $i == 0 && $_GET['page'] == "" ) ) { echo " <u>". ( $i + 1 ) ."</u> "; } else { echo " <a style=\"text-decoration: none\" href=\"". $_SERVER['PHP_SELF'] ."?page=". ( $i + 1 ) ."\">". ( $i + 1 ) ."</a> "; } } if ( $_GET['page'] == $i ) { echo "<b><a style=\"text-decoration: none\" href=\"". $_SERVER['PHP_SELF'] ."?page=". $_GET['page'] ."\"></a></b>"; } else if ( $i > 1 && $_GET['page'] == "" ) { echo "<b><a style=\"text-decoration: none\" href=\"". $_SERVER['PHP_SELF'] ."?page=". ( $_GET['page'] + 2 ) ."\"></a></b>"; } else if ( $i <= 1 && $_GET['page'] == "" ) { echo "<b><a style=\"text-decoration: none\" href=\"". $_SERVER['PHP_SELF'] ."?page=". ( $_GET['page'] + 1 ) ."\"></a></b>"; } else { echo "<b><a style=\"text-decoration: none\" href=\"". $_SERVER['PHP_SELF'] ."?page=". ( $_GET['page'] + 1 ) ."\"></a></b>"; } } ?> Šis nav takā tur. Taču ja pēc stila piestrādāsi, dabūsi arī smuku rezultātu. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now