»Forumlar »SE ? Plugins »newpagesbypath Eklentisinde Başlıkları Tablo icine Alma
  https://seditio.com.tr/eski1/forums.php?m=posts&q=2101
          Geri Dön      -      Sayfayı Yazdırmak için tıklayın
Author: Ali Korkmaz, Posted: 2012-12-18 11:56 GMT.
Arkada?lar newpagesbypath eklentisinde ba?l?klar? tablo icine almak istiyorum bu ?ekilde yapt?g?m da $row = "<table class='cells'>"; ?row un uzerine yap??t?rd?g?mda komple sayfa kay?yor yani son konular eklentisindeki gibi ba?l?klar? tablo icine almak istiyorum ve hata al?yorum g?r?n?m? daha g?zel olacakd?r o ?ekilde
Author: kors@n, Posted: 2012-12-18 21:12 GMT.
G?r?n?m temaya g?re de?i?kenlik g?sterebilir bu nedenle eklentilerde orjinalde bir tasar?m? yada ?ekli olmaz. Bu nedenle eklentinizin kodlar?n? buraya payla??n?z bizde yard?mc? olalal?m
Author: Kaan, Posted: 2012-12-18 21:16 GMT.
newpagesbypath.php yi a? alttakini bul
Kod:
"<a href=\"list.php?c=".$row['page_cat']."\">".$sed_cat[$row['page_cat']]['title']."</a>",

Alttaki ?ekilde de?i?tir.
Kod:
"<div id='user_back'><a href=\"list.php?c=".$row['page_cat']."\">".$sed_cat[$row['page_cat']]['title']."</a>",

Alttakini bul
Kod:
) : '';

Alt?na ekle
Kod:
$res .= "</div>";

Ben div kulland?m sen istedi?ini yapabilirsin.

Tablo i?ine almak i?in Table kodu yeterli olmaz onun i?in bir ?rnek vereyim.

<div id='user_back'> yerini ?u ?ekilde yaparsan istedi?in olur.
Kod:
<table class='cells'><tr><td>

Kapan?? Kodu Alttaki ?ekilde olmal?
Kod:
</td></tr></table>

Bu uygulamadan sonra istedi?in olucakt?r.
Author: Ali Korkmaz, Posted: 2012-12-18 22:59 GMT.
Kodlar?m Bunlar Kaan soylediklerinin hic biri bende yok hic oynama yapmad?m daha once newpagesbypath de

Kod:
<?PHP

/* ====================
Seditio - Website engine
Copyright Neocrome
http://www.neocrome.net

[BEGIN_SED]
File=plugins/newpagesbypath/newpagesbypath.php
Version=100
Updated=2006-jan-24
Type=Plugin
Author=Neocrome
Description=
[END_SED]

[BEGIN_SED_EXTPLUGIN]
Code=newpagesbypath
Part=main
File=newpagesbypath
Hooks=index.tags
Tags=index.tpl:{PLUGIN_NEWPAGESBYPATH.categorycodehere}
Minlevel=0
Order=10
[END_SED_EXTPLUGIN]

==================== */

if (!defined('SED_CODE')) { die('Wrong URL.'); }

/* ============ MASKS FOR THE HTML OUTPUTS =========== */

$cfg['plu_mask_newpagesbypath'] = "%1\$s"."<br />";

$plu_empty = $L['None']."<br />";

