Exemplo n.º 1
0
[BEGIN_COT_EXT]
Hooks=forums.editpost.tags, forums.posts.newpost.tags, forums.newtopic.tags
Tags=forums.editpost.tpl:{FORUMS_EDITPOST_MYPFS};forums.editpost.tpl:{FORUMS_POSTS_NEWPOST_MYPFS};forums.newtopic.tpl:{FORUMS_NEWTOPIC_MYPFS}
[END_COT_EXT]
==================== */
/**
 * PFS links for forums
 *
 * @package PFS
 * @copyright (c) Cotonti Team
 * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
 */
defined('COT_CODE') or die('Wrong URL.');
require_once cot_incfile('pfs', 'module');
$pfs_caller = cot_get_caller();
if ($pfs_caller == 'forums.posts') {
    $pfs_src = 'newpost';
    $pfs_name = 'rmsgtext';
    $pfs_tag = 'POSTS_NEWPOST';
} elseif ($pfs_caller == 'forums.newtopic') {
    $pfs_src = 'newtopic';
    $pfs_name = 'rmsgtext';
    $pfs_tag = 'NEWTOPIC';
} else {
    $pfs_src = 'editpost';
    $pfs_name = 'rmsgtext';
    $pfs_tag = 'EDITPOST';
}
$pfs = cot_build_pfs($usr['id'], $pfs_src, $pfs_name, $L['Mypfs']);
$pfs .= cot_auth('pfs', 'a', 'A') ? '   ' . cot_build_pfs(0, $pfs_src, $pfs_name, $L['SFS']) : '';
$t->assign('FORUMS_' . $pfs_tag . '_MYPFS', $pfs);
Exemplo n.º 2
0
<?php

/* ====================
[BEGIN_COT_EXT]
Hooks=pm.reply.tags,pm.send.tags
Tags=pm.message.tpl:{PM_FORM_PFS};pm.send.tpl:{PMSEND_FORM_PFS}
[END_COT_EXT]
==================== */
/**
 * PFS link for forums.editpost
 *
 * @package PFS
 * @copyright (c) Cotonti Team
 * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
 */
defined('COT_CODE') or die('Wrong URL.');
require_once cot_incfile('pfs', 'module');
$pfs = cot_build_pfs($usr['id'], 'newlink', 'newpmtext', $L['Mypfs']);
$pfs .= cot_auth('pfs', 'a', 'A') ? ' &nbsp; ' . cot_build_pfs(0, 'newlink', 'newpmtext', $L['SFS']) : '';
$pfs_tag = cot_get_caller() == 'pm.send' ? 'PMSEND_FORM_PFS' : 'PM_FORM_PFS';
$t->assign($pfs_tag, $pfs);
Exemplo n.º 3
0
<?php

/* ====================
[BEGIN_COT_EXT]
Hooks=page.add.tags,page.edit.tags
Tags=page.add.tpl:{PAGEADD_FORM_PFS},{PAGEADD_FORM_SFS},{PAGEADD_FORM_URL_PFS},{PAGEADD_FORM_URL_SFS};page.edit.tpl:{PAGEEDIT_FORM_PFS},{PAGEEDIT_FORM_SFS},{PAGEEDIT_FORM_URL_PFS},{PAGEEDIT_FORM_URL_SFS}
[END_COT_EXT]
==================== */
/**
 * PFS link on page.add
 *
 * @package PFS
 * @copyright (c) Cotonti Team
 * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
 */
defined('COT_CODE') or die('Wrong URL.');
require_once cot_incfile('pfs', 'module');
if (cot_get_caller() == 'page.add') {
    $pfs_tag = 'PAGEADD';
} else {
    $pfs_tag = 'PAGEEDIT';
}
$t->assign(array($pfs_tag . '_FORM_PFS' => cot_build_pfs($usr['id'], 'pageform', 'rpagetext', $L['Mypfs'], $sys['parser']), $pfs_tag . '_FORM_SFS' => cot_auth('pfs', 'a', 'A') ? ' &nbsp; ' . cot_build_pfs(0, 'pageform', 'rpagetext', $L['SFS'], $sys['parser']) : '', $pfs_tag . '_FORM_URL_PFS' => cot_build_pfs($usr['id'], 'pageform', 'rpageurl', $L['Mypfs']), $pfs_tag . '_FORM_URL_SFS' => cot_auth('pfs', 'a', 'A') ? ' ' . cot_build_pfs(0, 'pageform', 'rpageurl', $L['SFS']) : ''));
Exemplo n.º 4
0
<?php

/* ====================
[BEGIN_COT_EXT]
Hooks=comments.newcomment.tags,comments.edit.tags
Tags=comments.tpl:{COMMENTS_FORM_PFS},{COMMENTS_FORM_SFS}
[END_COT_EXT]
==================== */
/**
 * PFS link on page.add
 *
 * @package PFS
 * @copyright (c) Cotonti Team
 * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
 */
defined('COT_CODE') or die('Wrong URL.');
require_once cot_incfile('pfs', 'module');
global $usr, $L, $sys;
if (cot_get_caller() == 'comments.functions') {
    $form_name = 'newcomment';
    $input_name = 'rtext';
} else {
    $form_name = 'comments';
    $input_name = 'comtext';
}
$t->assign(array('COMMENTS_FORM_PFS' => cot_build_pfs($usr['id'], $form_name, $input_name, $L['Mypfs'], $sys['parser']), 'COMMENTS_FORM_SFS' => cot_auth('pfs', 'a', 'A') ? ' &nbsp; ' . cot_build_pfs(0, $form_name, $input_name, $L['SFS'], $sys['parser']) : ''));