Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Mano Visi klausimai cia.

Parašė Niger· 2008 Rugp. 5 19:08:36
#1

Turiu klausimuka,

Gal galit mazdaug biskuti paaskinti kaip hederyje padaryti naujiausias naujienas, ir skaitomiausias naujienas??|

Aciu is anksto kas pagelbes tuputuka.


Perredagavau posta, nes nesinori cia ju simtus prikurti.

Cia klausiu jusu kas man paciam neisheis :(

----------------------

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

$body_text = "#000000";
$body_bg = "#ffffff";
$theme_width = "900";
$theme_width_l = "183";
$theme_width_r = "183";

function render_header($header_content) {
global $theme_width,$settings,$locale,$userdata,$aidlink,$db_prefix;

   echo "<table class='forumline' align='center' width='$theme_width' cellspacing='0' cellpadding='0' style='border-right: solid #000000 1px; border-

left: solid #000000 1px; border-top: solid #000000 1px; margin-top: -5px;'>";
   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%'>";

   echo "<tr><table align=center width=100% height=270 background='".THEME."images/baner.jpg' border=0 cellspacing=0 cellpadding=0>";
echo"<tr><td height=50 class='nuorodos' align='center' style='padding-right:40px; padding-top:130px;'><br>";
echo"<table width='50%'><tr>";

echo"<td width='40%'>";
 $result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,5");
 if (dbrows($result) != 0) {
  echo "<table width='100%'>";
  while ($data = dbarray($result)) {
   echo "<tr>
    <td class='small'>
     <img src='".THEME."images/bullet.gif'>
     <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."'

class='side'>".trimlink($data['download_title'], 23)."</a>
    </td>
    <td align='right'>".$data['download_count']."</td>
   </tr>";
  }
  echo "</table>";
 } else {
  echo "<div style='text-align:center'>".$locale['004']."</div>\n";
 }

echo "</td><td width='40%' style='padding-left:80px;' >";

$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,5");
   if (dbrows($result) != 0) {
echo "<table  width='100%'>";
      while ($data = dbarray($result)) {
         echo "<tr>
            <td class='small'>
                    <img src='".THEME."images/bullet.gif'>
               <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."'

title='".$data['download_title']."' class='side'>".trimlink($data['download_title'], 23)."</a>
            </td>
            <td align='right'>".$data['download_count']."</td>
         </tr>";
      }
      echo "</table>";
   } else {
      echo "<div style='text-align:center'>".$locale['004']."</div>\n";
   }

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

echo "</td></tr>
<tr></tr>
<tr><td height=31></td></tr>
</table>
";

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

   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'>";
   echo "<td width='20%' height='50' class='white' align='left'>";
      if ($license == false) {
      echo "<b>Varikliukas: <a href='https://webdnd.com' target='_blank'>PHP-Fusion</a></b>";
   }
   echo "</td>";
   echo "<td width='40%' class='white' align='center'>";
   echo "<b>".stripslashes($settings['footer'])."</b></td>";
   echo "<td width='26%' class='white' align='right'>";
   echo "<b><a>Undersky</a> design</a></b>";
   echo "</td>";
   echo "<div align='center'></tr></table></td></tr></table></div>";
}




Nesurandu niekur kaip cia butu imanoma stumdyt situos aukstyn, zemyn, i kaire, i desne. jei galite pazimekite raudona spalva.

Aciu.

Redagavo ozzWANTED· 2008 Rugp. 9 19:08:29

Parašė Žmogus· 2008 Rugp. 5 19:08:12
#2

Bandyk pagal straipsnį daryk, kur parašytas :\

Parašė Niger· 2008 Rugp. 5 19:08:14
#3

ShadoVw parašė:
Bandyk pagal straipsnį daryk, kur parašytas :\


Jei nesunku numesk straipsnio linka, thnx

Parašė Žmogus· 2008 Rugp. 5 20:08:03
#4

https://webdnd.com/readarticle.p...icle_id=92

Parašė Niger· 2008 Rugp. 5 22:08:44
#5

Redagavau posta, jei nesunku galite gal padeti ? Pats pirmas postas.


Aciu.

Parašė Niger· 2008 Rugp. 5 23:08:29
#6

Please kasnors... please....

Parašė Haked· 2008 Rugp. 6 00:08:14
#7

va
if (!defined("IN_FUSION"merkia akį) { header("Location: ../../index.php"merkia akį; exit; }
require_once INCLUDES."theme_functions_include.php";

$body_text = "#000000";
$body_bg = "#ffffff";
$theme_width = "900";
$theme_width_l = "183";
$theme_width_r = "183";

function render_header($header_content) {
global $theme_width,$settings,$locale,$userdata,$aidlink,$db_prefix;

   echo "<table class='forumline' align='center' width='$theme_width' cellspacing='0' cellpadding='0' style='border-right: solid #000000 1px; border-

left: solid #000000 1px; border-top: solid #000000 1px; margin-top: -5px;'>";
   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%'>";

   echo "<tr><table align=center width=100% height=270 background='".THEME."images/baner.jpg' border=0 cellspacing=0 cellpadding=0>";
echo"<tr><td height=50 class='nuorodos' align='center' style='padding-right:40px; padding-top:130px;'><br>";
echo"<table width='50%'><tr>";

echo"<td width='40%'>";
 $result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,5");
 if (dbrows($result) != 0) {
  echo "<table width='100%'>";
  while ($data = dbarray($result)) {
   echo "<tr>
    <td class='small'>
     <img src='".THEME."images/bullet.gif'>
     <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>".trimlink($data['download_title'], 23)."</a>
    </td>
    <td align='right'>".$data['download_count']."</td>
   </tr>";
  }
  echo "</table>";
 } else {
  echo "<div style='text-align:center'>".$locale['004']."</div>\n";
 }

echo "</td><td width='60%' style='padding-left:80px;' >";

$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,5");
   if (dbrows($result) != 0) {
echo "<table  width='100%'>";
      while ($data = dbarray($result)) {
         echo "<tr>
            <td class='small'>
                    <img src='".THEME."images/bullet.gif'>
               <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>".trimlink($data['download_title'], 23)."</a>
            </td>
            <td align='right'>".$data['download_count']."</td>
         </tr>";
      }
      echo "</table>";
   } else {
      echo "<div style='text-align:center'>".$locale['004']."</div>\n";
   }

   </tr>";
  }
  echo "</table>";
 } else {
  echo "<div style='text-align:center'>".$locale['004']."</div>\n";
 }

echo "</td><td width='40%' style='padding-left:80px;' >";

$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,5"merkia akį;
   if (dbrows($result) != 0) {
echo "<table  width='100%'>";
      while ($data = dbarray($result)) {
         echo "<tr>
            <td class='small'>
                    <img src='".THEME."images/bullet.gif'>
               <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."'

title='".$data['download_title']."' class='side'>".trimlink($data['download_title'], 23)."</a>
            </td>
            <td align='right'>".$data['download_count']."</td>
         </tr>";
      }
      echo "</table>";
   } else {
      echo "<div style='text-align:center'>".$locale['004']."</div>\n";
   }

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

echo "</td></tr>
<tr></tr>
<tr><td height=31></td></tr>
</table>
";

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

   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'>";
   echo "<td width='20%' height='50' class='white' align='left'>";
      if ($license == false) {
      echo "<b>Varikliukas: <a href='https://webdnd.com' target='_blank'>PHP-Fusion</a></b>";
   }
   echo "</td>";
   echo "<td width='40%' class='white' align='center'>";
   echo "<b>".stripslashes($settings['footer'])."</b></td>";
   echo "<td width='26%' class='white' align='right'>";
   echo "<b><a>Undersky</a> design</a></b>";
   echo "</td>";
   echo "<div align='center'></tr></table></td></tr></table></div>";
}






o jei error,
imk koda to dalyko ir megink redaguot prie savo theme:
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,5");
 if (dbrows($result) != 0) {
  echo "<table width='100%'>";
  while ($data = dbarray($result)) {
   echo "<tr>
    <td class='small'>
     <img src='".THEME."images/bullet.gif'>
     <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>".trimlink($data['download_title'], 23)."</a>
    </td>
    <td align='right'>".$data['download_count']."</td>
   </tr>";
  }
  echo "</table>";
 } else {
  echo "<div style='text-align:center'>".$locale['004']."</div>\n";
 }

echo "</td><td width='60%' style='padding-left:80px;' >";

$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,5");
   if (dbrows($result) != 0) {
echo "<table  width='100%'>";
      while ($data = dbarray($result)) {
         echo "<tr>
            <td class='small'>
                    <img src='".THEME."images/bullet.gif'>
               <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>".trimlink($data['download_title'], 23)."</a>
            </td>
            <td align='right'>".$data['download_count']."</td>
         </tr>";
      }
      echo "</table>";
   } else {
      echo "<div style='text-align:center'>".$locale['004']."</div>\n";
   }



Redagavo Haked· 2008 Rugp. 6 00:08:55

Parašė Niger· 2008 Rugp. 9 18:08:22
#8

Mano naujas klausimelis, zodziu pasidariau prisijungima hederyje, idejau zmogaus ivertinima, bet zmogu ivertinus nerodo ivertinimo, tiksliau sakant neatvaizduoja %ver i balus... Gal galit kas pagelbeti kur ce problemele butu ?

Parašė Qrmiz· 2008 Rugp. 9 18:08:31
#9

Tai kodą duok šen, galbūt prie global nepridėjai $db_prefix... ir būtų gerai, jei foto parodytum :)

