serendipity_plugin_staticpage (dtree)

Creating and modifying plugins.
Post Reply
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

serendipity_plugin_staticpage (dtree)

Post by JWalker »

It seems that the directory tree of serendipity_plugin_staticpage does not remember its status, even when cookies are enabled in the plugin (they are enabled in my browser - FireFox 1.5). For comparision, the plugin_linklist remembers its tree status between F5-Refresh commands at the same time.

I have changed several config options in serendipity_plugin_staticpage.php, function generate_content() :

Code: Select all

            /* configuration section*/
            if (!serendipity_db_bool($this->get_config('useIcons'))) {
                $str .= "fd_$fdid.config.useIcons  = false;\n";
            }
            $str .= "fd_$fdid.config.useSelection  = false;\n";
            $str .= "fd_$fdid.config.useCookies    = true;\n"; // was false
            $str .= "fd_$fdid.config.useLines      = true;\n";  // was false
            $str .= "fd_$fdid.config.useStatusText = true;\n";
            $str .= "fd_$fdid.config.closeSameLevel= true;\n";
            $str .= "fd_$fdid.config.target        = '_self'\n";
The behaviour remained the same: after refresh the staticpage tree becomes fully opened - all levels, all branches, while plugin_linklist does not change. What is more interesting, plugin_linklist and plugin_staticpage both use dtree.js, with 'personal' copy of it in their directories... I also checked the two copies of dtree - they are binary identical (kdiff3 said so).

Another issue is that the link to the frontpage is always included in tree view, nevertheless it is disabled or not in the configuration of the plugin ($frontage bool config option). I suppose this is so, because this link is used as a tree root and thus must be present.

My environment: Windows XPSP2-Apache 2.0.55-PHP 5.0.2-MySQL 4.1.14-Firefox 1.5 - all in one box.
Ivan Cenov
OKTO-7 Co., Botevgrad
Bulgaria
Post Reply