Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Naujienų reitingavimo sistema

Parašė Gedi Minas· 2008 Sau. 22 11:01:45
#1

Radau savo kompe užsilikusį modą, kurį kažkada buvau susikūręs savo tikslams. Tai šiek tiek pakeistas news.php failas, įsikėlę jį ir dar šiek tiek paredagavę themes.php failą gausite naujienų reitingavo sistemą, panašią į tą, kuri buvo naudojama senesnėse DataLife Engine versijose. Prisegu news.php failą ir duodu pavyzdį kaip redaguoti theme.php (žiūrėti žemiau), kad gautumėte rezultatą. Žaliems to daryti nerekomenduojama, nes nenoriu būti apipiltas kvailais klausimais.

Taigi, themes.php faile susirandate šią vietą, kuri pavaizduota kode. Raudonai pažymėta ką turite pridėti ten (čia paimta Similitude06 thema ir viskas neatrodys tvarkingai, bet svarbiausia, kad pagautumėte esmę ką reikia keisti).

function render_news($subject, $news, $info, $rating) {

echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='capmain'>$subject</td>
</tr>
<tr>
<td class='main-body'>$news</td>
</tr>
<tr>
<td align='center' class='news-footer'>\n";
echo openform("N",$info['news_id']).newsposter($info," &middot;").newsopts($info,"&middot;").closeform("N",$info['news_id']);
echo "</td>
</tr>
<tr>
<td align='left' class='news-footer'>$rating</td>
</tr>

</table>\n";

}
 




Na, o čia pateiksiu reitingų paveikslėlius, kuriuos turite įkelti į savo ftp images folderį . Aišku galite ir savo paveikslėlius naudoti.








Beje, šie paveikslėliai turi vadintis atitinkamai rating0.gif, rating1.gif, rating2.gif, rating3.gif, rating4.gif, rating5.gif.

Gali būti klaidų, nes dariau seniai ir dabar netikrinau. Jei rasite, praneškite.

:s

Redagavo Gedi Minas· 2008 Bal. 17 18:04:26

Parašė Qrmiz· 2008 Sau. 22 12:01:49
#2

labai gera idėja, tik va kažkodėl neprisegei news.php, spėju neleidžia php segti, parašyk kodą tiesiog ;)

Parašė Gedi Minas· 2008 Sau. 22 12:01:34
#3

Prisegiau dabar.

:)

Parašė Qrmiz· 2008 Sau. 22 12:01:49
#4

ko tais man rašo, kad failas sugadintas :?

Parašė Žilvis· 2008 Sau. 22 13:01:56
#5

Normaliai :) man neraso :D

Parašė MaFetas· 2008 Sau. 22 13:01:41
#6

team parašė:
Normaliai :) man neraso :D

Rašo ir man :) Geriau uploadink kur kitur :)

Parašė sniuff· 2008 Sau. 22 14:01:56
#7

Jei kas galėtų įmesti .php kodą, arba kai prisega sekit .zip formatu, kad archyvas nesusigadintų.

Parašė MAnjack· 2008 Sau. 22 14:01:00
#8

Paįvairins :D Šiaip aš šitą dalyką kitur prisitaikysiu :)

Parašė Sineik· 2008 Sau. 22 14:01:34
#9

Visai nieko, manau daug kam pravers. Gal ir pats kada nors panaudosiu. :)

Parašė MAnjack· 2008 Sau. 22 15:01:40
#10

Man nesiunčia news.php failo :|

Parašė Enzo· 2008 Sau. 22 15:01:23
#11

MAnjack parašė:
Man nesiunčia news.php failo :|


Siunčia šitaip https://webdnd.com/forum/attachm...news_1.rar

Parašė ADXS· 2008 Sau. 22 15:01:11
#12

Tai kas nors įsimeskit tą modą ir tegu būna kaip pvz gyvas

Parašė MAnjack· 2008 Sau. 22 15:01:11
#13

Dėkui, dabar viskas gerai :)

Parašė Enzo· 2008 Sau. 22 15:01:10
#14

MAnjack parašė:
Dėkui, dabar viskas gerai :)


Pastebėjau, kad ko ankščiau nesiuntė paprastai paspaudus, tai siunčia kai eini per webdnd.com/forum/attachments/ ;)

Parašė Rytis· 2008 Sau. 22 15:01:16
#15

Įkraukite į paste.lt ar pastebin.com tuos kodus, patogiau ir greičiau

Parašė mckenzie· 2008 Sau. 22 16:01:00
#16

Neblogai, man patinka :)

Parašė Qrmiz· 2008 Sau. 22 16:01:04
#17

o kur nors gyvai galima pažiūrėti? nes man rodos, kad šitas atvaizdavimas nėra įprastam ratings_include.php?
$pct_rating = ceil(round($tot_votes / $num_votes)); - šitas kelia įtarimą

Parašė Gedi Minas· 2008 Sau. 22 23:01:46
#18

Qrmiz parašė:
o kur nors gyvai galima pažiūrėti? nes man rodos, kad šitas atvaizdavimas nėra įprastam ratings_include.php?
$pct_rating = ceil(round($tot_votes / $num_votes)); - šitas kelia įtarimą

Kas čia per įtarimai? Ši vieta skaičiuoja balsų vidurkį ir suapvalina iki sveikų skaičių.

c|

Redagavo Gedi Minas· 2008 Sau. 22 23:01:00

Parašė Gedi Minas· 2008 Sau. 22 23:01:11
#19

News.php kodas.

<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";

if (isset($readmore) && !isNum($readmore)) fallback(FUSION_SELF);

// Predefined variables, do not edit these values
if ($settings['news_style'] == "1") { $i = 0; $rc = 0; $ncount = 1; $ncolumn = 1; $news_[0] = ""; $news_[1] = ""; $news_[2] = ""; } else { $i = 1; }

// This number should be an odd number to keep layout tidy
$items_per_page = 11;

