PDA

View Full Version : please, please help... probs implementing search on SiteGround j15-13


queep
03-05-2008, 04:46 PM
please please help us if you can.... we are desperate at this stage over something that should be pretty routine to sort out....

we've been trying to get a normal site search on our new joomla site www.queep.com

we've used the Siteground-j15-13 template (customised) and we think we have followed the normal instructions for implementing a general sitesearch but nothing is happening (tho the template is pulling in the header with the search visibility on it, but there is no field to input text)

in the module manager the search module is enabled in position user4 (for Public) and we have followed instructions from the 1 tutorial we could find online for adding search to joomla sites

could anyone help us by giving us a simple rundown on how to implement a search facility? maybe there is something we have missed!

or would anyone have any idea as to why this wont work? Should we need to change the CSS for this template or something like that to get it working? Or do we need to set up a menu to add the search? We've looked on SiteGround and theres no help for the templates unless you choose SG's hosting, so we are now totally lost

we would much prefer to use google site search with some adsense on it, and have also tried a few of those extensions out (from joomla.org) but after following instructions on those, we still cant get anything to happen, so we'd settle for a normal site search at this stage no probs!

apart from the search, everything else seems to be working fine

the site is live so we really need to sort this out asap, we'd really appreciate any help at all....
cheers, damien

queep
03-05-2008, 10:49 PM
problem sorted, cheers anyhows :)

Jang
03-06-2008, 12:47 AM
i'm having the same problems, could you please explain how you did it?

oh and also, on my site i have a vertical line that separates the articles on the front page here: http://inorth.co.cc i saw that your site didnt have that, so could you also tell me how you did that?

thanks in advance.

JoyMonkey
03-26-2008, 08:40 AM
This template is beautful (thanks SiteGround!), but I'm also having trouble figuring this out.

I've created a Search module and assigned it to module position User4, and it looks like its displaying okay, but the inputfield itself is not displaying.
What am I missing?

JoyMonkey
03-26-2008, 09:56 AM
Okay, I did a little investigating and here's what I think is going on...

Joomla 1.5 Stable introduced a change in how the Search Module is implemented. This template must have been tested with RC1 or RC2; the siteground-j15-13/html/mod_search/default.php file appears to be formatted similarly to the default.php in the RC1 and RC2 search module.

To get the Search box to work on 1.5 Stable (or later), the templates' html/mod_search/default.php file will need to be edited. I'm not sure exactly how to go about doing it but here's

Here's the default.php from the template...
<?php
defined('_JEXEC') or die('Restricted access');
echo '<div id="search_bg">';
echo '<div id="search">';
echo '<form action="index.php" method="post">';
echo '<div class="search">';
echo $inputfield;
echo '<input type="hidden" name="option" value="com_search" />';
echo '<input type="hidden" name="task" value="search" />';
echo '<input type="hidden" name="Itemid" value="' .( isset( $itemid ) ? $itemid : '' ). '" />';
echo '</div>';
echo '</form>';
echo '</div>';
echo '</div>';
?>


and here's the modules/mod_search/tmpl/default.php from Joomla 1.5.2...

<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<form action="index.php" method="post">
<div class="search<?php echo $params->get('moduleclass_sfx') ?>">
<?php
$output = '<input name="searchword" id="mod_search_searchword" maxlength="20" alt="'.$button_text.'" class="inputbox'.$moduleclass_sfx.'" type="text" size="'.$width.'" value="'.$text.'" onblur="if(this.value==\'\') this.value=\''.$text.'\';" onfocus="if(this.value==\''.$text.'\') this.value=\'\';" />';

if ($button) :
if ($imagebutton) :
$button = '<input type="image" value="'.$button_text.'" class="button'.$moduleclass_sfx.'" src="'.$img.'"/>';
else :
$button = '<input type="submit" value="'.$button_text.'" class="button'.$moduleclass_sfx.'"/>';
endif;
endif;

switch ($button_pos) :
case 'top' :
$button = $button.'<br/>';
$output = $button.$output;
break;

case 'bottom' :
$button = '<br/>'.$button;
$output = $output.$button;
break;

case 'right' :
$output = $output.$button;
break;

case 'left' :
default :
$output = $button.$output;
break;
endswitch;

echo $output;
?>
</div>
<input type="hidden" name="task" value="search" />
<input type="hidden" name="option" value="com_search" />
</form>


I've tried editing the template's default.php a little to get it to match Joomla's one a little better, but haven't ha any luck yet.

queep
03-26-2008, 09:59 AM
ok.... when we said we fixed it, that was obviously pre-mature!!

dont know what happened again, but it just stopped working again, so now we are left with just a button in a menu as search.... not the pretty little search box on each page (would have used a different template if i knew this would be the case)

are you siteground peeps not into sorting out these issues for us? been seeing notes like this all over the place regarding your searches!!!! lads, get ur fingers out!

JoyMonkey
03-26-2008, 10:06 AM
Okay, looks like I've got it *kind-of* working. You can enter a search but the button doesn't do anything; to submit the search input you've to press enter on your keyboard.

Try replacing the siteground-j15-13/html/mod_search/default.php file with this...