function sed_get_newpagesbypath($c, $limit, $mask)
{
global $L, $db_pages, $usr, $cfg, $sed_cat, $sed_catacc, $plu_empty;

$mtch = $sed_cat[$c]['path'].".";
$mtchlen = strlen($mtch);
$catsub = array();
$catsub[] = $c;

@reset($sed_cat);
while (list($i,$x) = each($sed_cat) )
{
if (substr($x['path'],0,$mtchlen)==$mtch)
{
$catsub[] = $i;
}
}

$sql = sed_sql_query("SELECT page_id,page_cat,page_title,page_date,page_alias FROM $db_pages
WHERE page_state=0
AND page_cat NOT LIKE 'system'
AND page_cat IN ('".implode("','", $catsub)."')
ORDER by page_date DESC LIMIT $limit");

while ($row = sed_sql_fetcharray($sql))
{
$row ['page_urlpar'] = (empty($row['page_alias'])) ? "id=".$row['page_id'] : "al=".$row['page_alias'];

$res .= (sed_auth('page', $row['page_cat'], 'R')) ? sprintf($mask,
"<b></b><img src='skins/prenses/img/system/arrow-follow.gif'><a href=\"page.php?".$row['page_urlpar']."\">".sed_cc(sed_cutstring(stripslashes($row['page_title']),30))."</a>"
) : '';
}

$res = (empty($res)) ? $plu_empty : $res;

return($res);
}


if ($cfg['plugin']['newpagesbypath']['maxpages']>0 && !empty($cfg['plugin']['newpagesbypath']['categories']))
{
$cats = explode(',', $cfg['plugin']['newpagesbypath']['categories']);
foreach($cats as $k => $i)
{
$i = trim($i);
$newpagesbypath[$i] = sed_get_newpagesbypath(
$i,
$cfg['plugin']['newpagesbypath']['maxpages'],
$cfg['plu_mask_newpagesbypath']);
}
}

$t-> assign(array(
"PLUGIN_NEWPAGESBYPATH" => $newpagesbypath,
"PLUGIN_NEWPAGESBYPATH_MAXLINES" => $cfg['plugin']['newpagesbypath']['maxpages']
));

?>
Author: Kaan, Posted: 2012-12-18 23:03 GMT.
Bunun oldugu yer dedi?im yer orjinal eklenti de?il bu sen bi?ey yapmad?ysan
Kod:
<b></b><img src='skins/prenses/img/system/arrow-follow.gif'>

ve buras? hepsi var ama biraz farkl? seninki.
Kod:
) : '';
Author: Ali Korkmaz, Posted: 2012-12-18 23:25 GMT.
Ben bunda sadece konu ismi ve ve t?klanma say?s?n?n kalmas?n? istiyorum digerlerini silmek istiyorum ekleyen katogori ismi ve tarihi alttaki kodda tarihi falan c?kartmak istedigimde de hata al?yorum

Kod:
$row['page_urlpar'] = (empty($row['page_alias'])) ? "id=".$row['page_id'] : "al=".$row['page_alias'];
$res .= "<tr><td> &nbsp;";
$res .= (sed_auth('page', $row['page_cat'], 'R')) ? sprintf($mask,
"<a href=\"list.php?c=".$row['page_cat']."\">".$sed_cat[$row['page_cat']]['title']."</a></td>",
"<td><a href=\"page.php?".$row['page_urlpar']."\">".sed_cc(sed_cutstring(stripslashes($row['page_title']),36))."</a></td>",
"<td>".sed_build_user($row['page_ownerid'], sed_cc($row['user_name']))."</td>", "<td>".$row['page_count']."</td>", "<td>".date($cfg['formatyearmonthday'], $row['page_date'] + $usr['timezone'] * 3600) ) : ''."</td></tr>";

}
Author: Kaan, Posted: 2012-12-18 23:47 GMT.
Alttakini Bul
Kod:
$cfg['plu_mask_newpagesbypath'] = "%1\$s"." ".$cfg['separator']." "."%2\$s"." (%3\$s)<br />";

De?i?tir.
Kod:
$cfg['plu_mask_newpagesbypath'] = "%2\$s<br />";