if (!isset($readmore)) {

   $rows = dbcount("(news_id)", "news", groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().")");
   if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
   if ($rows != 0) {
      $result = dbquery(
         "SELECT tn.*, tc.*, user_id, user_name FROM ".$db_prefix."news tn
         LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
         LEFT JOIN ".$db_prefix."news_cats tc ON tn.news_cat=tc.news_cat_id
         WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().")
         ORDER BY news_sticky DESC, news_datestamp DESC LIMIT $rowstart,$items_per_page"
      );      
      $numrows = dbrows($result);
      if ($settings['news_style'] == "1") $nrows = round((dbrows($result) - 1) / 2);
      while ($data = dbarray($result)) {



$num_votes = dbresult(dbquery("SELECT COUNT(rating_item_id) FROM ".DB_PREFIX."ratings WHERE rating_item_id='".$data['news_id']."' AND rating_type='N'"),0);
$tot_votes = dbresult(dbquery("SELECT SUM(rating_vote) FROM ".DB_PREFIX."ratings WHERE rating_item_id='".$data['news_id']."' AND rating_type='N'"),0);
$pct_rating = ceil(round($tot_votes / $num_votes));
$voto = "<img src='".IMAGES."rating".$pct_rating.".gif' border='0'>";

                                                $news_rating = "$voto";
         $news_cat_image = "";
         $news_subject = "<a href='".BASEDIR."news.php?readmore=".$data['news_id']."'>".stripslashes($data['news_subject'])."</a>";
         if ($data['news_cat_image']) {
            $news_cat_image = "<a href='news_cats.php?cat_id=".$data['news_cat_id']."'><img src='".IMAGES_NC.$data['news_cat_image']."' alt='".$data['news_cat_name']."' align='left' style='border:0px;margin-top:3px;margin-right:5px'></a>";
         } else {
            $news_cat_image = "";
         }
         $news_news = $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_news'])) : stripslashes($data['news_news']);
         if ($news_cat_image != "") $news_news = $news_cat_image.$news_news;
         $news_info = array(
            "news_id" => $data['news_id'],
            "user_id" => $data['user_id'],
            "user_name" => $data['user_name'],
            "news_date" => $data['news_datestamp'],
            "news_ext" => $data['news_extended'] ? "y" : "n",
            "news_reads" => $data['news_reads'],
            "news_comments" => dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id='".$data['news_id']."'"),
            "news_allow_comments" => $data['news_allow_comments']
         );
         if ($settings['news_style'] == "1") {
            if ($rows <= 2 || $ncount == 1) {
               $news_[0] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
               $news_[0] .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
               $news_[0] .= "<tr>\n<td class='tbl1' style='text-align:justify'>$news_news</td>\n</tr>\n";
               $news_[0] .= "<tr>\n<td align='center' class='tbl2'>\n";
               if (iSUPERADMIN && checkrights("N")) $news_[0] .= "<form name='editnews".$news_info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$news_info['news_id']."'>\n";
               $news_[0] .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['041'].showdate("longdate", $news_info['news_date'])." &middot;\n";
               if ($news_info['news_ext'] == "y" || $news_info['news_allow_comments']) {
                  $news_[0] .= $news_info['news_ext'] == "y" ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."'>".$locale['042']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."'>".$news_info['news_comments'].$locale['043']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_reads'].$locale['044']." &middot;\n";
               }
               $news_[0] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>";
               if (iSUPERADMIN && checkrights("N")) { $news_[0] .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$news_info['news_id'].".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a></span>\n</form>\n"; } else { $news_[0] .= "</span>\n"; }
               $news_[0] .= "</td>\n</tr>\n</table>\n";
               if ($ncount != $rows) $news_[0] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
            } else {
               if ($i == $nrows && $ncolumn != 2) { $ncolumn = 2; $i = 0; }
               $row_color = ($rc % 2 == 0 ? "tbl2" : "tbl1");
               $news_[$ncolumn] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
               $news_[$ncolumn] .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
               $news_[$ncolumn] .= "<tr>\n<td class='tbl1' style='text-align:justify'>$news_news</td>\n</tr>\n";
               $news_[$ncolumn] .= "<tr>\n<td align='center' class='tbl2'>\n";
               if (iSUPERADMIN && checkrights("N")) $news_[$ncolumn] .= "<form name='editnews".$news_info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$news_info['news_id']."'>\n";
               $news_[$ncolumn] .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['041'].showdate("longdate", $news_info['news_date']);
               if ($news_info['news_ext'] == "y" || $news_info['news_allow_comments']) {
                  $news_[$ncolumn] .= "<br>\n";
                  $news_[$ncolumn] .= $news_info['news_ext'] == "y" ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."'>".$locale['042']."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."'>".$news_info['news_comments'].$locale['043']."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_reads'].$locale['044']." &middot;\n";
               } else {
                  $news_[$ncolumn] .= " &middot;\n";
               }
               $news_[$ncolumn] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>\n";
               if (iSUPERADMIN && checkrights("N")) { $news_[$ncolumn] .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$news_info['news_id'].".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a></span>\n</form>\n"; } else { $news_[$ncolumn] .= "</span>\n"; }
               $news_[$ncolumn] .= "</td>\n</tr>\n</table>\n";
               if ($ncolumn == 1 && $i < ($nrows - 1)) $news_[$ncolumn] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
               if ($ncolumn == 2 && $i < (dbrows($result) - $nrows - 2)) $news_[$ncolumn] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
               $i++; $rc++;
            }
            $ncount++;
         } else {
            render_news($news_subject, $news_news, $news_info, $news_rating);
            if ($i != $numrows) { tablebreak(); } $i++;
         }
      }
      if ($settings['news_style'] == "1") {
         opentable($locale['046']);
         echo "<table cellpadding='0' cellspacing='0' style='width:100%'>\n<tr>\n<td colspan='3' style='width:100%'>\n";
         echo $news_[0];
         echo "</td>\n</tr>\n<tr>\n<td style='width:50%;vertical-align:top;'>\n";
         echo $news_[1];
         echo "</td>\n<td style='width:10px'><img src='".THEME."images/blank.gif' alt='' width='10' height='1'></td>\n<td style='width:50%;vertical-align:top;'>\n";
         echo $news_[2];
         echo "</td>\n</tr>\n</table>\n";
         closetable();
      }
      if ($rows > $items_per_page) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,$items_per_page,$rows,3)."\n</div>\n";
   } else {
      opentable($locale['046']);
      echo "<center><br>\n".$locale['047']."<br><br>\n</center>\n";
      closetable();
   }

} else {
   include INCLUDES."comments_include.php";
                include INCLUDES."ratings_include.php";
   $result = dbquery(
      "SELECT tn.*, user_id, user_name FROM ".$db_prefix."news tn
      LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
      WHERE news_id='$readmore'"
   );

$num_votes = dbresult(dbquery("SELECT COUNT(rating_item_id) FROM ".DB_PREFIX."ratings WHERE rating_item_id='$readmore' AND rating_type='N'"),0);
$tot_votes = dbresult(dbquery("SELECT SUM(rating_vote) FROM ".DB_PREFIX."ratings WHERE rating_item_id='$readmore' AND rating_type='N'"),0);
$pct_rating = ceil(round($tot_votes / $num_votes));
$voto = "<img src='".IMAGES."rating".$pct_rating.".gif' border='0'>";

   if (dbrows($result)!=0) {
      $data = dbarray($result);
      if (checkgroup($data['news_visibility'])) {
                                                $news_rating = "$voto";
         $news_cat_image = "";
         if (!isset($_POST['post_comment']) && !isset($_POST['post_rating'])) {
             $result2 = dbquery("UPDATE ".$db_prefix."news SET news_reads=news_reads+1 WHERE news_id='$readmore'");
             $data['news_reads']++;
         }
         $news_subject = $data['news_subject'];
         if ($data['news_cat'] != 0) {
            $result2 = dbquery("SELECT * FROM ".$db_prefix."news_cats WHERE news_cat_id='".$data['news_cat']."'");
            if (dbrows($result2)) {
               $data2 = dbarray($result2);
               $news_cat_image = "<a href='news_cats.php?cat_id=".$data2['news_cat_id']."'><img src='".IMAGES_NC.$data2['news_cat_image']."' alt='".$data2['news_cat_name']."' align='left' style='border:0px;margin-top:3px;margin-right:5px'></a>";
            }
         }
         $news_news = stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news']);
         if ($data['news_breaks'] == "y") { $news_news = nl2br($news_news); }
         if ($news_cat_image != "") $news_news = $news_cat_image.$news_news;
         $news_info = array(
            "news_id" => $data['news_id'],
            "user_id" => $data['user_id'],
            "user_name" => $data['user_name'],
            "news_date" => $data['news_datestamp'],
            "news_ext" => "n",
            "news_reads" => $data['news_reads'],
            "news_comments" => dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id='".$data['news_id']."'"),
            "news_allow_comments" => $data['news_allow_comments']
         );
         render_news($news_subject, $news_news, $news_info, $news_rating);
         if ($data['news_allow_comments']) showcomments("N","news","news_id",$readmore,FUSION_SELF."?readmore=$readmore");
         if ($data['news_allow_ratings']) showratings("N",$readmore,FUSION_SELF."?readmore=$readmore");
      } else {
         redirect(FUSION_SELF);
      }
   } else {
      redirect(FUSION_SELF);
   }
}

require_once "side_right.php";
require_once "footer.php";
?>



Parašė ramon· 2008 Sau. 22 23:01:59
#20

Gal kas mateka nepasitiki? :s

Parašė Gedi Minas· 2008 Sau. 22 23:01:56
#21

Įtarūs tie nariai ir papraščiausi veiksmai jiems sukelia įtarimą. Nejaugi aš toks nepatikimas?

:]


Parašė ramon· 2008 Sau. 22 23:01:08
#22

Ok,reike pagirti zmogu,mldc ;) Beto paziurejau koda tai neblogai sumastei nes kaip as isivaizdavau toki kurt tai vienoi vietoi tik mintis pagauta buvo, na bet vistek gera darba nuveikiai. Taip ir toliau.:);)

Parašė Soo-2· 2008 Vas. 18 14:02:57
#23

man meta erorr i news.php:|

Parašė Donatis07· 2008 Bal. 16 21:04:59
#24

meta klaida: Warning: Division by zero in /public_html/news.php on line 44

Parašė Gedi Minas· 2008 Bal. 16 21:04:08
#25

Tuoj istaisysiu.

Parašė mXt· 2008 Bal. 16 21:04:22
#26

Reiks paziureti laiko turint. Galbut prisitaikyti kai kur kitur :)

EDIT: News.php tik sitas kodas iterptas, ar dar daugiau yra? Greitai perzvelgiau, tai daugiau lyg neradau..

$num_votes = dbresult(dbquery("SELECT COUNT(rating_item_id) FROM ".DB_PREFIX."ratings WHERE rating_item_id='".$data['news_id']."' AND rating_type='N'"),0);
$tot_votes = dbresult(dbquery("SELECT SUM(rating_vote) FROM ".DB_PREFIX."ratings WHERE rating_item_id='".$data['news_id']."' AND rating_type='N'"),0);
$pct_rating = ceil(round($tot_votes / $num_votes));
$voto = "<img src='".IMAGES."rating".$pct_rating.".gif' border='0'>";

Redagavo mXt· 2008 Bal. 16 22:04:21

Parašė Woo-2· 2008 Bal. 16 21:04:12
#27

Labai šaunu :) pats dariau tokia bet kai padariau pasirodė reitingų paveikslėliai per dideli, todėl ištraukiau ir pamiršau :]

Parašė Gedi Minas· 2008 Bal. 16 22:04:17
#28

Ištaisytas news.php kodas


<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";

if (isset($readmore) && !isNum($readmore)) fallback(FUSION_SELF);

// Predefined variables, do not edit these values
if ($settings['news_style'] == "1") { $i = 0; $rc = 0; $ncount = 1; $ncolumn = 1; $news_[0] = ""; $news_[1] = ""; $news_[2] = ""; } else { $i = 1; }

// This number should be an odd number to keep layout tidy
$items_per_page = 11;

