Witam,
tworzę wg. tego poradnika rozszerzenie komentarzy. https://community.invisionpower.com/4docs/advanced-usage/development/introduction-to-comments-r4/
Stworzyłem w /sources/Recruitment plik Comments.php (zawartość niżej) i teraz mam problem. Jak wyświetlić komentarze i dodawanie ich?
Comments.php
<?php
namespace IPS\panel\Recruitment;
/**
* Recruitment Comment Model
*/
class _Comment extends \IPS\Content\Comment implements \IPS\Content\EditHistory, \IPS\Content\ReportCenter, \IPS\Content\Hideable, \IPS\Content\Reputation
{
/**
* @brief [ActiveRecord] Multiton Store
*/
protected static $multitons;
/**
* @brief Default Values
*/
protected static $defaultValues = NULL;
/**
* @brief [Content\Comment] Item Class
*/
public static $itemClass = 'IPS\panel\Recruitment';
/**
* @brief [ActiveRecord] Database Table
*/
public static $databaseTable = 'panel_recruitment_comments';
/**
* @brief [ActiveRecord] Database Prefix
*/
public static $databasePrefix = 'comment_';
/**
* @brief Database Column Map
*/
public static $databaseColumnMap = array(
'item' => 'fid',
'author' => 'mid',
'author_name' => 'author',
'content' => 'text',
'date' => 'date',
'ip_address' => 'ip_address',
'edit_time' => 'edit_time',
'edit_member_name' => 'edit_name',
'edit_show' => 'append_edit',
'approved' => 'open'
);
/**
* @brief Application
*/
public static $application = 'panel';
/**
* @brief Title
*/
public static $title = 'panel_recruitment_comment';
/**
* @brief Icon
*/
public static $icon = '';
/**
* @brief Reputation Type
*/
public static $reputationType = 'comment_id';
}