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


PHP glossary_print_entry_concept函数代码示例

本文整理汇总了PHP中glossary_print_entry_concept函数的典型用法代码示例。如果您正苦于以下问题:PHP glossary_print_entry_concept函数的具体用法?PHP glossary_print_entry_concept怎么用?PHP glossary_print_entry_concept使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: glossary_show_entry_fullwithoutauthor

function glossary_show_entry_fullwithoutauthor($course, $cm, $glossary, $entry, $mode = "", $hook = "", $printicons = 1, $ratings = NULL, $aliases = true)
{
    global $CFG, $USER;
    $return = false;
    if ($entry) {
        echo '<table class="glossarypost fullwithoutauthor" cellspacing="0">';
        echo '<tr valign="top">';
        echo '<th class="entryheader">';
        echo '<div class="concept">';
        glossary_print_entry_concept($entry);
        echo '</div>';
        echo '<span class="time">(' . get_string('lastedited') . ': ' . userdate($entry->timemodified) . ')</span>';
        echo '</th>';
        echo '<td class="entryattachment">';
        glossary_print_entry_approval($cm, $entry, $mode);
        glossary_print_entry_attachment($entry, $cm, 'html', 'right');
        echo '</td>';
        echo '</tr>';
        echo '<tr valign="top">';
        echo '<td width="100%" colspan="2" class="entry">';
        glossary_print_entry_definition($entry, $glossary, $cm);
        echo '</td></tr>';
        echo '<tr valign="top"><td colspan="2" class="entrylowersection">';
        $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $ratings, $aliases);
        echo ' ';
        echo '</td></tr>';
        echo "</table>\n";
    } else {
        echo '<center>';
        print_string('noentry', 'glossary');
        echo '</center>';
    }
    return $return;
}
开发者ID:ajv,项目名称:Offline-Caching,代码行数:34,代码来源:fullwithoutauthor_format.php

示例2: glossary_show_entry_faq

function glossary_show_entry_faq($course, $cm, $glossary, $entry, $mode = "", $hook = "", $printicons = 1, $aliases = true)
{
    global $USER;
    if ($entry) {
        echo '<table class="glossarypost faq" cellspacing="0">';
        echo '<tr valign="top">';
        echo '<th class="entryheader">';
        $entry->course = $course->id;
        echo '<div class="concept">' . get_string('question', 'glossary') . ': ';
        glossary_print_entry_concept($entry);
        echo '</div>';
        echo '<span class="time">(' . get_string('lastedited') . ': ' . userdate($entry->timemodified) . ')</span>';
        echo '</th>';
        echo '<td class="entryattachment">';
        glossary_print_entry_approval($cm, $entry, $mode);
        echo '</td>';
        echo '</tr>';
        echo "\n<tr>";
        echo '<td colspan="2" class="entry">';
        echo '<b>' . get_string('answer', 'glossary') . ':</b> ';
        glossary_print_entry_definition($entry, $glossary, $cm);
        glossary_print_entry_attachment($entry, $cm, 'html');
        echo '</td></tr>';
        echo '<tr valign="top"><td colspan="3" class="entrylowersection">';
        glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $aliases);
        echo '</td></tr></table>';
    } else {
        echo '<div style="text-align:center">';
        print_string('noentry', 'glossary');
        echo '</div>';
    }
}
开发者ID:evltuma,项目名称:moodle,代码行数:32,代码来源:faq_format.php

示例3: glossary_show_entry_encyclopedia

function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode = '', $hook = '', $printicons = 1, $ratings = NULL, $aliases = true)
{
    global $CFG, $USER, $DB;
    $user = $DB->get_record('user', array('id' => $entry->userid));
    $strby = get_string('writtenby', 'glossary');
    $return = false;
    if ($entry) {
        echo '<table class="glossarypost encyclopedia" cellspacing="0">';
        echo '<tr valign="top">';
        echo '<td class="left picture">';
        print_user_picture($user, $course->id, $user->picture);
        echo '</td>';
        echo '<th class="entryheader">';
        echo '<div class="concept">';
        glossary_print_entry_concept($entry);
        echo '</div>';
        $fullname = fullname($user);
        $by = new object();
        $by->name = '<a href="' . $CFG->wwwroot . '/user/view.php?id=' . $user->id . '&amp;course=' . $course->id . '">' . $fullname . '</a>';
        $by->date = userdate($entry->timemodified);
        echo '<span class="author">' . get_string('bynameondate', 'forum', $by) . '</span>';
        echo '</th>';
        echo '<td class="entryapproval">';
        glossary_print_entry_approval($cm, $entry, $mode);
        echo '</td>';
        echo '</tr>';
        echo '<tr valign="top">';
        echo '<td class="left side" rowspan="2">&nbsp;</td>';
        echo '<td colspan="2" class="entry">';
        if ($entry->attachment) {
            $entry->course = $course->id;
            if (strlen($entry->definition) % 2) {
                $align = 'right';
            } else {
                $align = 'left';
            }
            glossary_print_entry_attachment($entry, $cm, null, $align, false);
        }
        glossary_print_entry_definition($entry, $glossary, $cm);
        if ($printicons or $ratings or $aliases) {
            echo '</td></tr>';
            echo '<tr>';
            echo '<td colspan="2" class="entrylowersection">';
            $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $ratings, $aliases);
            echo ' ';
        }
        echo '</td></tr>';
        echo "</table>\n";
    } else {
        echo '<div style="text-align:center">';
        print_string('noentry', 'glossary');
        echo '</div>';
    }
    return $return;
}
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:55,代码来源:encyclopedia_format.php

