forum.coppermine-gallery.net
No Support => Modifications/Add-Ons/Hacks => Mods: Menu/Navigation => Topic started by: Titooy on January 04, 2005, 02:27:41 am
-
I made that tree as I'm planning to make a cpg theme with a tree navigation.
Since I'm not really a developer, the code is probably not optimized - I started with mstralka's code (http://forum.coppermine-gallery.net/index.php?topic=8827.0) and I edited/rewrote it in order to work with dTree (http://www.destroydrop.com/javascripts/tree/).
If you want to test it, just extract all the files to your coppermine directory
and add<link rel="StyleSheet" href="dtree.css" type="text/css" />
<script type="text/javascript" src="dtree.js"></script>
<script type="text/javascript" src="dtree.php"></script>
into your anycontent.php
or just make a html file with these lines if you don't want to integrate it into your gallery.
I would be interested to know how it works for big galleries since I don't have one on-line. Since the entire gallery structure is loaded, I presume it would take some time but I think the loading time also depends of the brower and the client computer. I noticed that it loads much faster with Opera than with Firefox and while the page is loading, the processor use is at 100%. So the loading time depends more of the javascript parsing than of the bandwith. If some of you who have big galleries want to test both tree scripts, it would be great to see if one of the solutions is useable...
I have a little problem, I'd like to use $lang_list_categories['home'] for the top of the tree but I don't know how to get it :-[
P.S.: The only difference between cpg13x_dtree.zip and cpg14x_dtree.zip is db_ that became cpg_db_
-
Hi Titooy,
this looks great! I have tested it with my gallery and like it a lot. Idealy I would love to have this as a tree navigation popup window and add a link to it to my cpg main menu. Do you know how to achieve this? I have no problems with the php stuff and modifying cpg, but when it comes to javascript I feel like an idiot...
klaus
p.s. The first call to the code takes quite long to execute. I don't think its the db queries that causes the delay. You said its the java script code parsing... Any more thoughts on this?
-
Hi Titooy,
this looks great! I have tested it with my gallery and like it a lot. Idealy I would love to have this as a tree navigation popup window and add a link to it to my cpg main menu. Do you know how to achieve this? I have no problems with the php stuff and modifying cpg, but when it comes to javascript I feel like an idiot...
klaus
p.s. The first call to the code takes quite long to execute. I don't think its the db queries that causes the delay. You said its the java script code parsing... Any more thoughts on this?
I installed the script here http://gallery.snork13.net/navigation.html. While it is slow to call, it may be the size of the gallery. On my dev gallery with really nothing it's much faster.
as far as the pop-window display.
Iin your theme folder, edit theme.php find:
// HTML template for main menu
$template_main_menu = <<<EOT
<span class="topmenu">
and add:
<!-- BEGIN navigation -->
<a href="LINK TO YOUR NAVIGATION.html" target=_blank title="Gallery Navigation">Gallery Tree</a> ℜ
<! -- END navigation -->
the ℜ
is the divider I use for the menu, you can use the pipe symbol or whatever
live demo, click on the Gallery Tree link (http://gallery.snork13.net/?theme=snork13)
Ok, I am adding to this post to reflect a little extra java that can be added before the </head> of the navagation page to control the pop-up window position and size.
<SCRIPT LANGUAGE="JavaScript" FOR="window" EVENT="onload()">
window.moveTo(0, 0)
window.resizeTo(200, 400)
</script>
snork
-
Works very nice on my site :) Tnx alot.
Has anyone been able to add the location of the window to the cookie. Now when a user moves the window, then goes to another page, the window moves back to the default position. Im looking into it right now, if i find something ill let you know.
-
Wow it looks realli goot and almost wat i'm looking for.
I looked @snork13's gallery and wondered if, rather than creating a new page with the subcatagories, is it possible to have the subcatagories appear below the main catagory like the original coppermine after clicking the main catagory?? Will this need a new code or can the original be changed to accomadate this?
-
Don't request code changes on mod threads. They are provided as-is. You're allowed to post questions asking how to implement a mod, but you mustn't ask new features, as this would clutter threads.
-
First off i did not request a mod change. "/ I asked if wat i wanted was possible with the current code. titoony moddified someone elses code, so i'm wondering if i can change a lil bit of his to satisfy my need.
Now i actually do have a question tat is "allowed" I added the code to anycontent.php, but it didn't do anything. The 4 other files were added to the root file too. Am i supposed to add something from mstralka's code? or do i have to change the theme.php like Snork?
-
Aloha,
I have a problem with the tree menue. For eplication I show you some codes:
<html>
<head>
<title>Baummenue</title>
</head>
<body>
<link rel="StyleSheet" href="dtree.css" type="text/css" />
<script type="text/javascript" src="dtree.js"></script>
<script type="text/javascript" src="dtree.php"></script>
</body>
</html>
This is the file "tree.php" in the Coppermine folder and the dtree files are in the same folder.
When I look at the tree.php file than I saw a white screen and no tree menue.
When I look at the dtree.php I see a long list like this:
<head>
<meta http-equiv="Content-Language" content="de">
</head>
d = new dTree('d');
d.add(0,-1,'','index.php');
d.add(1,0,'Mix','index.php?cat=3','');
d.add(2,1,'Gemischte Bilder','thumbnails.php?album=3','');
.
.
.
.
I can't finde the problem why the tree.php file is not open the menue.
Can someone help me???
-
Post a link for a start.
-
http://www.alex-j.net/pics/tree.php (http://www.alex-j.net/pics/tree.php)
-
What is this code doing there?
<head>
<meta http-equiv="Content-Language" content="de">
</head>
-
It's something from Frontpage... I can delete it but the Problem is still there...
-
I mean the one in dtree.php - it is a javascript file so you can't have html there. Avoid using Frontpage.
-
Ok I understand... I don't know where this code come from.
I chance nothing on the files dtree.css , dtree.js, dtree.php and the image files and I think in the tree.php file is also no mistake.
I have no idea where I have so search to find the mistake.
-
The code you have in tree.php is now invalid, so replace it with a fresh copy. The content-language code seems to be added to all your pages.
-
I write the tree.php again with the editor and the problem is still there.
Do you think that a php file chance another php file??
I also refresh the files from the mod. So the complete tree files are new and were not open with frontpage. Is there maybe a problem in the index.php file from coppermine?
Some Month ago the mod run without problems. Some weeks later I saw that there is a problem and here I'am now.
The tree menue is so perfekt to integrate in the website. So I hope that it will work again.
-
Ok I found the mistake.
Some week ago I installed a plugin and there i found the wrong line in a php file. So your tip was very good. Thanks for your help.
Aloha
Alex
-
I love this modification. Easy Installation, works extremely well.
Thanks ;D
-
Hello,
Great Mod
I have a question,
is it possible with this type of menu that if we click on one "+" it will automatically close the other "+" (in order to keep the menu quite compact)
in other words, what modification I have to make in the code in order to change the values of the expanding menu, so that two menu cannot be expanded at the same time.
Thank you very much for any help you can provide.
;D
-
Hello, again,
By the way, is it possible (and how) to put the link "Album" (the one in the original menu that allows to see all the albums) next to the image "root" (the little computer screen) ?
Thank you very, very much :)