Welcome, Guest. Please login or register.
July 04, 2009, 03:09:10 AM

Login with username, password and session length
Search:     Advanced search
Willst du dem Website Baker Team beitreten?
Nähere Informationen findest du hier und auf unserer Startseite .
85167 Posts in 13110 Topics by 8207 Members
Latest Member: kolerik
* Home Help Search Login Register
+  Website Baker Community Forum
|-+  English
| |-+  Help/Support
| | |-+  Help/Support of WB2.7.x core (Moderators: Argos, BerndJM)
| | | |-+  Multilanguage site: submenu dissapears after search #SOLVED#
Pages: 1 [2] Go Down Print
Author Topic: Multilanguage site: submenu dissapears after search #SOLVED#  (Read 4884 times)
brofield
Semi-Master Baker
*****
Offline Offline

Posts: 218


WWW
« Reply #20 on: April 18, 2008, 05:20:16 AM »

After doing this, try updating to this version of the sm2 include file. The changes in this revision are a test only and it may not be the real version. Basically, this uses the referrer page ID as the current page ID when we don't have a current page (i.e. after a search, the menu still considers you to be on the same page as when you started the search). Not sure if this is what is really desired though.

http://showmenu2.googlecode.com/svn-history/r11/trunk/include.php
Logged
Boudi
Master Baker
*****
Offline Offline

Posts: 341


//o_-\\


« Reply #21 on: April 18, 2008, 10:09:55 AM »

Thank you Brofield for taking the time to check it out. Unfortenately the answer is: not working.

What I did:

- fresh install wb2.7
- enabled page languages in adv. settings
- enabled intro page in adv. settings
- installed SM2 4.5 mod
- installed ALLCSS2
- created the language structure
- ONLY changed 2 lines of code within the index.php of the ALLCSS2 template:

flags:
Code:
<?php show_menu2(0SM2_ROOTSM2_STARTfalse" [a]<img src=" .WB_URL .  "/media/flags/[menu_title].gif border=0 />[/a] "''''''false''0); ?>

menu:
Code:
<?php 
show_menu2
(0SM2_ROOT+1SM2_START+1SM2_TRIM|SM2_PRETTY'<li><a ' ."[if(class=menu-current){class=\"menu_current\" }]" .'href="[url]" target="[target]">[menu_title]</a>'"</li>""<ul>","</ul>"false'<ul>'); 
?>

- implemented the : <input type="hidden" name="referrer" value="[REFERRER_ID]" />
- changed the include.php

Result: www.yze.nl/cms0

Sincerely,
Knert
Logged

...:: Bake the Unbakable ::...
brofield
Semi-Master Baker
*****
Offline Offline

Posts: 218


WWW
« Reply #22 on: April 18, 2008, 10:11:38 AM »

So what is it supposed to be showing?
I see nothing but as far as I know, that is what I am supposed to see.
Logged
Boudi
Master Baker
*****
Offline Offline

Posts: 341


//o_-\\


« Reply #23 on: April 18, 2008, 10:12:34 AM »

When you do a search, the menu is dissapearing.  undecided

When you want I can pm you the logindata?
« Last Edit: April 18, 2008, 10:14:54 AM by knert » Logged

...:: Bake the Unbakable ::...
Luckyluke
Geek-Like Baker
*****
Offline Offline

Posts: 462


Let's Rock


« Reply #24 on: April 18, 2008, 12:01:02 PM »

Hi,

I have something in common. And that in 2 cases. My site also contains 2 languages: (NL and EN).

Example how something can obtain:

1: visit www.kisstory.be
2: Select a language, English for example
3: Select guestbook
4: Select sign guestbook
5: well, here you see the menu change. Suddenly, EN or NL (Dutch) as a main menu  huh

For this test I enabled the search capabilities (I will turn it off in some days). If you are looking for something and press search then the menu disappears, only the main menu is visible. A similar case as Knert.

I have no solution for this. The search is normally turned off on my site. And I can live with the problem of the guest book, But it is not a pretty sight.
And for the record: my template doesn't use MENU2 !!!

Grtz,
Luc
Logged
Boudi
Master Baker
*****
Offline Offline

Posts: 341


//o_-\\


