Yangi formatda davom etish uchun: https://uzfor.net/view.php?id=736&page=143
Johncms bo'yicha umumiy savollar
Mavzu fayllari (121)
Xabarlar
User ga bir marta kurinadigan link qanday qilinadi yani
fc-arsenal.u z dagidek regdan utgandan kiyin link beradi
fc-arsenal.u z dagidek regdan utgandan kiyin link beradi
Mahmudjon, # Mahmudjon (02.06.2020 / 12:51)
Xikoyalar.r u ni bosh sahifasida chiqib turgan maqolalarda Fikrlar (0) degan joyi bor. Maqoladagi fikrlarni sanaydigan kodni bervorilar, bosh sahifaga chiqargani.Mysql kodi
Yozilishi
Xikoyalar.r u ni bosh sahifasida chiqib turgan maqolalarda Fikrlar (0) degan joyi bor. Maqoladagi fikrlarni sanaydigan kodni bervorilar, bosh sahifaga chiqargani.Mysql kodi
$izoh= mysql_result( mysql_query("SELECT COUNT(*) FROM `cms_library_comments` WHERE `sub_id` = '".$row['id']."' "),0);
Yozilishi
<a href="?act=comments&id=' . $row['id'] . '">Fikrlar:</a>'.$izoh.'
+ (2): Fokuschi, sobirjonovv,
uzb_master, # uzb_master (02.06.2020 / 18:24)
Mahmudjon, Mysql kodi
$izoh= mysql_result( mysql_query("SELECT COUNT(*) FROM `cms_library_comments` WHERE `sub_id` = '".$row['id']."' "),0);
Yozilishi
<a href="?act=comments&id=' . $rowKod ishlamadi sardorjon :-(
Mahmudjon, Mysql kodi
$izoh= mysql_result( mysql_query("SELECT COUNT(*) FROM `cms_library_comments` WHERE `sub_id` = '".$row['id']."' "),0);
Yozilishi
<a href="?act=comments&id=' . $rowKod ishlamadi sardorjon :-(
Mahmudjon, # Mahmudjon (02.06.2020 / 19:38)
uzb_master, Kod ishlamadi sardorjon :-(Mysql koddagi
$izoh= mysql_result( mysql_query("SELECT COUNT(*) FROM `cms_library_comments` WHERE `sub_id` = '".$row['id']."' "),0);
shu qizil joyni sahifayizga moshlab oling
7 daqiqa 58 soniyadan keyin yozdi:
Men tepada yozganim faqat mysql va kodi uni sahifayizga moshlab olasiz
uzb_master, Kod ishlamadi sardorjon :-(Mysql koddagi
$izoh= mysql_result( mysql_query("SELECT COUNT(*) FROM `cms_library_comments` WHERE `sub_id` = '".$row['id']."' "),0);
shu qizil joyni sahifayizga moshlab oling
7 daqiqa 58 soniyadan keyin yozdi:
Men tepada yozganim faqat mysql va kodi uni sahifayizga moshlab olasiz
Mahmudjon, # Mahmudjon (02.06.2020 / 19:38)
uzb_master, Kod ishlamadi sardorjon :-(row['id'] sizda maqolararni bosh sahifaga chiraqishda maqola nomida qanaqa mysql kod yozilgan masalan < a href="http//maqola.ru/library/index.php?id=1"> . '$row['library_name'] . '</a> shunaqami sizda . '$row['library_name'] . ' örniga nima yozilgan
uzb_master, Kod ishlamadi sardorjon :-(row['id'] sizda maqolararni bosh sahifaga chiraqishda maqola nomida qanaqa mysql kod yozilgan masalan < a href="http//maqola.ru/library/index.php?id=1"> . '$row['library_name'] . '</a> shunaqami sizda . '$row['library_name'] . ' örniga nima yozilgan
Mahmudjon, Mana umumiy kod (namuna: yurakcha.ru):
<?php echo '<div class="phdr"><b>Yangi maqolalar</b></div>'; $kmess = '7'; $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `library_texts` WHERE `time` AND `premod`=1"), 0); $start = $page == 1 ? 0 : ($page - 1) * $kmess; $sql = mysql_query("SELECT `id`, `name`, `time`, `uploader`, `uploader_id`, `count_views`, `comments`, `count_comments`, `cat_id`, `announce` FROM `library_texts` WHERE `premod`=1 ORDER BY `time` DESC LIMIT " . $start . "," . $kmess); $nav = ($total > $kmess) ? '<div class="menu"><center>' . functions::display_pagination('?act=new&', $start, $total, $kmess) . '</center></div>' : ''; if ($total) { $i = 0; $comm = mysql_result( mysql_query("select count(*) from `cms_library_comments` where `refid` = '".$lib['id']."'"),0); echo '<div class="menu"><a href="' . $set['homeurl'] . '/library/index.php?id=' . $lib['id'] . '"><b>' . $lib['name'] . '</b></a> ['. functions::display_date($lib['time']) . ']<br>'.mb_substr($lib['announce'],0,100).'...<br>'; $catalog = mysql_fetch_assoc(mysql_query("SELECT `id`, `name` FROM `library_cats` WHERE `id` = " . $lib['cat_id'] . " LIMIT 1")); echo '[<a href="/library/index.php?do=dir&id=' . $catalog['id'] . '">' . functions::checkout($catalog['name']) . '</a>' . ($page > 1 ? ' | ' . functions::checkout($res['name']) : '') . ']'; echo '[<a href="/library/index.php?act=comments&id=' . $lib['id'] . '">Fikrlar:</a> (' . $lib['count_comments'] . ')]'; echo '<span style="float:right;"><b>[' . $lib['count_views'] . ']</b></span></div>'; $i; } } echo $nav; ?>
+ (1): sobirjonovv,
Улугбек, # Улугбек (02.06.2020 / 20:50)
Mahmudjon, row['id'] sizda maqolararni bosh sahifaga chiraqishda maqola nomida qanaqa mysql kod yozilgan masalan < a href="http//maqola.ru/library/index.php?id=1"> . '$row['library_name'] . '</a> shun$row['id'] manda
Mahmudjon, row['id'] sizda maqolararni bosh sahifaga chiraqishda maqola nomida qanaqa mysql kod yozilgan masalan < a href="http//maqola.ru/library/index.php?id=1"> . '$row['library_name'] . '</a> shun$row['id'] manda
JohnCMS uchun maqolalarga like va dislike bosish kimda bor? Bazaga likelar va dislikelarni sanab yozadigani? Forumdagi ko'pchilikga kerak bo'lsa kerak
+ (1): Qobilkhan,
Mahmudjon, # Mahmudjon (02.06.2020 / 23:08)
JohnCMS uchun maqolalarga like va dislike bosish kimda bor? Bazaga likelar va dislikelarni sanab yozadigani? Forumdagi ko'pchilikga kerak bo'lsa kerak Ёзиш осон нарсаку. Алохида базада устун очиб мақола ид рақами бўйича сақлаб кетаверасиз.
JohnCMS uchun maqolalarga like va dislike bosish kimda bor? Bazaga likelar va dislikelarni sanab yozadigani? Forumdagi ko'pchilikga kerak bo'lsa kerak Ёзиш осон нарсаку. Алохида базада устун очиб мақола ид рақами бўйича сақлаб кетаверасиз.
Akbarali, # Akbarali (03.06.2020 / 16:20)
Mahmudjon, Ёзиш осон нарсаку. Алохида базада устун очиб мақола ид рақами бўйича сақлаб кетаверасиз.Php, mysqldan uquvim yo'q. Sizga oson bo'lsa yozib tarqating
Mahmudjon, Ёзиш осон нарсаку. Алохида базада устун очиб мақола ид рақами бўйича сақлаб кетаверасиз.Php, mysqldan uquvim yo'q. Sizga oson bo'lsa yozib tarqating
Maqolaga plus, minus bosish bu arxivni ichida bor edi. 1 oy oldin titkilab ishlatolmagandim. O'sha plus, minusga screen ham bor ekan.
Kimdir ishlatolsa kodni yozinglar :-)
Kimdir ishlatolsa kodni yozinglar :-)
Mahmudjon, # Mahmudjon (03.06.2020 / 16:57)
Maqolaga plus, minus bosish bu arxivni ichida bor edi. 1 oy oldin titkilab ishlatolmagandim. O'sha plus, minusga [url=https://uzforYoqdi Yoqmadini kodini bersak buladimi
Maqolaga plus, minus bosish bu arxivni ichida bor edi. 1 oy oldin titkilab ishlatolmagandim. O'sha plus, minusga [url=https://uzforYoqdi Yoqmadini kodini bersak buladimi
Biriktirilgan fayllar [1]:
— screenshot_20200603-171816.jpg (640.35 KB) (86 ↴)
— screenshot_20200603-171816.jpg (640.35 KB) (86 ↴)
Besthakker, # Besthakker (03.06.2020 / 17:17)
Mahmudjon, Yoqdi Yoqmadini kodini bersak buladimiU oddiyku. Uni likebtn.com midiye, shunaqa saytdan yasasa bo'lardi. Man bazaga yozib boradiganini aytvomman.
Mahmudjon, Yoqdi Yoqmadini kodini bersak buladimiU oddiyku. Uni likebtn.com midiye, shunaqa saytdan yasasa bo'lardi. Man bazaga yozib boradiganini aytvomman.
Mahmudjon, # Mahmudjon (03.06.2020 / 17:23)
Besthakker, U oddiyku. Uni likebtn.com midiye, shunaqa saytdan yasasa bo'lardi. Man bazaga yozib boradiganini aytvomman.Likebtn dagi yozadimi bazaga
Besthakker, U oddiyku. Uni likebtn.com midiye, shunaqa saytdan yasasa bo'lardi. Man bazaga yozib boradiganini aytvomman.Likebtn dagi yozadimi bazaga
Besthakker, # Besthakker (03.06.2020 / 17:24)
Mahmudjon, Likebtn dagi yozadimi bazagaYo'q yozmaydi. U likebtn dagi larkdagi saytga xam tushib ketaveradi
Mahmudjon, Likebtn dagi yozadimi bazagaYo'q yozmaydi. U likebtn dagi larkdagi saytga xam tushib ketaveradi
video bolimide videolardi bosh sahifaga qana chiqarsa boladi
<?php /** * @package JohnCMS * @link http://johncms.com * @copyright Copyright (C) 2008-2011 JohnCMS Community * @license LICENSE.txt (see attached file) * @version VERSION.txt (see attached file) * @author http://johncms.com/about */ require('../incfiles/core.php'); $headmod = 'gallery'; $lng_gal = core::load_lng('gallery'); $textl = $lng['gallery']; require('../incfiles/head.php'); // Ограничиваем доступ к Галерее $error = ''; if (!$set['mod_gal'] && $rights < 7) { $error = $lng_gal['gallery_closed']; } elseif ($set['mod_gal'] == 1 && !$user_id) { $error = $lng['access_guest_forbidden']; } if ($error) { require_once('../incfiles/head.php'); echo '<div class="rmenu"><p>' . $error . '</p></div>'; require_once('../incfiles/end.php'); exit; } function setTransparency($new_image, $image_source) { if ($transparencyIndex >= 0) { } $transparencyIndex = imagecolorallocate($new_image, $transparencyColor['red'], $transparencyColor['green'], $transparencyColor['blue']); } 'new', 'edf', 'delf', 'edit', 'del', 'load', 'upl', 'cral', 'razd' ); require_once($act . '.php'); } else { if (!$set['mod_gal']) { echo '<p><font color="#FF0000"><b>' . $lng_gal['gallery_closed'] . '</b></font></p>'; } if ($id) { switch ($ms['type']) { case 'rz': /* ----------------------------------------------------------------- Просмотр раздела ----------------------------------------------------------------- */ echo '<div class="phdr"><i class="fa fa-picture-o" style="color:#ffffff;"></i> <a href="index.php"><b>' . $lng['gallery'] . '</b></a> | ' . $ms['text'] . '</div>'; $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery` WHERE `type` = 'al' AND `refid` = '$id'"), 0); if ($total) { $req = mysql_query("SELECT * FROM `gallery` WHERE `type` = 'al' AND `refid` = '$id' ORDER BY `time` DESC LIMIT $start, $kmess"); echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; $total_f = mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery` WHERE `type` = 'ft' AND `refid` = '" . $res['id'] . "'"), 0); echo '<a href="index.php?id=' . $res['id'] . '">' . $res['text'] . '</a> (' . $total_f . ')</div>'; ++$i; } } else { echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>'; } echo '<div class="phdr"><i class="fa fa-spinner" style="color:#ffffff;"></i> ' . $lng['total'] . ': ' . $total . '</div><p>'; if ($total > $kmess) { echo '<p>' . functions::display_pagination('index.php?id=' . $id . '&', $start, $total, $kmess) . '</p>' . '<p><form action="index.php?id=' . $id . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' >>"/>' . '</form></p>'; } if ($rights >= 6) { echo "<div class='menu'><i class='fa fa-plus-square' style='color:red;'></i> <a href='index.php?act=cral&id=" . $id . "'>" . $lng_gal['create_album'] . "</a><br/>"; echo "<i class='fa fa-trash-o' style='color:red;'></i> <a href='index.php?act=del&id=" . $id . "'>" . $lng_gal['delete_section'] . "</a><br/>"; echo "<i class='fa fa-wrench' style='color:red;'></i> <a href='index.php?act=edit&id=" . $id . "'>" . $lng_gal['edit_section'] . "</a><br/>"; } echo "<i class='fa fa-share-square-o' style='color:red;'></i> <a href='index.php'>Galereya</a></p>"; break; case 'al': /* ----------------------------------------------------------------- Просмотр альбома ----------------------------------------------------------------- */ if ($imd != "." && $imd != ".." && $imd != "index.php") { $im[] = $imd; } } for ($imi = 0; $imi < $totalim; $imi++) { $ftime1 = $tim - 10; if ($filtime[$imi] < $ftime1) { } } echo '<div class="phdr"><i class="fa fa-picture-o" style="color:#ffffff;"></i> <a href="index.php"><b>' . $lng['gallery'] . '</b></a> | <a href="index.php?id=' . $ms['refid'] . '">' . $rz1['text'] . '</a> | ' . $ms['text'] . '</div>'; $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery` WHERE `type` = 'ft' AND `refid` = '$id'"), 0); $req = mysql_query("SELECT * FROM `gallery` WHERE `type` = 'ft' AND `refid` = '$id' ORDER BY `time` DESC LIMIT $start, $kmess"); echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; echo '<a href="index.php?id=' . $fot1['id'] . '">'; $infile = "foto/$fot1[name]"; $razm = $_SESSION['frazm']; } else { $razm = 100; } $width = $sizs[0]; $height = $sizs[1]; $quality = 80; $x_ratio = $razm / $width; $y_ratio = $razm / $height; if (($width <= $razm) && ($height <= $razm)) { $tn_width = $width; $tn_height = $height; } else { if (($x_ratio * $height) < $razm) { $tn_width = $razm; } else { $tn_height = $razm; } } $format = functions::format($infile); switch ($format) { case "gif": break; case "jpg": case "jpeg": break; case "png": break; } setTransparency($im1, $im); $namefile = "$fot1[name]"; switch ($format) { case "gif": $imagnam = "temp/$namefile.temp.gif"; echo "<img src='" . $imagnam . "' alt=''/><br/>"; break; case "jpg": case "jpeg": $imagnam = "temp/$namefile.temp.jpg"; echo "<img src='" . $imagnam . "' alt=''/><br/>"; break; case "png": $imagnam = "temp/$namefile.temp.png"; echo "<img src='" . $imagnam . "' alt=''/><br/>"; break; } echo '</a>'; echo "$fot1[text]<br/>"; } if ($rights >= 6) { echo "<a href='index.php?act=edf&id=" . $fot1['id'] . "'>" . $lng['edit'] . "</a> | <a href='index.php?act=delf&id=" . $fot1['id'] . "'>" . $lng['delete'] . "</a><br/>"; } } else { echo $lng_gal['image_missing'] . '<br /><a href="index.php?act=delf&id=' . $fot1['id'] . '">' . $lng['delete'] . '</a>'; } echo "</div>"; ++$i; } echo '<div class="phdr"><i class="fa fa-spinner" style="color:#ffffff;"></i> ' . $lng['total'] . ': ' . $total . '</div><p>'; if ($total > $kmess) { echo '<p>' . functions::display_pagination('index.php?id=' . $id . '&', $start, $total, $kmess) . '</p>' . '<p><form action="index.php?id=' . $id . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' >>"/>' . '</form></p>'; } if (($user_id && $rz1['user'] == 1 && $ms['text'] == $login && !$ban['1'] && !$ban['14']) || $rights >= 6) { echo '<div class="menu"><i class="fa fa-download" style="color:red;"></i> <a href="index.php?act=upl&id=' . $id . '">' . $lng_gal['upload_photo'] . '</a><br/>'; } if ($rights >= 6) { echo "<i class='fa fa-trash' style='color:red;'></i> <a href='index.php?act=del&id=" . $id . "'>" . $lng_gal['delete_album'] . "</a><br/>"; echo "<i class='fa fa-pencil' style='color:red;'></i> <a href='index.php?act=edit&id=" . $id . "'>" . $lng_gal['edit_album'] . "</a><br/>"; } echo "<i class='fa fa-share-square-o' style='color:red;'></i> <a href='index.php'>" . $lng_gal['to_gallery'] . "</a></p>"; break; case 'ft': /* ----------------------------------------------------------------- Просмотр фото ----------------------------------------------------------------- */ echo "<br/> "; $infile = "foto/$ms[name]"; $razm = $_SESSION['frazm']; } else { $razm = 50; } $width = $sizs[0]; $height = $sizs[1]; $format = functions::format($infile); switch ($format) { case "gif": break; case "jpg": break; case "jpeg": break; case "png": break; } setTransparency($im1, $im); $namefile = "$ms[name]"; switch ($format) { case "gif": $imagnam = "temp/$namefile.gif"; echo "<img src='" . $imagnam . "' alt=''/><br/>"; break; case "jpg": case "jpeg": $imagnam = "temp/$namefile.jpg"; echo "<img src='" . $imagnam . "' alt=''/><br/>"; break; case "png": $imagnam = "temp/$namefile.png"; echo "<img src='" . $imagnam . "' alt=''/><br/>"; break; } $fwidth = $sizs[0]; $fheight = $sizs[1]; echo "<p>" . $lng['description'] . ": $ms[text]<br/>"; echo $lng_gal['dimensions'] . ": $fwidth*$fheight пкс.<br/>"; echo $lng_gal['weight'] . ": $fotsz кб.<br/>"; echo $lng['date'] . ': ' . functions::display_date($ms['time']) . '<br/>'; echo $lng_gal['posted_by'] . ": $ms[avtor]<br/>"; echo "<a href='foto/$ms[name]'>" . $lng['download'] . "</a><br /><br />"; echo "<a href='index.php?id=" . $ms['refid'] . "'>" . $lng['back'] . "</a><br/>"; echo "<a href='index.php'>" . $lng_gal['to_gallery'] . "</a></p>"; break; default : break; } } else { /* ----------------------------------------------------------------- Главная страница Галлереи ----------------------------------------------------------------- */ echo '<p><a href="index.php?act=new">' . $lng_gal['new_photo'] . '</a> (' . counters::gallery(1) . ')</p>'; echo '<div class="phdr"><i class="fa fa-image" style="color:#ffffff;"></i> <b>' . $lng['gallery'] . '</b></div>'; echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; echo '<a href="index.php?id=' . $res['id'] . '">' . $res['text'] . '</a> (' . $countal . ')</div>'; ++$i; } echo '<div class="phdr"><i class="fa fa-spinner" style="color:#ffffff;"></i> ' . $lng['total'] . ': ' . $total . '</div><p>'; if ($rights >= 6) { echo "<div class='menu'><i class='fa fa-plus-square' style='color:red;'></i> <a href='index.php?act=razd'>" . $lng_gal['create_section'] . "</a><br/>"; } echo "</p>"; } } require('../incfiles/end.php'); ?>
Shunda rasmlarga qanday o'lcham qo'ysa bo'ladi? Width va height qo'yish kerak
Kamron, 246-strogadan keyingi kodlarni qo'ysangiz shuni o'zi yetarli bo'lardi tushunish uchun. Bu yerda yozgan kodlarizdan 1ta sayt qurib olsa bo'ladiku :sweet_smile:
Tavsiya etamiz:
- Hoziroq maydonlarni to'ldiring va reklamangizni joylashtiring!
Mavzuga oid xabarlar soni: 3101 ta
So'ngi faollik vaqti: 15:21:31, 19 Apr 2022