Quick'n Dirty Fix for NAV_TABLE_COLUMN

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Quick'n Dirty Fix for NAV_TABLE_COLUMN

Post by pico »

Hi

the Navigation Problem in IE in 1.2.7

There is some new Code in front.func - looks like that there are Canges for 'Hidden' and 'Logged In' Levels but they are not finished !?

The Problem comes from a wrong Calculation of <colspan=....

Code: Select all

  $colspan	= ($depth2 > 1) ? " colspan=\"".$depth2."\"" : "";
can be fixed with adding this Code into front.func.inc.php ~Line 1120

Code: Select all

foreach($struct as $key => $value) {
		if($struct[$key]["acat_struct"] == $act_cat_id && $key && (!$struct[$key]["acat_hidden"] || isset($GLOBALS['LEVEL_KEY'][$key]))) {
			$c++;
		}
	}
	$c = (!$c) ? 1 : 0;
after

Code: Select all

if(is_array($data) && count($data)) {
		$temp_tree = array_reverse($data, 1);
	} else {
		$temp_tree = false;
	}
before

Code: Select all

//get depth of level
	while ($start_level) {
		$start_level = $struct[$start_level]["acat_struct"];
		$level_depth++;
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hoffentlich liest das O.G. auch. :roll:
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
mdgroot
Posts: 155
Joined: Wed 11. Feb 2004, 17:47
Location: Netherlands

Post by mdgroot »

Pico, I love you :D
phpWCMS v1.27
User avatar
Oliver Georgi
Site Admin
Posts: 9913
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Yes really seems to help :)

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
1996 328ti
Posts: 317
Joined: Mon 19. Apr 2004, 06:10
Location: Greenville, SC USA
Contact:

Post by 1996 328ti »

I wonder if this is why my {nav_table_column:x} no longer works the way it did in 1.2.5 because I used two hidden categories in {nav_table_column}.

http://www.phpwcms.de/forum/viewtopic.php?p=67544
User avatar
Oliver Georgi
Site Admin
Posts: 9913
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

no I think I have forgotten a var that sets the correct level.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
1996 328ti
Posts: 317
Joined: Mon 19. Apr 2004, 06:10
Location: Greenville, SC USA
Contact:

Post by 1996 328ti »

And now the nav column:x is working correctly. :oops:
No idea why.

I originally had a dev directory
/public_html/wcms/ with a copy of my live site.
I deleted it and now the nav section is working.

