Advertisement:

Author Topic: MessagePreviewOnMouseOver  (Read 180279 times)

Offline snork13

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,305
  • Gender: Male
  • so little time
    • simplemachines.org
MessagePreviewOnMouseOver
« on: February 03, 2006, 12:39:52 AM »
Link to Mod

This modification adds the preview of the first post within a topic. The admin has the ability to choose the length of the preview within the Admin section under Posts & Topics. Please note the message preview length by default is set to 0, which renders no preview.



Package has been updated to version 1.8
« Last Edit: June 15, 2011, 01:25:58 PM by 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 flapper

  • Jr. Member
  • **
  • Posts: 124
  • Gender: Male
Re: MessagePreviewOnMouseOver
« Reply #1 on: February 03, 2006, 10:22:52 AM »
Will this work on the Show unread posts since last visit (action=unread) page as well.

Offline houston

  • Jr. Member
  • **
  • Posts: 149
Re: MessagePreviewOnMouseOver
« Reply #2 on: February 03, 2006, 11:11:36 AM »
Thanks Works great.

Offline dtm.exe

  • SMF Hero
  • ******
  • Posts: 5,465
Re: MessagePreviewOnMouseOver
« Reply #3 on: February 03, 2006, 11:25:28 AM »
Great idea!  :)

Offline ArkServer

  • SMF Hero
  • ******
  • Posts: 1,831
  • My posts are my own
    • BlushyFace | A spoopy and creppy site
Re: MessagePreviewOnMouseOver
« Reply #4 on: February 03, 2006, 12:12:11 PM »
lovin it :)

Offline Gumbie

  • Semi-Newbie
  • *
  • Posts: 41
Re: MessagePreviewOnMouseOver
« Reply #5 on: February 03, 2006, 06:58:23 PM »
Cant get mine to work it comes up with a failure...

    Execute Modification     ./Themes/default/MessageIndex.template.php     Failure

Offline snork13

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,305
  • Gender: Male
  • so little time
    • simplemachines.org
Re: MessagePreviewOnMouseOver
« Reply #6 on: February 03, 2006, 10:02:20 PM »
Cant get mine to work it comes up with a failure...

    Execute Modification¬†    ./Themes/default/MessageIndex.template.php¬†    Failure

could you post you MessageIndex.template file? you have any other mods installed?
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 Gumbie

  • Semi-Newbie
  • *
  • Posts: 41
Re: MessagePreviewOnMouseOver
« Reply #7 on: February 10, 2006, 06:00:58 PM »
Code: [Select]
<?php
// Version: 1.0; MessageIndex

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

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

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

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

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

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

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

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

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

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

echo &#39;
</td>
</tr>&#39;;
}
echo &#39;
</table></div>&#39;;
}

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

