|
Errors in the AkoComment v2.0 Joomla Component |
|
|
|
Tutorials / FAQs -
Joomla
|
|
Page 1 of 2 Sometimes the AkoCommentv2.0 Joomla component throws errors when trying to save settings. Here's how to fix it. "Fatal error: Non-static method MENU_Default::MENU_Default() cannot be called statically in ...administrator\components\com_akocomment\toolbar.akocomment.php on line 37"
FILE CHANGE LIST: /administrator/components/com_akocomment/toolbar.akocomment.php /administrator/components/com_akocomment/admin.akocomment.html.php /administrator/components/com_akocomment/admin.akocomment.php /components/com_akocomment/languages/english.php /mambots/content/akocommentbot.php Make these changes In the file: /administrator/components/com_akocomment/toolbar.akocomment.php ( OLD line 36-38 ) default: MENU_Default::MENU_Default(); break; ( NEW line 36-38 ) case "default": MENU_Default::MENU_Default(); break;
In the file: /administrator/components/com_akocomment/admin.akocomment.html.php ( OLD line 50-51 ) $commentlenght = "40"; ( NEW line 50-51 ) $titleLength = "40"; $commentLength = "60"; ( OLD @ lines 72-80 ) <tr> <th width="2%" class="title"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $rows ); ?>);" /></th> <th class="title"><div align="center">Author</div></th> <th class="title"><div align="left">Comment</div></th> <th class="title"><div align="center">Date</div></th> <th class="title"><div align="center">Content Item</div></th> <th class="title"><div align="center">Published</div></th> </tr> ( NEW @ lines 72-80 ) <tr> <th width="2%" class="title"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $rows ); ?>);" /></th> <th class="title"><div align="center">Author</div></th> <th class="title"><div align="left">Title</div></th> <th class="title"><div align="left">Comment</div></th> <th class="title"><div align="center">Date</div></th> <th class="title"><div align="center">Content Item</div></th> <th class="title"><div align="center">Published</div></th> </tr> ( OLD @ lines 84-92 ) echo "<td width='5%'><input type='checkbox' id='cb$i' name='cid[]' value='$row->id' onclick='isChecked(this.checked);' /></td>"; echo "<td align='center'><a href=\"index2.php?option=". $option. "&task=edit&cid[]=". $row-> id. "\">$row->name</a></td>"; if(strlen($row-> comment) > $commentlenght) { $row-> comment = substr($row-> comment, 0, $entrylenght-3); $row->comment .= "..."; } echo "<td align='left'>$row->comment</td>"; echo "<td align='center'>$row->date</td>"; echo "<td align='center'>$row->contentid</td>"; ( NEW @ lines 86-99 ) echo "<td width='5%'><input type='checkbox' id='cb$i' name='cid[]' value='$row->id' onclick='isChecked(this.checked);' /></td>"; echo "<td align='center'><a href=\"index2.php?option=". $option. "&task=edit&cid[]=". $row-> id. "\">$row->name</a></td>"; if(strlen($row-> title) > $titleLength) { $row-> title = substr($row-> title, 0, $titleLength-3); $row->title .= "..."; } if(strlen($row-> comment) > $commentLength) { $row-> comment = substr($row-> comment, 0, $commentLength-3); $row->comment .= "..."; } echo "<td align='left'>$row->title</td>"; echo "<td align='left'>$row->comment</td>"; echo "<td align='center'>$row->date</td>"; echo "<td align='center'>$row->contentid</td>";
|