Parašė Niger· 2008 Rugp. 9 18:08:35
#10

Va nautrauka: http://www.imagestime.com/show.p...0_stai.jpg


Kodas kuriame noriu kad rodytu vid ivertinima:



<?php
global $theme_width,$settings,$aidlink,$locale,$userdata;
echo "<table width='$theme_width' border='0' align='center' cellpadding='0' cellspacing='0' background='".THEME."images/logo.gif' height='100'

style='background-repeat: no-repeat;'>
      <tr>
     
      <td width='235' style='padding-right: 0px; padding-left: 700px; padding-bottom: 10px; padding-top:20px;' valign='middle'>";
      if (iMEMBER) {
   $msg_count = dbcount("(message_id)", "messages", "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
   echo "<table width='235' border='0' cellspacing='2' cellpadding='2'>
  <tr>
    <td>\n";
   if ($userdata['user_avatar'] != "") {
   echo "<center><img src='".BASEDIR."images/avatars/".$userdata['user_avatar']."' width='100' height='100' style='border:1px solid

#999999'></center>\n";
   } else {
   echo "<center><img src='".THEME."images/noavatar.gif' width='100' height='100' border='0'></center>\n";
   }
   echo "</td>
    <td valign='top'> <img src='".THEME."images/bullet.gif' alt=''> Vid &#225;vertinimas: $vert<br> <img src='".THEME."images/bullet.gif' alt=''> <a

href='".BASEDIR."edit_profile.php' class='side'>Redaguoti profil&#225;</a><br>
<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."messages.php' class='side'>&#222;inut&#235;s [naujø: <b><span style='color:#990000'>".sprintf

($msg_count)."</span></b>]</a><br>
<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."members.php' class='side'>Nariai</a><br>\n";
   if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
      echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".ADMIN."index.php".$aidlink."' class='side'>Administracija</a><br>\n";
   }
   echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."setuser.php?logout=yes' class='side'>".$locale['084']."</a><br><br>
   <b><span class='ip'>IP: </span></b>";
   $userip = $_SERVER['REMOTE_ADDR'];
      $host = gethostbyaddr($userip);
      echo "<span class='ip'>".$userip."</span><br /></td></tr></table>\n";
   } else {
   echo "<table width='170' border='0' cellspacing='0' cellpadding='0' align='center'><form name='loginform' method='post' action='".FUSION_SELF."'>
  <tr>
    <td align='right' class='ip'>Vardas: </td>
    <td> <input type='text' name='user_name' class='textbox' style='width:100px;filter:alpha(opacity=70)'></td>
  </tr>
  <tr>
    <td align='right' class='ip'>".$locale['062'].": </td>
    <td> <input type='password' name='user_pass' class='textbox' style='width:100px;filter:alpha(opacity=70)'></td>
  </tr>
  <tr>
    <td align='right'><input type='checkbox' name='remember_me' value='y'></td>
    <td> <input type='submit' name='login' value='Prisijungti' class='button'></td>
  </tr>
  </form>\n";
   if ($settings['enable_registration']) {
      echo "<a href=".BASEDIR."register.php>Registracija</a> / <a href=".BASEDIR."lostpassword.php>Slapta&#254;odis</a>\n";
   }
   echo"</table>\n";
}
?>






