Forumlar / Cotonti / Support / SeeAlso Plugin

Porting to Cotonti needed

Lombi
#11266 2009-04-10 01:31
Yeah, that's cause you're basing it off the LDU version, as opposed to the Seditio version, which is available on neocrome.net -

Please download that (I dont have the link)

then use this on the seealso.page.php

<?php
/* ====================
Seditio - Website engine
Copyright Neocrome
http://ldu.neocrome.net

[BEGIN_SED]
File=plugins/seealso/seealso.page.php
Version=800
Updated=2005-may-15
Type=Plugin
Author=Sin (vrihedd@yandex.ru)
Description=Adds "See also:" and list of related pages by keywords
[END_SED]

[BEGIN_SED_EXTPLUGIN]
Code=seealso
Part=page
File=seealso.page
Hooks=page.tags
Tags=
Order=10
[END_SED_EXTPLUGIN]

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

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

$sql = sed_sql_query("SELECT page_id, page_state, page_alias, page_cat, page_title, page_desc, page_author FROM $db_pages WHERE page_state=0 AND page_id != ".$pag['page_id']." AND \"(".eregi_replace(",", "|", $pag['page_extra5']).")\" REGEXP Replace(page_extra5, \",\", \"|\") ORDER BY page_date desc LIMIT 0,15");


if (sed_sql_numrows($sql)>0)
        {
        while ($row = sed_sql_fetcharray($sql))
                {
		$sa_author = sed_cc($row['page_author']);
		$sa_pageid = $row['page_id'];
		$sa_pagecat = sed_cc($row['page_cat']);
		$sa_pagedesc = sed_cc($row['page_desc']);
		$sa_pagetitle = sed_cc($row['page_title']);
		$link = sed_page_url($row['page_alias'], $row['page_cat'], $row['page_id']);
		$catpath = sed_category_breadcrumb($sa_pagecat);
		
		$catpath = $catpath." ".$cfg['separator']." <a href=\"".$link."\">".$sa_pagetitle."</a>";
                $t-> assign(array(
                        "SEEALSO_AUTHOR" => $sa_author,
                        "SEEALSO_PAGE_ID" => $sa_pageid,
                        "SEEALSO_PAGECAT" => $sa_pagecat,
                        "SEEALSO_PAGETITLE" => $sa_pagetitle,
                        "SEEALSO_PAGELINK" => $catpath
                        ));
                $t->parse("MAIN.SEEALSO.SEEALSO_ROW");
                }
        }
        else
        {
        $t->parse("MAIN.COMMENTS.SEEALSO_EMPTY");
        }


$t->parse("MAIN.SEEALSO");
?>

You might also notice that I have the URL part using my url rewrite system so you should probably work on those two lines to bring it like you have in your first paste.
<a href="http://www.domenlo.com">Surreal Art</a>
Bu gönderi Lombi tarafından düzenlendi (2009-04-10 01:33, 16 yıllar önce)