use Friendica\Content\Pager;
use Friendica\Content\Text\BBCode;
use Friendica\Core\ACL;
+use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
'$uploadurl' => $ret['post_url'],
// ACL permissions box
- '$group_perms' => DI::l10n()->t('Show to Groups'),
- '$contact_perms' => DI::l10n()->t('Show to Contacts'),
'$return_path' => DI::args()->getQueryString(),
]);
return Renderer::replaceMacros(Renderer::getMarkupTemplate('confirm.tpl'), [
'$method' => 'post',
'$message' => DI::l10n()->t('Do you really want to delete this photo album and all its photos?'),
- '$extra_inputs' => [],
'$confirm' => DI::l10n()->t('Delete Album'),
'$confirm_url' => $drop_url,
'$confirm_name' => 'dropalbum',
return Renderer::replaceMacros(Renderer::getMarkupTemplate('confirm.tpl'), [
'$method' => 'post',
'$message' => DI::l10n()->t('Do you really want to delete this photo?'),
- '$extra_inputs' => [],
'$confirm' => DI::l10n()->t('Delete Photo'),
'$confirm_url' => $drop_url,
'$confirm_name' => 'delete',
'$delete' => DI::l10n()->t('Delete Photo'),
// ACL permissions box
- '$group_perms' => DI::l10n()->t('Show to Groups'),
- '$contact_perms' => DI::l10n()->t('Show to Contacts'),
'$return_path' => DI::args()->getQueryString(),
]);
}
if (!DBA::isResult($items)) {
if (($can_post || Security::canWriteToUserWall($owner_uid))) {
+ /*
+ * Hmmm, code depending on the presence of a particular addon?
+ * This should be better if done by a hook
+ */
+ $qcomment = null;
+ if (Addon::isEnabled('qcomment')) {
+ $words = DI::pConfig()->get(local_user(), 'qcomment', 'words');
+ $qcomment = $words ? explode("\n", $words) : [];
+ }
+
$comments .= Renderer::replaceMacros($cmnt_tpl, [
'$return_path' => '',
'$jsreload' => $return_path,
'$preview' => DI::l10n()->t('Preview'),
'$loading' => DI::l10n()->t('Loading...'),
'$sourceapp' => DI::l10n()->t($a->sourcename),
- '$ww' => '',
+ '$qcomment' => $qcomment,
'$rand_num' => Crypto::randomDigits(12)
]);
}
}
if (($can_post || Security::canWriteToUserWall($owner_uid))) {
+ /*
+ * Hmmm, code depending on the presence of a particular addon?
+ * This should be better if done by a hook
+ */
+ $qcomment = null;
+ if (Addon::isEnabled('qcomment')) {
+ $words = DI::pConfig()->get(local_user(), 'qcomment', 'words');
+ $qcomment = $words ? explode("\n", $words) : [];
+ }
+
$comments .= Renderer::replaceMacros($cmnt_tpl,[
'$return_path' => '',
'$jsreload' => $return_path,
'$submit' => DI::l10n()->t('Submit'),
'$preview' => DI::l10n()->t('Preview'),
'$sourceapp' => DI::l10n()->t($a->sourcename),
- '$ww' => '',
+ '$qcomment' => $qcomment,
'$rand_num' => Crypto::randomDigits(12)
]);
}
]);
if (($can_post || Security::canWriteToUserWall($owner_uid))) {
+ /*
+ * Hmmm, code depending on the presence of a particular addon?
+ * This should be better if done by a hook
+ */
+ $qcomment = null;
+ if (Addon::isEnabled('qcomment')) {
+ $words = DI::pConfig()->get(local_user(), 'qcomment', 'words');
+ $qcomment = $words ? explode("\n", $words) : [];
+ }
+
$comments .= Renderer::replaceMacros($cmnt_tpl, [
'$return_path' => '',
'$jsreload' => $return_path,
'$submit' => DI::l10n()->t('Submit'),
'$preview' => DI::l10n()->t('Preview'),
'$sourceapp' => DI::l10n()->t($a->sourcename),
- '$ww' => '',
+ '$qcomment' => $qcomment,
'$rand_num' => Crypto::randomDigits(12)
]);
}