News:

Wondering if this will always be free?  See why free is better.

Main Menu

Two questions: One how long is Forever and...

Started by Jazhawk, August 24, 2004, 12:39:46 AM

Previous topic - Next topic

Jazhawk

what is this error when I click search?

Undefined index: simpleSearch in /home/domainname/public_html/sweat/Sources/Load.php(1090) : eval()'d code on line 31

Now, In the interest of full disclosure, I see then when I have the template ChatBubbles loaded.

On the issue of "forever", I thought that if I entered another window like Yahoo email for instance and return, 10-15 minutes later, I'm logged out.

any ideas anyone?

-Jazhawk

Metho

The error is due to a file in the chat bubbles theme not being updated to RC1 standard.

- Methonis
Joshua "Methonis" Frazer
Support Specialist
The Simple Machines Team

kegobeer

In Search.template.php:

find
if ($context['simpleSearch'])

replace with
if ($context['simple_search'])

find
if (!empty($context['topics']))
{
echo '
<td width="4%">&nbsp;</td>
<td width="4%">&nbsp;</td>
<td width="56%"><a href="', $scripturl, '?action=search2;params=', $context['params'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[70], $context['sort_by'] == 'subject' ? '&nbsp;<img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
<td width="12%"><a href="', $scripturl, '?action=search2;params=', $context['params'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[109], $context['sort_by'] == 'starter' ? '&nbsp;<img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
<td width="6%" align="center"><a href="', $scripturl, '?action=search2;params=', $context['params'], ';sort=relevance', $context['sort_by'] == 'relevance' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['search_relevance'], $context['sort_by'] == 'relevance' ? '&nbsp;<img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
<td width="18%" align="center"><a href="', $scripturl, '?action=search2;params=', $context['params'], ';sort=date', $context['sort_by'] == 'date' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['search_date_posted'], $context['sort_by'] == 'date' ? '&nbsp;<img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>';
}
else
echo '
<td width="100%" colspan="5"><b>', $txt['search_no_results'], '</b></td>';
echo '
</tr>';


replace with
if (!empty($context['topics']))
{
echo '
<td width="4%"></td>
<td width="4%"></td>
<td width="56%">', $txt[70], '</td>
<td width="12%">', $txt[109], '</td>
<td width="6%" align="center">', $txt['search_relevance'], '</td>
<td width="18%" align="center">', $txt['search_date_posted'], '</td>';
}
else
echo '
<td width="100%" colspan="5"><b>', $txt['search_no_results'], '</b></td>';
echo '
</tr>';


find
$topic['date']

replace with
$topic['first_post']['time']
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

kegobeer

There's also modifications needed to get the sort options to display:

In Search.template.php:

find
    echo '
<input type="hidden" name="advanced" value="1" />
<table><tr>
<td>
<b>', $txt[582], ':</b>
</td>
<td>&nbsp;</td>
<td>
<b>', $txt[583], ':</b>
</td>
</tr><tr>
<td>
<input type="text" name="search"', !empty($context['search_params']['search']) ? ' value="' . $context['search_params']['search'] . '"' : '', ' size="37" />
</td><td>
<select name="searchtype">
<option value="1"', empty($context['search_params']['searchtype']) ? ' selected="selected"' : '', '>', $txt[343], '</option>
<option value="2"', !empty($context['search_params']['searchtype']) ? ' selected="selected"' : '', '>', $txt[344], '</option>
</select>&nbsp;&nbsp;&nbsp;
</td><td>
<input type="text" name="userspec" value="', empty($context['search_params']['userspec']) ? '*' : $context['search_params']['userspec'], '" size="37" />&nbsp;
</td>
</tr><tr>
<td colspan="3">&nbsp;</td>
</tr><tr>
<td colspan="2"><b>', $txt['search_options'], ':</b></td>
<td><b>', $txt['search_post_age'], ': </b></td>
</tr><tr>
<td colspan="2">
<input type="checkbox" name="show_complete" id="show_complete" value="1"', !empty($context['search_params']['show_complete']) ? ' checked="checked"' : '', ' class="check" /> <label for="show_complete">', $txt['search_show_complete_messages'], '</label>
</td>
<td>
', $txt['search_between'], '&nbsp;<input type="text" name="minage" value="', empty($context['search_params']['minage']) ? '0' : $context['search_params']['minage'], '" size="5" maxlength="5" />&nbsp;', $txt['search_and'], '&nbsp;<input type="text" name="maxage" value="', empty($context['search_params']['maxage']) ? '9999' : $context['search_params']['maxage'], '" size="5" maxlength="5" /> ', $txt[579], '.
</td>
</tr></table>
<br /><br />
<b>', $txt[189], ':</b><br /><br />
<table width="80%" border="0" cellpadding="1" cellspacing="0">';