« Reply #25 on: April 21, 2008, 09:14:17 PM »

Hello,


I have a question, Is sir Brofield still on this topic, trying to solve it?   smiley

Besides that I would like to hear from other multilanguage users if they have this problem or not.

Hope 2 hear from you  smiley

Sincerely,
Knert
« Last Edit: April 21, 2008, 09:21:23 PM by knert » Logged

...:: Bake the Unbakable ::...
brofield
Semi-Master Baker
*****
Offline Offline

Posts: 218


WWW
« Reply #26 on: April 22, 2008, 05:11:24 AM »

Fixed.

In class.frontend.php, function get_page_details(), add the following line:

     // Page ID
     define('PAGE_ID', $this->page['page_id']);
+   define('REFERRER_ID', PAGE_ID);

(Note that this change isn't strictly necessary, but I feel that it is better to have it as it makes the necessary template code a little simpler. Simpler is always better. See below)

In Settings -> Show advanced settings -> Search Settings -> Header, add this input field immediately following the <form> open tag.

     <input type="hidden" name="referrer" value="[REFERRER_ID]" />

In the template, add the following input field immediately following the search <form> open tag.

     <input type="hidden" name="referrer" value="<?php echo REFERRER_ID; ?>" />

If the class.frontend.php is not modified, it can still be done with the code:

     <input type="hidden" name="referrer" value="<?php echo defined('REFERRER_ID') ? REFERRER_ID : PAGE_ID; ?>" />

Upgrade to the latest show_menu2 version 2.6

     http://code.jellycan.com/show_menu2/


NOTE: would you please test with these changes and verify for me that it is fixed (I've tested on 2.7 for multi-language sites, and 2.6.7 for a normal site).

B
« Last Edit: April 22, 2008, 07:40:49 AM by brofield » Logged
Boudi
Master Baker
*****
Offline Offline

Posts: 341


//o_-\\


« Reply #27 on: April 22, 2008, 10:43:18 AM »

Hi Brofield,

First off all...thank you for taking the time to try to solve this issue. I really appreciate it!

Specs:

- WB 2.7
- Allcss2 template

I did exactly what you wrote and it works like a charm!  cheesy cheesy

The menu stays intact like It should be! Great stuff! So nice to see it works after weeks of stress  rolleyes

I will now test it in combination with other mods like anynews, multiple menu's etc.
If I have results about that I will put them here right away!

Thank again for helping me (and us) out!  smiley smiley
Logged

...:: Bake the Unbakable ::...
doc
A Baker's Baker
*****
Offline Offline

Posts: 2966

Never mind, love it, change it or leave it.


« Reply #28 on: April 22, 2008, 07:09:12 PM »

Hello Brofield,

tested the latest version of show_menu2 (v4.60) on an existing WB 2.6.7 multi-lingual site: http://help.websitebaker.org/
Everything works as it should (also tested with WB 2.7), thanks for providing a working solution.

Have updated the show_menu2 module on the addons repository with your latest version.

Thanks for your contribution.
Regards Christian
« Last Edit: April 22, 2008, 09:02:49 PM by doc » Logged
gucci
Pending Apprentice Baker
**
Offline Offline

Posts: 32


« Reply #29 on: May 14, 2008, 01:02:06 PM »

Hallo Brofield,

I had the same problem like Knert.
Now, the menu stays intact when I click on search and the results are displayed.
But when I click on one of the results all div containers above the div container who includes the search (in index.php of my template) disappear.

I use wb 2.7 with showmenu2 (version 4.6), multilingual site.

Code:
<?php show_menu2(0SM2_ROOT+1SM2_ALLSM2_CURR+1|SM2_CURRTREEfalsefalsefalsefalsefalse'<ul id="header_menu" class="menu">'); ?>

Is this a problem of my template or a showmenue2 problem?

Sincerely

gucci
« Last Edit: October 23, 2008, 09:00:53 AM by gucci » Logged
brofield
Semi-Master Baker
*****
Offline Offline

Posts: 218


WWW
« Reply #30 on: May 16, 2008, 12:28:54 AM »

Your parameters to the function look wrong. The flags are definitely wrong.

B
Logged
Pages: 1 [2] Go Up Print 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!