Seditio ve Ldu hakkında sınırsız arama yapın
 
 
> 1 <

Etiketler: news eklentisi değiştirmede sorun

Author Message

Xiao

Moderators


Online status

866 posts
http://www.seditione.com
Pagerank: 0

Location: Turkey Trabzon
Occupation: Orman Mühendisi
Age: 30

#4321   2007-07-08 19:46 GMT      

kullanmış olduğum news eklentisinin adını ve yerini değiştirmek istedim.adını listhaber yapıp list.tpl de göstermek istedim.bir önceki açtığım portal da bunu yapmıştım.fakat şimdiki yaptığım portalda yaptığımda hata felan vermiyor fakat eklenti list.tpl de görünmüyor.sebebini anlamadım.kodu yazıyorum.
Code:
<?PHP

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

[BEGIN_SED]
File=plugins/listhaber/listhaber.php
Version=110
Updated=2006-nov-17
Type=Plugin
Author=Neocrome
Description=
[END_SED]

[BEGIN_SED_EXTPLUGIN]
Code=listhaber
Part=listhaber
File=listhaber
Hooks=list.tags
Tags=list.tpl:{LIST_LISTHABER}
Minlevel=0
Order=10
[END_SED_EXTPLUGIN]

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

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

function sed_get_listhaber($cat, $limit,$res) {

global $L, $t, $db_pages, $db_users, $usr, $cfg, $sed_cat, $sed_catacc, $plu_empty;

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

        foreach($sed_cat as $i => $x)
                {
                if (substr($x['path'], 0, $mtchlen)==$mtch && sed_auth('page', $i, 'R'))
                        { $catsub[] = $i; }
                }

        $sql = sed_sql_query("SELECT p.*, u.user_name, user_avatar 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 IN ('".implode("','", $catsub)."') ORDER BY page_".$sed_cat[$cat]['order']." ".$sed_cat[$cat]['way']." LIMIT $limit");

        $mskin = sed_skinfile(array('listhaber', $cat));
        $listhaber = new XTemplate($mskin);

        while ($pag = sed_sql_fetcharray($sql))
                {
                $jj++;
                $catpath = sed_build_catpath($pag['page_cat'], "<a href=\"list.php?c=%1\$s\">%2\$s</a>");
                $pag['page_desc'] = sed_cc($pag['page_desc']);
                $pag['page_pageurl'] = (empty($pag['page_alias'])) ? "page.php?id=".$pag['page_id'] : "page.php?al=".$pag['page_alias'];
                $pag['page_fulltitle'] = $catpath." ".$cfg['separator']." <a href=\"".$pag['page_pageurl']."\">".$pag['page_title']."</a>";

                $item_code = 'p'.$pag['page_id'];
                list($pag['page_comments'], $pag['page_comments_display']) = sed_build_comments($item_code, $pag['page_pageurl'], TRUE);
                list($pag['page_ratings'], $pag['page_ratings_display']) = sed_build_ratings($item_code, $pag['page_pageurl'], FALSE);

                $listhaber-> assign(array(
                        "PAGE_ROW_URL" => $pag['page_pageurl'],
                        "PAGE_ROW_ID" => $pag['page_id'],
                        "PAGE_ROW_TITLE" => $pag['page_fulltitle'],
                        "PAGE_ROW_SHORTTITLE" => $pag['page_title'],
                        "PAGE_ROW_CAT" => $pag['page_cat'],
                        "PAGE_ROW_CATTITLE" => $sed_cat[$pag['page_cat']]['title'],
                        "PAGE_ROW_CATPATH" => $catpath,
                        "PAGE_ROW_CATDESC" => $sed_cat[$pag['page_cat']]['desc'],
                        "PAGE_ROW_CATICON" => $sed_cat[$pag['page_cat']]['icon'],
                        "PAGE_ROW_KEY" => sed_cc($pag['page_key']),
                        "PAGE_ROW_EXTRA1" => sed_cc($pag['page_extra1']),
                        "PAGE_ROW_EXTRA2" => sed_cc($pag['page_extra2']),
                        "PAGE_ROW_EXTRA3" => sed_cc($pag['page_extra3']),
                        "PAGE_ROW_EXTRA4" => sed_cc($pag['page_extra4']),
                        "PAGE_ROW_EXTRA5" => sed_cc($pag['page_extra5']),
                        "PAGE_ROW_DESC" => $pag['page_desc'],
                        "PAGE_ROW_AUTHOR" => sed_cc($pag['page_author']),
                        "PAGE_ROW_OWNER" => sed_build_user($pag['page_ownerid'], sed_cc($pag['user_name'])),
                        "PAGE_ROW_AVATAR" => sed_build_userimage($pag['user_avatar']),
                        "PAGE_ROW_DATE" => @date($cfg['formatyearmonthday'], $pag['page_date'] + $usr['timezone'] * 3600),
                        "PAGE_ROW_FILEURL" => $pag['page_url'],
                        "PAGE_ROW_SIZE" => $pag['page_size'],
                        "PAGE_ROW_COUNT" => $pag['page_count'],
                        "PAGE_ROW_FILECOUNT" => $pag['page_filecount'],
                        "PAGE_ROW_COMMENTS" => $pag['page_comments'],
                        "PAGE_ROW_RATINGS" => "<a href=\"".$pag['page_pageurl']."&amp;ratings=1\"><img src=\"skins/".$usr['skin']."/img/system/vote".round($pag['rating_average'],0).".gif\" alt=\"\" /></a>",
                        "PAGE_ROW_ODDEVEN" => sed_build_oddeven($jj)
                                ));

                switch($pag['page_type'])
                        {
                        case '1':
                        $listhaber->assign("PAGE_ROW_TEXT", $pag['page_text']);
                        break;

                        case '2':

                        if ($cfg['allowphp_pages'])
                                {
                                ob_start();
                                eval($pag['page_text']);
                                $listhaber->assign("PAGE_ROW_TEXT", ob_get_clean());
                                }
               else
                                {
                                $listhaber->assign("PAGE_ROW_TEXT", "The PHP mode is disabled for pages.<br />Please see the administration panel, then \"Configuration\", then \"Parsers\".");
                                }
                        break;

                        default:
                        $readmore = strpos($pag['page_text'], "[more]");
                        if ($readmore>0)
                                {
                                $pag['page_text'] = substr($pag['page_text'], 0, $readmore)."<br />";
                                $pag['page_text'] .= "<a href=\"".$pag['page_pageurl']."\">".$L['ReadMore']."</a>";
                                }
else { $pag['page_text'] = substr($pag['page_text'], 0, 225)."... <a href=\"".$pag['page_pageurl']."\">Devamı...</a>";}
                        $listhaber->assign("PAGE_ROW_TEXT", sed_parse($pag['page_text'], $cfg['parsebbcodepages'], $cfg['parsesmiliespages'], 1));
                        break;
                        }
                $listhaber->parse("LISTHABER.PAGE_ROW");
                }
        $listhaber->parse("LISTHABER");
        $res = $listhaber->text("LISTHABER");
        $t->assign("LIST_LISTHABER_".strtoupper($cat)."",$res);
    return($res);
}

