I am reading this tutorial:
Creating a add-on to insert tabs in profile page (using hooks) - Part 4(http://xenforo.com/community/resour...rofile-page-using-hooks.335/update?update=488)
I have several questions:
1.
Step 8 - Input text field and "Send" button
how could I find the definition of this classrimary, if I want to change its value?
2.
I checked this file: XenForo\Template\Compiler\Tag\Avatar.php,
but it does not have such parameters: size, class, so how could I know all the available options(size,class..) for avatar? and how to use them?
3.
Step 10 - Create a DataWriter to manipulate data
In library\newProfileTabs\DataWriter\Notes.php, we have several functions here:
In library\newProfileTabs\Extend\ControllerPublic\Member.php, we have:
But it seems that we did not use those functions we created in DataWriter\Notes.php: _getFields,_getExistingData,_getUpdateCondition, so why?
Creating a add-on to insert tabs in profile page (using hooks) - Part 4(http://xenforo.com/community/resour...rofile-page-using-hooks.335/update?update=488)
I have several questions:
1.
Step 8 - Input text field and "Send" button
Code:
<input type="submit" value="Send" accesskey="s" class="button primary">
2.
Code:
<xen:avatar user="$note.user" size="s" class="icon" />
Code:
public function compile(XenForo_Template_Compiler $compiler, $tag, array $attributes, array $children, array $options)
3.
Step 10 - Create a DataWriter to manipulate data
In library\newProfileTabs\DataWriter\Notes.php, we have several functions here:
Code:
class newProfileTabs_DataWriter_Notes extends XenForo_DataWriter
{
protected function _getFields(){}
protected function _getExistingData($data){}
protected function _getUpdateCondition($tableName){}
}
Code:
$dw = XenForo_DataWriter::create('newProfileTabs_DataWriter_Notes');
$dw->set('given_user_id', $visitor['user_id']);
$dw->set('received_user_id', $userId);
$dw->set('note_message', $note_message);
$dw->set('note_date', $note_date);
$dw->save();