if (!isset($readmore)) {

   $rows = dbcount("(news_id)", "news", groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().")");
   if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
   if ($rows != 0) {
      $result = dbquery(
         "SELECT tn.*, tc.*, user_id, user_name FROM ".$db_prefix."news tn
         LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
         LEFT JOIN ".$db_prefix."news_cats tc ON tn.news_cat=tc.news_cat_id
         WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().")
         ORDER BY news_sticky DESC, news_datestamp DESC LIMIT $rowstart,$items_per_page"
      );     
      $numrows = dbrows($result);
      if ($settings['news_style'] == "1") $nrows = round((dbrows($result) - 1) / 2);
      while ($data = dbarray($result)) {



$num_votes = dbresult(dbquery("SELECT COUNT(rating_item_id) FROM ".DB_PREFIX."ratings WHERE rating_item_id='".$data['news_id']."' AND rating_type='N'"),0);
$tot_votes = dbresult(dbquery("SELECT SUM(rating_vote) FROM ".DB_PREFIX."ratings WHERE rating_item_id='".$data['news_id']."' AND rating_type='N'"),0);
if (( $num_votes > 0 ) && ($tot_votes > 0)) {
$pct_rating = ceil(round($tot_votes / $num_votes));
$voto = "<img src='".IMAGES."rating".$pct_rating.".gif' border='0'>";
 } else { $voto = "<img src='".IMAGES."rating0.gif' border='0'>"; }


                                                $news_rating = "$voto";
         $news_cat_image = "";
         $news_subject = "<a href='".BASEDIR."news.php?readmore=".$data['news_id']."'>".stripslashes($data['news_subject'])."</a>";
         if ($data['news_cat_image']) {
            $news_cat_image = "<a href='news_cats.php?cat_id=".$data['news_cat_id']."'><img src='".IMAGES_NC.$data['news_cat_image']."' alt='".$data['news_cat_name']."' align='left' style='border:0px;margin-top:3px;margin-right:5px'></a>";
         } else {
            $news_cat_image = "";
         }
         $news_news = $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_news'])) : stripslashes($data['news_news']);
         if ($news_cat_image != "") $news_news = $news_cat_image.$news_news;
         $news_info = array(
            "news_id" => $data['news_id'],
            "user_id" => $data['user_id'],
            "user_name" => $data['user_name'],
            "news_date" => $data['news_datestamp'],
            "news_ext" => $data['news_extended'] ? "y" : "n",
            "news_reads" => $data['news_reads'],
            "news_comments" => dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id='".$data['news_id']."'"),
            "news_allow_comments" => $data['news_allow_comments']
         );
         if ($settings['news_style'] == "1") {
            if ($rows <= 2 || $ncount == 1) {
               $news_[0] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
               $news_[0] .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
               $news_[0] .= "<tr>\n<td class='tbl1' style='text-align:justify'>$news_news</td>\n</tr>\n";
               $news_[0] .= "<tr>\n<td align='center' class='tbl2'>\n";
               if (iSUPERADMIN && checkrights("N")) $news_[0] .= "<form name='editnews".$news_info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$news_info['news_id']."'>\n";
               $news_[0] .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['041'].showdate("longdate", $news_info['news_date'])." &middot;\n";
               if ($news_info['news_ext'] == "y" || $news_info['news_allow_comments']) {
                  $news_[0] .= $news_info['news_ext'] == "y" ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."'>".$locale['042']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."'>".$news_info['news_comments'].$locale['043']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_reads'].$locale['044']." &middot;\n";
               }
               $news_[0] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>";
               if (iSUPERADMIN && checkrights("N")) { $news_[0] .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$news_info['news_id'].".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a></span>\n</form>\n"; } else { $news_[0] .= "</span>\n"; }
               $news_[0] .= "</td>\n</tr>\n</table>\n";
               if ($ncount != $rows) $news_[0] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
            } else {
               if ($i == $nrows && $ncolumn != 2) { $ncolumn = 2; $i = 0; }
               $row_color = ($rc % 2 == 0 ? "tbl2" : "tbl1");
               $news_[$ncolumn] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
               $news_[$ncolumn] .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
               $news_[$ncolumn] .= "<tr>\n<td class='tbl1' style='text-align:justify'>$news_news</td>\n</tr>\n";
               $news_[$ncolumn] .= "<tr>\n<td align='center' class='tbl2'>\n";
               if (iSUPERADMIN && checkrights("N")) $news_[$ncolumn] .= "<form name='editnews".$news_info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$news_info['news_id']."'>\n";
               $news_[$ncolumn] .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['041'].showdate("longdate", $news_info['news_date']);
               if ($news_info['news_ext'] == "y" || $news_info['news_allow_comments']) {
                  $news_[$ncolumn] .= "<br>\n";
                  $news_[$ncolumn] .= $news_info['news_ext'] == "y" ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."'>".$locale['042']."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."'>".$news_info['news_comments'].$locale['043']."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_reads'].$locale['044']." &middot;\n";
               } else {
                  $news_[$ncolumn] .= " &middot;\n";
               }
               $news_[$ncolumn] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>\n";
               if (iSUPERADMIN && checkrights("N")) { $news_[$ncolumn] .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$news_info['news_id'].".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a></span>\n</form>\n"; } else { $news_[$ncolumn] .= "</span>\n"; }
               $news_[$ncolumn] .= "</td>\n</tr>\n</table>\n";
               if ($ncolumn == 1 && $i < ($nrows - 1)) $news_[$ncolumn] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
               if ($ncolumn == 2 && $i < (dbrows($result) - $nrows - 2)) $news_[$ncolumn] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
               $i++; $rc++;
            }
            $ncount++;
         } else {
            render_news($news_subject, $news_news, $news_info, $news_rating);
            if ($i != $numrows) { tablebreak(); } $i++;
         }
      }
      if ($settings['news_style'] == "1") {
         opentable($locale['046']);
         echo "<table cellpadding='0' cellspacing='0' style='width:100%'>\n<tr>\n<td colspan='3' style='width:100%'>\n";
         echo $news_[0];
         echo "</td>\n</tr>\n<tr>\n<td style='width:50%;vertical-align:top;'>\n";
         echo $news_[1];
         echo "</td>\n<td style='width:10px'><img src='".THEME."images/blank.gif' alt='' width='10' height='1'></td>\n<td style='width:50%;vertical-align:top;'>\n";
         echo $news_[2];
         echo "</td>\n</tr>\n</table>\n";
         closetable();
      }
      if ($rows > $items_per_page) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,$items_per_page,$rows,3)."\n</div>\n";
   } else {
      opentable($locale['046']);
      echo "<center><br>\n".$locale['047']."<br><br>\n</center>\n";
      closetable();
   }

} else {
   include INCLUDES."comments_include.php";
                include INCLUDES."ratings_include.php";
   $result = dbquery(
      "SELECT tn.*, user_id, user_name FROM ".$db_prefix."news tn
      LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
      WHERE news_id='$readmore'"
   );

$num_votes = dbresult(dbquery("SELECT COUNT(rating_item_id) FROM ".DB_PREFIX."ratings WHERE rating_item_id='$readmore' AND rating_type='N'"),0);
$tot_votes = dbresult(dbquery("SELECT SUM(rating_vote) FROM ".DB_PREFIX."ratings WHERE rating_item_id='$readmore' AND rating_type='N'"),0);
if (( $num_votes > 0 ) && ($tot_votes > 0)) {
$pct_rating = ceil(round($tot_votes / $num_votes));
$voto = "<img src='".IMAGES."rating".$pct_rating.".gif' border='0'>";
 } else { $voto = "<img src='".IMAGES."rating0.gif' border='0'>"; }



   if (dbrows($result)!=0) {
      $data = dbarray($result);
      if (checkgroup($data['news_visibility'])) {
                                                $news_rating = "$voto";
         $news_cat_image = "";
         if (!isset($_POST['post_comment']) && !isset($_POST['post_rating'])) {
             $result2 = dbquery("UPDATE ".$db_prefix."news SET news_reads=news_reads+1 WHERE news_id='$readmore'");
             $data['news_reads']++;
         }
         $news_subject = $data['news_subject'];
         if ($data['news_cat'] != 0) {
            $result2 = dbquery("SELECT * FROM ".$db_prefix."news_cats WHERE news_cat_id='".$data['news_cat']."'");
            if (dbrows($result2)) {
               $data2 = dbarray($result2);
               $news_cat_image = "<a href='news_cats.php?cat_id=".$data2['news_cat_id']."'><img src='".IMAGES_NC.$data2['news_cat_image']."' alt='".$data2['news_cat_name']."' align='left' style='border:0px;margin-top:3px;margin-right:5px'></a>";
            }
         }
         $news_news = stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news']);
         if ($data['news_breaks'] == "y") { $news_news = nl2br($news_news); }
         if ($news_cat_image != "") $news_news = $news_cat_image.$news_news;
         $news_info = array(
            "news_id" => $data['news_id'],
            "user_id" => $data['user_id'],
            "user_name" => $data['user_name'],
            "news_date" => $data['news_datestamp'],
            "news_ext" => "n",
            "news_reads" => $data['news_reads'],
            "news_comments" => dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id='".$data['news_id']."'"),
            "news_allow_comments" => $data['news_allow_comments']
         );
         render_news($news_subject, $news_news, $news_info, $news_rating);
         if ($data['news_allow_comments']) showcomments("N","news","news_id",$readmore,FUSION_SELF."?readmore=$readmore");
         if ($data['news_allow_ratings']) showratings("N",$readmore,FUSION_SELF."?readmore=$readmore");
      } else {
         redirect(FUSION_SELF);
      }
   } else {
      redirect(FUSION_SELF);
   }
}

require_once "side_right.php";
require_once "footer.php";
?>





Redagavo Gedi Minas· 2008 Bal. 16 22:04:04

Parašė Gedi Minas· 2008 Bal. 16 22:04:22
#29

mXt - šiek tiek daugiau įterpta.

:s

Parašė Gedi Minas· 2008 Bal. 16 22:04:13
#30

Atsakiau, be to dar raudonai dabar pažymėjau kas pakeista, jei tik nieko nepraleidau.

:s

Parašė mXt· 2008 Bal. 16 22:04:51
#31

Aha, dėkui. Nemačiau tavo posto, kaip rašiau saavo :)

Parašė ADXS· 2008 Bal. 17 09:04:47
#32

blemba visai nice modas. ?|

Parašė suomis· 2008 Bal. 17 17:04:57
#33

dariau kaip parasyta bet neveikia :|

Parašė Gedi Minas· 2008 Bal. 17 18:04:36
#34

Turi veikti, vakar tikrinau.

:|

Parašė suomis· 2008 Bal. 17 18:04:21
#35

nu viska padariau kaip parasyta, toj vietoj kur tas reitingas turi but neatsiranda niekas ?|

Parašė suomis· 2008 Bal. 17 18:04:08
#36

o meginaj ant v6.01.13 versijos?

Parašė Gedi Minas· 2008 Bal. 17 18:04:47
#37

Mėginau būtent ant šios versijos, themes.php failą redagavai?

:?

Parašė suomis· 2008 Bal. 17 18:04:00
#38

zinoma redagavau :) gy nesu koks zaliukas jaj ka

Parašė Dandžu· 2008 Bal. 17 18:04:56
#39

O jokio error nemeta? :?

Parašė suomis· 2008 Bal. 17 18:04:19
#40

nieko is vis tik del sito kodo <tr>
<td align='left' class='news-footer'>$rating</td>
</tr>
tokia kaip tuscia vieta ir fsio

Parašė Dandžu· 2008 Bal. 17 18:04:41
#41

Šito nepamiršai?
function render_news($subject, $news, $info, $rating)



Parašė suomis· 2008 Bal. 17 18:04:36
#42

nu bliot kaip as cia ta pramazinau c| dekui viskas uikiai veikia jau ;);) dekui Sharkman ;)

Parašė Gedi Minas· 2008 Bal. 17 18:04:39
#43

Greičiausiai, kad pamiršo.

:)

Parašė suomis· 2008 Bal. 17 18:04:40
#44

ne nepamirsau o tiesiog nepastebejau galvojau tik ta zemiau reikia darasyt :]

Parašė Dandžu· 2008 Bal. 17 19:04:32
#45

Kai pasakė jog tuščia tai iškart galvon jog tą praleido. :)

Parašė suomis· 2008 Bal. 17 19:04:24
#46

nu del to suduko ir nenuskaite ten tu visu pribumbasu ;) geras modas cia toks gerai padirbeta ;)

Parašė suomis· 2008 Bal. 17 19:04:25
#47

tik galetu dar rasyt koks retingas pvz alt='' funkcija ?|

Parašė Dandžu· 2008 Bal. 17 19:04:27
#48

Na tai jau pats gali tai pasidaryti. Juk nesunku. :)

Parašė bad_user· 2008 Bal. 17 19:04:44
#49

Tai ir kišk rating į alt'ą :)

Parašė bad_user· 2008 Bal. 17 19:04:37
#50

Tai ir kišk rating į alt'ą :)

Parašė suomis· 2008 Bal. 17 19:04:48
#51

tai as galiu dadet aisq alt='retingas bet butu graziau kad uzeini ir rodo koks reitingas pvz 'reitingas puiku"

Parašė Samp_Tevas· 2008 Bal. 17 20:04:42
#52

Meta toki, Ka tai reiskia?

Parse error: syntax error, unexpected T_VARIABLE, expecting ')' in C:\wamp\www\bandymams\themes\Similitude06\theme.php on line 59

Parašė Dandžu· 2008 Bal. 17 20:04:34
#53

Rekomenduoju paskaityti straipsnį apie error'us.

Parašė Samp_Tevas· 2008 Bal. 17 21:04:10
#54

pasirodo kablelio truko, dekui ;).

Parašė Gedi Minas· 2008 Bal. 18 15:04:50
#55

Matau jau suomis savo saite įsidiegė, gražu.

;)

Parašė mXt· 2008 Bal. 18 15:04:34
#56

A koks tas jo saitas? ?| Noreciau gyvai pamatyti. Atsiusk i PM nuoroda, arba cia parasyk. Dekui.

Parašė Gedi Minas· 2008 Bal. 18 15:04:24
#57

Taigi jo paraše adresas.

:o

Parašė mXt· 2008 Bal. 18 15:04:51
#58

Ui.. Nepamačiau :)

Parašė NoNy· 2008 Bal. 18 18:04:24
#59

<?php

/************************/
/* Settings/Nustatymai   */
/************************/

$body_text = "#262626";
$body_bg = "#ffffff";
$theme_width = "988";
$theme_width_l = "180";
$theme_width_r = "180";


function render_header($header_content) {
global $theme_width,$settings;

 echo "<script src='".THEME."/grade.js' language='Javascript'></script>";
   echo "<table class='forumline' align='center' width='$theme_width' cellspacing='0' cellpadding='0' style='margin-top: -5px; margin-bottom: -5px; border-top: solid #000000 1px;'>";
   echo "<tr><td><table align='center' width='100%' cellspacing='0' cellpadding='0'>";
   echo "<tr><td><table align='center' width='100%' cellspacing='0' cellpadding='0'>";
   echo "<tr><td class='header' width='100%'>";
   
// Start banner code / Banerio kodas



   echo "<table id='Table_01' width='1001' height='211' border='0' cellpadding='0' cellspacing='0'>
   <tr>
      <td colspan='21'>
         <img src='".THEME."images/head_01.jpg' width='1000' height='159' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='1' height='159' alt=''></td>
   </tr>
   <tr>
      <td rowspan='3'>
         <img src='".THEME."images/head_02.jpg' width='6' height='34' alt=''></td>
      <td rowspan='3'>
         <a href='http://www.wg.xz.lt/news.php'><img src='".THEME."images/pagrindinis.jpg' width='82' height='34' border='0' onMouseOver=this.src='".THEME."images/pagrindinis.gif' onMouseOut=this.src='".THEME."images/pagrindinis.jpg'></a></td>
      <td rowspan='3'>
         <img src='".THEME."images/head_04.jpg' width='1' height='34' alt=''></td>
      <td rowspan='3'>
         <a href='http://www.wg.xz.lt/forum/index.php'><img src='".THEME."images/forumas.jpg' width='63' height='34' border='0' onMouseOver=this.src='".THEME."images/forumas.gif' onMouseOut=this.src='".THEME."images/forumas.jpg'></a></td>
      <td rowspan='3'>
         <img src='".THEME."images/head_06.jpg' width='1' height='34' alt=''></td>
      <td rowspan='3'>
         <a href='http://www.wg.xz.lt/downloads.php'><img src='".THEME."images/siuntimai.jpg' width='69' height='34' border='0' onMouseOver=this.src='".THEME."images/siuntimai.gif' onMouseOut=this.src='".THEME."images/siuntimai.jpg'></a></td>
      <td rowspan='3'>
         <img src='".THEME."images/head_08.jpg' width='1' height='34' alt=''></td>
      <td rowspan='3'>
         <a href='http://www.wg.xz.lt/serveriai'><img src='".THEME."images/serveriai.jpg' width='68' height='34' border='0' onMouseOver=this.src='".THEME."images/serveriai.gif' onMouseOut=this.src='".THEME."images/serveriai.jpg'></a></td>
      <td rowspan='3'>
         <img src='".THEME."images/head_10.jpg' width='1' height='34' alt=''></td>
      <td rowspan='3'>
         <a href='http://www.wg.xz.lt/articles.php'><img src='".THEME."images/pamokos.jpg' width='64' height='34' border='0' onMouseOver=this.src='".THEME."images/pamokos.gif' onMouseOut=this.src='".THEME."images/pamokos.jpg'></a></td>
      <td colspan='9'>
         <img src='".THEME."images/head_12.jpg' width='356' height='8' alt=''></td>
      <td colspan='2' rowspan='2'>
         <img src='".THEME."images/head_13.jpg' width='288' height='16' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='1' height='8' alt=''></td>
   </tr>
   <tr>
      <td rowspan='2'>
         <img src='".THEME."images/head_14.jpg' width='93' height='26' alt=''></td>
      <td>
         <a href='http://www.wg.xz.lt/viewpage.php?page_id=4'><img src='".THEME."images/uzeriai.jpg' width='34' height='8' border='0' onMouseOver=this.src='".THEME."images/uzeriai.gif' onMouseOut=this.src='".THEME."images/uzeriai.jpg'></a></td>
      <td>
         <img src='".THEME."images/head_16.jpg' width='17' height='8' alt=''></td>
      <td>
         <a href='http://www.wg.xz.lt/viewpage.php?page_id=4'><img src='".THEME."images/admin.jpg' width='76' height='8' border='0' onMouseOver=this.src='".THEME."images/admin.gif' onMouseOut=this.src='".THEME."images/admin.jpg'></a></td>
      <td>
         <img src='".THEME."images/head_18.jpg' width='18' height='8' alt=''></td>
      <td>
         <a href='http://www.wg.xz.lt/contact.php'><img src='".THEME."images/paslaugos.jpg' width='50' height='8' border='0' onMouseOver=this.src='".THEME."images/paslaugos.gif' onMouseOut=this.src='".THEME."images/paslaugos.jpg'></a></td>
      <td>
         <img src='".THEME."images/head_20.jpg' width='19' height='8' alt=''></td>
      <td>
         <a href='http://www.wg.xz.lt/viewpage.php?page_id=3'><img src='".THEME."images/reklama.jpg' width='40' height='8' border='0' onMouseOver=this.src='".THEME."images/reklama.gif' onMouseOut=this.src='".THEME."images/reklama.jpg'></a></td>
      <td>
         <img src='".THEME."images/head_22.jpg' width='9' height='8' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='1' height='8' alt=''></td>
   </tr>
   <tr>
      <td colspan='9' rowspan='2'>
         <img src='".THEME."images/head_23.jpg' width='487' height='35' alt=''></td>
      <td rowspan='2'>
         <img src='".THEME."images/head_24.jpg' width='64' height='35' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='1' height='18' alt=''></td>
   </tr>
   <tr>
      <td colspan='11'>
         <img src='".THEME."images/head_25.jpg' width='449' height='17' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='1' height='17' alt=''></td>
   </tr>
   <tr>
      <td>
         <img src='".THEME."images/spacer.gif' width='6' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='82' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='1' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='63' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='1' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='69' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='1' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='68' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='1' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='64' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='93' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='34' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='17' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='76' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='18' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='50' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='19' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='40' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='9' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='224' height='1' alt=''></td>
      <td>
         <img src='".THEME."images/spacer.gif' width='64' height='1' alt=''></td>
      <td></td>
   </tr>
</table>";


   // End banner code / Banerio kodo pabaiga
   
   echo "<table width='100%' cellpadding='4' bgcolor='#F8F8F8' cellspacing='0' border='0'><tr>";
}

