Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: centravimas ir sulyginimas

Parašė _Tomas· 2008 Bal. 13 15:04:58
#1

susidėjau U-CTR vieną panelę. Joje yra naujausi straipsniai ir siuntiniai.
Bet kaip daugiau siuntinių ar staipsnių Cellpicai buna nelygus ir noriu, kad butu jie per centra. <center> tagas netinka arba neten idedu.
Gal kas gali padaryt kad butu vienodas aukštis ir centre butu

echo "<table width='100%'>
<tr>
<td width='33%'>";
openside("<center>Naujausi Siuntiniai</center>");
$result = dbquery(
"SELECT td.*,tdc.* FROM ".$db_prefix."downloads td
INNER JOIN ".$db_prefix."download_cats tdc ON td.download_cat=tdc.download_cat_id
WHERE ".groupaccess('download_cat_access')." ORDER BY download_datestamp DESC LIMIT 0,10"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
echo "</td>
<td width='33%'>";
openside("<center>Naujausi Straipsniai</center>");
$result = dbquery(
"SELECT ta.*,tac.* FROM ".$db_prefix."articles ta
INNER JOIN ".$db_prefix."article_cats tac ON ta.article_cat=tac.article_cat_id
WHERE ".groupaccess('article_cat_access')." ORDER BY article_datestamp DESC LIMIT 0,5"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['article_subject'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."readarticle.php?article_id=".$data['article_id']."' title='".$data['article_subject']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
echo "</td>
<td width='33%'>";
echo "</tr>
</table>";



Parašė MaFetas· 2008 Bal. 13 16:04:28
#2

Prašome:
openside("name");
echo "<table width='100%'>
<tr>
<td width='50%'>";
openside("<center>Naujausi Siuntiniai</center>");
$result = dbquery(
"SELECT td.*,tdc.* FROM ".$db_prefix."downloads td
INNER JOIN ".$db_prefix."download_cats tdc ON td.download_cat=tdc.download_cat_id
WHERE ".groupaccess('download_cat_access')." ORDER BY download_datestamp DESC LIMIT 0,10"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
echo "</td>
<td width='50%'>";
openside("<center>Naujausi Straipsniai</center>");
$result = dbquery(
"SELECT ta.*,tac.* FROM ".$db_prefix."articles ta
INNER JOIN ".$db_prefix."article_cats tac ON ta.article_cat=tac.article_cat_id
WHERE ".groupaccess('article_cat_access')." ORDER BY article_datestamp DESC LIMIT 0,10"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['article_subject'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."readarticle.php?article_id=".$data['article_id']."' title='".$data['article_subject']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
echo "</td>
<td width='33%'>";
echo "</tr>
</table>";

closeside();



Parašė _Tomas· 2008 Bal. 13 17:04:44
#3

Neto noriu...
Man nereikia Openside ir Closeside daryt.
Man reikia kad butu sulyginti Cellpicai kaip buna Nelygus Siutinių ar Straipsnių skaičius ir kad butu centre

Parašė MaFetas· 2008 Bal. 13 17:04:13
#4

Savizudisz parašė:
Man reikia kad butu sulyginti Cellpicai kaip buna Nelygus Siutinių ar Straipsnių skaičius ir kad butu centre

Nesuprantu ką tu čia šneki. Geriau paimk ir nupiešk kaip viskas turi atrodyti

Parašė _Tomas· 2008 Bal. 13 18:04:52
#5

Va:
Kad butu Centre ir lygus Cellpicai.





Parašė MaFetas· 2008 Bal. 13 19:04:13
#6

Bandyk taip, rodys po 10 naujausiu siuntiniu bei straipsniu. Paneles turėtų būti vienodos jei bus po lygiai duomenu.
echo "<table width='100%'>
<tr>
<td width='50%'>";
openside("<center>Naujausi Siuntiniai</center>");
$result = dbquery(
"SELECT td.*,tdc.* FROM ".$db_prefix."downloads td
INNER JOIN ".$db_prefix."download_cats tdc ON td.download_cat=tdc.download_cat_id
WHERE ".groupaccess('download_cat_access')." ORDER BY download_datestamp DESC LIMIT 0,10"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
echo "</td>
<td width='50%'>";
openside("<center>Naujausi Straipsniai</center>");
$result = dbquery(
"SELECT ta.*,tac.* FROM ".$db_prefix."articles ta
INNER JOIN ".$db_prefix."article_cats tac ON ta.article_cat=tac.article_cat_id
WHERE ".groupaccess('article_cat_access')." ORDER BY article_datestamp DESC LIMIT 0,10"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['article_subject'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."readarticle.php?article_id=".$data['article_id']."' title='".$data['article_subject']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
echo "</td>


</table>";





Redagavo bad_user· 2008 Bal. 13 19:04:34

Parašė _Tomas· 2008 Bir. 12 18:06:59
#7

sena tema bet nenoriu kurti naujos. Kaip padaryti iš to kodo kur Mafetas davė kad butu lygus cellpicai kaip buna 5 Siuntiniai 9 Straipsniai. Nes dabar nelygiai.

Parašė bruzgis· 2008 Bir. 12 19:06:54
#8

bandyk nurodyt lentelių aukštį, turėtų atrodyt maždaug šitaip:

<td width='400'>



P.S. paryškintą gali keist. Juo aukštis reguliuojasi
Ir taip abiems stulpeliams.

echo "<table width='100%'>
<tr>
<td width='50%' height='400'>";
openside("<center>Naujausi Siuntiniai</center>");
$result = dbquery(
"SELECT td.*,tdc.* FROM ".$db_prefix."downloads td
INNER JOIN ".$db_prefix."download_cats tdc ON td.download_cat=tdc.download_cat_id
WHERE ".groupaccess('download_cat_access')." ORDER BY download_datestamp DESC LIMIT 0,10"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
echo "</td>
<td width='50%' height='400'>";
openside("<center>Naujausi Straipsniai</center>");
$result = dbquery(
"SELECT ta.*,tac.* FROM ".$db_prefix."articles ta
INNER JOIN ".$db_prefix."article_cats tac ON ta.article_cat=tac.article_cat_id
WHERE ".groupaccess('article_cat_access')." ORDER BY article_datestamp DESC LIMIT 0,10"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['article_subject'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."readarticle.php?article_id=".$data['article_id']."' title='".$data['article_subject']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
echo "</td>


</table>";