Fork me on GitHub

module CrpTag does not display the title pagemaster  Bottom

  • module CrpTag does not display the title pagemaster

    --
    BathRoom- my test workable project
  • if somebody needed

    in pnuserapi

    Code

    function PageMaster_userapi_get($args)
    {
        if (isset($args)) {
            foreach ($args as $ktag)
            {
                $pid_tid = explode('-',$ktag);
                $pid = $pid_tid[0];
                $tid = $pid_tid[1];
            }
        }
        $pubdata = pnModAPIFunc('PageMaster', 'user', 'getPub',
                                array('tid'                => $tid,
                                      'pid'                => $pid));
       
        $comment['title'] = 'huyhuy';
        return $pubdata['core_title'];
    }


    in crpTag template plugins made function.crptagbuildurlpagemaster.php

    Code

    function smarty_function_crptagbuildurlpagemaster($params, & $smarty)
    {
        // Security check
        if (!SecurityUtil :: checkPermission('crpTag::', '::', ACCESS_READ))
        {
            return LogUtil :: registerPermissionError();
        }
        $pid_tid = explode("-",$params['id_module']);
        return DataUtil::formatForDisplay(pnModURL($params['module'],
                        'user',
                        'viewpub',
                        array (
                            "tid" => $pid_tid[0],
                            "pid" => $pid_tid[1]
                        )));
    }
    ?>


    in crptag_usr_viewtag.htm change
    old

    Code

    <a href="<!--[crptagbuildurl module=$tag.modname func=$tag.func mapid=$tag.mapid id_module=$tag.id_module]-->" title="<!--[gt text="View"]--> <!--[$tag.item.title]-->"><!--[$tag.item.title|pnvarprepfordisplay]--></a>
                - <!--[gt text="Created on"]--> <!--[$tag.item.cr_date|pndate_format]--> <!--[gt text="by"]--> <a href="<!--[$cr_profilelink|pnvarprepfordisplay]-->"><!--[$cr_uname|pnvarprepfordisplay]--></a>


    new

    Code

    <!--[if $tag.modname == 'PageMaster' || $tag.modname == 'pagemaster']-->

                        <a href="<!--[crptagbuildurlpagemaster module=$tag.modname func=$tag.func mapid=$tag.mapid id_module=$tag.id_module]-->" title="<!--[gt text="View"]--> <!--[$tag.item]-->"><!--[$tag.item|pnvarprepfordisplay]--></a>- <!--[gt text="Created on"]--> <!--[$tag.item.cr_date|pndate_format]--> <!--[gt text="by"]--> <a href="<!--[$cr_profilelink|pnvarprepfordisplay]-->"><!--[$cr_uname|pnvarprepfordisplay]--></a>

    <!--[else]-->

                <a href="<!--[crptagbuildurl module=$tag.modname func=$tag.func mapid=$tag.mapid id_module=$tag.id_module]-->" title="<!--[gt text="View"]--> <!--[$tag.item.title]-->"><!--[$tag.item.title|pnvarprepfordisplay]--></a>
                - <!--[gt text="Created on"]--> <!--[$tag.item.cr_date|pndate_format]--> <!--[gt text="by"]--> <a href="<!--[$cr_profilelink|pnvarprepfordisplay]-->"><!--[$cr_uname|pnvarprepfordisplay]--></a>
    <!--[/if]-->


    --
    BathRoom- my test workable project

This list is based on users active over the last 60 minutes.