示例4: glossary_print_entry_entrylist

function glossary_print_entry_entrylist($course, $cm, $glossary, $entry, $mode = '', $hook = '', $printicons = 1)
{
    //The print view for this format is different from the normal view, so we implement it here completely
    global $CFG, $USER;
    //Take out autolinking in definitions un print view
    $entry->definition = '<span class="nolink">' . $entry->definition . '</span>';
    echo '<table class="glossarypost entrylist">';
    echo '<tr valign="top">';
    echo '<td class="entry">';
    echo '<b>';
    glossary_print_entry_concept($entry);
    echo ':</b> ';
    glossary_print_entry_definition($entry, $glossary, $cm);
    glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, false, false);
    echo '</td>';
    echo '</tr>';
    echo "</table>\n";
}
开发者ID:nmicha,项目名称:moodle,代码行数:18,代码来源:entrylist_format.php

示例5: glossary_show_entry_dictionary

function glossary_show_entry_dictionary($course, $cm, $glossary, $entry, $mode = '', $hook = '', $printicons = 1, $aliases = true)
{
    global $CFG, $USER;
    echo '<table class="glossarypost dictionary" cellspacing="0">';
    echo '<tr valign="top">';
    echo '<td class="entry">';
    glossary_print_entry_approval($cm, $entry, $mode);
    glossary_print_entry_attachment($entry, $cm, 'html', 'right');
    echo '<div class="concept">';
    glossary_print_entry_concept($entry);
    echo '</div> ';
    glossary_print_entry_definition($entry, $glossary, $cm);
    echo '</td></tr>';
    echo '<tr valign="top"><td class="entrylowersection">';
    glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $aliases);
    echo '</td>';
    echo '</tr>';
    echo "</table>\n";
}
开发者ID:EmmanuelYupit,项目名称:educursos,代码行数:19,代码来源:dictionary_format.php

示例6: glossary_show_entry_continuous

function glossary_show_entry_continuous($course, $cm, $glossary, $entry, $mode = '', $hook = '', $printicons = 1, $ratings = NULL, $aliases = false)
{
    global $USER;
    echo '<table class="glossarypost continuous" cellspacing="0">';
    echo '<tr valign="top">';
    echo '<td class="entry">';
    glossary_print_entry_approval($cm, $entry, $mode);
    glossary_print_entry_attachment($entry, 'html', 'right');
    echo '<span class="concept">';
    glossary_print_entry_concept($entry);
    echo ':</span> ';
    glossary_print_entry_definition($entry);
    $entry->alias = '';
    echo '</td></tr>';
    echo '<tr valign="top"><td class="entrylowersection">';
    $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $ratings, $aliases);
    echo '</td>';
    echo '</tr>';
    echo "</table>\n";
    return $return;
}
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:21,代码来源:continuous_format.php

示例7: glossary_print_entry_entrylist

function glossary_print_entry_entrylist($course, $cm, $glossary, $entry, $mode = '', $hook = '', $printicons = 1)
{
    //Take out autolinking in definitions un print view
    // TODO use <nolink> tags MDL-15555.
    $entry->definition = '<span class="nolink">' . $entry->definition . '</span>';
    echo html_writer::start_tag('table', array('class' => 'glossarypost entrylist mod-glossary-entrylist'));
    echo html_writer::start_tag('tr');
    echo html_writer::start_tag('td', array('class' => 'entry mod-glossary-entry'));
    echo html_writer::start_tag('div', array('class' => 'mod-glossary-concept'));
    glossary_print_entry_concept($entry);
    echo html_writer::end_tag('div');
    echo html_writer::start_tag('div', array('class' => 'mod-glossary-definition'));
    glossary_print_entry_definition($entry, $glossary, $cm);
    echo html_writer::end_tag('div');
    echo html_writer::start_tag('div', array('class' => 'mod-glossary-lower-section'));
    glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, false, false);
    echo html_writer::end_tag('div');
    echo html_writer::end_tag('td');
    echo html_writer::end_tag('tr');
    echo html_writer::end_tag('table');
}
开发者ID:evltuma,项目名称:moodle,代码行数:21,代码来源:entrylist_format.php

示例8: glossary_show_entry_TEMPLATE

function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode = '', $hook = '', $printicons = 1, $ratings = NULL, $aliases = true)
{
    global $CFG, $USER, $DB, $OUTPUT;
    $user = $DB->get_record('user', array('id' => $entry->userid));
    $strby = get_string('writtenby', 'glossary');
    if ($entry) {
        echo '<table class="glossarypost TEMPLATE">';
        echo '<tr>';
        echo '<td class="entryheader">';
        //Use this function to show author's image
        //Comments: Configuration not supported
        echo $OUTPUT->user_picture(moodle_user_picture::make($user, $course->id));
        //Line separator to show this template fine. :-)
        echo '<br />';
        //Use this code to show author's name
        //Comments: Configuration not supported
        $fullname = fullname($user);
        $by = new object();
        $by->name = '<a href="' . $CFG->wwwroot . '/user/view.php?id=' . $user->id . '&amp;course=' . $course->id . '">' . $fullname . '</a>';
        $by->date = userdate($entry->timemodified);
        echo '<span class="author">' . get_string('bynameondate', 'forum', $by) . '</span>' . '<br />';
        //Use this code to show modification date
        //Comments: Configuration not supported
        echo get_string('lastedited') . ': ' . userdate($entry->timemodified) . '<br /></span>';
        //Use this function to show the approval button. It'll be shown if necessary
        //Comments: You can configure this parameters:
        //----Define where to show the approval button
        $approvalalign = 'right';
        //Values: left, center and right (default right)
        //----Define if the approval button must be showed into a 100% width table
        $approvalinsidetable = true;
        //Values: true, false (default true)
        //Call the function
        glossary_print_entry_approval($cm, $entry, $mode, $approvalalign, $approvalinsidetable);
        //Line separator to show this template fine. :-)
        echo '<br />';
        echo '</td>';
        echo '<td class="entryattachment">';
        //Use this function to show the attachment. It'll be showed if necessary
        //Comments: You can configure this parameters:
        //----Define how to show the attachment
        $attachmentformat = 'html';
        //Values: html (link) and NULL (inline image if possible) (default NULL)
        //----Define where to show the attachment
        $attachmentalign = 'right';
        //Values: left, center and right (default right)
        //----Define if the attachment must be showed into a 100% width table
        $attachmentinsidetable = true;
        //Values: true, false (default true)
        //Call the function
        glossary_print_entry_attachment($entry, $cm, $attachmentformat, $attachmentalign, $attachmentinsidetable);
        //Line separator to show this template fine. :-)
        echo "<br />\n";
        echo '</td></tr>';
        echo '<tr valign="top">';
        echo '<td class="entry">';
        //Use this function to print the concept in a heading <h3>
        //Comments: Configuration not supported
        glossary_print_entry_concept($entry);
        //Line separator not normally needed now.
        //echo "<br />\n";
        //Use this function to show the definition
        //Comments: Configuration not supported
        glossary_print_entry_definition($entry, $glossary, $cm);
        //Line separator to show this template fine. :-)
        echo "<br />\n";
        //Use this function to show aliases, editing icons and ratings (all know as the 'lower section')
        //Comments: You can configure this parameters:
        //----Define when to show the aliases popup
        //    use it only if you are really sure!
        //$aliases = true; //Values: true, false (Default: true)
        //----Uncoment this line to avoid ratings being showed
        //    use it only if you are really sure! You can define this in the glossary conf. page.
        //$ratings = NULL;
        //----Uncoment this line to avoid editing icons being showed
        //    use it only if you are really sure!
        //$printicons = false;
        $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $ratings, $aliases);
        echo '</td>';
        echo '</tr>';
        echo "</table>\n";
    } else {
        echo '<div style="text-align:center">';
        print_string('noentry', 'glossary');
        echo '</div>';
    }
    return $return;
}
开发者ID:ajv,项目名称:Offline-Caching,代码行数:88,代码来源:TEMPLATE_format.php


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