BC Tech : Free Tutorials and More Advertisement
Main
Friday, 30 July 2010
 
 
Errors in the AkoComment v2.0 Joomla Component Print E-mail
Tutorials / FAQs - Joomla
Article Index
Errors in the AkoComment v2.0 Joomla Component
Page 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 

  1. ( OLD line 36-38 )
  2.   default:
  3.     MENU_Default::MENU_Default();
  4.     break;
  5. ( NEW line 36-38 )
  6.   case "default":
  7.     MENU_Default::MENU_Default();
  8.     break;

 

In the file: /administrator/components/com_akocomment/admin.akocomment.html.php 

  1. ( OLD line 50-51 )
  2.     $commentlenght = "40";
  3.  
  4. ( NEW line 50-51 )
  5.   $titleLength = "40";
  6.   $commentLength = "60";
  7.  
  8. ( OLD @ lines 72-80 )
  9. <tr>
  10.   <th width="2%" class="title"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $rows ); ?>);" /></th>
  11.   <th class="title"><div align="center">Author</div></th>
  12.   <th class="title"><div align="left">Comment</div></th>
  13.   <th class="title"><div align="center">Date</div></th>
  14.   <th class="title"><div align="center">Content Item</div></th>
  15.   <th class="title"><div align="center">Published</div></th>
  16. </tr>
  17.  
  18. ( NEW @ lines 72-80 )
  19. <tr>
  20.   <th width="2%" class="title"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $rows ); ?>);" /></th>
  21.   <th class="title"><div align="center">Author</div></th>
  22.   <th class="title"><div align="left">Title</div></th>
  23.   <th class="title"><div align="left">Comment</div></th>
  24.   <th class="title"><div align="center">Date</div></th>
  25.   <th class="title"><div align="center">Content Item</div></th>
  26.   <th class="title"><div align="center">Published</div></th>
  27. </tr>
  28.  
  29.  
  30. ( OLD @ lines 84-92 )
  31. echo "<td width='5%'><input type='checkbox' id='cb$i' name='cid[]' value='$row->id' onclick='isChecked(this.checked);' /></td>";
  32. echo "<td align='center'><a href=\"index2.php?option=".$option."&task=edit&cid[]=".$row->id."\">$row->name</a></td>";
  33. if(strlen($row->comment) > $commentlenght) {
  34.   $row->comment  = substr($row->comment,0,$entrylenght-3);
  35.   $row->comment .= "...";
  36. }
  37. echo "<td align='left'>$row->comment</td>";
  38. echo "<td align='center'>$row->date</td>";
  39. echo "<td align='center'>$row->contentid</td>";
  40.  
  41.  
  42. ( NEW @ lines 86-99 )
  43. echo "<td width='5%'><input type='checkbox' id='cb$i' name='cid[]' value='$row->id' onclick='isChecked(this.checked);' /></td>";
  44. echo "<td align='center'><a href=\"index2.php?option=".$option."&task=edit&cid[]=".$row->id."\">$row->name</a></td>";
  45. if(strlen($row->title) > $titleLength) {
  46.   $row->title  = substr($row->title,0,$titleLength-3);
  47.   $row->title .= "...";
  48. }
  49. if(strlen($row->comment) > $commentLength) {
  50.   $row->comment  = substr($row->comment,0,$commentLength-3);
  51.   $row->comment .= "...";
  52. }
  53. echo "<td align='left'>$row->title</td>";
  54. echo "<td align='left'>$row->comment</td>";
  55. echo "<td align='center'>$row->date</td>";
  56. echo "<td align='center'>$row->contentid</td>";

 

 


 
Next >
Google
 
Web benconley.net
 
Top! Top!