parse problem with {NAV_ROW} Replacement tag

If you've problems with unsupported - non official ;-) - functionalities use this forum please.
Post Reply
cyrano
Posts: 1598
Joined: Sat 31. Jan 2004, 18:33
Location: Stuttgart
Contact:

parse problem with {NAV_ROW} Replacement tag

Post by cyrano »

hi there i try to setup the new {NAV_ROW} Tag (12.04.04) and after finising all the described steps I get an error when open the page where i set the Tag.

Code: Select all

Parse error: parse error, unexpected T_STRING in /www/htdocs/xxxxx/include/inc_front/front.func.inc.php on line 1744
In this Line is only a omment??? I don‘t understand this.

I get that now on all pages and can't go back to home...

I added the lines in content.inc.php whch is decribed later in Olivers Describtion and get now this errors, when I call the homepage:

Code: Select all

Parse error: parse error, unexpected T_STRING in /www/htdocs/xxxxx/include/inc_front/front.func.inc.php on line 1744

Parse error: parse error, unexpected T_STRING in /www/htdocs/xxxxx/include/inc_front/content.func.inc.php on line 277
What‘s wrong? Did I oversee something?

Thank you for advise.
Gruß/ regards cyrano
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Try to download the patch file from http://www.phpwcms.de?download

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
cyrano
Posts: 1598
Joined: Sat 31. Jan 2004, 18:33
Location: Stuttgart
Contact:

Post by cyrano »

Hi Oliver,

i used the patch from 04-12-04.

is this patch renewed without renaming the date?


update:

I downloaded the patch again, put all the code into the php-files, replace the files in the include folder with the one on the server, updated all and get now this error:

Code: Select all

Fatal error: Cannot redeclare nav_level_row() (previously declared in /www/htdocs/xxxxx/include/inc_front/front.func.inc.php:665) in /www/htdocs/xxxxx/include/inc_front/front.func.inc.php on line 1743
what is going wrong here?

thank you for your advice.

greetings
Gruß/ regards cyrano
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Seems that you do not have repleaced your "old" front.func.inc.php with the new one. Do not use the hacks version of the {NAV_ROW} anymore.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
cyrano
Posts: 1598
Joined: Sat 31. Jan 2004, 18:33
Location: Stuttgart
Contact:

Post by cyrano »

hello Oliver,

i still added the code to the front.func.inc.php file.

itmakes the errors i wrote.

nav_row hack?

you mean the additional code lines?

Code: Select all

// Simple row based navigation 
if( ! ( strpos($content["all"],'{NAV_ROW')===false ) ) { 
   $content["all"] = str_replace('{NAV_ROW}', nav_level_row(0), $content["all"]); 
   $content["all"] = str_replace('{NAV_ROW_NOHOME}', nav_level_row(0,0), $content["all"]); 
   $content["all"] = str_replace('{NAV_ROW_CURRENT}', nav_level_row($content["cat_id"],0), $content["all"]); 
   $content["all"] = preg_replace('/\{NAV_ROW:(\d+)\}/e','nav_level_row($1,0);',$content["all"]); 
}
Gruß/ regards cyrano
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

The new replacement tag code is this one:

Code: Select all

// Simple row based navigation
if( ! ( strpos($content["all"],'{NAV_ROW')===false ) ) {
	$content["all"] = str_replace('{NAV_ROW}', nav_level_row(0), $content["all"]);
	$content["all"] = preg_replace('/\{NAV_ROW:(\w+|\d+):(0|1)\}/e','nav_level_row($1,$2);',$content["all"]);
}
in content.func.inc.php

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
cyrano
Posts: 1598
Joined: Sat 31. Jan 2004, 18:33
Location: Stuttgart
Contact:

Post by cyrano »

thanx a lot - i changed it - but still the same error :(

i now deleted the lines in the front.func.inc.php and it works - without the nav-row tag ...
Gruß/ regards cyrano
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Oh Cyrano - you did something wrong.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
cyrano
Posts: 1598
Joined: Sat 31. Jan 2004, 18:33
Location: Stuttgart
Contact:

Post by cyrano »

:D

it really seems like so.....

so i wait at the moment for the new release version, perhaps than.....

i don't need it now, but would be see what it can do for me in future projects....

so, thank you for debugging me :-)
Gruß/ regards cyrano
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
ionrock
Posts: 279
Joined: Fri 20. Feb 2004, 17:04

Post by ionrock »

I did a hack for the menu (nav_table_column) to be a list instead of tables. You can make it a horizontal menu using css. Just an idea. I have the code on my site. Let me know if you needed any help with it.
Post Reply