当前位置: 首页>>代码示例>>PHP>>正文


PHP RMFunctions::comments_form方法代码示例

本文整理汇总了PHP中RMFunctions::comments_form方法的典型用法代码示例。如果您正苦于以下问题:PHP RMFunctions::comments_form方法的具体用法?PHP RMFunctions::comments_form怎么用?PHP RMFunctions::comments_form使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RMFunctions的用法示例。


在下文中一共展示了RMFunctions::comments_form方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showSection

/**
* @desc Muestra el contenido completo de una sección
*/
function showSection(RDResource &$res, RDSection &$section)
{
    global $xoopsUser, $xoopsModuleConfig, $xoopsOption, $xoopsTpl, $xoopsConfig, $standalone;
    include 'header.php';
    $xoopsTpl->assign('xoops_pagetitle', $section->getVar('title'));
    // Resource data
    $resource = array('id' => $res->id(), 'title' => $res->getVar('title'), 'link' => $res->permalink(), 'reads' => $res->getVar('reads'));
    $res->add_read($res);
    // Navegación de Secciones
    $db = XoopsDatabaseFactory::getDatabaseConnection();
    $sql = "SELECT * FROM " . $db->prefix("rd_sections") . " WHERE id_res='" . $res->id() . "' AND parent = '0' ORDER BY `order`";
    $result = $db->query($sql);
    $i = 1;
    $number = 1;
    $located = false;
    // Check if current position has been located
    while ($row = $db->fetchArray($result)) {
        $sec = new RDSection();
        $sec->assignVars($row);
        if ($sec->id() == $section->id()) {
            $number = $i;
            $located = true;
        }
        if ($sec->id() == $section->id() && isset($sprev)) {
            $prev_section = array('id' => $sprev->id(), 'title' => $sprev->getVar('title'), 'link' => $sprev->permalink());
        }
        if ($number == $i - 1 && $located) {
            $next_section = array('id' => $sec->id(), 'title' => $sec->getVar('title'), 'link' => $sec->permalink());
            break;
        }
        $i++;
        $sprev = $sec;
    }
    $GLOBALS['rd_section_number'] = $number;
    $sections = RDFunctions::get_section_tree($section->id(), $res, $number, true);
    array_walk($sections, 'rd_insert_edit');
    // Check last modification date
    $last_modification = 0;
    foreach ($sections as $sec) {
        if ($sec['modified'] > $last_modification) {
            $last_modification = $sec['modified'];
            $last_author = array('id' => $sec['author'], 'name' => $sec['author_name']);
        }
    }
    // Event
    $sections = RMEvents::get()->run_event('docs.show.section', $sections, $res, $section);
    RMTemplate::get()->add_style('docs.css', 'docs');
    RMTemplate::get()->add_jquery();
    RMTemplate::get()->add_script(XOOPS_URL . '/modules/docs/include/js/docs.js');
    // URLs
    if ($xoopsModuleConfig['permalinks']) {
        /**
         * @todo Generate friendly links
         */
        if (RMFunctions::plugin_installed('topdf')) {
            $pdf_book_url = RDFunctions::url() . '/pdfbook/' . $section->id() . '/';
            $pdf_section_url = RDFunctions::url() . '/pdfsection/' . $section->id() . '/';
        }
        $print_book_url = RDFunctions::url() . '/printbook/' . $section->id() . '/';
        $print_section_url = RDFunctions::url() . '/printsection/' . $section->id() . '/';
        if (RDFunctions::new_resource_allowed($xoopsUser ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS)) {
            $publish_url = RDFunctions::url() . '/publish/';
        }
    } else {
        if (RMFunctions::plugin_installed('topdf')) {
            $pdf_book_url = XOOPS_URL . '/modules/docs/index.php?page=content&id=' . $section->id() . '&action=pdfbook';
            $pdf_section_url = XOOPS_URL . '/modules/docs/index.php?page=content&id=' . $section->id() . '&action=pdfsection';
        }
        $print_book_url = XOOPS_URL . '/modules/docs/index.php?page=content&id=' . $section->id() . '&action=printbook';
        $print_section_url = XOOPS_URL . '/modules/docs/index.php?page=content&id=' . $section->id() . '&action=printsection';
        if (RDFunctions::new_resource_allowed($xoopsUser ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS)) {
            $publish_url = RDFunctions::url() . '/?action=publish';
        }
    }
    // Comments
    RMFunctions::get_comments('docs', 'res=' . $res->id() . '&id=' . $section->id(), 'module', 0);
    RMFunctions::comments_form('docs', 'res=' . $res->id() . '&id=' . $section->id(), 'module', RDPATH . '/class/mywordscontroller.php');
    RDFunctions::breadcrumb();
    RMBreadCrumb::get()->add_crumb($res->getVar('title'), $res->permalink());
    RMBreadCrumb::get()->add_crumb($section->getVar('title'), $section->permalink());
    include RMEvents::get()->run_event('docs.section.template', RMTemplate::get()->get_template('rd_section.php', 'module', 'docs'));
    if ($standalone) {
        RDFunctions::standalone();
    }
    include 'footer.php';
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:89,代码来源:content.php

示例2: showSetContent


//.........这里部分代码省略.........
     * @desc Formato para el manejo de las imágenes
     */
    if ($mc['set_format_mode']) {
        $format = $mc['set_format_values'];
        $crop = $format[0];
        // 0 = Redimensionar, 1 = Cortar
        $width = $format[1];
        $height = $format[2];
        $limit = $format[3];
        $cols = $format[4];
        @($showdesc = $format[5]);
        // Imágenes Grandes
        $format = $mc['setbig_format_values'];
        $bcrop = $format[0];
        $bwidth = $format[1];
        $bheight = $format[2];
        $blimit = $format[3];
        $bcols = $format[4];
        @($bshowdesc = $format[5]);
        // Medidas
        $tpl->assign('big_width', $bwidth + 15);
    } else {
        $limit = $mc['limit_pics'];
        $cols = $mc['cols_pics'];
        $showdesc = 0;
    }
    list($num) = $db->fetchRow($db->query($sql));
    if ($page > 0) {
        $page -= 1;
    }
    $start = $page * $limit;
    $tpages = (int) ($num / $limit);
    if ($num % $limit > 0) {
        $tpages++;
    }
    $pactual = $page + 1;
    if ($pactual > $tpages) {
        $pactual = $tpages;
        $start = ($tpages - 1) * $limit;
    }
    $urlnav = '';
    if ($tpages > 1) {
        $urlnav .= $mc['urlmode'] ? 'usr/' . $user->uname() . '/set/' . $set->id() : '?usr=' . $user->uname() . '&set=' . $set->id();
        $nav = new RMPageNav($num, $limit, $pactual, 5);
        $nav->target_url(GSFunctions::get_url() . $urlnav . ($mc['urlmode'] ? '/pag/{PAGE_NUM}/' : '&pag={PAGE_NUM}'));
        $tpl->assign('upNavPage', $nav->render(false));
    }
    $showmax = $start + $limit;
    $showmax = $showmax > $num ? $num : $showmax;
    $tpl->assign('lang_showing', sprintf(__('Showing pictures %u to %u out of %u.', 'galleries'), $start + 1, $showmax, $num));
    $tpl->assign('limit', $limit);
    $tpl->assign('pag', $pactual);
    //Fin de barra de navegación
    $sql = str_replace("COUNT(*)", '*', $sql);
    $sql .= " ORDER BY a.id_image ASC, a.modified DESC LIMIT {$start}, {$limit}";
    $result = $db->query($sql);
    while ($row = $db->fetchArray($result)) {
        $img = new GSImage();
        $img->assignVars($row);
        $imglink = $user->userURL() . ($mc['urlmode'] ? 'img/' . $img->id() . '/set/' . $set->id() . '/' : '&img=' . $img->id() . '&set=' . $set->id());
        $imgfile = $user->filesURL() . '/' . ($mc['set_format_mode'] ? 'formats/set_' : 'ths/') . $img->image();
        // Conversion de los formatos
        if (!$img->setFormat() && $mc['set_format_mode']) {
            GSFunctions::resizeImage($crop, $user->filesPath() . '/' . $img->image(), $user->filesPath() . '/formats/set_' . $img->image(), $width, $height);
            $img->setSetFormat(1, 1);
        }
        $tpl->append('images', array('id' => $img->id(), 'title' => $img->title(), 'thumbnail' => $imgfile, 'link' => $imglink, 'bigimage' => $user->filesURL() . '/' . $img->image()));
    }
    // Imagen grande del album
    $sql = "SELECT * FROM {$tbl1} a, {$tbl2} b WHERE b.id_set='" . $set->id() . "' AND a.id_image=b.id_image {$public} AND owner='" . $user->uid() . "' \n\t\t\tORDER BY a.id_image DESC LIMIT 0,{$blimit}";
    $result = $db->query($sql);
    $bi = 0;
    $tf = new RMTimeFormatter(0, __('%m%/%d%/%Y% %h%:%i%', 'galleries'));
    // cremos la imagen grande para los albumes
    while ($row = $db->fetchArray($result)) {
        $img = new GSImage();
        $img->assignVars($row);
        if ($mc['set_format_mode'] && !$img->bigSetFormat()) {
            GSFunctions::resizeImage($bcrop, $user->filesPath() . '/' . $img->image(), $user->filesPath() . '/formats/bigset_' . $img->image(), $bwidth, $bheight);
            $img->setBigSetFormat(1, 1);
        }
        if ($mc['set_format_mode']) {
            list($ancho, $altura, $tipo, $atr) = getimagesize($user->filesPath() . '/formats/bigset_' . $img->image());
            $tpl->assign('big_width', $ancho);
        }
        $imglink = $user->userURL() . 'img/' . $img->id() . '/set/' . $set->id() . '/';
        // ASignamos las imagenes grandes para los albumes
        $imgfile = $user->filesURL() . '/' . ($mc['set_format_mode'] ? 'formats/bigset_' : 'ths/') . $img->image();
        if ($bi == 0) {
            $tpl->assign('lang_updated', sprintf(__('Updated on %s', 'galleries'), $tf->format($img->created())));
        }
        $tpl->append('bigs', array('id' => $img->id(), 'title' => $img->title(), 'image' => $imgfile, 'link' => $imglink));
    }
    RMFunctions::get_comments('galleries', 'set=' . $set->id());
    // Comments form
    RMFunctions::comments_form('galleries', 'set=' . $set->id(), 'module', GS_PATH . '/class/galleriescontroller.php');
    // Datos para el formato
    $tpl->assign('max_cols', $cols);
    include 'footer.php';
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:101,代码来源:user.php

示例3: unset

    }
}
unset($tags_list);
// Comments
// When use the common utilities comments system you can choose between
// use of Common Utilities templates or use your own templates
// We will use MyWords included templates
if ($post->getVar('comstatus')) {
    $comms = RMFunctions::get_comments('mywords', 'post=' . $post->id(), 'module', 0, null, false);
    if (count($comms) != $post->getVar('comments')) {
        $post->setVar('comments', count($comms));
        $xoopsDB->queryF("UPDATE " . $xoopsDB->prefix("mw_posts") . " SET `comments`=" . count($comms) . " WHERE id_post=" . $post->id());
    }
    $xoopsTpl->assign('comments', $comms);
    // Comments form
    RMFunctions::comments_form('mywords', 'post=' . $post->id(), 'module', MW_PATH . '/class/mywordscontroller.php');
}
// Load trackbacks
$trackbacks = $post->trackbacks();
foreach ($trackbacks as $tb) {
    $xoopsTpl->append('trackbacks', array('id' => $tb->id(), 'title' => $tb->getVar('title'), 'blog' => $tb->getVar('blog_name'), 'url' => $tb->getVar('url'), 'text' => $tb->getVar('excerpt'), 'date' => formatTimestamp($tb->getVar('date'), 'c')));
}
// Language
$xoopsTpl->assign('lang_publish', __('Published in', 'mywords'));
$xoopsTpl->assign('lang_tagged', __('Tagged as', 'mywords'));
$xoopsTpl->assign('lang_numcoms', sprintf(__('%u Comments', 'mywords'), $post->getVar('comments')));
$xoopsTpl->assign('lang_numtracks', sprintf(__('%u trackbacks', 'mywords'), count($trackbacks)));
$xoopsTpl->assign('lang_trackback', __('Trackback', 'mywords'));
$xoopsTpl->assign('lang_homemw', __('Main Page', 'mywords'));
$xoopsTpl->assign('enable_images', $xoopsModuleConfig['post_imgs']);
//Trackback
开发者ID:laiello,项目名称:bitcero-modules,代码行数:31,代码来源:post.php

示例4: array

 // Show all content
 $toc = array();
 RDFunctions::sections_tree_index(0, 0, $res, '', '', false, $toc, true);
 array_walk($toc, 'rd_insert_edit');
 $last_modification = 0;
 foreach ($toc as $sec) {
     if ($sec['modified'] > $last_modification) {
         $last_modification = $sec['modified'];
         $last_author = array('id' => $sec['author'], 'name' => $sec['author_name']);
     }
 }
 RMTemplate::get()->add_jquery();
 RMTemplate::get()->add_script(XOOPS_URL . '/modules/docs/include/js/docs.js');
 // Comments
 RMFunctions::get_comments('docs', 'res=' . $res->id(), 'module', 0);
 RMFunctions::comments_form('docs', 'res=' . $res->id(), 'module', RDPATH . '/class/docscontroller.php');
 $res->add_read();
 // URLs
 if ($xoopsModuleConfig['permalinks']) {
     $config = array();
     $config =& $xoopsModuleConfig;
     /**
      * @todo Generate friendly links
      */
     if (RMFunctions::plugin_installed('topdf')) {
         $pdf_book_url = ($xoopsModuleConfig['subdomain'] != '' ? $xoopsModuleConfig['subdomain'] : XOOPS_URL) . $xoopsModuleConfig['htpath'] . '/pdfbook/' . $toc[0]['id'] . '/';
     }
     $print_book_url = ($xoopsModuleConfig['subdomain'] != '' ? $xoopsModuleConfig['subdomain'] : XOOPS_URL) . $xoopsModuleConfig['htpath'] . '/printbook/' . $toc[0]['id'] . '/';
     if (RDFunctions::new_resource_allowed($xoopsUser ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS)) {
         $publish_url = RDFunctions::url() . '/publish/';
     }
开发者ID:laiello,项目名称:bitcero-modules,代码行数:31,代码来源:resource.php

示例5: __

}
$tpl->assign('lang_desc', __('Description', 'works'));
$tpl->assign('lang_catego', __('Category', 'works'));
$tpl->assign('lang_client', __('Customer', 'admin_works'));
$tpl->assign('lang_start', __('Begins', 'works'));
$tpl->assign('lang_period', __('Time length', 'works'));
$tpl->assign('lang_comment', __('Comment', 'works'));
$tpl->assign('lang_cost', __('Price', 'works'));
$tpl->assign('lang_others', __('Related Works', 'works'));
$tpl->assign('lang_date', __('Date', 'works'));
$tpl->assign('lang_images', __('Work Images', 'works'));
$tpl->assign('lang_site', __('Web site', 'works'));
$tpl->assign('lang_mark', __('Featured', 'works'));
$tpl->assign('lang_rating', __('Our Rate', 'works'));
$tpl->assign('works_type', $mc['other_works']);
$tpl->assign('lang_views', __('Views', 'works'));
$imgSize = $mc['image_main'];
$thsSize = $mc['image_ths'];
$tpl->assign('widthimg', $thsSize[0] + 10);
$tpl->assign('widthOther', $thsSize[0] + 20);
PWFunctions::makeHeader();
RMFunctions::get_comments('works', 'work=' . $work->id());
// Comments form
RMFunctions::comments_form('works', 'work=' . $work->id(), 'module', PW_ROOT . '/class/workscontroller.php');
// Professional Works uses LightBox plugin to show
// work images.
if (RMFunctions::plugin_installed('lightbox')) {
    RMLightbox::get()->add_element('#pw-work-images a');
    RMLightbox::get()->render();
}
include 'footer.php';
开发者ID:laiello,项目名称:bitcero-modules,代码行数:31,代码来源:work.php

