{"id":168,"date":"2009-06-23T01:04:14","date_gmt":"2009-06-22T23:04:14","guid":{"rendered":"http:\/\/kavdesign.net\/wordpress\/?p=168"},"modified":"2010-04-12T11:54:45","modified_gmt":"2010-04-12T09:54:45","slug":"hack-for-a-problem-with-the-search-module-in-joomla-1511%d1%85%d0%b0%d0%ba-%d0%b7%d0%b0-%d0%bc%d0%be%d0%b4%d1%83%d0%bb%d0%b0-%d0%b7%d0%b0-%d1%82%d1%8a%d1%80%d1%81%d0%b5%d0%bd%d0%b5-%d0%bd%d0%b0-joom","status":"publish","type":"post","link":"https:\/\/www.kavdesign.net\/blog\/coding\/hack-for-a-problem-with-the-search-module-in-joomla-1511%d1%85%d0%b0%d0%ba-%d0%b7%d0%b0-%d0%bc%d0%be%d0%b4%d1%83%d0%bb%d0%b0-%d0%b7%d0%b0-%d1%82%d1%8a%d1%80%d1%81%d0%b5%d0%bd%d0%b5-%d0%bd%d0%b0-joom\/","title":{"rendered":"Hack for a problem with the search module in Joomla 1.5.11"},"content":{"rendered":"<p><!--:bg-->If you don&#8217;t want all your search results to open on the front page of your website just use this hack. After it they will open on a separate page.<\/p>\n<p>Just open<strong> your-site\/components\/com_search\/controller.php<\/strong><\/p>\n<p><strong>Find this part:<\/strong><strong><strong><!--:--><!--more--><!--:bg--><\/strong><\/strong><\/p>\n<p>\/\/ No need to guess Itemid if it&#8217;s already present in the URL<br \/>\nif (JRequest::getInt(&#8216;Itemid&#8217;) &gt; 0) {<br \/>\n$post[&#8216;Itemid&#8217;] = JRequest::getInt(&#8216;Itemid&#8217;);<br \/>\n} else {<\/p>\n<p>\/\/ set Itemid id for links<br \/>\n$menu = &amp;JSite::getMenu();<br \/>\n$items\u00a0\u00a0\u00a0 = $menu-&gt;getItems(&#8216;link&#8217;, &#8216;index.php?option=com_search&amp;view=search&#8217;);<\/p>\n<p>if(isset($items[0])) {<br \/>\n$post[&#8216;Itemid&#8217;] = $items[0]-&gt;id;<br \/>\n}<\/p>\n<p>}<\/p>\n<p><strong>Change it to this:<\/strong><\/p>\n<p>\/\/ set Itemid id for links<br \/>\n$menu = &amp;JSite::getMenu();<br \/>\n$items\u00a0\u00a0\u00a0 = $menu-&gt;getItems(&#8216;link&#8217;, &#8216;index.php?option=com_search&amp;view=search&#8217;);<\/p>\n<p>if(isset($items[0])) {<br \/>\n$post[&#8216;Itemid&#8217;] = $items[0]-&gt;id;<br \/>\n}<\/p>\n<p><!--:--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you don&#8217;t want all your search results to open on the front page of your website just use this hack. After it they will<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/www.kavdesign.net\/blog\/coding\/hack-for-a-problem-with-the-search-module-in-joomla-1511%d1%85%d0%b0%d0%ba-%d0%b7%d0%b0-%d0%bc%d0%be%d0%b4%d1%83%d0%bb%d0%b0-%d0%b7%d0%b0-%d1%82%d1%8a%d1%80%d1%81%d0%b5%d0%bd%d0%b5-%d0%bd%d0%b0-joom\/\">Continue reading<span class=\"screen-reader-text\">Hack for a problem with the search module in Joomla 1.5.11<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[9,29],"tags":[39,40,37,38,36],"class_list":["post-168","post","type-post","status-publish","format-standard","hentry","category-coding","category-joomla","tag-hack","tag-joomla-1511","tag-module","tag-problem","tag-search","entry"],"_links":{"self":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts\/168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/comments?post=168"}],"version-history":[{"count":9,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts\/168\/revisions"}],"predecessor-version":[{"id":266,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts\/168\/revisions\/266"}],"wp:attachment":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/media?parent=168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/categories?post=168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/tags?post=168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}