4 Provides a fancy "quick view" (fragments) of the current and all
5 associated (linked and backlinked) pages.
7 - idea borought from a PhpWiki: discussion.
8 - obviously needs improvement (all links should be tour:Links ?)
13 $ewiki_plugins["action"]["tour"] = "ewiki_tour";
14 $ewiki_config["action_links"]["view"]["tour"] = "PageTour";
15 $ewiki_config["action_links"]["tour"]["view"] = "ViewFullPage";
16 $ewiki_config["action_links"]["tour"]["links"] = "BACKLINKS";
17 $ewiki_config["action_links"]["tour"]["info"] = "PAGEHISTORY";
19 function ewiki_tour($id, &$data, $action) {
25 explode("\n", trim($data["refs"])),
26 ewiki_get_backlinks($id),
29 foreach ($page_lists as $pages) {
30 foreach ($pages as $page) {
32 $row = ewiki_db::GET($page);
33 if (EWIKI_DB_F_TEXT == $row["flags"] & EWIKI_DB_F_TYPE) {
35 $add = substr($row["content"], 0, 333);
36 $add = substr($add, 0, strrpos($add, " "));
37 $add = preg_replace("/^[!*#-:;>]+/m", "", $add);
38 $add = strtr($add, "\n\t", " ");
40 $o .= "!!! [tour:{$row[id]}]\n"
41 . "@@tour-page-fragment $add ...\n\n";
47 $o = ewiki_format($o);
48 $o .= ewiki_control_links($id, $data, $action);