cotonti.com : SeeAlso Plugin https://www.cotonti.com Последние сообщения в теме Cotonti en Thu, 09 Oct 2025 21:50:13 -0000 Lombi пт, 10 апр 2009 01:48:30 -0000 aiwass
Thanks, Lombi & TwistedGA]]>
пт, 10 апр 2009 01:46:39 -0000
Lombi
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=https://www.cotonti.com/\"".$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.]]>
пт, 10 апр 2009 01:31:56 -0000
TwistedGA # Lombi : We did fix this, the problem is the seealso word in the sql line (cotonti uses seealso for an operation hence it becomes a misunderstanding).

I think removing that fixed it.

So removing what I said should make it work yea? I had issues with the BOX plugin because it had had something like that at the end of the sql lines, removing it solved the problem.]]>
пт, 10 апр 2009 01:29:26 -0000
aiwass # Lombi : We did fix this, the problem is the seealso word in the sql line (cotonti uses seealso for an operation hence it becomes a misunderstanding).

I think removing that fixed it.

Unfortunatly it does not work on my site, just gets a blank page instead. Or did you mean something else ?]]>
пт, 10 апр 2009 01:26:07 -0000
Lombi
I think removing that fixed it.

I'm using it on all my sites too, just not on sites that have over 50.000 pages since it kills my mysql daemon.

A solution would be to cache it in mysql, like maybe serialized in page_extrasomething so we wouldnt even need to do any db manipulation.]]>
пт, 10 апр 2009 01:22:36 -0000
aiwass Lombi, but i have almost all my pages wired to it and it's very useful. Do you have another solution linking together pages like this : http://www.megamind.se/page.php?id=126 (keyword : Ferry Corsten)

TwistedGA : Does not work, but thank you.

I'm open to all kinds of solutions which utilizes those keywords that are placed in page_extra4 for this plugin and presents them in a similar fashion like on the link above.

It's my site by the way !

/Aiwass]]>
пт, 10 апр 2009 01:06:49 -0000
Lombi пт, 10 апр 2009 00:53:54 -0000 TwistedGA The seealso.page.php file :
<?php
/* ====================
[BEGIN_SED]
File=plugins/extended/seealso/seealso.page.php
Type=Plugin
[END_SED]

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

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

$sql = sed_sql_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 (sed_num_rows($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']);
                $sa_pagelink = "<a href=https://www.cotonti.com/\"page.php?id=".$sa_pageid."\" title='".$sa_pagedesc."'>".$sa_pagecat.$cfg['separator'].$sa_pagetitle."</a>";
		$catpath = sed_build_catpath($sa_pagecat, "<a href=https://www.cotonti.com/\"list.php?c=%1\$s\" title=\"%2\$s\">%2\$s</a>");
		$catpath = $catpath." ".$cfg['separator']." <a href=https://www.cotonti.com/\"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
/* ====================
[BEGIN_SED]
File=plugins/extended/seealso/seealso.setup.php
Type=Plugin
[END_SED]

[BEGIN_SED_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_SED_EXTPLUGIN]

[BEGIN_SED_EXTPLUGIN_CONFIG]
[END_SED_EXTPLUGIN_CONFIG]
==================== */

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

?>

Make a backup of the originals and try this. I only see one other thing that might cause a problem as it is, if you still have issues, try removing :::, "SeeAlso/get related":::: form the $sql = line. If that doesnt solve it let me know and I'll actually take it into my test site and figure out what the problem is.]]>
пт, 10 апр 2009 00:39:36 -0000
aiwass
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=https://www.cotonti.com/\"page.php?id=".$sa_pageid."\" title='".$sa_pagedesc."'>".$sa_pagecat.$cfg['separator'].$sa_pagetitle."</a>";
		$catpath = ldu_build_catpath($sa_pagecat, "<a href=https://www.cotonti.com/\"list.php?c=%1\$s\" title=\"%2\$s\">%2\$s</a>");
		$catpath = $catpath." ".$cfg['separator']." <a href=https://www.cotonti.com/\"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]]>
пт, 10 апр 2009 00:19:41 -0000