replace with
echo '
<input type="hidden" name="advanced" value="1" />
<table cellpadding="1" cellspacing="3" border="0">
<tr>
<td>
<b>', $txt[582], ':</b>
</td>
<td></td>
<td>
<b>', $txt[583], ':</b>
</td>
</tr><tr>
<td>
<input type="text" name="search"', !empty($context['search_params']['search']) ? ' value="' . $context['search_params']['search'] . '"' : '', ' size="40" />
</td><td style="padding-right: 2ex;">
<select name="searchtype">
<option value="1"', empty($context['search_params']['searchtype']) ? ' selected="selected"' : '', '>', $txt[343], '</option>
<option value="2"', !empty($context['search_params']['searchtype']) ? ' selected="selected"' : '', '>', $txt[344], '</option>
</select>
</td><td>
<input type="text" name="userspec" value="', empty($context['search_params']['userspec']) ? '*' : $context['search_params']['userspec'], '" size="40" />
</td>
</tr><tr>
<td style="padding-top: 2ex;" colspan="2"><b>', $txt['search_options'], ':</b></td>
<td style="padding-top: 2ex;"><b>', $txt['search_post_age'], ': </b></td>
</tr><tr>
<td colspan="2">
<label for="show_complete"><input type="checkbox" name="show_complete" id="show_complete" value="1"', !empty($context['search_params']['show_complete']) ? ' checked="checked"' : '', ' class="check" /> ', $txt['search_show_complete_messages'], '</label><br />
<label for="subject_only"><input type="checkbox" name="subject_only" id="subject_only" value="1"', !empty($context['search_params']['subject_only']) ? ' checked="checked"' : '', ' class="check" /> ', $txt['search_subject_only'], '</label>
</td>
<td>
', $txt['search_between'], ' <input type="text" name="minage" value="', empty($context['search_params']['minage']) ? '0' : $context['search_params']['minage'], '" size="5" maxlength="5" />&nbsp;', $txt['search_and'], '&nbsp;<input type="text" name="maxage" value="', empty($context['search_params']['maxage']) ? '9999' : $context['search_params']['maxage'], '" size="5" maxlength="5" /> ', $txt[579], '.
</td>
</tr><tr>
<td style="padding-top: 2ex; colspan="2"><b>', $txt['search_order'], ':</b></td>
<td></td>
</tr><tr>
<td colspan="2">
<select name="sort">
<option value="relevance|desc">', $txt['search_orderby_relevant_first'], '</option>
<option value="numReplies|desc">', $txt['search_orderby_large_first'], '</option>
<option value="numReplies|asc">', $txt['search_orderby_small_first'], '</option>
<option value="ID_MSG|desc">', $txt['search_orderby_recent_first'], '</option>
<option value="ID_MSG|asc">', $txt['search_orderby_old_first'], '</option>
</select>
</td>
<td></td>
</tr>
</table>
<br />
<b>', $txt[189], ':</b><br />

<table width="80%" border="0" cellpadding="1" cellspacing="0">';
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

Jazhawk

Thanx Kegs.  I'll plug in this modifications and get back with this thread.

-Jazhawk

[Unknown]

Forever is a darn freaking long time.  But, it's not infinite.  I'd say... about... 4,294,967,295 seconds.

-[Unknown]

Jazhawk

Then I have a problem Unknown.   As I explained, if I leave the window for 10-15 minutes, it logs me out even though my login says forever. 

There are things about this system I'm not yet familier with as I am more accustomed to the way Yabb works.  So I have to ask a few dumb questions to get some answers as I continue to evaluate SMF.

-Jazhawk

Jazhawk

BTW Kegs,

You did it again. That seemed to fix the search window problem. The only problem I have now with the search is an error searching the database itself.  I'm assuming the permissions are correct but I can't get in.

my error...

Access denied for user: 'servername_ssocks@localhost' to database 'servername_ssocks'
File: /home/servername/public_html/sweat/Sources/Search.php
Line: 362


-Jazhawk

Christian Land

Quote from: Jazhawk on August 24, 2004, 04:35:49 AM
Access denied for user: 'servername_ssocks@localhost' to database 'servername_ssocks'
File: /home/servername/public_html/sweat/Sources/Search.php
Line: 362


Answered multiple times ::) your DB-User needs "CREATE TEMPORARY TABLE" permissions in MySQL

[Unknown]

Quote from: Jazhawk on August 24, 2004, 04:29:06 AM
Then I have a problem Unknown.   As I explained, if I leave the window for 10-15 minutes, it logs me out even though my login says forever.

This means you aren't having cookies set.  Can I see a phpinfo?

-[Unknown]

Jazhawk

#10
Quote from: [Unknown] on August 25, 2004, 01:08:57 AM
Quote from: Jazhawk on August 24, 2004, 04:29:06 AM
Then I have a problem Unknown.   As I explained, if I leave the window for 10-15 minutes, it logs me out even though my login says forever.

This means you aren't having cookies set.  Can I see a phpinfo?

-[Unknown]

I guess so.  Where do I find it?  My server settings say that cookies are set to be SMFCookie10.

-Jazhawk

Jazhawk

Hey Unknown, I think I figured it out.  And storage of cookies wasn't happening as it turns out.

-Jazhawk

Advertisement: