Page 2 of 2

Posted: Fri Sep 22, 2006 4:15 pm
by judebert
Gee, chrisT33, I guess you're my project for tonight, too. :wink:

I'll add this temporarily to my blog and I'll see what I can do with this.

Oh, wait. Tonight is game night with my mates; it'll have to wait at least until Saturday. If someone else wants to take a shot at it, you're welcome to it.

Posted: Fri Sep 22, 2006 5:31 pm
by chrisT33
it's not urgent judebert :)

thanks again for your help

Posted: Fri Oct 06, 2006 3:50 pm
by KarlKoch
okay, I see nothing. I copyed the HTML_Tree files in the bounded libs directory(http://pear.php.net/package/HTML_TreeMenu/download). I defined the image and the tree file. I read this thread and these should be the right paths or?

Code: Select all

 Image folder: http://karlkoch.uttx.net/serendipity/bundled-libs/HTML_TreeMenu/images/

js file:
http://karlkoch.uttx.net/serendipity/bundled-libs/HTML_TreeMenu/TreeMenu.js
I have an title also. Now the Category tree should be displayed? Or is there smth. I have to do?

Thanks for help guys!

Posted: Wed Oct 11, 2006 10:26 pm
by WonkoDSane
So...

Depending on which template you're using, your sidebar titles may not be defined as

Code: Select all

<span class="serendipitySideBarTitle">Title</span>
but as

Code: Select all

<h3 class="serendipitySideBarTitle">Title</h3>
You can just alter line 133 of serendipity_plugin_category_dhtml_menu.php from

Code: Select all

$cat_nodes[0] = new HTML_TreeNode(array('text'=>'<span class="serendipitySideBarTitle">'.$this->get_config('title', $title).'</span>'));
to

Code: Select all

$cat_nodes[0] = new HTML_TreeNode(array('text'=>'<h3 class="serendipitySideBarTitle">'.$this->get_config('title', $title).'</h3>'));
and you should have the same look. (I noticed this behavior in Carl Contest/s9y v3.0 template, I don't know that it is universal.)

As for setting up the TreeMenu categories plugin, a few things I did to make it work:

(Pear was already installed)
pear install HTML_TreeMenu
mkdir $WEBSERVER_HTDOCS$/serendipity/bundled-libs/HTML_TreeMenu
cp -R $PHP_LIB$/data/HTML_TreeMenu/ $WEBSERVER_HTDOCS$/serendipity/bundled-libs/HTML_TreeMenu
For me, $WEBSERVER_HTDOCS$ is /usr/local/apache/htdocs and $PHP_LIB$ is /usr/local/lib/php/

I then set my directories in Configure Plugin: Category Tree Menu to the following:

I left off the leading slashes.

Path to Images: bundled-libs/HTML_TreeMenu/images/
Path to HTMLTree.js: bundled-libs/HTML_TreeMenu/TreeMenu.js

And don't get confused by the plugin's request for HTMLTree.js. The second path should ask for TreeMenu.js instead.

Now the next step is figuring out how to wedge the linked image for the RSS feeds into the tree structure.

Posted: Thu Oct 12, 2006 3:41 am
by judebert
Okay, that's enough for one night. My server won't let me create the directory HTML_TreeMenu under the bundled-libs directory. Why? I dunno. Very strange. Anyway, now all I can get is the "Please install" message.

I'll keep at it, but my time is very limited. I'm sure I'll crack it eventually. It'll just take me a while.

Posted: Fri Oct 13, 2006 4:47 am
by judebert
I got it!

I moved the HTML_TreeMenu directory to my plugin directory. It stopped complaining that TreeMenu wasn't installed, but it showed me a blank sidebar container.

No problem, eh? Just view the source and see what the problem is. Sure enough, the tree is there. I verified that my tree source download is uncorrupt by visiting {my-blog}/plugins/serendipity_plugin_category_dhtml_menu/HTML_TreeMenu/docs/example.php -- yes, I know it's big and bulky, but it's a test. It rendered a nice tree.

So what was the difference? Well, the test used ../TreeMenu.js. Hmmm. Checking more closely, I saw that my front page used http://judebert.com/wasted_youth/wasted_youth/... , doubling the blog directory!

So that "absolute" URL it's asking for in the configuration isn't so absolute. It's relative to the blog directory.

I changed the configuration to point to my subdirectory, and it worked!

Naturally, this wouldn't be a problem for anyone whose Serendipity is installed in the root directory. For those of us with additional uses for our webspace, though, we've got to change that URL from an absolute HTTP path to an HTTP path relative to the blog directory. In your case, I believe that would be /bundled-libs/HTML_TreeMenu/TreeMenu.js and /bundled-libs/HTML_TreeMenu/images. (You can also try imagesAlt and imagesAlt2 if it tickles you.)

You can see it in action with the Alt2 images on http://judebert.com/wasted_youth/ -- for a limited time only. Bottom of the right sidebar.

Sorry it took so long. Let me know if it works for you, and if so I'll update the plugin to remove the configuration confusion.

Posted: Fri Oct 13, 2006 11:46 am
by KarlKoch
So now my cat tree is working too. Easy as it is. I changed the Hoster, but that should not change smth. In the past i tried the absolute and relative path, but it doesn't worked. So now I started from the beginning.
  • I downloaded the plugin, copied that in the Plugin folder
    Downloaded the HTML_Tree files
    copied them in the bounded libs folder (or anywhere else)
    Installed the plugin in the backend, give them a title and the paths. The relative paths. In my case

    Code: Select all

    /bundled-libs/HTML_TreeMenu/images
    /bundled-libs/HTML_TreeMenu/TreeMenu.js
    And it worked.
Thanks everybody for help but nobody could know that it was so easy..

Have a nice day...

P.S.: The title of this Plugin isn't shown as a Title. You/I have to change the CSS. Don't know if it is the theme or the plugin..(Theme sqare)