News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

New mods

Started by suzann, October 07, 2009, 08:11:41 AM

Previous topic - Next topic

suzann

#20
Quote from: JBlaze on October 08, 2009, 04:11:21 PM
Try this for install.xml
<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>user:mod_name</id>
<version>version</version>

<file name="$boarddir/index.php">
<operation>
<search position="before"><![CDATA[require_once($sourcedir . '/Security.php');]]></search>
<add><![CDATA[

// RECENT TOPICS SCROLLER
require_once($boarddir . '/SSI.php');
$context['recent_topics_scroller'] = ssi_recentTopics(10, '', 'return');
// END RECENT TOPICS SCROLLER]]></add>
</operation>
</file>

<file name="$themedir/index.template.php">
<operation>
<search position="before"><![CDATA[ // Show the menu here, according to the menu sub template.
template_menu();]]></search>
<add><![CDATA[

// RECENT TOPICS SCROLLER
echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="20">
<span style="font-family: Verdana, sans-serif; font-size: 110%; ">', $txt['recent_posts'], '</span>
</td>
</tr>
</table>';
         
         echo '
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="0" border="0" style="margin-top: 1px;">
<tr class="windowbg2">
<td class="windowbg" valign="middle">
<marquee direction=\'right\' onMouseOver=\'this.stop()\' onMouseOut=\'this.start()\'>';

            foreach($context['recent_topics_scroller'] as $topic)
{
echo '
<span style="color:black;">{', $topic['link'], '} - </span>
<span style="color:green;">{', $txt['sent_by'], '} </span>";
<span style="color:black;">{', $topic['poster']['link'], '} </span>
&nbsp;&nbsp;::&nbsp;&nbsp;';
}

echo '
</marquee>
</td>
</tr>
</table>';
// END RECENT TOPICS SCROLLER]]></add>
</operation>
</file>

<file name="$languagedir/Modifications.english.php">
<operation>
<search position="end" />
<add><![CDATA[
$txt['recent_posts'] = 'Recent Posts';
$txt['sent_by'] = 'Sent by:';
]]></add>
</operation>
</file>

<file name="$languagedir/Modifications.english-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['recent_posts'] = 'Recent Posts';
$txt['sent_by'] = 'Sent by:';
]]></add>
</operation>
</file>

</modification>


I'm sorry jblazer, your script did not work, and damaged my friend's forum.

Anyway, i was able to restore his forum and this took almost 2 hours of brain storming  :)

I've submitted my original mod again, with the recommended changes in language files only. The results are 100% OK the Scroller is working perfectly.  ;)


Thanks to all.  :)
suzann


Advertisement: