Problem with rewrite

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Adamski
Posts: 23
Joined: Tue 6. Apr 2004, 01:16

Problem with rewrite

Post by Adamski »

my site is pretty much how I wanted it, with one minor problem.

The links in the navigation menu are working fine, but if you click on the box the link is in rather than the link itself, the first three letters of the link are missing. Is is possible to stop the box itself working as a link?

http://www.allaboutpanic.com

Adam
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

as i wrote in an article before this depends on the update of the function get_struct_data, nav_table_struct and build_levels in the front.func.inc - the bug wasn#t there at the version from 20.02.

the solution is to update the rewrite function js_url_search in the same way like the url_search
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

Code: Select all

function js_url_search($query) { 
   if ( subStr($query,0,4) == "?id=") { 
      $noid = substr($query, 4); 
      $file = str_replace(",", ".", $noid).".html"; 
   } else { 
      $noid = substr($query,1); 
      $file = str_replace(",", ".", $noid).".html"; 
   } 
   $link = "onClick=\"location.href='".$file."'"; 
   return($link); 
} 
:wink:
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
Adamski
Posts: 23
Joined: Tue 6. Apr 2004, 01:16

Post by Adamski »

Worked like a charm, thanks jan :)
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

no problemo
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
iflash
Posts: 3
Joined: Wed 17. Mar 2004, 14:51

Post by iflash »

I try it, but doesn't work with the Navigation {NAV_LIST_TOP:Home: }

I change the Rewrite function in inc_front/front.func.inc

Code: Select all

//Rewrite functions
function url_search($query)    
{ 
   $noid = substr($query, 4); 
   $file = str_replace(",", ".", $noid).".html"; //further use 
   //$file = $noid.".html"; 
   $link = "<a href=\"".$file."\""; 
   return($link); 
   //unset($link); 
} 
function js_url_search($query) { 
   if ( subStr($query,0,4) == "?id=") { 
      $noid = substr($query, 4); 
      $file = str_replace(",", ".", $noid).".html"; 
   } else { 
      $noid = substr($query,1); 
      $file = str_replace(",", ".", $noid).".html"; 
   } 
   $link = "onClick=\"location.href='".$file."'"; 
   return($link); 
} 

And in inc_conf/conf.inc

Code: Select all

$phpwcms["rewrite_url"]       = 1;  //whether URL should be rewritable
Can you help me about this......

Thank's a lot
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

at the momemt it's only working with the nav_column. you have to hold the alias in an array from the nav_list_top (the function is in include/inc_front/front.func.inc), you can do this with a small mod in the function, like pixelpeter did it with the nav_column...
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
Post Reply