示例6: __

$xoopsTpl->assign('lang_published', __('Published on:', 'dtransport'));
$xoopsTpl->assign('lang_downopts', __('Download Options', 'dtransport'));
$xoopsTpl->assign('lang_details', __('Details', 'dtransport'));
$xoopsTpl->assign('lang_logs', __('Logs', 'dtransport'));
$xoopsTpl->assign('lang_features', __('Features', 'dtransport'));
$xoopsTpl->assign('lang_choose', __('You can choose between next download options if you prefer another file type or another location.', 'dtransport'));
// Download options labels
$xoopsTpl->assign('lang_title', __('Title', 'dtransport'));
$xoopsTpl->assign('lang_size', __('Size', 'dtransport'));
$xoopsTpl->assign('lang_hits', __('Hits', 'dtransport'));
$xoopsTpl->assign('xoops_pagetitle', $item->getVar('name') . ($item->getVar('version') != '' ? " " . $item->getVar('version') : '') . " » " . $xoopsModule->name());
// Ubicación Actual
//$location = "<strong>"._MS_DT_YOUREHERE."</strong> <a href='".DT_URL."'>".$xoopsModule->name()."</a> &raquo; ";
$location .= " &raquo; <strong>" . $item->getVar('name') . "</strong>";
$xoopsTpl->assign('dt_location', $location);
$tpl->add_xoops_style('main.css', 'dtransport');
$tpl->add_local_script('main.js', 'dtransport');
$metas = $data['metas'];
$rmf->add_keywords_description(isset($metas['description']) ? $metas['description'] : $item->getVar('shortdesc'), isset($metas['keywords']) ? $metas['keywords'] : '');
// Lightbox plugins
if ($rmf->plugin_installed("lightbox")) {
    $lightbox = RMLightbox::get();
    $lightbox->add_element("a.item-images");
    $lightbox->add_element("#dt-item-features a");
    $lightbox->render();
}
// Comments
$rmf->get_comments('dtransport', 'item=' . $item->id(), 'module', 0, null, true);
// Comments form
RMFunctions::comments_form('dtransport', 'item=' . $item->id(), 'module', DT_PATH . '/class/dtransportcontroller.php');
include 'footer.php';
开发者ID:laiello,项目名称:bitcero-modules,代码行数:31,代码来源:item.php


注:本文中的RMFunctions::comments_form方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。