if ($cfg['plugin']['listhaber']['maxpages']>0 && !empty($cfg['plugin']['listhaber']['category'])) {

$cats = explode(',', $cfg['plugin']['listhaber']['category']);

foreach($cats as $k => $i)
        {
        $i = trim($i);
        sed_get_listhaber($i,$cfg['plugin']['listhaber']['maxpages'],$res);
        }
}
?>
Haziran 2008 Seditio Site Yar??mas? >> http://www.seditione.com

siyah.kin

Members


Online status

98 posts
http://www.miraturk.org
Pagerank: 2

Location: Turkey GiresunYer6
Occupation: Web Tasar?m
Age: 23

#4324   2007-07-08 21:08 GMT      
Part=listhaber kardeş şurda sorun olabilir çünkü diğernde homepage
Mira Group

Xiao

Moderators


Online status

866 posts
http://www.seditione.com
Pagerank: 0

Location: Turkey Trabzon
Occupation: Orman Mühendisi
Age: 30

#4325   2007-07-08 21:09 GMT      

yo hayır ondan değil.homepage şeklinde de denedim
Haziran 2008 Seditio Site Yar??mas? >> http://www.seditione.com

siyah.kin

Members


Online status

98 posts
http://www.miraturk.org
Pagerank: 2

Location: Turkey GiresunYer6
Occupation: Web Tasar?m
Age: 23

#4327   2007-07-08 21:14 GMT      
hmm peki şunu değiştirmeyi denedinmi Hooks=list.tags home.tags
Mira Group

Xiao

Moderators


Online status

866 posts
http://www.seditione.com
Pagerank: 0

Location: Turkey Trabzon
Occupation: Orman Mühendisi
Age: 30

#4328   2007-07-08 21:17 GMT      
olur mu ben list.tpl de göstermek istiyorum zaten
Haziran 2008 Seditio Site Yar??mas? >> http://www.seditione.com

Dvdbil

Administrator


Online status

2,178 posts
http://www.seditio-tr.com
Pagerank: 3

Location: Turkey istanbul
Occupation: Web Site(ler) İşletmeciliği :)
Age: 28

#4330   2007-07-08 22:00 GMT      
list.tpl'de;
Code:
<!-- BEGIN: LIST_ROWCAT -->
<!-- END: LIST_ROWCAT -->
-
<!-- BEGIN: LIST_ROW -->
<!-- END: LIST_ROW -->

hazırladığım eklentinin bu kısımların arasında olmamasına dikkat et.
> 1 <

Benzer konular (Similar topics) #BETA

Keywords (beta):

Forum Arşiv (beta):

[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131] [132] [133] [134] [135] [136] [137] [138] [139] [140] [141] [142] [143] [144] [145] [146] [147] [148] [149] [150] [151] [152] [153] [154] [155] [156] [157] [158] [159] [160] [161] [162] [163] [164] [165] [166] [167] [168] [169] [170] [171] [172] [173] [174] [175] [176] [177] [178] [179] [180] [181] [182] [183] [184] [185] [186] [187] [188] [189] [190] [191] [192] [193] [194] [195] [196] [197] [198] [199] [200] [201] [202] [203] [204] [205]