Navigacija

Vartotojų tinkle

Prisijungusių svečių: 94
Prisijungusių narių: 0
Prisijungusių narių nėra

Registruoti nariai: 25,959
Naujausias narys: Simbijanas

Naujausi straipsniai

Paskutiniai nariai

Reikalas 1 savaitė
Simbijanas 6 savaitės
Karinacraft 7 savaitės
Žmogus10 savaitės
Bruksnys14 savaitės
Darexs17 savaitės
Nepas18 savaitės
keistuole20 savaitės
Gizmis21 savaitės
Rytis31 savaitės
MaFetas35 savaitės
ozzWANTED36 savaitės
saulyzas38 savaitės
TOMIJUS39 savaitės
Jaunelis55 savaitės
lanis55 savaitės
And2s56 savaitės
Memento Mori61 savaitės
Quwqkibor63 savaitės
asirija67 savaitės

Informacija:


OS: Unknown
Naršyklė: Nežinoma
IP: 216.73.216.166
Naujienų: 529
Straipsnių: 235
Temų: 52,589
Postų: 522,547
Postų pask. parą: 0
Shout'ų pask. parą: 0
P.S.C. pask. parą: 0
Nuorodų kataloge: 13

Lankomumo Statistika

Peržiūrų šiandien: 22

Iš viso peržiūrų: 22948724

Prisijungti

REGISTRUOTIS
Nario vardas

Slaptažodis



Pamiršai slaptažodį?
Paprašyk naujo

Aktyvuoti save

Šaukykla

Jei norite rašyti žinutes, turite prisijungti.

Žmogus
2025 Geg. 31 10:05:18
Kas geresnio? šypsosi

Nepas
2025 Bal. 9 17:04:13
drovus

Nepas
2025 Bal. 9 17:04:08
drovus

Gizmis
2025 Kov. 15 14:03:50
OMG, smagu matyt sita puslapi veikianti

ozzWANTED
2024 Lap. 30 15:11:14
Taip, vis dar up šypsosi

Šaukyklos archyvas

Apklausa

Ar esate patenkinti lietuviško vertimo kokybe?

Taip!

Taip, bet yra ką taisyti (parašysiu komentaruose)

Ne

Norėdamas balsuoti turite prisijungti.
Archyvas
Reklama 400x60
Usergalerie - perdarymas
Forumas | PHP-Fusion, WordPress, Shopify, PHP ir MySQL (PROGRAMAVIMAS) | Kiti PHP, HTML, MySQL klausimai

Autorius: Vaidotas- Peržiūrų: 1104      Spausdinti temą
2009 Vas. 28 16:02:00          1 žinutė iš 3
Spausdinti pranešimą
Sveiki,

į savo puslapį turiu įsirašęs usergalerie modifikaciją, viskas būtų kaip ir gerai, tačiau vienas bet... kada peržiūri narių, susikūrusių albumu galerijas,nuotraukos rodomas visu dydžiu, ir visas puslapis labai išsidarko. Gal žinot kaip išspręsti šią problemą nesudėtingais būdais?






Žemiau prikabinu ir pačią modifikaciją šypsosi

Edited by Edis: paveiksliuką dėk tarp code tagų


Redagavo edis2 2009 Vas. 28 17:02:35
2009 Vas. 28 17:02:06          2 žinutė iš 3
Spausdinti pranešimą
Gali su javascript sumažint arba <img kode, kuriame atvaizduoja foto įdėt height ir width

2009 Vas. 28 18:02:36          3 žinutė iš 3
Spausdinti pranešimą
<?php

require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";
include "ug_setting.php";
include "locale/English.php";
include INCLUDES."ug_comments_include.php";

function checkImageExists($image_file) {
   if(file_exists($image_file)) {
      return $image_file;
   }
}

if (isset($step) && $step == "delete") {
   $result = dbquery("DELETE FROM ".$db_prefix."ug_comments WHERE comment_id='$comment_id'");
   redirect("comments.php?ctype=$ctype&cid=$cid");
}

if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if (isset($photo) && !isNum($photo)) fallback(FUSION_SELF);
if (isset($userid) && !isNum($userid)) fallback(FUSION_SELF);

if(isset($photo)){
   $result=dbquery("UPDATE ".$db_prefix."ug_photos SET photo_views=(photo_views+1) WHERE photo_id='".$photo."'");
   $result=dbquery("SELECT tp.*, user_name FROM ".$db_prefix."ug_photos AS tp INNER JOIN ".$db_prefix."users USING (user_id) WHERE photo_id='".$photo."'");
   $data=dbarray($result);

   opentable($data['user_name'].$locale['VU08']." - [ ".$locale['VU19'].$data['photo_title']." ]");
   if(dbrows($result)!=1){
      echo "<center><br>".$locale['VU28']."<br><br></center>\n";
   }else{
      $img_filename = USERGALERIE.$photo.".jpg";
      $imgsize=@getimagesize($img_filename);
      $prev=@dbresult(@dbquery("SELECT t2.photo_id FROM ".$db_prefix."ug_photos t1 JOIN ".$db_prefix."ug_photos t2 WHERE t1.photo_order=t2.photo_order+1 AND t1.album_id=t2.album_id AND t1.photo_id='".$photo."'"),0);
      $next=@dbresult(@dbquery("SELECT t2.photo_id FROM ".$db_prefix."ug_photos t1 JOIN ".$db_prefix."ug_photos t2 WHERE t1.photo_order=t2.photo_order-1 AND t1.album_id=t2.album_id AND t1.photo_id='".$photo."'"),0);
      echo "<div align='center' style='margin:5px 0px;'>
<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n<tr>
<td class='tbl1'><span class='small'><a href='".FUSION_SELF."?".(empty($prev)?"userid=".$data['album_id']:"userid=".$data['album_id']."&photo=".$prev)."'>".$locale['VU29']."</a></span></td>
<td class='tbl2'><span class='small'><a href='".FUSION_SELF."?userid=".$data['album_id']."'>".$data['user_name']." ".$locale['VU08']."</a></span></td>
<td class='tbl1'><span class='small'><a href='".FUSION_SELF."?".(empty($next)?"userid=".$data['album_id']:"userid=".$data['album_id']."&photo=".$next)."'>".$locale['VU30']."</a></span></td>
</tr>\n</table>\n</div><br><div align='center' style='margin:5px 0px;'>
<img src='".checkImageExists($img_filename)."' border='1' title='".$data['photo_title']."' title='".$data['photo_title']."' alt='".$locale['VU05']."'>
</div><br><div align='center' style='margin:5px 0px;'>
<span class='small2'>".$locale['VU20'].$imgsize[0]." x ".$imgsize[1].$locale['VU21']."(".parseByteSize(filesize($img_filename)).")<br>
".$locale['VU22']."".$locale['VU23']."<b>".showdate("shortdate", $data['photo_date'])."</b><br>
".$locale['VU24']."<b>".$data['photo_views']."</b>".$locale['VU25']."</span>
</div>";
}

closetable();

if($settings['album_comments']=="1") showcomments("P","photos","photo_id",$photo,FUSION_SELF."?userid=".$data['album_id']."&photo=$photo");
}elseif(isset($userid)){
   $data=dbarray(dbquery(
      "SELECT ta.*, COUNT(photo_id) as photo_count, MAX(photo_date) as max_date, user_name
      FROM ".$db_prefix."ug_photo_albums AS ta
      LEFT JOIN ".$db_prefix."ug_photos USING (album_id)
      LEFT JOIN ".$db_prefix."users USING (user_id)
      WHERE ta.album_id='".$userid."' GROUP BY album_id"
   ));

if ($data['album_title'] != ""){

   $piccnt=$data['photo_count'];
   opentable($data['album_title'].$locale['VU08']);
   echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>

<td width='75%' valign='top'>".($data['album_info']==""?$data['album_title']:$data['album_info'])."</td>
</tr>
<tr>
<td valign='bottom' class='small2'><hr>".$locale['VU09']."<b>".($data['photo_count']>0?"$data[photo_count]</b><br>".$locale['VU10']."<b>".strftime($settings['shortdate'], $data['max_date']+($settings['timeoffset']*3600))."</b>":$locale['VU12']."</b><br /><br />")."</td>
</tr>
<tr>
<td align='center' colspan='2' class='small'><br><a href='".FUSION_SELF."'>".$locale['VU26']."</a></td>
</tr>
</table>



";
   closetable();
   tablebreak();

   opentable($locale['VU13']);
   $result=dbquery(
      "SELECT tp.*, COUNT(comment_item_id) AS comment_count
      FROM ".$db_prefix."ug_photos AS tp LEFT JOIN ".$db_prefix."ug_comments
      ON photo_id = comment_item_id AND comment_type='P'
      WHERE album_id='".$userid."' GROUP BY photo_id
      ORDER BY photo_order LIMIT ".$rowstart.",".$settings['thumbs_per_page']
   );
   if(dbrows($result)>0){
      echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
      $img_cnt=0;
      while($data=dbarray($result)){
   
echo "<td class='gallery' width='".round(100/$settings['thumbs_per_row'])."%' align='center' valign='top'>
<a href='".FUSION_SELF."?userid=".$data['album_id']."&photo=$data[photo_id]' class='gallery'>
<img src='".checkImageExists(USERGALERIE.$data['photo_id']."t.jpg")."' width='".$settings['thumb_image_w']."' height='".$settings['thumb_image_h']."' title='".$data['photo_title']."' alt='".$locale['VU05']."'>
</a><br />
".$data['photo_title']."<br />
<span class='small2'>".$locale['VU14']."<b>".($data['photo_views']==0?$locale['VU12']:$data['photo_views'])."</b><br />
".($data['comment_count']==0?$locale['VU15']:"<b>".$data['comment_count']."</b> ".($data['comment_count']==1?$locale['VU16']:$locale['VU17']))."</span>";
         if(++$img_cnt%$settings['thumbs_per_row']==0) echo "</tr>\n<tr>\n";
      }

      echo "</tr>\n</table>\n";
      
   }else{
      echo "<center><br />".$locale['VU18']."<br /><br /></center>";
   }
   closetable();
   
   if ($piccnt != 0) echo "<div align='center' style='margin-top:5px;'>".makePageNav($rowstart,$settings['thumbs_per_page'],$piccnt,3,FUSION_SELF."?userid=".$userid."&amp;")."</div>\n";
}else{
opentable($locale['VU00']);
echo "<center>".$locale['VU31']."</center>";
closetable();
}}


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





Tai manau reiktų keisti šią vietą:


echo "<td class='gallery' width='".round(100/$settings['thumbs_per_row'])."%' align='center' valign='top'>
<a href='".FUSION_SELF."?userid=".$data['album_id']."&photo=$data[photo_id]' class='gallery'>
<img src='".checkImageExists(USERGALERIE.$data['photo_id']."t.jpg")."' width='".$settings['thumb_image_w']."' height='".$settings['thumb_image_h']."' title='".$data['photo_title']."' alt='".$locale['VU05']."'>
</a><br />





Bandžiau naudoti kažką tokio:

<a href='http://www.puslapis.com'><img src='http://www.puslapis.com/nuotrauka.jpg' border='0' alt=' ' width='dydisX' height='dydisY' />


Redagavo Vaidotas- 2009 Vas. 28 18:02:54
Peršokti į forumą: