WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Multilanguage site: submenu dissapears after search #SOLVED#
  • Print
Pages: 1 [2]   Go Down

Author Topic: Multilanguage site: submenu dissapears after search #SOLVED#  (Read 28349 times)

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Multilanguage site: submenu dissapears after search
« 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?   :-)

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

Hope 2 hear from you  :-)

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

brofield

  • Guest
Re: Multilanguage site: submenu dissapears after search
« 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

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Multilanguage site: submenu dissapears after search
« 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!  :lol: :lol:

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

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!  :-) :-)
Logged
...:: Bake the Unbakable ::...

doc

  • Guest
Re: Multilanguage site: submenu dissapears after search
« 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

Offline gucci

  • Posts: 59
Re: Multilanguage site: submenu dissapears after search #SOLVED#
« 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: [Select]
<?php show_menu2(0, SM2_ROOT+1, SM2_ALL, SM2_CURR+1|SM2_CURRTREE, false, false, false, false, false, &#39;<ul id="header_menu" class="menu">&#39;); ?>
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

  • Guest
Re: Multilanguage site: submenu dissapears after search #SOLVED#
« Reply #30 on: May 16, 2008, 12:28:54 AM »
Your parameters to the function look wrong. The flags are definitely wrong.

B
Logged

Ivanov

  • Guest
Re: Multilanguage site: submenu dissapears after search #SOLVED#
« Reply #31 on: September 11, 2010, 04:35:07 PM »
I found a solution that satisfy me.
I wanted to show the main navigation menu (no parents, just what the menu looks like on the home page of current language).
So if I start searching from page on English, I want on the search results page to see the menu like I am on the English home (start, root) page.
So, the solution about show_menu is:
1. Open the framework/class.frontend.php
2. Search for...
Code: [Select]
if ($this->menu_start_level>0) {
$key_array=array_keys($this->page_trail);
if (isset($key_array[$this->menu_start_level-1])) {
$real_start=$key_array[$this->menu_start_level-1];
$this->menu_parent=$real_start;
$this->menu_start_level=0;
} else {
return;
}

3. Replace it with...
Code: [Select]
if (isset($key_array[$this->menu_start_level-1])) {
$real_start=$key_array[$this->menu_start_level-1];
$this->menu_parent=$real_start;
$this->menu_start_level=0;
} else {
$get_language_root = $database->query("select `page_id` from `pages` where `parent` = '0' and `language` = '".LANGUAGE."'");
$language_root = $get_language_root->fetchRow();
$this->menu_parent = $language_root['page_id'];
$this->menu_start_level=0;
}


For show_menu2 the solution is ...
1. Open modules/show_menu2/include.php
2. Search for...
Code: [Select]
   if (count($wb->page) == 0 && defined('REFERRER_ID') && REFERRER_ID > 0) {
        global $database;
        $sql = "SELECT * FROM ".TABLE_PREFIX."pages WHERE page_id = '".REFERRER_ID."'";
        $result = $database->query($sql);
        if ($result->numRows() == 1) {
            $wb->page = $result->fetchRow();
        }
        unset($result);
    }
3. Than replace it with...
Code: [Select]
if (count($wb->page) == 0 && ((defined('REFERRER_ID') && REFERRER_ID > 0) || PAGE_ID == 0)) {
global $database;
if(defined('REFERRER_ID') && REFERRER_ID > 0) {
$select_page_id = REFERRER_ID;
}
else {
$get_language_root = $database->query("select `page_id` from `pages` where `parent` = '0' and `language` = '".LANGUAGE."'");
$language_root = $get_language_root->fetchRow();
$select_page_id = $CURR_PAGE_ID = $language_root['page_id'];
}
$sql = "SELECT * FROM ".TABLE_PREFIX."pages WHERE page_id = '".$select_page_id."'";
$result = $database->query($sql);
if ($result->numRows() == 1) {
$wb->page = $result->fetchRow();
}
unset($result);
    }
« Last Edit: September 12, 2010, 12:51:20 PM by Ivanov »
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: Multilanguage site: submenu dissapears after search #SOLVED#
« Reply #32 on: September 11, 2010, 05:30:39 PM »
looks neat, maybe to include in core ?

cheers
Logged
Web developer

mr-fan

  • Guest
Re: Multilanguage site: submenu dissapears after search
« Reply #33 on: October 19, 2010, 07:49:07 PM »
Quote from: Boudi on April 18, 2008, 10:12:34 AM
When you do a search, the menu is dissapearing.  :|

When you want I can pm you the logindata?

hi boudi,

was there a solution for this....i've got the same issue on a multilanguage site with more than one menu....

kind regards
martin
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: Multilanguage site: submenu dissapears after search #SOLVED#
« Reply #34 on: November 16, 2010, 09:20:52 PM »
I have the same issue here, using SM2 on wb.281..

I tried solutions from all posts here but still no solution...damn...
Logged
Web developer

  • Print
Pages: 1 [2]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Multilanguage site: submenu dissapears after search #SOLVED#
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2