Foren / Cotonti / Support / SeeAlso Plugin

Porting to Cotonti needed

aiwass
#11256 10. April 2009, 00:19
Hi !

I run a very large website that is currently running on a highly modified version of the LDU 800 and there is a plugin that i use very much called Seealso from Kpoxa.

The thing is that i'm in dire need of getting this plugin to work under Cotonti since i'm in the process of updating and porting all my data to it. I have over 10.000 pages, links, events and other stuff.

I would be more the happy if someone would like to help me. Seealso uses page_extra5 field in the database (at least as i've configured it)

All tips/solutions etc. are helpful

The seealso.page.php file :
<?php
/* ====================
Land Down Under - Website engine
Copyright Neocrome
http://ldu.neocrome.net

[BEGIN_LDU]
File=plugins/extended/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_LDU]

[BEGIN_LDU_EXTPLUGIN]
Code=seealso
Part=page
File=seealso.page
Hooks=page.tags
Tags=
Minlevel=0
Order=10
[END_LDU_EXTPLUGIN]

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

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

$sql = ldu_query("SELECT page_id, page_state, 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_extra4']).")\" REGEXP Replace(page_extra4, \",\", \"|\") ORDER BY page_date desc", "SeeAlso/get related");


if (ldu_num_rows($sql)>0)
        {
        while ($row = ldu_fetch_array($sql))
                {
		$sa_author = ldu_cc($row['page_author']);
		$sa_pageid = $row['page_id'];
		$sa_pagecat = ldu_cc($row['page_cat']);
		$sa_pagedesc = ldu_cc($row['page_desc']);
		$sa_pagetitle = ldu_cc($row['page_title']);
                $sa_pagelink = "<a href=\"page.php?id=".$sa_pageid."\" title='".$sa_pagedesc."'>".$sa_pagecat.$cfg['separator'].$sa_pagetitle."</a>";
		$catpath = ldu_build_catpath($sa_pagecat, "<a href=\"list.php?c=%1\$s\" title=\"%2\$s\">%2\$s</a>");
		$catpath = $catpath." ".$cfg['separator']." <a href=\"page.php?id=".$sa_pageid."\" title=\"".$sa_pagetitle."\">".$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");
?>

The seeaslo.setup.php file :
<?php
/* ====================
Land Down Under - Website engine
Copyright Neocrome
http://ldu.neocrome.net

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

[BEGIN_LDU_EXTPLUGIN]
Code=seealso
Name=See also (Related pages)
Description=Adds "See also:" and list of related pages by keywords
Version=0.1
Date=2005/05/15
Author=Kpoxa (vrihedd@yandex.ru)
Copyright=
Notes=
Config=
SQL=
[END_LDU_EXTPLUGIN]

[BEGIN_LDU_EXTPLUGIN_CONFIG]
[END_LDU_EXTPLUGIN_CONFIG]

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

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

?>

/Aiwass has a deadline next week
Take all that money that we spend on weapons and defences each year and instead spend it feeding and clothing and educating the poor of the world, which it would many times over, not one human being excluded, and we could explore space, together, both inner and outer, forever, in peace. - Bill Hicks

https://evlear.com