Advertisement:

Author Topic: MessagePreviewOnMouseOver  (Read 180264 times)

Offline unrelenting

  • Full Member
  • ***
  • Posts: 526
Re: MessagePreviewOnMouseOver
« Reply #40 on: November 12, 2006, 10:36:59 AM »
@unrelenting

give this one a try...

-Snork13

Thanks, Snork!! It works just as it should with no errors but I did get a couple of errors to show up in the error log while installing. It's something with the filename or path, I guess.

512: parseModification(): The filename 'Themes/classic/MessageIndex.template.php' is not a full path!
File: /hermes/web09/b2721/username/htdocs/myboard/Sources/Subs-Package.php
Line: 1330

Offline Sonic_Reducer

  • Newbie
  • *
  • Posts: 6
Re: MessagePreviewOnMouseOver
« Reply #41 on: November 15, 2006, 04:56:06 PM »
I have this installed on 1.1 RC3 and it's only working when I show unread posts, nowhere else.  I'm using the Alien Nation Theme.  Any ideas where to look to fix it?

Offline snork13

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,305
  • Gender: Male
  • so little time
    • simplemachines.org
Re: MessagePreviewOnMouseOver
« Reply #42 on: November 15, 2006, 06:20:30 PM »
I have this installed on 1.1 RC3 and it's only working when I show unread posts, nowhere else.  I'm using the Alien Nation Theme.  Any ideas where to look to fix it?

It only installs for the default and now classic themes. I don't know that theme, but if a file isn't include in a custom theme then smf uses to the default theme file.

http://docs.simplemachines.org/index.php?topic=402
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

Offline choloman05

  • Full Member
  • ***
  • Posts: 620
  • Gender: Male
    • Competition Web Marketing
Re: MessagePreviewOnMouseOver
« Reply #43 on: November 15, 2006, 06:43:33 PM »
Open up MessageIndex.php and search for
Code: [Select]
LEFT(mf.body, 384) AS firstBody
Change 384 to a number.

Then search for
Code: [Select]
if ($smfFunc['strlen']($row['firstBody']) > 128)
$row['firstBody'] = $smfFunc['substr']($row['firstBody'], 0, 128) . '...';
and change 128 to a number.

Warning: Increasing this number decreases performance for the query. I don't recommend you do so.

thanks, but I couldn't find any of that code.  ???

Anyone else not find this? Or am I retarded?

Offline Sonic_Reducer

  • Newbie
  • *
  • Posts: 6
Re: MessagePreviewOnMouseOver
« Reply #44 on: November 15, 2006, 07:11:37 PM »
I have this installed on 1.1 RC3 and it's only working when I show unread posts, nowhere else.  I'm using the Alien Nation Theme.  Any ideas where to look to fix it?

It only installs for the default and now classic themes. I don't know that theme, but if a file isn't include in a custom theme then smf uses to the default theme file.

http://docs.simplemachines.org/index.php?topic=402

So whic files could be missing?

Offline junglecat

  • Full Member
  • ***
  • Posts: 439
  • Gender: Female
  • Geek Wannabe
Re: MessagePreviewOnMouseOver
« Reply #45 on: November 23, 2006, 10:23:07 PM »
I was wondering if someone would be so kind as to post the -exact- changes that are made to the code in the MessageIndex.php file, so I could apply the same changes to the same MessageIndex.php file for the theme babylon? I'm asking the same question with a few other mods that work only with the default theme.

Same here. I'm not using the default theme, and I'm getting a bit confused.

Here is my MessageIndex.template.php if anyone can help?


Code: [Select]
<?php
// Version: 1.1 RC3; MessageIndex