cia yra user panele ir tas vidutinis ivertinimas veikia. :


<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 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
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }

if (iMEMBER) {
   openside($userdata['user_name']);
   $sk = 0;
   $result = dbquery("SELECT * FROM ".$db_prefix."user_ratings WHERE rate_subject = '".$userdata['user_id']."'");
   if (dbrows($result)) {
      while ($data = dbarray($result)) $sk = $sk+$data['rate_opt'];
   }
   $vert = (dbrows($result) > 0 ? round($sk/dbrows($result),2) : "N&#235;ra");
   $msg_count = dbcount("(message_id)", "messages", "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
echo ($userdata['user_avatar'] ? "<center><img src='".IMAGES."avatars/".$userdata['user_avatar']."'></center><br>\n" : "<center>N&#235;ra avataro</center><br>\n")."<br>
<img src='".THEME."images/bullet.gif' alt=''> Vidutinis &#225;vertinimas: $vert<br>
".(iADMIN && eregi("C",$userdata['user_rights']) ? "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."viewpage.php?page_id=3' class='side'>Visi komentarai</a><br>\n" : "")."
<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."edit_profile.php' class='side'>".$locale['080']."</a><br>
<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."messages.php' class='side'>".$locale['081']."</a><br>
<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."members.php' class='side'>".$locale['082']."</a><br>\n";
   if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
      echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".ADMIN."index.php".$aidlink."' class='side'>".$locale['083']."</a><br>\n";
   }
   echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."setuser.php?logout=yes' class='side'>".$locale['084']."</a>\n";
   if ($msg_count) echo "<br><br><center><b><a href='".BASEDIR."messages.php' class='side'>".sprintf($locale['085'], $msg_count).($msg_count == 1 ? $locale['086'] : $locale['087'])."</a></b></center>\n";
} else {
   openside($locale['060']);
   echo "<div align='center'>".(isset($loginerror) ? $loginerror : "")."
<form name='loginform' method='post' action='".FUSION_SELF."'>
".$locale['061']."<br>
<input type='text' name='user_name' class='textbox' style='width:100px'><br>
".$locale['062']."<br>
<input type='password' name='user_pass' class='textbox' style='width:100px'><br>
<input type='checkbox' name='remember_me' value='y' title='".$locale['063']."' style='vertical-align:middle;'>
<input type='submit' name='login' value='".$locale['064']."' class='button'><br>
</form>
<br>\n";
   if ($settings['enable_registration']) {
      echo "".$locale['065']."<br><br>\n";
   }
   echo $locale['066']."
</div>\n";
}
closeside();
?>