Edit: Oh wait. It's not working. When I click on he menu, the secondary menu doesn't open. :(
supervise-it
Posts: 15
Joined: Tue 21. Feb 2006, 17:45

Post by supervise-it »

I love you.....
yoda007
Posts: 4
Joined: Sat 22. Nov 2008, 13:18

Re:

Post by yoda007 »

Oliver Georgi wrote:no I think I have forgotten a var that sets the correct level.

Oliver
Ich habe auch dieses Problem mit Version 1.2.8.

Habe eine Website mit einer zweiten Sprache ausgestattet und daher einen zusätzlichen Level eingefügt ("de", "en"). Dadurch entsteht mit NAV_TABLE_COLUMN ein Problem im IE, wenn man auf einer Unterebene einsteigt, d.h. statt NAV_TABLE_COLUMN:0 (hier funktioniert es problemlos!) wird nun z.B. NAV_TABLE_COLUMN:32 gewählt. Die "colspan's" sind nicht mehr richtig, d.h. FF kompensiert dies, aber der IE rückt das Untermenü viel zu weit ein.

Ich wäre interessiert an dem Workaround mit der zusätzlichen Variable $temp_var, die den richtigen Navigationslevel ermittelt.

Da meine mehrsprachige Seite fertig ist und nur diesen Bug aufweist, möchte ich nicht den Aufwand des Updates auf eine höhere Version betreiben (habe das ursprünglich versucht und musste dabei mit vielen anderen Schwierigkeiten kämpfen...).

Also: Bräuchte nur eine korrekte colspan-Berechnung - danke!
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Re: Quick'n Dirty Fix for NAV_TABLE_COLUMN

Post by juergen »

Du verstehst aber schon, dass jetzt niemand daher kommt und dir eine Liste von Risiken, die du mit der 1.2.8 hast hier reinstellt ? Die neuen Naviagtionen können exakt alles was die NAV Table kann, sogar in der 1.2.8. Zudem keine Module und und und... ohne Update.. brrrr
yoda007
Posts: 4
Joined: Sat 22. Nov 2008, 13:18

Re: Quick'n Dirty Fix for NAV_TABLE_COLUMN

Post by yoda007 »

DF6IH wrote:Du verstehst aber schon, dass jetzt niemand daher kommt und dir eine Liste von Risiken, die du mit der 1.2.8 hast hier reinstellt ? Die neuen Naviagtionen können exakt alles was die NAV Table kann, sogar in der 1.2.8. Zudem keine Module und und und... ohne Update.. brrrr
Was meinst Du mit "Liste von Risiken"?

Ich möchte doch nur - wenn irgendwie möglich - einen kleinen Workaround für das geschilderte Problem. Im Prinzip kann das auch eine nicht allgemein gültige Lösung sein. Ich brauche nur für eine Navigation mit einem Einstieg ab Level 1 ("Root" = Level 0; "de" bzw. "en" sind Level 1) eine korrekte Berechnung der COLSPAN-Anzahl. Mir ist in diesem Fall auch egal, ob damit die Navigation ab Level = noch funktionieren würde.

Natürlich habe ich im ersten Ansatz versucht, auf die Version 1.3.9 uopzugraden. Leider hätte ich dabei viele andere Probleme gehabt und habe es aus Zeitgründe nicht weiter verfolgt.

Übrigens: ich habe noch eine Seite mit "1.2.5 dev" zweisprachig laufen, die dieses Problem nicht hat.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: Quick'n Dirty Fix for NAV_TABLE_COLUMN

Post by flip-flop »

Was meinst Du mit "Liste von Risiken"?
Es gibt in älteren Versionen (wie in jeder anderen Software auch) gewisse Sicherheitsrisiken die hier nicht veröffentlichen werden.

Mache einfach ein Update auf die 1.4.0 (Download siehe Docu).

Vor allem kannst du eine anständige NAVI verwenden. - NAV_LIST_UL

Allerdings erfordert das natürlich etwas Zeit. Am einfachsten ist eine paral. Installation, dort kannst du ganz gelassen die Seite aufbauen/systemspez. Änderungen einpflegen.
Update: http://forum.phpwcms.org/viewtopic.php?p=109508#p109508 zwei Varianten, siehe auch ganz unten.

Eine 1.2.5 ist sicherheitstechnisch völlig jenseits von gut und böse.

Außerdem sollten wir hier Engl. sprechen, da phpwcms Support English.

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
yoda007
Posts: 4
Joined: Sat 22. Nov 2008, 13:18

Re: Quick'n Dirty Fix for NAV_TABLE_COLUMN

Post by yoda007 »

Okay - once again!

I only want a workarount for my problem with the NAV_TABLE_COLUMN with starting point not in level 0.

In buildt a second language version to a website with version 1.2.8 and therefore had to choose two navigation entries in level 1. The problem is, In IE the COLSPAN params aren't calculated correctly.

So I ask for a workaround in Version 1.2.8 to correct this problem - I don't want to have a solution that is stable for other installations.

Thanx for your help!
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: Quick'n Dirty Fix for NAV_TABLE_COLUMN

Post by flip-flop »

Once again too!

There is no workaround available for this old old table based navigation.
But you can use an other div based navigation:

Code: Select all

NAV_LIST_ALL_DIV ->  mz.ja-nek. de/test2_3_1.phtml
NAV_LIST_ALL_DIV1 -> mz.ja-nek. de/test2_3_11.phtml
Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Post Reply