function template_main()
{
global $context$settings$options$scripturl$modSettings$txt;

echo '
<table width="100%" cellpadding="3" cellspacing="0">
<tr>
<td><a name="top"></a>'
theme_linktree(), '</td>';
if (!empty($settings['display_who_viewing']))
{
echo '
<td class="smalltext" align="right">'
;
if ($settings['display_who_viewing'] == 1)
echo count($context['view_members']), ' 'count($context['view_members']) == $txt['who_member'] : $txt[19];
else
echo empty($context['view_members_list']) ? '0 ' $txt[19] : implode(', '$context['view_members_list']) . ((empty($context['view_num_hidden']) or $context['can_moderate_forum']) ? '' ' (+ ' $context['view_num_hidden'] . ' ' $txt['hidden'] . ')');
echo $txt['who_and'], $context['view_num_guests'], ' '$context['view_num_guests'] == $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], '</td>';
}
echo '
</tr>
</table>'
;

if (isset($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0))
{
echo '
<div class="tborder" style="padding: 1px; margin-bottom: 2ex;"><table border="0" width="100%" cellspacing="1" cellpadding="5">
<tr class="titlebg">
<td colspan="4">'
$txt['parent_boards'], '</td>
</tr>'
;
foreach ($context['boards'] as $board)
{
echo '
<tr class="windowbg2">
<td class="windowbg" width="6%" align="center" valign="top"><a href="'
$scripturl'?action=unread;board='$board['id'], '.0">';

// Is this board itself new?
if ($board['new'])
echo '<img src="'$settings['images_url'], '/on.gif" alt="'$txt[333], '" title="'$txt[333], '" border="0" />';
// Is one of this board's children new, then?
elseif ($board['children_new'])
echo '<img src="'$settings['images_url'], '/on2.gif" alt="'$txt[333], '" title="'$txt[333], '" border="0" />';
// I guess it's not new at all.
else
echo '<img src="'$settings['images_url'], '/off.gif" alt="'$txt[334], '" title="'$txt[334], '" border="0" />';

echo '</a></td>
<td align="left">
<b><a href="'
$board['href'], '" name="b'$board['id'], '">'$board['name'], '</a></b><br />
'
$board['description'];

if (!empty($board['moderators']))
echo '
<div style="padding-top: 1px;" class="smalltext"><i>'
count($board['moderators']) == $txt[298] : $txt[299], ': 'implode(', '$board['link_moderators']), '</i></div>';

if (!empty($board['children']))
{
$children = array();
foreach ($board['children'] as $child)
{
$child['link'] = '<a href="' $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' $txt[330] . ': ' $child['topics'] . ', ' $txt[21] . ': ' $child['posts'] . ')">' $child['name'] . '</a>';
$children[] = $child['new'] ? '<b>' $child['link'] . '</b>' $child['link'];
}

echo '
<div style="padding-top: 1px;" class="smalltext"><i>'
$txt['parent_boards'], ': 'implode(', '$children), '</i></div>';
}

echo '
</td>
<td class="windowbg" valign="middle" align="center" style="width: 12ex;"><span class="smalltext">
'
$board['posts'], ' '$txt[21], ' '$txt['smf88'], '<br />
'
$board['topics'], ' '$txt[330], '
</span></td>
<td class="smalltext" valign="middle" width="22%">'
;

if (!empty($board['last_post']['id']))
echo '
'
$txt[22], ' '$txt[30], ' '$board['last_post']['time'], '<br />
'
$txt['smf88'], ' '$board['last_post']['link'], ' '$txt[525], ' '$board['last_post']['member']['link'];

echo '
</td>
</tr>'
;
}
echo '
</table></div>'
;
}

if (!empty($options['show_board_desc']) && $context['description'] != '')
{
echo '
<table width="100%" cellpadding="6" cellspacing="0" border="0" class="tborder" style="margin-bottom: 1ex;">
<tr>
<td class="catbg" width="100%" height="24">
<span class="smalltext">'
$context['description'], '</span>
</td>
</tr>
</table>'
;
}