function render_footer($license=false) {
global $theme_width,$locale,$settings;

   echo "</tr>\n</table>\n";
   echo "<table cellSpacing='0' cellPadding='2' width='100%' border='0' background='".THEME."images/footer.gif' style='border-right: solid #FFFFFF 1px; border-left: solid #FFFFFF 1px;'>";
   echo "<td width='20%' height='25' class='white' align='left'>";
      if ($license == false) {
   }
   echo "</td>";
   echo "<td width='40%' class='white' align='center'>";
   echo "<b>".stripslashes($settings['footer'])."</b></td>";
   echo "<td width='' class='white' align='right'>";
   echo "<b>Sprendimas: <a href='http://v3rm1.xz.lt'>V3rm1</a></b>";
   echo "</td>";
   echo "<div align='center'></tr></table></td></tr></table></div>";
}

function render_news($subject, $news, $info, $rating) {


global $locale;

   echo "<table class='news-border' border='0' cellspacing='2' width='100%' cellpadding='1'><tr>";
   echo "<td height='25' class='table-cellpic'>$subject</td>";
   echo "</tr></table>";
   echo "<table width='100%' cellpadding='0' cellspacing='0' class='border'><tr>";
   echo "<td><table width='100%' cellpadding='0' cellspacing='0'><tr>";
   echo "<td class='main-body'>$news</td></tr></table>";
   echo "<table width='100%' cellpadding='0' cellspacing='0'><tr>";
   echo "<td class='news-footer'>";
   echo "".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> ";
   echo "".$locale['041'].showdate("longdate", $info['news_date'])." </td>";
   echo "<td height='24' align='right'>";
   echo "".($info['news_ext'] == "y" ? "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n" : "")."";
   if ($info['news_allow_comments'])
   echo "<a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a> · ";
   echo "".$info['news_reads'].$locale['044']." ";
   echo "<a href='print.php?type=N&amp;item_id=".$info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='vertical-align:middle;border:0px;'></a>";
   echo "</td></tr></table></td></tr></table>\n";
}

