When a user creates a new page from an existing page (either through the Create Page module or by clicking on a "?"), categories could be inherited.
The problem is that this is not necessarily behaviour required for all TIki installs, and might have to be coded as admin configurable.
One quick way that will not affect other Tiki code is just to add the following lines to tiki-editpage.php. The effect of this may or may not be what is required. Need comments if this is should be added to core.
if ($feature_categories == 'y' && isset($_SERVER['HTTP_REFERER']) && (strstr($_SERVER['HTTP_REFERER'], 'tiki-index.php') ) { // default the categs the page you come from for a new page if (preg_match('/page=([^\&]+)/', $_SERVER['HTTP_REFERER'], $ms)) $p = urldecode($ms[1]); elseif (preg_match('/page_ref_id=([0-9]+)/', $_SERVER['HTTP_REFERER'], $ms)) { $pinfo = $structlib->s_get_page_info($ms[1]); $p = $pinfo["pageName"]; } else $p = $wikilib->get_default_wiki_page(); $cs = $categlib->get_object_categories('wiki page', $p); for ($i = count($categories) - 1; $i >= 0; --$i) { if (in_array($categories[$i]['categId'], $cs)) { $categories[$i]['incat'] = 'y'; $catpresetname = $categories[$i]['name']; $catpreset = true; $presettype = 'wiki page'; } } }
To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tiki.org instance. To start, simply select a version and click on "Create show2.tiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show2.tiki.org.
Unable to connect to show.tikiwiki.org. Please let us know of the problem so that we can do something about it. Thanks.
filename | created | hits | comment | version | filetype | ||
---|---|---|---|---|---|---|---|
No attachments for this item |