if (!$context['no_topic_listing'])
{
echo '
<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="margin-bottom: 1ex;">
<tr>
<td class="catbg" height="30">
<table cellpadding="3" cellspacing="0" width="100%">
<tr>
<td><b>'
$txt[139], ':</b> '$context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '<a href="#bot">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/go_down.gif" alt="' $txt['topbottom5'] . '" border="0" align="top" />' $txt['topbottom5']) . '</a>' '''</td>
<td align="'
, !$context['right_to_left'] ? 'right' 'left''" nowrap="nowrap" style="font-size: smaller;">'theme_show_buttons(), '</td>
</tr>
</table>
</td>
</tr>
</table>'
;

// If Quick Moderation is enabled start the form.
if (!empty($options['display_quick_mod']) && !empty($context['topics']))
echo '
<form action="'
$scripturl'?action=quickmod;board='$context['current_board'], '.'$context['start'], '" method="post" accept-charset="'$context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">';

echo '
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
<tr class="titlebg">'
;

// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<td width="9%" colspan="2"></td>
<td><a href="'
$scripturl'?board='$context['current_board'], '.'$context['start'], ';sort=subject'$context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ';desc' '''">'$txt[70], $context['sort_by'] == 'subject' ' <img src="' $settings['images_url'] . '/sort_' $context['sort_direction'] . '.gif" alt="" border="0" />' '''</a></td>
<td width="14%"><a href="'
$scripturl'?board='$context['current_board'], '.'$context['start'], ';sort=starter'$context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ';desc' '''">'$txt[109], $context['sort_by'] == 'starter' ' <img src="' $settings['images_url'] . '/sort_' $context['sort_direction'] . '.gif" alt="" border="0" />' '''</a></td>
<td width="4%" align="center"><a href="'
$scripturl'?board='$context['current_board'], '.'$context['start'], ';sort=replies'$context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ';desc' '''">'$txt[110], $context['sort_by'] == 'replies' ' <img src="' $settings['images_url'] . '/sort_' $context['sort_direction'] . '.gif" alt="" border="0" />' '''</a></td>
<td width="4%" align="center"><a href="'
$scripturl'?board='$context['current_board'], '.'$context['start'], ';sort=views'$context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ';desc' '''">'$txt[301], $context['sort_by'] == 'views' ' <img src="' $settings['images_url'] . '/sort_' $context['sort_direction'] . '.gif" alt="" border="0" />' '''</a></td>
<td width="24%"><a href="'
$scripturl'?board='$context['current_board'], '.'$context['start'], ';sort=last_post'$context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ';desc' '''">'$txt[111], $context['sort_by'] == 'last_post' ' <img src="' $settings['images_url'] . '/sort_' $context['sort_direction'] . '.gif" alt="" border="0" />' '''</a></td>';

// Show a "select all" box for quick moderation?
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
echo '
<td width="24" valign="middle" align="center">
<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="check" />
</td>'
;
// If it's on in "image" mode, don't show anything but the column.
elseif (!empty($options['display_quick_mod']))
echo '
<td width="4%" valign="middle" align="center"></td>'
;
}
// No topics.... just say, "sorry bub".
else
echo '
<td width="100%" colspan="7"><b>'
$txt[151], '</b></td>';

echo '
</tr>'
;

foreach ($context['topics'] as $topic)
{
echo '
                                <tr>
                                        <td class="windowbg2" valign="middle" align="center" width="5%">
                                                <img src="'
$settings['images_url'], '/topic/'$topic['class'], '.gif" alt="" />
                                        </td>
                                        <td class="windowbg2" valign="middle" align="center" width="4%">
<img src="'
$topic['first_post']['icon_url'], '" alt="" />
                                        </td>
                                        <td class="windowbg" valign="middle">
                                                '
$topic['first_post']['link'];

                
// Is this topic new? (assuming they are logged in!)
                
if ($topic['new'] && $context['user']['is_logged'])
                        echo 
'
<a href="'
$topic['new_href'], '"><img src="'$settings['images_url'], '/'$context['user']['language'], '/new.gif" alt="'$txt[302], '" border="0" /></a>';

                echo 
'
                                                <span class="smalltext">'
$topic['pages'], '</span>
                                        </td>
                                        <td class="windowbg2" valign="middle" width="14%">
                                                '
$topic['first_post']['member']['link'], '
                                        </td>
                                        <td class="windowbg" valign="middle" width="4%" align="center">
                                                '
$topic['replies'], '
                                        </td>
                                        <td class="windowbg" valign="middle" width="4%" align="center">
                                                '
$topic['views'], '
                                        </td>
<td class="windowbg2" valign="middle" width="22%">
<a href="'
$topic['last_post']['href'], '"><img src="'$settings['images_url'], '/icons/last_post.gif" alt="'$txt[111], '" title="'$txt[111], '" border="0" style="float: right;" /></a>
<span class="smalltext">
'
$topic['last_post']['time'], '<br />
'
$txt[525], ' '$topic['last_post']['member']['link'], '
</span>
</td>'
;

// Show the quick moderation options?
if (!empty($options['display_quick_mod']))
{
echo '
<td class="windowbg" valign="middle" align="center" width="4%">'
;
if ($options['display_quick_mod'] == 1)
echo '
<input type="checkbox" name="topics[]" value="'
$topic['id'], '" class="check" />';
else
{
// Check permissions on each and show only the ones they are allowed to use.
if ($topic['quick_mod']['remove'])
echo '<a href="'$scripturl'?action=quickmod;board='$context['current_board'], '.'$context['start'], ';actions['$topic['id'], ']=remove;sesc='$context['session_id'], '" onclick="return confirm(\''$txt['quickmod_confirm'], '\');"><img src="'$settings['images_url'], '/icons/quick_remove.gif" width="16" alt="'$txt[63], '" title="'$txt[63], '" border="0" /></a>';
if ($topic['quick_mod']['lock'])
echo '<a href="'$scripturl'?action=quickmod;board='$context['current_board'], '.'$context['start'], ';actions['$topic['id'], ']=lock;sesc='$context['session_id'], '" onclick="return confirm(\''$txt['quickmod_confirm'], '\');"><img src="'$settings['images_url'], '/icons/quick_lock.gif" width="16" alt="'$txt['smf279'], '" title="'$txt['smf279'], '" border="0" /></a>';
if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove'])
echo '<br />';
if ($topic['quick_mod']['sticky'])
echo '<a href="'$scripturl'?action=quickmod;board='$context['current_board'], '.'$context['start'], ';actions['$topic['id'], ']=sticky;sesc='$context['session_id'], '" onclick="return confirm(\''$txt['quickmod_confirm'], '\');"><img src="'$settings['images_url'], '/icons/quick_sticky.gif" width="16" alt="'$txt['smf277'], '" title="'$txt['smf277'], '" border="0" /></a>';
if ($topic['quick_mod']['move'])
echo '<a href="'$scripturl'?action=movetopic;board='$context['current_board'], '.'$context['start'], ';topic='$topic['id'], '.0"><img src="'$settings['images_url'], '/icons/quick_move.gif" width="16" alt="'$txt[132], '" title="'$txt[132], '" border="0" /></a>';
}
echo '</td>';
}
echo '
</tr>'
;
}

if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == && !empty($context['topics']))
{
echo '
<tr class="titlebg">
<td colspan="8" align="right">
<select name="qaction"'
$context['can_move'] ? ' onchange="this.form.moveItTo.disabled = (this.options[this.selectedIndex].value != \'move\');"' '''>
<option value="">--------</option>
'
$context['can_remove'] ? '<option value="remove">' $txt['quick_mod_remove'] . '</option>' '''
'
$context['can_lock'] ? '<option value="lock">' $txt['quick_mod_lock'] . '</option>' '''
'
$context['can_sticky'] ? '<option value="sticky">' $txt['quick_mod_sticky'] . '</option>' '''
'
$context['can_move'] ? '<option value="move">' $txt['quick_mod_move'] . ': </option>' '''
'
$context['can_merge'] ? '<option value="merge">' $txt['quick_mod_merge'] . '</option>' '''
<option value="markread">'
$txt['quick_mod_markread'], '</option>
</select>'
;

if ($context['can_move'])
{
echo '
<select id="moveItTo" name="move_to" disabled="disabled">'
;
foreach ($context['jump_to'] as $category)
foreach ($category['boards'] as $board)
{
if (!$board['is_current'])
echo '
<option value="'
$board['id'], '"', !empty($board['selected']) ? ' selected="selected"' '''>'str_repeat('-'$board['child_level'] + 1), ' '$board['name'], '</option>';
}
echo '
</select>'
;
}

echo '
<input type="submit" value="'
$txt['quick_mod_go'], '" onclick="return this.form.qaction.value != \'\' &amp;&amp; confirm(\''$txt['quickmod_confirm'], '\');" />
</td>
</tr>'
;
}

echo '
</table>'
;

// Finish off the form - again, if Quick Moderation is being done with checkboxes. (1)
if (!empty($options['display_quick_mod']) && !empty($context['topics']))
echo '
<input type="hidden" name="sc" value="' 
$context['session_id'] . '" />
</form>'
;

echo '
<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="margin-top: 1ex;">
<tr>
<td class="catbg" width="100%" height="30">
<table cellpadding="3" cellspacing="0" width="100%">
<tr>
<td><a name="bot"></a><b>'
$txt[139], ':</b> '$context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '<a href="#top">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/go_up.gif" alt="' $txt['topbottom4'] . '" border="0" align="top" />' $txt['topbottom4']) . '</a>' '''</td>
<td align="'
, !$context['right_to_left'] ? 'right' 'left''" nowrap="nowrap" style="font-size: smaller;">'theme_show_buttons(), '</td>
</tr>
</table>
</td>
</tr>
</table>'
;
}

echo '
<table cellpadding="0" cellspacing="0" width="100%">'
;

// Show breadcrumbs at the bottom too?
if ($settings['linktree_inline'])
echo '
<tr>
<td colspan="3" valign="bottom">'
theme_linktree(), '<br /><br /></td>
</tr>'
;

echo '
<tr>'
;

if (!$context['no_topic_listing'])
echo '
<td class="smalltext" style="padding-top: 1ex;">'
, !empty($modSettings['enableParticipation']) ? '
<img src="' 
$settings['images_url'] . '/topic/my_normal_post.gif" alt="" align="middle" /> ' $txt['participation_caption'] . '<br />' '''
<img src="' 
$settings['images_url'] . '/topic/normal_post.gif" alt="" align="middle" /> ' $txt[457] . '<br />
<img src="' 
$settings['images_url'] . '/topic/hot_post.gif" alt="" align="middle" /> ' $txt[454] . '<br />
<img src="' 
$settings['images_url'] . '/topic/veryhot_post.gif" alt="" align="middle" /> ' $txt[455] . '
</td>
<td class="smalltext" valign="top" style="padding-top: 1ex;">
<img src="' 
$settings['images_url'] . '/topic/normal_post_locked.gif" alt="" align="middle" /> ' $txt[456] . '<br />' . ($modSettings['enableStickyTopics'] == '1' '
<img src="' 
$settings['images_url'] . '/topic/normal_post_sticky.gif" alt="" align="middle" /> ' $txt['smf96'] . '<br />' '') . ($modSettings['pollMode'] == '1' '
<img src="' 
$settings['images_url'] . '/topic/normal_poll.gif" alt="" align="middle" /> ' $txt['smf43'] : '') . '
</td>'
;

echo '
<td class="smalltext" align="'
, !$context['right_to_left'] ? 'right' 'left''" valign="middle">
<form action="'
$scripturl'" method="get" accept-charset="'$context['character_set'], '">
<label for="jumpto">' 
$txt[160] . '</label>:
<select name="jumpto" id="jumpto" onchange="if (this.selectedIndex > 0 &amp;&amp; this.options[this.selectedIndex].value) window.location.href = smf_scripturl + this.options[this.selectedIndex].value.substr(smf_scripturl.indexOf(\'?\') == -1 || this.options[this.selectedIndex].value.substr(0, 1) != \'?\' ? 0 : 1);">
<option value="">' 
$txt[251] . ':</option>';

// Show each category - they all have an id, name, and the boards in them.
foreach ($context['jump_to'] as $category)
{
// Show the category name with a link to the category. (index.php#id)
echo '
<option value="" disabled="disabled">-----------------------------</option>
<option value="#'
$category['id'], '">'$category['name'], '</option>
<option value="" disabled="disabled">-----------------------------</option>'
;

/* Now go through each board - they all have:
id, name, child_level (how many parents they have, basically...), and is_current. (is this the current board?) */
foreach ($category['boards'] as $board)
{
// Show some more =='s if this is a child, so as to make it look nice.
echo '
<option value="?board='
$board['id'], '.0"'$board['is_current'] ? ' selected="selected"' '''> 'str_repeat('=='$board['child_level']), '=> '$board['name'], '</option>';
}
}

