Loading...
 
Features / Usability

Features / Usability


Wiki Links

posts: 32 United Kingdom


Is there any way to get a list of needed Wiki pages? I mean a list of pages which there are links to, but do not yet exist.

- Gray

posts: 2881 United Kingdom

Hi

Under some of the Tiki versions there are tiki-orphan_pages.php, they could be listed on that.

Damian


posts: 71 United States
I believe orphan pages are wiki pages that exist but not linked to from anywhere. gray is looking for a list of wikiwords that do not link to existing pages, I think. There is no such feature (yet).

posts: 32 United Kingdom

Ah, yes. I'm looking for a list of WikiWords which do not link to existing pages. The feature not existing explains why I couldn't find it. :-) Thanks.

- Gray

posts: 59 Belgium

I have seen this question before on this forum, only a couple of weeks ago I think.
If you browse back, you might find a solution.

And please dev people like Damian: this sounds like a good feature, please add it if it's not too much work. ;-)



posts: 32 United Kingdom

Thanks for the pointer avgasse.

I've borrowed that idea. If anyone is interested the SQL i've used to list wanted pages is:

select tiki_links.toPage from tiki_links left join tiki_pages on (tiki_links.toPage = tiki_pages.pageName) where tiki_pages.pageName is null;

- Gray


posts: 32 United Kingdom

The full solution I used was this quick hack of a Wiki plugin: (save as lib/wiki-plugins/wikiplugin_wantedpages.php) (you will also need to add the start and end php tags)

// wikiplugin_wantedpages.php // Display "wanted" Wiki pages // grk@ducked.net // Usage: {WANTEDPAGES()}{WANTEDPAGES} require_once "lib/wiki/pluginslib.php"; function wikiplugin_wantedpages_help() { return tra("Lists ''wanted'' Wiki pages\n"); } function wikiplugin_wantedpages($data, $params) { $plugin = new WikiPluginWantedPages(); return $plugin->wantedpages($data, $params); } class WikiPluginWantedPages extends PluginsLib { function wantedpages($data, $params) { global $wikilib; $query = "select tiki_links.toPage from tiki_links"; $query .= " left join tiki_pages on (tiki_links.toPage = tiki_pages.pageName)"; $query .= " where tiki_pages.pageName is null;"; $result = $wikilib->query($query,array()); $out = array(); while ($row = $result->fetchRow()) { $out[] = '(('.$row['toPage'].'))'; } sort($out); return implode('',$out); } }