Parašė Žmogus· 2008 Rugp. 9 19:08:00
#11

global $theme_width,$settings,$aidlink,$locale,$userdata,$db_prefix;




Dėk šitą

Redagavo Žmogus· 2008 Rugp. 9 19:08:12

Parašė Niger· 2008 Rugp. 9 19:08:20
#12

Nieko nepakito, tas pats. :|

Parašė Žmogus· 2008 Rugp. 9 19:08:27
#13

global $theme_width,$settings,$aidlink,$locale,$userdata,$db_prefix,$vert;




Nežinau ar veiks, bet turbūt mes klaida :\

Parašė Niger· 2008 Rugp. 9 19:08:02
#14

ShadoVw parašė:
global $theme_width,$settings,$aidlink,$locale,$userdata,$db_prefix,$vert;




Nežinau ar veiks, bet turbūt mes klaida :\



Va aciu uz pradzia, o gala pats susitvarkiau :D

Mat sitaip turejo buti ir veikia (cia kodo pradzia):

<?php
global $theme_width,$settings,$aidlink,$locale,$userdata,$db_prefix,$vert,$result,$sk;
echo "<table width='$theme_width' border='0' align='center' cellpadding='0' cellspacing='0' background='".THEME."images/logo.gif' height='100'

style='background-repeat: no-repeat;'>
      <tr>
     
      <td width='235' style='padding-right: 0px; padding-left: 700px; padding-bottom: 10px; padding-top:20px;' valign='middle'>";
      if (iMEMBER) {
   $sk = 0;
   $result = dbquery("SELECT * FROM ".$db_prefix."user_ratings WHERE rate_subject = '".$userdata['user_id']."'");
   if (dbrows($result)) {
      while ($data = dbarray($result)) $sk = $sk+$data['rate_opt'];
   }
   $vert = (dbrows($result) > 0 ? round($sk/dbrows($result),2) : "N&#235;ra");
   $msg_count = dbcount("(message_id)", "messages", "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
   echo "<table width='235' border='0' cellspacing='2' cellpadding='2'>



Parašė Žmogus· 2008 Rugp. 9 19:08:24
#15

Jo taip turėjo būti, būčiau jau rašęs, bet dėkui dėvui pats susiprotėjai :]]]]]

Parašė Niger· 2008 Rugp. 9 19:08:38
#16

Vat dar vienas klausimelis, kaip ten nurodyti linka kad paspaudus nueijtu i mano profilis? ir ten galeciau pasizeti komentarus ka raso kiti?

Parašė Žmogus· 2008 Rugp. 9 19:08:34
#17

".BASEDIR."profile.php?lookup=".$userdata['user_id']."



Parašė bruzgis· 2008 Rugp. 9 19:08:21
#18

<a href='".BASEDIR."profile.php?lookup=".$userdata['user_id']."' class='side'>Mano profilis</a>

Parašė Niger· 2008 Rugp. 9 20:08:50
#19

chipass parašė:
<a href='".BASEDIR."profile.php?lookup=".$userdata['user_id']."' class='side'>Mano profilis</a>


DIDELIS Aciu chipass!!!