echo '
</select>&nbsp;
<input type="button" value="'
$txt[161], '" onclick="if (this.form.jumpto.options[this.form.jumpto.selectedIndex].value) window.location.href = \''$scripturl'\' + this.form.jumpto.options[this.form.jumpto.selectedIndex].value;" />
</form>
</td>
</tr>
</table>'
;

// Javascript for inline editing.
echo '
<script language="JavaScript" type="text/javascript" src="' 
$settings['default_theme_url'] . '/xml_board.js"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

// Hide certain bits during topic edit.
hide_prefixes.push("pages", "newicon");

// Use it to detect when we\'ve stopped editing.
document.onmousedown = mouse_down;

var mouse_on_div;
function mouse_down(e)
{
if (in_edit_mode == 1 && mouse_on_div == 0)
modify_topic_save("'
$context['session_id'], '");
}

// For templating, shown when an inline edit is made.
function modify_topic_show_edit(subject)
{
// Just template the subject.
setInnerHTML(cur_subject_div, \'<input type="text" name="subject" value="\' + subject + \'" size="60" style="width: 99%;"  maxlength="80" /><input type="hidden" name="topic" value="\' + cur_topic_id + \'" /><input type="hidden" name="msg" value="\' + cur_msg_id.substr(4) + \'" />\');
}

// And the reverse for hiding it.
function modify_topic_hide_edit(subject)
{
// Re-template the subject!
setInnerHTML(cur_subject_div, \'<a href="'
$scripturl'?topic=\' + cur_topic_id + \'.0">\' + subject + \'</a>\');
}
// ]]></script>'
;

}

function 
theme_show_buttons()
{
        global 
$context$settings$options$txt$scripturl;

        
$buttonArray = array();

        
// If they are logged in, and the mark read buttons are enabled..
        
if ($context['user']['is_logged'] && $settings['show_mark_read']){
                echo 
'<table cellpadding="0" cellspacing="0" border="0"><tr><td width="99%"> </td><td nowrap="nowrap" style="border-left: solid 1px #000000; border-right: solid 1px #000000;">';
                echo 
'<a href="' $scripturl '?action=markasread;sa=board;board=' $context['current_board'] . '.0;sesc=' $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img style="margin: 0px;" src="' $settings['images_url'] . '/' $context['user']['language'] . '/markread.gif" alt="' $txt[300] . '" border="0" />' $txt[300]) . '</a>';

         }
        
// If the user has permission to show the notification button... ask them if they're sure, though.
        
if ($context['can_mark_notify'])
                echo 
'<a href="' $scripturl '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' 'on') . ';board=' $context['current_board'] . '.' $context['start'] . ';sesc=' $context['session_id'] . '" onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');">' . ($settings['use_image_buttons'] ? '<img  style="margin: 0px;" src="' $settings['images_url'] . '/' $context['user']['language'] . '/notify.gif" alt="' $txt[131] . '" border="0" />' $txt[131]) . '</a>';

        
// Are they allowed to post new topics?
        
if ($context['can_post_new'])
                echo 
'<a href="' $scripturl '?action=post;board=' $context['current_board'] . '.0">' . ($settings['use_image_buttons'] ? '<img style="margin: 0px;" src="' $settings['images_url'] . '/' $context['user']['language'] . '/new_topic.gif" alt="' $txt[33] . '" border="0" />' $txt[33]) . '</a>';

        
// How about new polls, can the user post those?
        
if ($context['can_post_poll'])
                echo 
'<a href="' $scripturl '?action=post;board=' $context['current_board'] . '.0;poll">' . ($settings['use_image_buttons'] ? '<img style="margin: 0px;" src="' $settings['images_url'] . '/' $context['user']['language'] . '/new_poll.gif" alt="' $txt['smf20'] . '" border="0" />' $txt['smf20']) . '</a>';
        echo 
'</td></tr></table>';

        return;
}

