Well, this is what I have so far
/templates/base/scripts/BxBaseCmtsView.php
function _getPostReplyBox($sType = 'comment', $iCmtParentId = 0) {
// $sSwitcher = '<a class="cmt-post-reply-text inactive" href="javascript:void(0)" onclick="javascript:' . $this->_sJsObjName . '.toggleType(this)">' . _t('_Add Your Comment') . '</a><a class="cmt-post-reply-video" href="javascript:void(0)" onclick="javascript:' . $this->_sJsObjName . '.toggleType(this)">' . _t('_Record Your Comment') . '</a>';
if($sType == 'comment')
$sSwitcher = '<a class="cmt-post-reply-text inactive" href="javascript:void(0)" onclick="javascript:' .
$this->_sJsObjName . '.toggleType(this)">' .
_t('_Add Your Comment') .
'</a><a class="cmt-post-reply-photo" href="javascript:void(0)" onclick="javascript:' .
$this->_sJsObjName .
'.toggleType(this)">' .
_t('_bx_photos_add') . '</a>';
else if($sType == 'reply')
$sSwitcher = '<a class="cmt-post-reply-text inactive" href="javascript:void(0)" onclick="javascript:' .
$this->_sJsObjName .
'.toggleType(this)">' .
_t('_Reply as text') .
'</a><a class="cmt-post-reply-photo" href="javascript:void(0)" onclick="javascript:' .
$this->_sJsObjName .
'.toggleType(this)">' .
_t('_bx_photos_add') . '</a>';
function _getFormBox($iCmtParentId = 0, $sText = "", $sFunction = "submitComment(this)",$bEditWall=0) {
$sTinyStyle = ($this->iGlobAllowHtml == 1 && $this->iGlobUseTinyMCE == 1) ? ' tinypossible="true" ' : '';
###
#SteveSoft
#03-04-2013
#
$sHelpImage = getTemplateIcon('info.gif');
$sStuff = '
<form name="cmt-post-reply" onsubmit="' . $this->_sJsObjName . '.' . $sFunction . '; return false;">
<input type="hidden" name="CmtParent" value="' . $iCmtParentId . '" />
<input type="hidden" name="CmtType" value="text" />
<div class="cmt-post-reply-text">
<textarea name="CmtText" ' . $sTinyStyle . ' >' . $sText . '</textarea>
</div>';
// <div class="cmt-post-reply-video">' . getApplicationContent('video_comments', 'recorder', array('user' => $this->_getAuthorId(), 'password' => $this->_getAuthorPassword(), 'extra' => implode('_', array($this->_sSystem . '-' . $this->getId(), $iCmtParentId))), true) . '</div>
//$sStuff .= '<div class="cmt-post-reply-video">' . getApplicationContent('video_comments', 'recorder', array('user' => $this->_getAuthorId(), 'password' => $this->_getAuthorPassword(), 'extra' => implode('_', array($this->_sSystem . '-' . $this->getId(), $iCmtParentId))), true) . '</div>';
$sPhotoUploader= BxDolService::call('photos', 'get_uploader_form', array(array('amode' => 'ajax', 'mode' => 'single', 'category' => 'comments', 'album'=>_t('_comments', getNickName($this->_iOwnerId)), 'from_wall' => 0, 'owner_id' => $this->_iOwnerId)), 'Uploader');
$sStuff .= '<div class="cmt-post-reply-photo">' .$sPhotoUploader. '</div>';
$sStuff .='
<div class="cmt-post-reply-post"><input type="submit" value="' . _t('_Submit Comment') . '" /></div>
' . $sMood . '
</div> </div></form>';
return $sStuff;
}
I know I will have to do some work in /inc/js/classes/BxDolCmts.js
in this function...
// submit comment and show it after posting
BxDolCmts.prototype.submitComment = function (f)
{
once I get it to be able to add the photo!
THIS triggers the photo uploader function, it will assign it to an album of the person making the comment with the name "comment".
$sPhotoUploader= BxDolService::call('photos', 'get_uploader_form', array(array('amode' => 'ajax', 'mode' => 'single', 'category' => 'comments', 'album'=>_t('_comments', getNickName($this->_iOwnerId)), 'from_wall' => 0, 'owner_id' => $this->_iOwnerId)), 'Uploader');
When you click Add Photo, it loads the photo uploader, but then, nothing works after selecting the photo. I don't see an error in my console, and even if I click the submit button, it doesn't work.
I'm stuck at this point.
Ignore the 'from_wall" parameter. I use that when uploading to the wall so you cannot select a category when uploading photos to the wall.
THIS function works when posting a photo to the wall BTW....
echo BxDolService::call('photos', 'get_uploader_form', array(array('amode' => 'ajax', 'mode' => $_REQUEST['type'], 'category' => 'Wall', 'album'=>_t('_wall_photo_album', getNickName($_REQUEST['owner'])), 'from_wall' => 1, 'owner_id' => $_REQUEST['owner'])), 'Uploader');
I use this to choose what uploader to send a photo to the wall.