SimplePortal

Customization => Custom Coding => Topic started by: josh4596 on March 10, 2015, 05:44:25 PM

Title: Recent posts block with preview?
Post by: josh4596 on March 10, 2015, 05:44:25 PM
Hello I'm following Blues code from this thread: http://simpleportal.net/index.php?topic=9143.20

Here is the code:

Code: [Select]
<?php
// CODE FROM NOW ON
echo '
<script src="Themes/default/SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script> 
<link href="Themes/default/SpryAssets/RoundedTabs.css" rel="stylesheet" type="text/css" />
 
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup"> 
<li class="TabbedPanelsTab" tabindex="0">All Boards</li> 
<li class="TabbedPanelsTab" tabindex="0">Comics Discussion</li>
                <li class="TabbedPanelsTab" tabindex="0">TV, Movies & Music</li> 
</ul> 
<div class="TabbedPanelsContentGroup"> 
<div class="TabbedPanelsContent">'
;

// START OF FIRST TAB
global $scripturl$settings$context$txt;

        
$what ssi_recentTopics(25nullnull'array');

echo '
<div class="tabsmenucontent" style="padding: 2px">
<table border="0" width="100%" cellspacing="1" cellpadding="2" class="bordercolor">
<tr class="titlebg">
                                <td valign="middle">Topic</td>
<td valign="middle">Poster</td>
<td valign="middle">Time</td>
<td valign="middle"></td>
</tr>'
;

foreach ($what as $topic)
{
echo '
<tr>
<td class="windowbg" valign="middle">'
$topic['link'];

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

echo '
</td>
<td class="windowbg2" valign="middle">'
$topic['poster']['link'], '</td>
<td class="windowbg2" valign="middle">'
$topic['time'], '</td>
<td class="windowbg2" valign="middle">'
;

if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
echo '
<a href="'
$topic['href'], '"><img src="'$settings['images_url'], '/icons/last_post.gif" alt="Last Post" title="Last Post" border="0" style="float: right;" /></a>';
}

echo 
'
</td>
</tr>
</table>
</div>'
;
// END OF FIRST TAB

echo'</div> 
<div class="TabbedPanelsContent">'
;

// START OF SECOND TAB
global $scripturl$settings$context$txt;
   
 $what2 ssi_recentTopics(25null, array(28), 'array');

echo '
<div class="tabsmenucontent" style="padding: 2px">
<table border="0" width="100%" cellspacing="1" cellpadding="2" class="bordercolor">
<tr class="titlebg">
                                <td valign="middle">Topic</td>
<td valign="middle">Poster</td>
<td valign="middle">Time</td>
<td valign="middle"></td>
</tr>'
;

foreach ($what2 as $topic)
{
echo '
<tr>
<td class="windowbg" valign="middle">'
$topic['link'];

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

echo '
</td>
<td class="windowbg2" valign="middle">'
$topic['poster']['link'], '</td>
<td class="windowbg2" valign="middle">'
$topic['time'], '</td>
<td class="windowbg2" valign="middle">'
;

if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
echo '
<a href="'
$topic['href'], '"><img src="'$settings['images_url'], '/icons/last_post.gif" alt="Last Post" title="Last Post" border="0" style="float: right;" /></a>';
}

echo 
'
</td>
</tr>
</table>
</div>'
;
// END OF SECOND TAB

echo'</div> 
</div> 
</div>
 
<script type="text/javascript"> 
<!-- 
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1"); 
Spry.Widget.TabbedPanels("TabbedPanels2");
//--> 
</script>
'
;


?>

Now my question is if it would be possible to have a box pop-up when hovering over a topic title showing a little bit of text from the topic. Thanks in advance for any help you may be able to offer.
SimplePortal 2.3.8 © 2008-2024, SimplePortal