?>

PM me for affordable hosting. I will install your SMF forum with your choice of a theme for FREE.
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
Join us at Christian Discussions 
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~

Offline Greek

  • Full Member
  • ***
  • Posts: 493
  • Gender: Male
    • Πάρε-Δώσε - Αντικαρκινικό Forum
Re: MessagePreviewOnMouseOver
« Reply #46 on: November 30, 2006, 10:16:04 AM »
What about for Babylon theme?
Does anybody knows what have i do to make it work?
Thanks

Offline Fatherguido

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
    • SportzMania,LLC
Re: MessagePreviewOnMouseOver
« Reply #47 on: November 30, 2006, 10:47:32 AM »
Open up MessageIndex.php and search for
Code: [Select]
LEFT(mf.body, 384) AS firstBody
Change 384 to a number.

Then search for
Code: [Select]
if ($smfFunc['strlen']($row['firstBody']) > 128)
$row['firstBody'] = $smfFunc['substr']($row['firstBody'], 0, 128) . '...';
and change 128 to a number.

Warning: Increasing this number decreases performance for the query. I don't recommend you do so.

thanks, but I couldn't find any of that code.  ???

Anyone else not find this? Or am I retarded?
Are you looking in Messageindex.php (located in your sources folder) or are you looking in the template file? -- you should be in the sources folder

Offline choloman05

  • Full Member
  • ***
  • Posts: 620
  • Gender: Male
    • Competition Web Marketing
Re: MessagePreviewOnMouseOver
« Reply #48 on: November 30, 2006, 05:51:33 PM »
I think I was in the template file. I'll check the sources folder when I get back home. Thanks alot. (ps.-nice sigs. Do you make these?)

Offline Fatherguido

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
    • SportzMania,LLC
Re: MessagePreviewOnMouseOver
« Reply #49 on: November 30, 2006, 05:57:31 PM »
I think I was in the template file. I'll check the sources folder when I get back home. Thanks alot. (ps.-nice sigs. Do you make these?)
your welcome - thanks and yes, I did make those

Offline snork13

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,305
  • Gender: Male
  • so little time
    • simplemachines.org
Re: MessagePreviewOnMouseOver
« Reply #50 on: November 30, 2006, 09:35:27 PM »
I think I was in the template file. I'll check the sources folder when I get back home. Thanks alot. (ps.-nice sigs. Do you make these?)
your welcome - thanks and yes, I did make those

those are some nice sigs, personally I'm a Bears Fan :D

-Snork13
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

Offline choloman05

  • Full Member
  • ***
  • Posts: 620
  • Gender: Male
    • Competition Web Marketing
Re: MessagePreviewOnMouseOver
« Reply #51 on: January 06, 2007, 03:27:24 PM »
looking forward to 1.1.1 !

Offline lordevil

  • Jr. Member
  • **
  • Posts: 121
Re: MessagePreviewOnMouseOver
« Reply #52 on: January 10, 2007, 10:39:36 PM »
I am using default theme. I want to use the preview text thing you built. When I unzipped it I got two files Modification and package info. It looks as if Modification has all the code in it so I guess this is the one we suppose to use. Which template do I open up and where exactly does it go? Much appreciated

Offline AlbertA

  • Newbie
  • *
  • Posts: 6
Re: MessagePreviewOnMouseOver
« Reply #53 on: January 10, 2007, 11:06:41 PM »
Just use the package manager in SMF.

Offline lordevil

  • Jr. Member
  • **
  • Posts: 121
Re: MessagePreviewOnMouseOver
« Reply #54 on: January 10, 2007, 11:28:16 PM »
Did that but I got a lot of red failures :(

Offline lordevil

  • Jr. Member
  • **
  • Posts: 121
Re: MessagePreviewOnMouseOver
« Reply #55 on: January 10, 2007, 11:32:42 PM »
Open up MessageIndex.php and search for
Code: [Select]
LEFT(mf.body, 384) AS firstBody
Change 384 to a number.

Then search for
Code: [Select]
if ($smfFunc['strlen']($row['firstBody']) > 128)
$row['firstBody'] = $smfFunc['substr']($row['firstBody'], 0, 128) . '...';
and change 128 to a number.

Warning: Increasing this number decreases performance for the query. I don't recommend you do so.

thanks, but I couldn't find any of that code.  ???

Anyone else not find this? Or am I retarded?
Are you looking in Messageindex.php (located in your sources folder) or are you looking in the template file? -- you should be in the sources folder
I found this what number should I change this too or does it really matter?

Offline unrelenting

  • Full Member
  • ***
  • Posts: 526
Re: MessagePreviewOnMouseOver
« Reply #56 on: January 11, 2007, 08:56:53 PM »
That's just for changing the number of characters in the preview. No need to mess with that.

Be sure to make a backup of that file before you start editing just in case you need to go back to it.

Open your messageindex.template.php in the default folder.

Basically, you find this:

Code: [Select]
echo '
', $topic['is_sticky'] ? '<b>' : '' , '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span>', $topic['is_sticky'] ? '</b>' : '';]]>

and replace that with this:

Code: [Select]
echo '
', $topic['is_sticky'] ? '<b>' : '' , '<span title="', $topic['first_post']['preview'], '"><span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span></span>', $topic['is_sticky'] ? '</b>' : '';

The other edits are for classic theme and for creating the hover over your recent posts page.

Offline geezmo

  • Full Member
  • ***
  • Posts: 439
Re: MessagePreviewOnMouseOver
« Reply #57 on: January 17, 2007, 04:03:14 AM »
I'm using this for 1.1.1 but there are some errors. Sometimes the message preview appears inline, that is, the text preview is actually written beside the topic of the thread, it's not shown anymore when the mouse hovers over the title.

Anyone experiencing the same? How to solve this?

Offline snork13

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,305
  • Gender: Male
  • so little time
    • simplemachines.org
Re: MessagePreviewOnMouseOver
« Reply #58 on: January 17, 2007, 11:27:27 AM »
I'm using this for 1.1.1 but there are some errors. Sometimes the message preview appears inline, that is, the text preview is actually written beside the topic of the thread, it's not shown anymore when the mouse hovers over the title.

Anyone experiencing the same? How to solve this?
i do have an inline version, please check the mod. I would uninstall and try again with a freshly downloaded version.
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

Offline geezmo

  • Full Member
  • ***
  • Posts: 439
Re: MessagePreviewOnMouseOver
« Reply #59 on: January 18, 2007, 02:09:30 AM »
Thanks snork. But I think having the preview inline clutters my board because of too many text that's why I prefer the preview on mouse over.

I hope someone can address my previous prob regarding some preview appearing as an inline text and not when the mouse hovers.