MyBB Community Forums

Full Version: News Mod Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
thats awesome yeh but erm.... i ccant find how to change the template understand its in the readme but i dont get that

$news_template_1 = array(
"tid" => NULL,
"title" => 'newsplugin_main',
"template" => $db->escape_string('<div class="box-border">
<div class="box-header"></div>
</div>
<table width="674" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutDefaultTable-->
<tr>
<td height="20" valign="top"><a href="{$forumpath}/showthread.php?tid={$news[\'tid\']}"><font color="#000000" size="2" face="Tahoma"><strong>{$news[\'subject\']}</strong></font></a>
</td>
</tr>
<tr>
<td width="674" height="44" valign="top"><font size="2" face="Tahoma">$newsmessage
</font></td>
</tr>
<tr>
<td height="19"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>(<a href="{$forumpath}/showthread.php?tid={$news[\'tid\']}">{$news[\'replies\']}
{$replytext}replies</a>)</strong> | Posted by <a href="{$forumpath}/member.php?action=profile&amp;uid={$news[\'uid\']}" target="_blank"><strong>{$news[\'username\']}</strong></a>
on the<strong> $date</strong> at <strong>$time </strong></font></td>
</tr>
</table>
'),
"sid" => "-1",
"version" => "1.0",
"dateline" => time(),
);
$news_template_2 = array(
"tid" => NULL,
"title" => 'news_avatar_bit',
"template" => $db->escape_string('<div class="box-content" style="text-align: center; position: relative; float: left; padding: 0px; padding-right: 10px;">
<img src="{$url}{$news[\'avatar\']}" alt="" />
</div>'),


i saw that part in the actual plugin so i edited the part where the html part was where i think the template is and i replaced it with my own but it still doesnt show it it shoes it totally different as it was before
You don't edit the plugin you edit the template in the ACP. It's under Global Templates in the ACP.
i am so close of nearly finishing it all off buttt on the news i edited it in the global acp and this is the template i got


<table width="674" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20" valign="top"><a href="{$forumpath}/showthread.php?tid={$news[\'tid\']}"><font color="#000000" size="2" face="Tahoma"><strong>{$news[\'subject\']}</strong></font></a>
</td>
</tr>
<tr>
<td width="674" height="44" valign="top"><font size="2" face="Tahoma">$newsmessage
</font></td>
</tr>
<tr>
<td height="19"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>(<a href="{$forumpath}/showthread.php?tid={$news[\'tid\']}">{$news[\'replies\']}
{$replytext}replies</a>)</strong> | Posted by <a href="{$forumpath}/member.php?action=profile&amp;uid={$news[\'uid\']}" target="_blank"><strong>{$news[\'username\']}</strong></a>
on the<strong> $date</strong> at <strong>$time </strong></font></td>
</tr>
</table>
^^^^ thats what i put in and when i go on news.php this comes up


Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1

testetstsetsetsetsetsetseteststsetsetsetsetsetsetsetstsetsetse
( replies) | Posted by on the 13th January 2007 at 10:28 AM



Any ideas?? thanks
Replace all \' with '
erm... i changed them all and checked agen and this is the code


<table width="674" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20" valign="top"><a href="{$forumpath}/showthread.php?tid={$news['tid']}"><font color="#000000" size="2" face="Tahoma"><strong>{$news['subject']}</strong></font></a>
</td>
</tr>
<tr>
<td width="674" height="44" valign="top"><font size="2" face="Tahoma">$newsmessage
</font></td>
</tr>
<tr>
<td height="19"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>(<a href="{$forumpath}/showthread.php?tid={$news['tid']}">{$news['replies']}
{$replytext}replies</a>)</strong> | Posted by <a href="{$forumpath}/member.php?action=profile&amp;uid={$news['uid']}" target="_blank"><strong>{$news['username']}</strong></a>
on the<strong> $date</strong> at <strong>$time </strong></font></td>
</tr>
</table>



buttt.... it shows the posted part the news and the title now butt it ahs this above it


Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mass3716/public_html/forums/inc/plugins/newsplugin.php(240) : eval()'d code on line 1
ok... since you seemed to have edited the template incorrectly deactivate the plugin and reactivate it. That was the correct template will be restored. [Wiki: Admin_CP_Templates] (Broken link, head over to docs.mybb.com instead)
thank you thank you thank you lol its working woohooo!!!!!!!!
Pages: 1 2