<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<div id="search_bg">
<div id="search">
<form action="index.php" method="post">
<div class="search<?php echo $params->get('moduleclass_sfx') ?>">
<?php
$output = '<input name="searchword" id="mod_search_searchword" maxlength="20" alt="'.$button_text.'" class="inputbox'.$moduleclass_sfx.'" type="text" size="'.$width.'" value="'.$text.'" onblur="if(this.value==\'\') this.value=\''.$text.'\';" onfocus="if(this.value==\''.$text.'\') this.value=\'\';" />';

if ($button) :
if ($imagebutton) :
$button = '<input type="image" value="'.$button_text.'" class="button'.$moduleclass_sfx.'" src="'.$img.'"/>';
else :
$button = '<input type="submit" value="'.$button_text.'" class="button'.$moduleclass_sfx.'"/>';
endif;
endif;

switch ($button_pos) :
case 'top' :
$button = $button.'<br/>';
$output = $button.$output;
break;

case 'bottom' :
$button = '<br/>'.$button;
$output = $output.$button;
break;

case 'right' :
$output = $output.$button;
break;

case 'left' :
default :
$output = $button.$output;
break;
endswitch;

echo $output;
?>
</div>
<input type="hidden" name="task" value="search" />
<input type="hidden" name="option" value="com_search" />
</form>
</div>
</div>

gandazgul
05-16-2008, 12:30 AM
This works perfectly, substitute default.php in mod_search for this. Enter works, button works, all settings everything, even the style. So try it out and let me know if it works for you!

www.sctree-it.com <-- come by and I'll be happy to help you.

This also applies to sg- joomla 1.5 (siteground.zip) and in this one I fixed the charts for the polls results... if you used something with ' like "It's ok" or "my name's gandazgul", it would get you and error message "Invalid XML data", well I modified the poll manager so it would scape the ' and now it works fine. I dont know if the fix will work with Siteground-j15-13 and if that one has the same problem but you can try.

I also modified one thing I didn't like in sg- joomla 1.5 (siteground.zip)... to be able to show the logo and the title at the same time... originally, when you selected to show the title on the top of the page, it didnt show the logo. This last modification I am still working on making the settings work, but it works fine with "summer" and showing, the logo, the title and the slogan.

if you think you need this fixes contact me in my page, I will post an article about it and the modified template in my site sometime this week.

<?php
defined('_JEXEC') or die('Restricted access');
?>

<div id="search">
<form action="index.php" method="post">
<div class='search'>

<?php
$output = '<input name="searchword" id="mod_search_searchword" maxlength="20" alt="'.$button_text.'" class="inputbox'.$moduleclass_sfx.'" type="text" size="'.$width.'" value="'.$text.'" onblur="if(this.value==\'\') this.value=\''.$text.'\';" onfocus="if(this.value==\''.$text.'\') this.value=\'\';" />';

if ($button) :
if ($imagebutton) :
$button = '<input type="image" value="'.$button_text.'" class="button'.$moduleclass_sfx.'" src="'.$img.'"/>';
else :
$button = '<input type="submit" value="'.$button_text.'" class="button'.$moduleclass_sfx.'"/>';
endif;
endif;

switch ($button_pos) :
case 'top' :
$button = $button.'<br/>';
$output = $button.$output;
break;

case 'bottom' :
$button = '<br/>'.$button;
$output = $output.$button;
break;

case 'right' :
$output = $output.$button;
break;

case 'left' :
default :
$output = $button.$output;
break;
endswitch;

echo $output;
?>
</div>
<input type="hidden" name="task" value="search" />
<input type="hidden" name="option" value="com_search" />
</form>
</div>

Vera
02-24-2009, 09:42 AM
I am new to joomla but was lucky to find this lovely template (j115-13) and have learnt most basics about joomla already.

I stumbled upon this same problem - search field does not work with this template.

Joymonkey's fix makes the field work almost: can input txt and search by hitting enter. But the button does not work.

gandazgul's fix did not work for me any better: the search field jumped too far right and lost its pretty graphics. I was able to input txt and search with enter as in the previous fix though.

So please, anyone can offer a fully working fix for this? I do not know the needed codes enough to be able to figure it out by myself unfortunately. :(

I would be very grateful. Thank you! :)

p.s. I am using Joomla version 1.5 with System Legacy on, cos this template wouldn't install otherwise, even though I dloaded this from under 1.5 templates. :P

yanislav
02-25-2009, 08:13 AM
It will be best to post a support ticket regarding this issue. This way we will be able to investigate the issue faster and better and we will also deploy the fix to the main template package.

Vera
02-25-2009, 10:30 AM
I am unable to login and post such ticket.. as this is about a free template. :/ Would be wonderful if it was indeed fixed to the main package.

Niko
02-25-2009, 11:27 AM
Hello Vera,

The template in question is indeed a free one, bit it has been developed by our designers and you can report such issues in the HelpDesk and request further assistance as explained in the following tutorial:

http://www.siteground.com/tutorials/getting_started/customers_post_ticket.htm

We have already reported the problem to our colleagues which are in charge of the templates' development. They will review the problem as soon as possible and in turn release the corrected version of the template in our Joomla Templates 1.5 download section:

http://www.siteground.com/joomla-hosting/joomla15-templates.htm