// If Quick Moderation is enabled (and set to checkboxes - 1) start the form.
if (!empty($options[&#39;display_quick_mod&#39;]) && $options[&#39;display_quick_mod&#39;] == 1 && !empty($context[&#39;topics&#39;]))
echo &#39;
<form action="&#39;, $scripturl, &#39;?action=quickmod;board=&#39;, $context[&#39;current_board&#39;], &#39;.&#39;, $context[&#39;start&#39;], &#39;" method="post" name="topicForm" style="margin: 0;">&#39;;

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

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

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

echo &#39;
</tr>&#39;;

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

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

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

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

if (!empty($options[&#39;display_quick_mod&#39;]) && $options[&#39;display_quick_mod&#39;] == 1 && !empty($context[&#39;topics&#39;]))
{
echo &#39;
<tr class="titlebg">
<td colspan="8" align="right">
<select name="qaction"&#39;, $context[&#39;can_move&#39;] ? &#39; onchange="document.topicForm.moveItTo.disabled = (this.options[this.selectedIndex].value != \&#39;move\&#39;);"&#39; : &#39;&#39;, &#39;>
<option value="">--------</option>
&#39;, $context[&#39;can_remove&#39;] ? &#39;<option value="remove">&#39; . $txt[&#39;quick_mod_remove&#39;] . &#39;</option>&#39; : &#39;&#39;, &#39;
&#39;, $context[&#39;can_lock&#39;] ? &#39;<option value="lock">&#39; . $txt[&#39;quick_mod_lock&#39;] . &#39;</option>&#39; : &#39;&#39;, &#39;
&#39;, $context[&#39;can_sticky&#39;] ? &#39;<option value="sticky">&#39; . $txt[&#39;quick_mod_sticky&#39;] . &#39;</option>&#39; : &#39;&#39;, &#39;
&#39;, $context[&#39;can_move&#39;] ? &#39;<option value="move">&#39; . $txt[&#39;quick_mod_move&#39;] . &#39;: </option>&#39; : &#39;&#39;, &#39;
&#39;, $context[&#39;can_merge&#39;] ? &#39;<option value="merge">&#39; . $txt[&#39;quick_mod_merge&#39;] . &#39;</option>&#39; : &#39;&#39;, &#39;
</select>&#39;;
if ($context[&#39;can_move&#39;])
{
echo &#39;
<select id="moveItTo" name="move_to" disabled="disabled">&#39;;
foreach ($context[&#39;jump_to&#39;] as $category)
foreach ($category[&#39;boards&#39;] as $board)
{
if (!$board[&#39;is_current&#39;])
echo &#39;
<option value="&#39;, $board[&#39;id&#39;], &#39;"&#39;, !empty($board[&#39;selected&#39;]) ? &#39; selected="selected"&#39; : &#39;&#39;, &#39;>&#39;, str_repeat(&#39;-&#39;, $board[&#39;child_level&#39;] + 1), &#39; &#39;, $board[&#39;name&#39;], &#39;</option>&#39;;
}
echo &#39;
</select>&#39;;
}
echo &#39;
<input type="submit" value="&#39;, $txt[&#39;quick_mod_go&#39;], &#39;" onclick="return document.topicForm.qaction.value != \&#39;\&#39; &amp;&amp; confirm(\&#39;&#39;, $txt[&#39;quickmod_confirm&#39;], &#39;\&#39;);" />
</td>
</tr>&#39;;
}

echo &#39;
</table>&#39;;

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

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

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

echo &#39;
<tr>
<td class="smalltext" align="left" style="padding-top: 1ex;">&#39;, !empty($modSettings[&#39;enableParticipation&#39;]) ? &#39;
<img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/topic/my_normal_post.gif" alt="" align="middle" /> &#39; . $txt[&#39;participation_caption&#39;] . &#39;<br />&#39; : &#39;&#39;, &#39;
<img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/topic/normal_post.gif" alt="" align="middle" /> &#39; . $txt[457] . &#39;<br />
<img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/topic/hot_post.gif" alt="" align="middle" /> &#39; . $txt[454] . &#39;<br />
<img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/topic/veryhot_post.gif" alt="" align="middle" /> &#39; . $txt[455] . &#39;
</td>
<td class="smalltext" align="left" valign="top" style="padding-top: 1ex;">
<img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/topic/normal_post_locked.gif" alt="" align="middle" /> &#39; . $txt[456] . &#39;<br />&#39; . ($modSettings[&#39;enableStickyTopics&#39;] == &#39;1&#39; ? &#39;
<img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/topic/normal_post_sticky.gif" alt="" align="middle" /> &#39; . $txt[&#39;smf96&#39;] . &#39;<br />&#39; : &#39;&#39;) . ($modSettings[&#39;pollMode&#39;] == &#39;1&#39; ? &#39;
<img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/topic/normal_poll.gif" alt="" align="middle" /> &#39; . $txt[&#39;smf43&#39;] : &#39;&#39;) . &#39;
</td>
<td class="smalltext" align="right" valign="middle">
<form action="&#39;, $scripturl, &#39;" method="get" name="jumptoForm">
<label for="jumpto">&#39; . $txt[160] . &#39;</label>:
<select name="jumpto" id="jumpto" onchange="if (this.options[this.selectedIndex].value) window.location.href=\&#39;&#39;, $scripturl, &#39;\&#39; + this.options[this.selectedIndex].value;">
<option value="">&#39; . $txt[251] . &#39;:</option>&#39;;

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

/* 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[&#39;boards&#39;] as $board)
{
// Show some more ==&#39;s if this is a child, so as to make it look nice.
echo &#39;
<option value="?board=&#39;, $board[&#39;id&#39;], &#39;.0"&#39;, $board[&#39;is_current&#39;] ? &#39; selected="selected"&#39; : &#39;&#39;, &#39;> &#39;, str_repeat(&#39;==&#39;, $board[&#39;child_level&#39;]), &#39;=> &#39;, $board[&#39;name&#39;], &#39;</option>&#39;;
}
}

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

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[&#39;user&#39;][&#39;is_logged&#39;] && $settings[&#39;show_mark_read&#39;])
$buttonArray[] = &#39;<a href="&#39; . $scripturl . &#39;?action=markasread;sa=board;board=&#39; . $context[&#39;current_board&#39;] . &#39;.0">&#39; . ($settings[&#39;use_image_buttons&#39;] ? &#39;<img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/&#39; . $context[&#39;user&#39;][&#39;language&#39;] . &#39;/markread.gif" alt="&#39; . $txt[300] . &#39;" border="0" />&#39; : $txt[300]) . &#39;</a>&#39;;

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

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

// How about new polls, can the user post those?
if ($context[&#39;can_post_poll&#39;])
$buttonArray[] = &#39;<a href="&#39; . $scripturl . &#39;?action=post;board=&#39; . $context[&#39;current_board&#39;] . &#39;.0;poll">&#39; . ($settings[&#39;use_image_buttons&#39;] ? &#39;<img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/&#39; . $context[&#39;user&#39;][&#39;language&#39;] . &#39;/new_poll.gif" alt="&#39; . $txt[&#39;smf20&#39;] . &#39;" border="0" />&#39; : $txt[&#39;smf20&#39;]) . &#39;</a>&#39;;

return implode($context[&#39;menu_separator&#39;], $buttonArray);
}

?>


Currently no mods installed.

Offline pcigre

  • Jr. Member
  • **
  • Posts: 212
  • Gender: Male
    • Game community
Re: MessagePreviewOnMouseOver
« Reply #8 on: February 19, 2006, 04:41:20 AM »
Maybe this should be a core part. Great mod.

Can you make it for next relise, that user can configure how much caracters will show in preview?

Thanks again.

Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,603
  • It's quite perplexing isn't it
Re: MessagePreviewOnMouseOver
« Reply #9 on: April 23, 2006, 06:24:51 PM »
how many characters do show in preview?  For me it looks like maybe the first line only?

Like the person above me says, it would be good to be able to increase this

Offline danskmacabre

  • Semi-Newbie
  • *
  • Posts: 90
Re: MessagePreviewOnMouseOver
« Reply #10 on: July 12, 2006, 06:40:32 AM »
Looks like it's the first 124 characters of a post.

I would like to increase this.

Any know how?
Website: cantref.org.uk chaos8.com | SmF version: 2 | Portal software: PortaMx 1.3 | Default theme: Coal Black

Offline unrelenting

  • Full Member
  • ***
  • Posts: 526
Re: MessagePreviewOnMouseOver
« Reply #11 on: August 02, 2006, 07:00:37 PM »
What would be the code for showing the newest post when you hover over the NEW box to the right of the thread title.

Currently it is:

echo '
	
	
	
	
	
	
<a href="'
$topic['new_href'], '" id="newicon' $topic['first_post']['id'] . '"><img src="'$settings['images_url'], '/'$context['user']['language'], '/new.gif" alt="'$txt[302], '" border="0" /></a>';




I figured I could just add to it like this but it didn't work. What do I need to replace ['first_post] with? I also tried removing the alt= in there.



<span title="', $topic['first_post']['preview'], '"><a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a></span>';

Offline invisiblex

  • Semi-Newbie
  • *
  • Posts: 51
Re: MessagePreviewOnMouseOver
« Reply #12 on: August 03, 2006, 03:38:02 AM »
this works on default theme
how to make work in other theme? >:(
this smf sucks

Offline Vinspire

  • Sr. Member
  • ****
  • Posts: 852
  • Gender: Male
    • The Box Of Heart Forum
Re: MessagePreviewOnMouseOver
« Reply #13 on: August 03, 2006, 04:06:35 AM »
Link to Mod

packaged up from the tips and tricks, this adds the preview of first message within topic


example:


snork, the example pic is not working :)

Offline Assistance

  • Jr. Member
  • **
  • Posts: 343
  • Gender: Male
Re: MessagePreviewOnMouseOver
« Reply #14 on: August 10, 2006, 11:22:54 AM »
Will this work on the Show unread posts since last visit (action=unread) page as well.
no

works perfectly in IE
but dodgy in FF

doesnt want to show linebreaks
~playing poker~

Offline deadpoeticstar

  • Jr. Member
  • **
  • Posts: 252
  • Gender: Male
    • My Blog
Re: MessagePreviewOnMouseOver
« Reply #15 on: August 14, 2006, 12:07:02 PM »
where are we at on the update for RC3 for this mod?

Offline snork13

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,305
  • Gender: Male
  • so little time
    • simplemachines.org
Re: MessagePreviewOnMouseOver
« Reply #16 on: August 14, 2006, 04:26:08 PM »
where are we at on the update for RC3 for this mod?

I'll update later today, along with my other mods ;)
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 deadpoeticstar

  • Jr. Member
  • **
  • Posts: 252
  • Gender: Male
    • My Blog
Re: MessagePreviewOnMouseOver
« Reply #17 on: August 14, 2006, 04:32:26 PM »
oh alrighty just wanting to make sure i didnt miss anything thats all thats why ive asked

Offline snork13

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,305
  • Gender: Male
  • so little time
    • simplemachines.org
Re: MessagePreviewOnMouseOver
« Reply #18 on: August 14, 2006, 04:38:56 PM »
oh alrighty just wanting to make sure i didnt miss anything thats all thats why ive asked

ok, updated :P had a few seconds at work ;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 mickyd2006

  • Jr. Member
  • **
  • Posts: 203
  • I'm Not Angry.. Just Annoyed
Re: MessagePreviewOnMouseOver
« Reply #19 on: August 23, 2006, 10:57:12 AM »
Hmmm.. Doesn't appear to work with me.. Tried in both FF and IE... but got no joy.. I downloaded the latest package 0.2.5.  ???  I am running SMF 1.1 RC2..I even tried turning off the phishing filter in IE and the pop up blockers in Both FF and IE but that didnt help either :(

Do I need to configure it or something?
« Last Edit: August 23, 2006, 10:58:47 AM by mickyd2006 »
High Quality Low Cost CMS Installations - Just-Installs.com

SOHK: School Of Hard Knox - Hard Hitting Lessons In Life


I Wonder:

What Exactly Did The Man Who Invented The Drawing Board Go Back To?
Why Are Disasters Always Described As Great?
What Platform Was Windows Designed On?