Alttakini bul
Kod:
$sql = sed_sql_query("SELECT page_id,page_cat,page_title,page_date,page_alias FROM $db_pages
WHERE page_state=0
AND page_cat NOT LIKE 'system'
AND page_cat IN ('".implode("','", $catsub)."')
ORDER by page_date DESC LIMIT $limit");

De?i?tir
Kod:
$sql = sed_sql_query("SELECT page_id,page_cat,page_title,page_date,page_alias,page_count FROM $db_pages
WHERE page_state=0
AND page_cat NOT LIKE 'system'
AND page_cat IN ('".implode("','", $catsub)."')
ORDER by page_date DESC LIMIT $limit");

Alttakini bul
Kod:
"<a href=\"page.php?".$row['page_urlpar']."\">".sed_cc(sed_cutstring(stripslashes($row['page_title']),36))."</a>",

De?i?tir.
Kod:
"<a href=\"page.php?".$row['page_urlpar']."\">".sed_cc(sed_cutstring(stripslashes($row['page_title']),36))."</a> (".$row['page_count'].")",

newpagesbypath.php

Kod:
<?PHP

/* ====================
Seditio - Website engine
Copyright Neocrome
http://www.neocrome.net

[BEGIN_SED]
File=plugins/newpagesbypath/newpagesbypath.php
Version=100
Updated=2006-jan-24
Type=Plugin
Author=Neocrome
Description=
[END_SED]

[BEGIN_SED_EXTPLUGIN]
Code=newpagesbypath
Part=main
File=newpagesbypath
Hooks=index.tags
Tags=index.tpl:{PLUGIN_NEWPAGESBYPATH.categorycodehere}
Minlevel=0
Order=10
[END_SED_EXTPLUGIN]

==================== */

if (!defined('SED_CODE')) { die('Wrong URL.'); }

/* ============ MASKS FOR THE HTML OUTPUTS =========== */

$cfg['plu_mask_newpagesbypath'] = "%2\$s<br />";
// %1\$s = Link to the category
// %2\$s = Link to the page
// %3\$s = Date

$plu_empty = $L['None']."<br />";

function sed_get_newpagesbypath($c, $limit, $mask)
{
global $L, $db_pages, $usr, $cfg, $sed_cat, $sed_catacc, $plu_empty;

$mtch = $sed_cat[$c]['path'].".";
$mtchlen = strlen($mtch);
$catsub = array();
$catsub[] = $c;

@reset($sed_cat);
while (list($i,$x) = each($sed_cat) )
{
if (substr($x['path'],0,$mtchlen)==$mtch)
{
$catsub[] = $i;
}
}

$sql = sed_sql_query("SELECT page_id,page_cat,page_title,page_date,page_alias,page_count FROM $db_pages
WHERE page_state=0
AND page_cat NOT LIKE 'system'
AND page_cat IN ('".implode("','", $catsub)."')
ORDER by page_date DESC LIMIT $limit");

while ($row = sed_sql_fetcharray($sql))
{
$row['page_urlpar'] = (empty($row['page_alias'])) ? "id=".$row['page_id'] : "al=".$row['page_alias'];

$res .= (sed_auth('page', $row['page_cat'], 'R')) ? sprintf($mask,
"<a href=\"list.php?c=".$row['page_cat']."\">".$sed_cat[$row['page_cat']]['title']."</a>",
"<a href=\"page.php?".$row['page_urlpar']."\">".sed_cc(sed_cutstring(stripslashes($row['page_title']),36))."</a (".$row['page_count'].")",
date($cfg['formatyearmonthday'], $row['page_date'] + $usr['timezone'] * 3600)
) : '';

}

$res = (empty($res)) ? $plu_empty : $res;

return($res);
}


if ($cfg['plugin']['newpagesbypath']['maxpages']>0 && !empty($cfg['plugin']['newpagesbypath']['categories']))
{
$cats = explode(',', $cfg['plugin']['newpagesbypath']['categories']);
foreach($cats as $k => $i)
{
$i = trim($i);
$newpagesbypath[$i] = sed_get_newpagesbypath(
$i,
$cfg['plugin']['newpagesbypath']['maxpages'],
$cfg['plu_mask_newpagesbypath']);
}
}

$t-> assign(array(
"PLUGIN_NEWPAGESBYPATH" => $newpagesbypath,
"PLUGIN_NEWPAGESBYPATH_MAXLINES" => $cfg['plugin']['newpagesbypath']['maxpages']
));

?>
Author: Ali Korkmaz, Posted: 2012-12-21 21:03 GMT.
kaan bu senin son newpagesbypath.php dosyas? yine olmad? hemde o arka arkaya gidiyor alt alta degil ikincisi ise ben zaman? istemiyorum sadece konu ismi ve hit bilgisi ni istiyorum

alttaki newpagespath.php de isimler tablo icinde sorun yok ama tarih ve konuyu acan? silmem laz?m

Kod:
<?PHP

/* ====================
Seditio - Website engine
Copyright Neocrome
http://www.neocrome.net

[BEGIN_SED]
File=plugins/newpagesbypath/newpagesbypath.php
Version=100
Updated=2006-jan-24
Type=Plugin
Author=Neocrome
Description=
[END_SED]

[BEGIN_SED_EXTPLUGIN]
Code=newpagesbypath
Part=main
File=newpagesbypath
Hooks=index.tags
Tags=index.tpl:{PLUGIN_NEWPAGESBYPATH.categorycodehere}
Minlevel=0
Order=10
[END_SED_EXTPLUGIN]

==================== */

if (!defined('SED_CODE')) { die('Wrong URL.'); }

/* ============ MASKS FOR THE HTML OUTPUTS =========== */

$cfg['plu_mask_newpagesbypath'] = "%1\$s"."  "."%2\$s"." "."%3\$s"." "."%4\$s"." %5\$s<br />";
// %1\$s = Link to the category
// %2\$s = Link to the page
// %3\$s = Date

$plu_empty = $L['None']."<br />";

function sed_get_newpagesbypath($c, $limit, $mask)
{
global $L, $db_pages, $db_users, $usr, $cfg, $sed_cat, $sed_catacc, $plu_empty;

$mtch = $sed_cat[$c]['path'].".";
$mtchlen = strlen($mtch);
$catsub = array();
$catsub[] = $c;

@reset($sed_cat);
while (list($i,$x) = each($sed_cat) )
{
if (substr($x['path'],0,$mtchlen)==$mtch)
{
$catsub[] = $i;
}
}

$sql = sed_sql_query("SELECT p.*, u.user_name FROM $db_pages AS p
LEFT JOIN $db_users AS u ON u.user_id=p.page_ownerid
WHERE page_state=0
AND page_cat NOT LIKE 'system'
AND page_cat IN ('".implode("','", $catsub)."')
ORDER by page_date DESC LIMIT $limit");

$res = "<table class='cells' width='100%' cellspacing='3' cellpadding='0' align='center'>";
$res .= "<tr><td class=\"coltop\">Katagori</td><td class=\"coltop\">Konu</td><td class=\"coltop\">Ekleyen</td><td class=\"coltop\">?nceleme</td><td class=\"coltop\">Tarih</td></tr>";

while ($row = sed_sql_fetcharray($sql))
{
$row['page_urlpar'] = (empty($row['page_alias'])) ? "id=".$row['page_id'] : "al=".$row['page_alias'];
$res .= "<tr><td> &nbsp;";
$res .= (sed_auth('page', $row['page_cat'], 'R')) ? sprintf($mask,
"<a href=\"list.php?c=".$row['page_cat']."\">".$sed_cat[$row['page_cat']]['title']."</a></td>",
"<td><a href=\"page.php?".$row['page_urlpar']."\">".sed_cc(sed_cutstring(stripslashes($row['page_title']),36))."</a></td>",
"<td>".sed_build_user($row['page_ownerid'], sed_cc($row['user_name']))."</td>", "<td>".$row['page_count']."</td>", "<td>".date($cfg['formatyearmonthday'], $row['page_date'] + $usr['timezone'] * 3600) ) : ''."</td></tr>";

}
$res .= "</table>";
$res = (empty($res)) ? $plu_empty : $res;
return($res);
}
if ($cfg['plugin']['newpagesbypath']['maxpages']>0 && !empty($cfg['plugin']['newpagesbypath']['categories']))
{
$cats = explode(',', $cfg['plugin']['newpagesbypath']['categories']);
foreach($cats as $k => $i)
{
$i = trim($i);
$newpagesbypath[$i] = sed_get_newpagesbypath(
$i,
$cfg['plugin']['newpagesbypath']['maxpages'],
$cfg['plu_mask_newpagesbypath']);
}
}

$t-> assign(array(
"PLUGIN_NEWPAGESBYPATH" => $newpagesbypath,
"PLUGIN_NEWPAGESBYPATH_MAXLINES" => $cfg['plugin']['newpagesbypath']['maxpages']
));

?>
Author: Kaan, Posted: 2012-12-21 21:09 GMT. This post was edited by Kaan (2012-12-21 21:15 GMT, 4993 Gün ago)
Benim son verdi?im senin istedi?in gibi ve alt alta gidiyor tarih vs.. yok ve sadece hiti say?yor. kodlarda tarih oldu?una bakma onlar ge?ersiz ?al??m?yor yani test ettim bir sorun yok.

son mesaj 5 dakika ?nce

Seninkini istedi?in gibi yapmak istiyorsan alttakini bul
Kod:
$cfg['plu_mask_newpagesbypath'] = "%1\$s"."  "."%2\$s"." "."%3\$s"." "."%4\$s"." %5\$s<br />";

De?i?tir
Kod:
$cfg['plu_mask_newpagesbypath'] = "%2\$s<br />";

Hepsi bu kadar hit i?inde alttakileri uygula
Bul
Kod:
"<td><a href=\"page.php?".$row['page_urlpar']."\">".sed_cc(sed_cutstring(stripslashes($row['page_title']),36))."</a></td>",

De?i?tir.
Kod:
"<td><a href=\"page.php?".$row['page_urlpar']."\">".sed_cc(sed_cutstring(stripslashes($row['page_title']),36))."</a>                            (".$row['page_count'].")</td>",
Author: Ali Korkmaz, Posted: 2012-12-21 21:17 GMT. This post was edited by Ali Korkmaz (2012-12-21 21:37 GMT, 4993 Gün ago)
bende olmuyor senin verdigin kodda. alt alta c?km?yor ve tablo yok ve arka arkaya gidiyor duz metin seklinde eklentiyide kald?r?p yeniden kurdum ama yine ayn?

son mesaj 15 dakika ?nce

Kod:
$cfg['plu_mask_newpagesbypath'] = "%2\$s<br />";


ve buradakini %2 2 olarak kullan?rsam eklenti hata veriyor 1 olarak yaparsam sorun olmuyor ama tablosuz

Powered by SeditioPrint version