tnd1000 Posted April 24, 2012 Share Posted April 24, 2012 I am using SocialEngine software. Out-of-the-box, it comes with a global search bar in the top right-hand corner of the screen. However, it doesn't come with a search button. It still works if you type in your search term and hit "Enter" on the keyboard, but not all of my users will know that trick. SocialEngine claims that they can't help me with this matter, and they don't supply a button out-of-the-box, which makes absolutely NO sense to me. I did find a dying support forum, where I managed to get an answer that told me to access the core folder 'menu-mini' to access a search button widget. I found the file 'Controller.php', but now I don't know what to do with the code, as the answer given to me was very vague. class Core_Widget_MenuMiniController extends Engine_Content_Widget_Abstract{ public function indexAction() { $this->view->viewer = $viewer = Engine_Api::_()->user()->getViewer(); $require_check = Engine_Api::_()->getApi('settings', 'core')->core_general_search; if(!$require_check){ if( $viewer->getIdentity()){ $this->view->search_check = true; } else{ $this->view->search_check = false; } } else $this->view->search_check = true; $this->view->navigation = $navigation = Engine_Api::_() ->getApi('menus', 'core') ->getNavigation('core_mini'); if( $viewer->getIdentity() ) { $this->view->notificationCount = Engine_Api::_()->getDbtable('notifications', 'activity')->hasNotifications($viewer); } $request = Zend_Controller_Front::getInstance()->getRequest(); $this->view->notificationOnly = $request->getParam('notificationOnly', false); $this->view->updateSettings = Engine_Api::_()->getApi('settings', 'core')->getSetting('core.general.notificationupdate'); }} Any tips or suggestions would be greatly appreciated. Link to comment Share on other sites More sharing options...
justsomeguy Posted April 24, 2012 Share Posted April 24, 2012 There's no code there that includes the markup for the search form, this is probably what leads to the markup: $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core') ->getNavigation('core_mini'); So you'll need to locate the Engine_Api class, check the "_" method inside to see what that returns, check the getApi method, and check the getNavigation method. One of those will probably load a template file that contains the markup for the search form where you can add the button to that. The markup may also be stored in the database, but one of those methods will be responsible for loading it. Link to comment Share on other sites More sharing options...
tnd1000 Posted April 24, 2012 Author Share Posted April 24, 2012 Thank you very much for the prompt reply! I will look into that. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.