function render_article($subject, $article, $info) {

global $locale;

   echo "<table class='news-border' border='0' cellspacing='2' width='100%' cellpadding='1'><tr>";
   echo "<td height='25' class='table-cellpic'>$subject</td>";
   echo "</tr></table>";
   echo "<table width='100%' cellpadding='0' cellspacing='0' class='border'><tr>";
   echo "<td><table width='100%' cellpadding='0' cellspacing='0'><tr>";
   echo "<td class='main-body'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."";
   echo "</td></tr></table>";
   echo "<table width='100%' cellpadding='0' cellspacing='0'><tr>";
   echo "<td class='news-footer'>";
   echo "".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> ";
   echo "".$locale['041'].showdate("longdate", $info['article_date'])."</td>";
   echo "<td height='24' align='right'>";
   if ($info['article_allow_comments']) echo $info['article_comments'].$locale['043']." · ";
   echo "".$info['article_reads'].$locale['044']." ";
   echo "<a href='print.php?type=A&amp;item_id=".$info['article_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='vertical-align:middle;border:0px;'></a>";
   echo "</td></tr></table></td></tr></table>\n";
}

// Open table begins
function opentable($title) {

   echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>";
   echo "<tr><td width='100%'><table class='panel-border' cellSpacing='1' cellPadding='0' width='100%' border='0'>";
   echo "<tr><td width='100%' height='25' class='table-cellpic' align='right'>$title</td></tr>";
   echo "<tr><td class='main-body' width='100%' bgColor='#FFFFFF'>";
}

// Close table end
function closetable() {

   echo "</td></tr></table></td></tr></table>";
}

function openside($title) {

   echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>";
   echo "<tr><td width='100%'><table class='panel-border' cellSpacing='1' cellPadding='0' width='100%' border='0'>";
   echo "<tr><td width='100%' height='25' class='panel-cellpic' align='right'>$title</td></tr>";
   echo "<tr><td class='side-body' width='100%' bgColor='#FFFFFF'>";
}

function closeside() {

   echo "</td></tr></table></td></tr></table>";
   tablebreak();
}

function opensidex($title,$open="on") {

   $boxname = str_replace(" ", "", $title);
   $box_img = $open == "on" ? "off" : "on";
   echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>";
   echo "<tr><td width='100%'><table class='panel-border' cellSpacing='1' cellPadding='0' width='100%' border='0'>";
   echo "<tr><td width='100%' height='25' class='panel-cellpic' align='center'><img align='right' src='".THEME."images/panel_$box_img.gif' name='b_$boxname' alt='' onclick=\"javascript:flipBox('$boxname')\">$title</td></tr>";
   echo "<tr><td class='side-body' width='100%' bgColor='#FFFFFF'>";
   echo "<div id='box_$boxname'"; if($open=="off"){ echo "style='display:none'"; } echo ">\n";
}

function closesidex() {

   echo "</div></td></tr></table></td></tr></table>";
   tablebreak();
}

// Table functions
function tablebreak() {
   echo "<table width='100%' cellspacing='0' cellpadding='0'><tr><td height='8'></td></tr></table>\n";
}
?>




Va čia mano theme.php, bet aš nerandu tų vietų.. :(

Parašė Dandžu· 2008 Bal. 18 18:04:39
#60

Už tave neįdėsiu. :]

Parašė NoNy· 2008 Bal. 18 18:04:42
#61

Tai aprodik kuriose vietose, aš gi neprašau įdėti. :(

Parašė Gedi Minas· 2008 Bal. 18 19:04:18
#62

NONY Įdėjau pačioj apčioj.


function render_news($subject, $news, $info, $rating) {


global $locale;

   echo "<table class='news-border' border='0' cellspacing='2' width='100%' cellpadding='1'><tr>";
   echo "<td height='25' class='table-cellpic'>$subject</td>";
   echo "</tr></table>";
   echo "<table width='100%' cellpadding='0' cellspacing='0' class='border'><tr>";
   echo "<td><table width='100%' cellpadding='0' cellspacing='0'><tr>";
   echo "<td class='main-body'>$news</td></tr></table>";
   echo "<table width='100%' cellpadding='0' cellspacing='0'><tr>";
   echo "<td class='news-footer'>";
   echo "".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> ";
   echo "".$locale['041'].showdate("longdate", $info['news_date'])." </td>";
   echo "<td height='24' align='right'>";
   echo "".($info['news_ext'] == "y" ? "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n" : ""merkia akį."";
   if ($info['news_allow_comments'])
   echo "<a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a> · ";
   echo "".$info['news_reads'].$locale['044']." ";
   echo "<a href='print.php?type=N&amp;item_id=".$info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='vertical-align:middle;border:0px;'></a>";
   echo "</td></tr><tr>
<td align='left' class='news-footer'>$rating</td>
</tr>
</table></td></tr></table>\n";
}



Redagavo Gedi Minas· 2008 Bal. 18 19:04:20

Parašė kLx· 2008 Bal. 18 19:04:56
#63

Labai ačiū už modą ! Tikrai labai šaunus ir gražus modas! ;)

Parašė hopan· 2008 Bir. 28 22:06:30
#64

Ačiū, kaip tik ko ir ieškojau ;)

Parašė ququ· 2008 Bir. 28 22:06:01
#65

function render_news($subject, $news, $info, $rating) {

global $locale;
   
echo "
         <div class='open-div'>
            <div class='title'>
               $subject
            </div>

            ".newsposter($info,"<br><br>")."
            $news\n";
               if ($info['news_ext'] == "y") echo "<br><br><a href='news.php?readmore=".$info['news_id']."'><span class='read-more'><b><marquee><img src='".THEME."images/readmore.gif'> ".$locale['042']."</marquee></b></span></a>\n";
echo "
            <div class='news-footer'>\n";
               echo openform("N",$info['news_id']).newsopts($info,"&middot;").closeform("N",$info['news_id']);
echo "

            </div>
         </div>\n";

}

function render_article($subject, $article, $info) {






Gal galite patarti Kur man isprausti koda


<tr>
<td align='left' class='news-footer'>$rating</td>
</tr>

Redagavo ozzWANTED· 2008 Bir. 28 22:06:33

Parašė hopan· 2008 Bir. 29 13:06:00
#66

Duok ilgesnį tekstą, nes ne tą vietą čia parašiai kur reikia įterpti, kai parašysi normaliai parašysiu aš tau :)

Parašė ququ· 2008 Bir. 29 14:06:52
#67

<?php
/*
CleanRed 1.0 theme for PHP-Fusion
Copyright © 2007 Patric G. Forcelini (IceWasp)
Released under the terms & conditions of GNU/GPL v2
*/
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once THEMES."CleanRed/theme_functions_include.php";

// theme settings
$body_text = "#000000";
$body_bg = "#ffffff";
$theme_width = "750";
$theme_width_l = "165";
$theme_width_r = "165";

function render_header($header_content) {

global $theme_width,$settings,$locale;

echo "
<div id='container' style='width:$theme_width;'>
      <div id='header'>
         $header_content
      </div>
      <div id='sub-header'>
         ".showsublinks("","white")."
      </div>
      <table width='100%' cellpadding='0' cellspacing='0'>
         <tr>\n";

}

function render_footer($license=false) {

global $theme_width,$settings,$locale;

echo "
         </tr>
      </table>
      <div id='footer'>
         ".stripslashes($settings['footer'])."
               <b>   </div>
   </div>\n";

}

function render_news($subject, $news, $info, $rating) {

global $locale;
   
echo "
         <div class='open-div'>
            <div class='title'>
               $subject
            </div>

            ".newsposter($info,"<br><br>")."
            $news\n";
               if ($info['news_ext'] == "y") echo "<br><br><a href='news.php?readmore=".$info['news_id']."'><span class='read-more'><b><marquee><img src='".THEME."images/readmore.gif'> ".$locale['042']."</marquee></b></span></a>\n";
echo "
            <div class='news-footer'>\n";
               echo openform("N",$info['news_id']).newsopts($info,"&middot;").closeform("N",$info['news_id']);
echo "

            </div>
         </div>\n";

}

function render_article($subject, $article, $info) {

global $locale;

echo "
         <div class='open-div'>
            <div class='title'>
               $subject
            </div>
            ".articleposter($info,"<br><br>")."
            ".($info['article_breaks'] == "y" ? nl2br($article) : $article)."
            <div class='news-footer'>\n";
               echo openform("A",$info['article_id']).articleopts($info,"&middot;").closeform("A",$info['article_id']);
echo "

            </div>
         </div>\n";

}

function opentable($title) {

echo "
         <div class='open-div'>
            <div class='title'>
               $title
            </div>\n";

}

function closetable() {

    echo "
         </div>\n";

}

function openside($title) {
   
echo "
         <div class='open-sdiv'>
            <div class='title'>
               $title
            </div>\n";

}

function closeside() {

echo "
         </div>\n";

}

function opensidex($title,$state="on") {

$boxname = str_replace(" ", "", $title);

echo "
         <div class='open-sdiv'>
            <div class='titler'>
               ".panelbutton($state,$boxname)."
            </div>
            <div class='title'>
               $title
            </div>
               <div id='box_$boxname'"; if($open=="off"){ echo "style='display:none'"; } echo ">\n";

}

function closesidex() {

    echo "
            </div>
         </div>\n";

}

function tablebreak() {

echo "
         <div class='break'></div>\n";

}
?>




dar yra pasony failas


<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
/*
CleanRed 1.0 theme for PHP-Fusion
Copyright © 2007 Patric G. Forcelini (IceWasp)
Released under the terms & conditions of GNU/GPL v2
*/
if (!defined("IN_FUSION")) { header("Location:../index.php"); exit; }

function showsublinks($sep="&middot;",$class="") {
   $i = 0; $res = "";
   $sres = dbquery("SELECT * FROM ".DB_PREFIX."site_links WHERE link_position>='2' ORDER BY link_order");
   if (dbrows($sres) != 0) {
      while($sdata = dbarray($sres)) {
         if (checkgroup($sdata['link_visibility'])) {
            if ($sdata['link_url']!="---") {
               if ($i != 0) { $res .= " ".$sep."\n"; } else { $res .= "\n"; }
               $link_target = $sdata['link_window'] == "1" ? " target='_blank'" : "";
               $link_class = $class ? " class='$class'" : "";
               if (strstr($sdata['link_url'], "http://") || strstr($sdata['link_url'], "https://")) {
                  $res .= "<a href='".$sdata['link_url']."'".$link_target.$link_class.">".$sdata['link_name']."</a>";
               } else {
                  $res .= "<a href='".BASEDIR.$sdata['link_url']."'".$link_target.$link_class.">".$sdata['link_name']."</a>";
               }
            }
            $i++;
         }
      }
   }
   if ($i != 0) { return $res; } else { return "&nbsp;"; }
}

function newsposter($info,$sep="",$class="") {
   global $locale; $res = "";
   $link_class = $class ? " class='$class' " : "";
   $res = "";
   $res .= "";
   $res .= $locale['041'];
   $res .= $sep."\n";
   return $res;
}

function newsopts($info,$sep,$class="") {
   global $locale; $res = "";
   $link_class = $class ? " class='$class' " : "";
   if ($info['news_allow_comments']) $res .= "<a href='news.php?readmore=".$info['news_id']."'".$link_class.">".$info['news_comments'].$locale['043']."</a> ".$sep." ";
   if ($info['news_ext'] == "y" || $info['news_allow_comments']) $res .= $info['news_reads'].$locale['044']."\n" ;
   $res .= $sep." <a href='print.php?type=N&amp;item_id=".$info['news_id']."'><img src='".THEME."images/pakeista.gif' alt='".$locale['045']."' title='".$locale['045']."' style='vertical-align:middle;border:0px;'></a>\n";
   return $res;
}

function articleposter($info,$sep="",$class="") {
   global $locale; $res = "";
   $link_class = $class ? " class='$class' " : "";
   $res = "<img src='".THEME."images/bullet.gif' alt='&middot;'>\n";
   $res .= $locale['040']."<a href='profile.php?lookup=".$info['user_id']."'".$link_class.">".$info['user_name']."</a>\n";
   $res .= $locale['041'].showdate("longdate", $info['article_date']);
   $res .= $sep."\n";
   return $res;
}

function articleopts($info,$sep) {
   global $locale; $res = "";
   if ($info['article_allow_comments']) $res = $info['article_comments'].$locale['043']." ".$sep."\n";
   $res .= $info['article_reads'].$locale['044']." ".$sep."\n";
   $res .= "<a href='print.php?type=A&amp;item_id=".$info['article_id']."'><img src='".THEME."images/pakeista.gif' alt='".$locale['045']."' title='".$locale['045']."' style='vertical-align:middle;border:0px;'></a>\n";
   return $res;
}

function openform($item_type,$item_id) {
   global $aidlink;
   $res = "";
   if ($item_type == "N") {
      if (iADMIN && checkrights($item_type)) $res .= "<form name='editnews".$item_id."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$item_id."'>\n";
   } elseif ($item_type == "A") {
      if (iADMIN && checkrights($item_type)) $res .= "<form name='editarticle".$item_id."' method='post' action='".ADMIN."articles.php".$aidlink."&amp;article_id=".$item_id."'>\n";
   }
   return $res;
}

function closeform($item_type,$item_id) {
   global $locale; $res = "";
   if ($item_type == "N") {
      if (iADMIN && checkrights($item_type)) $res .= "&middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$item_id.".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a>\n</form>\n";
   } elseif ($item_type == "A") {
      if (iADMIN && checkrights($item_type)) $res .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editarticle".$item_id.".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a>\n</form>\n";
   }
   return $res;
}

function showcopyright($class="") {
   global $settings;
   $link_class = $class ? " class='$class' " : "";
   $res = "Powered by <a href='http://www.xdd.lt'".$link_class."target='_blank'>PHP-Fusion</a> <br>\n";
   $res .= "Released as free software under the terms of the GNU/GPL license.";
   return $res;
}

function showcounter() {
   global $locale,$settings;
   return number_format($settings['counter'])." ".($settings['counter'] == 1 ? $locale['140'] : $locale['141']);
}

function panelbutton($state,$bname) {
   return "<img src='".THEME."images/panel_".($state == "on" ? "off" : "on").".gif' name='b_$bname' alt='' onclick=\"javascript:flipBox('$bname')\">";
}
?>



Redagavo ququ· 2008 Bir. 29 14:06:44

Parašė tm· 2008 Bir. 29 15:06:14
#68

Liuks daiktas isbandziau pasidariau viskas veikia 100 % :)

