Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Tree navigation with dTree  (Read 39691 times)

0 Members and 1 Guest are viewing this topic.

Titooy

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 736
    • under construction...
Tree navigation with dTree
« 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 and I edited/rewrote it in order to work with dTree.

If you want to test it, just extract all the files to your coppermine directory
and add
Code: [Select]
<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_
« Last Edit: May 05, 2006, 10:07:20 pm by GauGau »
Logged

ks

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 44
Re: Tree navigation with dTree
« Reply #1 on: January 07, 2005, 11:07:37 am »

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?
Logged

snork13

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 260
  • Internet! Is that thing still around?
    • Gallery
Re: Tree navigation with dTree
« Reply #2 on: January 28, 2005, 03:45:30 am »

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:


Code: [Select]
// HTML template for main menu
$template_main_menu = <<<EOT
                <span class="topmenu">
and add:
Code: [Select]
<!-- BEGIN navigation -->
<a href="LINK TO YOUR NAVIGATION.html" target=_blank title="Gallery Navigation">Gallery Tree</a>  &real;
<! -- END navigation -->

the
Code: [Select]
&real; is the divider I use for the menu, you can use the pipe symbol or whatever

live demo, click on the Gallery Tree link

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.

Code: [Select]
<SCRIPT LANGUAGE="JavaScript" FOR="window" EVENT="onload()">

window.moveTo(0, 0)
window.resizeTo(200, 400)

</script>

snork
« Last Edit: January 28, 2005, 05:40:54 am by snork13 »
Logged

n3n

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 173
Re: Tree navigation with dTree
« Reply #3 on: May 29, 2006, 10:40:04 pm »

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.
Logged

krnboy

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Tree navigation with dTree
« Reply #4 on: June 14, 2006, 09:06:43 pm »

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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Tree navigation with dTree
« Reply #5 on: June 20, 2006, 08:00:14 am »

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.
Logged

krnboy

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Tree navigation with dTree
« Reply #6 on: July 05, 2006, 11:35:28 pm »

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?
Logged

Alex-J

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Tree navigation with dTree
« Reply #7 on: June 30, 2007, 08:52:59 am »

Aloha,
I have a problem with the tree menue. For eplication I show you some codes:

Code: [Select]
<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:
Code: [Select]
<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???

Logged

Nibbler

  • Guest
Re: Tree navigation with dTree
« Reply #8 on: June 30, 2007, 12:08:35 pm »

Post a link for a start.
Logged

Alex-J

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Tree navigation with dTree
« Reply #9 on: June 30, 2007, 01:51:12 pm »

Logged

Nibbler

  • Guest
Re: Tree navigation with dTree
« Reply #10 on: June 30, 2007, 03:33:05 pm »

What is this code doing there?

Code: [Select]
<head>
<meta http-equiv="Content-Language" content="de">
</head>
Logged

Alex-J

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Tree navigation with dTree
« Reply #11 on: June 30, 2007, 03:41:16 pm »

It's something from Frontpage... I can delete it but the Problem is still there...
Logged

Nibbler

  • Guest
Re: Tree navigation with dTree
« Reply #12 on: June 30, 2007, 04:12:38 pm »

I mean the one in dtree.php - it is a javascript file so you can't have html there. Avoid using Frontpage.
Logged

Alex-J

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Tree navigation with dTree
« Reply #13 on: June 30, 2007, 04:44:05 pm »

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.
Logged

Nibbler

  • Guest
Re: Tree navigation with dTree
« Reply #14 on: June 30, 2007, 04:52:36 pm »

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.
Logged

Alex-J

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Tree navigation with dTree
« Reply #15 on: June 30, 2007, 05:18:59 pm »

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.
Logged

Alex-J

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Tree navigation with dTree
« Reply #16 on: July 02, 2007, 03:04:36 pm »

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
Logged

Carlos5039

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 13
  • Thank God for Open Source
Re: Tree navigation with dTree
« Reply #17 on: July 05, 2007, 01:10:14 am »

I love this modification.  Easy Installation, works extremely well.

Thanks ;D
Logged

TopAuto

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Tree navigation with dTree
« Reply #18 on: March 28, 2008, 03:20:01 am »

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
Logged

TopAuto

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Tree navigation with dTree
« Reply #19 on: March 28, 2008, 03:34:32 am »


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  :)
Logged
Pages: [1]   Go Up
 

Page created in 0.027 seconds with 20 queries.