Total Users Online: 0 üye, 378 guest | Tarih/Saat: 2026-08-24 05:11
 
NEWPAGESBYPATH değişikliği
2011-03-22 18:49 GMT  oklu Alnt
hakan yildiz
Seditio
User is: Online status   Gender_M
Posts: 46
Ülke: Konya - 42
Meslek: Kargo
Age: 40

Arkada?lar S.a
Bir konuda yard?m almak istiyorum, Sorunum ?u ;

Son forum konular?n?n ana sayfada g?r?nt?s? ?ok ho? ...

Konu - Mesajlar - Okunma - G?nderen - Tarih

Olmak ?zere hepsi tablo i?inde ve kulland???m plugin ise bu
PLUGIN_latestposts
Kod:
<?PHP
/* ====================
Land Down Under - Website engine
Copyright Kaan
http://www.ntka.org

[BEGIN_SED]
File=plugins/latestposts/latestposts.php
Version=2
Updated=
Type=Plugin
Author=
Description=Ana Sayfada Son Forum Konulari
[END_SED]

[BEGIN_SED_EXTPLUGIN]
Code=latestposts
Part=main
File=latestposts
Hooks=index.tags
Tags=index.tpl:{PLUGIN_latestposts}
Minlevel=0
Order=10
[END_SED_EXTPLUGIN]
====================
*/

if ( !defined('SED_CODE') ) { die("Hacking attempt."); }

$plimit = "25";   // define number of rows you want to see...

$sql = sed_sql_query("SELECT t.ft_id, t.ft_sectionid, t.ft_title, t.ft_updated, t.ft_postcount, t.ft_viewcount, t.ft_lastposterid, t.ft_lastpostername, s.fs_id, s.fs_title, s.fs_category FROM $db_forum_topics t,$db_forum_sections s
WHERE t.ft_sectionid=s.fs_id AND t.ft_movedto=0 AND t.ft_mode=0 ORDER by t.ft_updated DESC LIMIT $plimit");

$latestposts = "<table class='cells' width='100%' cellspacing='3' cellpadding='0' align='center'>";
$latestposts .= "<tr><td class=\"coltop\">Konu</td><td class=\"coltop\">Mesajlar</td><td class=\"coltop\">Okunma</td><td class=\"coltop\">Son G?nderen</td><td class=\"coltop\">Tarih</td></tr>";

$ii=0;
while ($row = sed_sql_fetcharray($sql)){
if (sed_auth('forums', $row['fs_id'], 'R')){

$ii++;
$img = ($usr['id']>0 && $row['ft_updated']>$usr['lastvisit']) ? "<a href=\"forums.php?m=posts&amp;q=".$row['ft_id']."&amp;n=unread#unread\"><img src=\"skins/$skin/img/system/arrow-unread.gif\" alt=\"\" /></a>" : "<a href=\"forums.php?m=posts&amp;q=".$row['ft_id']."\"><img src=\"skins/$skin/img/system/arrow-follow.gif\" alt=\"\" /></a> ";

$latestposts .= "<tr><td> &nbsp;";
$latestposts .= $img." <a href=\"forums.php?m=posts&amp;q=".$row['ft_id']."\">".sed_cc(sed_cutstring(stripslashes($row['ft_title']),38))."</a></td>";

$latestposts .="<td>&nbsp;(" .$row["ft_postcount"]. ") </td>";
$latestposts .="<td>&nbsp;(" .$row["ft_viewcount"]. ")</td>";
$latestposts .= "<td>&nbsp;<a href='users.php?m=details&amp;id=".$row["ft_lastposterid"]."'>".$row["ft_lastpostername"]."</a></td>";$latestposts .= "<td>&nbsp; ".date($cfg['formatmonthdayhourmin'], $row['ft_updated'] + $usr['timezone'] * 3600)."</td></tr>";

}
}

if($ii==0){
$latestposts .= "<tr><td colspan=\"5\"><center><font color='red'>Son Forum Konular?n? G?rmek i?in Giri? Yap?n?z</font></center></td></tr>";
}

$latestposts .= "</table>";

$t-> assign(array(
"PLUGIN_latestposts" => $latestposts,
));

?>


Ben NEWPAGESBYPATH eklentisini kullan?yorum, bu eklenti ile panelimden kategoriler olusturdum video, oyun, vs...
Olu?turmu? oldu?um bu kategorileri ana sayfamda index.tpl dosyas?nda g?r?nt?l?yorum, mesela kulland???m kategori kodu ve g?r?nt?lenme ?u ?ekilde

index.tpl
{PLUGIN_NEWPAGESBYPATH.oyunlar}

G?r?nt?lenme ise ana sayfada ?u ?ekilde oluyor ...

? 2011-03-18 / Oyun // -? Pro Evulation Soccer 2011 ( PES 2011 )
? 2011-03-03 / Oyun // -? Samurai Shodown (ATAR?) - Yap?m A?amas?nda
? 2011-03-01 / Oyun // -? Deneme oyun 3
? 2011-02-17 / Oyun // -? Deneme oyun 4
? 2011-02-17 / Oyun // -? Deneme oyun 5

Kulland???m eklentiyi san?r?m kaan bey yazm?? ve kodlar? ise bunlar
newpagesbypath.php
Kod:
<?PHP
/* ====================
Land Down Under - Website engine
Copyright Kaan
http://www.ntka.org

[BEGIN_SED]
File=plugins/newpagesbypath/newpagesbypath.php
Version= 1.2
Updated=01-04-2007
Type=Plugin
Author=Kaan
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'] = "? %3\$s"." ".$cfg['separator']." "."%1\$s // -?"." %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 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']),68))."</a>",
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']
));

?>


Ben bu NEWPAGESBYPATH pluginindeki olusturdu?um kategorileri ana sayfada g?sterirken, Son forum konular?ndaki gibi, ?ok ??k bi ?ekilde tablo i?erisine almak istiyorum

Yani ayn? son forum konular?nda oldu?u gibi
Konu - Mesajlar - Okunma - G?nderen - Tarih, ?eklinde yap?p tablo i?erisinde g?r?nmesini sa?lamak istiyorum

Yard?mlar?n?z i?in ?imdiden te?ekk?r ederim ...
Konuyla İlgili Diğer Başlıklar
newpagesbypath Eklentisinde Başlıkları Tablo icine Alma
newpagesbypath sorunu
newpagesbypath eklentisi nasıl kullanılır?
NEWPAGESBYPATH sorunu

Bu mesaj Kaan tarafından 2011-03-23 00:08 GMT, 5633 Gün önce düzenlendi.

 

Powered by Seditio © 2009-2012 All Rights Reserved