Parašė MAnjack· 2008 Bir. 29 15:06:07
#69

Galima ir su žvaigždutėm pasidaryt :)

Parašė tm· 2008 Bir. 29 15:06:36
#70

tai taip tai cia jau img pakeiti ir vsio bet maniskiui dizainiukui oaprastam si kaip tik :)

Parašė ququ· 2008 Bir. 29 16:06:44
#71

Gal zinot kur idet ta koda i tema kur parasiau virsuje :?:?:?

Parašė GoBiS· 2008 Rugs. 6 13:09:29
#72

gal galit padet kas nors nesigauna man to theme.php padaryt padekyt :(

va mano theme.php kam nesunku padarykit



<?php
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";

// theme settings
$body_text = "#555555";
$body_bg = "#484848";
$theme_width = "780"; ///Temos plotis
$theme_width_l = "175";
$theme_width_r = "175";

function render_header($header_content) {

global $theme_width,$settings;

echo "<table align='center' cellspacing='0' cellpadding='0' width='$theme_width' class='outer-border'>
<tr>
<td>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='header_top'>
<table cellpadding='0' cellspacing='0' width='100%'>
<td width='500'></td>
<td width='200'></td>

<td width='13' height='28'align='left'><img src='".THEME."images/line_l.png'></td>
<td width='235' align='left' height='28' background='".THEME."images/line_grad.png' class='line'><marquee scrollamount='1' scrolldelay='50' onmouseover='this.stop()' onmouseout='this.start()'>".stripslashes($settings['description'])."</marquee></td>
<td width='13' align='left' height='28'><img src='".THEME."images/line_r.png'></td>

</table>
</td>
</tr>
</table>\n";

echo "<table cellpadding='0' cellspacing='0' width='100%' class='outer-border'>\n<tr>
<td><img src='".THEME."header.gif'></td>
</tr>
</table>\n";


echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>
<td class='linija'></td>
</table>\n";

echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";

}

function render_footer($license=false) {

global $theme_width,$settings;

echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>


</td>
</tr>
</table>
</td>
</tr>
</table>\n";

}



function render_news($subject, $news, $info) {

global $aidlink,$item_type;
$res = "";

echo "<table cellpadding='0' cellspacing='0' width='$theme_width'>
<tr>
<td class='capmain'>$subject<br><span style='font-size : 10px;font-weight : normal;color:#B2B2B2;'>".showdate("shortdate", $info['news_date'])."</span></td>
</tr>
<tr>
<td class='main-body'>$news</td>
</tr>
<tr>
<form name='editnews".$info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$info['news_id']."'>
<td align='center' class='news-footer'><img src='http://www.dance.too.lt/images/placiau.gif'<a href='news.php?readmore=".$info['news_id']."'><text>Naujiena plačiau</a> <img src='http://www.dance.too.lt/images/komentarai.png' <text>Komentarų: ".$info['news_comments']."</td>
</form>
</tr>
</table>\n";

}

function render_article($subject, $article, $info) {

echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='capmain'>$subject</td>
</tr>
<tr>
<td class='main-body'>
".($info['article_breaks'] == "y" ? nl2br($article) : $article)."
</td>
</tr>
<tr>
<td align='center' class='news-footer'>\n";
echo openform("A",$info['article_id']).articleposter($info," &middot;").articleopts($info,"&middot;").closeform("A",$info['article_id']);
echo "</td>
</tr>
</table>\n";

}

function opentable($title) {

echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='capmain'>$title</td>
</tr>
<tr>
<td class='main-body'>\n";

}

function closetable() {

echo "</td>
</tr>
</table>\n";

}

function openside($title) {

echo "<table cellpadding='0' cellspacing='0' width='100%' class='border'>
<tr>
<td class='scapmain'>$title</td>
</tr>
<tr>
<td class='side-body'>\n";

}

function closeside() {

echo "</td>
</tr>
</table>\n";
tablebreak();

}



function opensidex($title,$state="on") {

$boxname = str_replace(" ", "", $title);
echo "<table cellpadding='0' cellspacing='0' width='100%' class='border'>
<tr>
<td class='scapmain'>$title</td>
<td class='scapmain' align='right'>".panelbutton($state,$boxname)."</td>
</tr>
<tr>
<td colspan='2' class='side-body'>
<div id='box_$boxname'".($state=="off"?" style='display:none'":"").">\n";

}

function closesidex() {

echo "</div>
</td>
</tr>
</table>\n";
tablebreak();

}

function tablebreak() {

echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n<td height='5'></td>\n</tr>\n</table>\n";

}
?>

Redagavo GoBiS· 2008 Rugs. 6 13:09:32

Parašė masck· 2008 Rugs. 16 13:09:51
#73

Nesigauna man nors tu ka,turbut kad ant V7 darau.?|

Parašė kinomanas· 2008 Rugs. 20 12:09:43
#74

Grazus darbas ;)