示例#1
0
function cleanDiscussionMetaData($discussionItems)
{
    // Remove Category name and split string on spaces
    $discussionItems = preg_replace('/(<category>(.*)<\\/category>)/', '', $discussionItems);
    $discussionItems = preg_split('/\\s+/', $discussionItems);
    // Format / retrieve desirable discussion metadata
    $discussionTitle = formatTitle($discussionItems[0]);
    $discussionCreated = formatCreated($discussionItems);
    $discussionAuthor = formatAuthor($discussionItems[7]);
    // print_r($discussionItems);
    return array('title' => $discussionTitle, 'created' => $discussionCreated, 'author' => $discussionAuthor);
}
示例#2
0
            echo $conferenceInfo->ConferenceStartDate;
            ?>
 to <?php 
            echo $conferenceInfo->ConferenceEndDate;
            ?>
</td>
                    </tr>
                    <tr> 
                      <td colspan="3" align="center">&nbsp;</td>
                    </tr>
                    <tr> 
                      <td colspan="3" align="center"><?php 
            $first = $registerInfo->FirstName;
            $middle = $registerInfo->MiddleName;
            $last = $registerInfo->LastName;
            $name = formatAuthor($first, $middle, $last);
            echo $name;
            ?>
</td>
                    </tr>
                    <tr> 
                      <td colspan="3" align="center"><?php 
            echo $registerInfo->Organisation;
            ?>
</td>
                    </tr>
                    <tr> 
                      <td colspan="3">&nbsp;</td>
                    </tr>
                    <tr> 
                      <td colspan="3" align="center">Hosted by <?php 
示例#3
0
function showThread(&$headers, &$liste, $depth, $tree, $group, $article_first = 0, $article_last = 0, &$article_count, $ajax)
{
    global $thread_treestyle;
    global $thread_showDate, $thread_showSubject;
    global $thread_showAuthor, $imgdir;
    global $file_article, $thread_maxSubject;
    global $age_count, $age_time, $age_color;
    global $frame_article, $thread_fontPre, $thread_fontPost;
    if ($thread_treestyle == 3) {
        echo "\n<UL>\n";
    }
    for ($i = 0; $i < count($liste); $i++) {
        $c = $headers[$liste[$i]];
        // read the first article
        $article_count++;
        switch ($thread_treestyle) {
            case 4:
                // thread
            // thread
            case 5:
                // thread, graphic
            // thread, graphic
            case 6:
                // thread, table
            // thread, table
            case 7:
                // thread, table, graphic
                $newtree = calculateTree($tree, $depth, $i, $liste, $c);
        }
        if ($article_first == 0 || $article_count >= $article_first && $article_count <= $article_last) {
            switch ($thread_treestyle) {
                case 0:
                    // simple list
                    echo $thread_fontPre;
                    if ($thread_showDate) {
                        echo formatDate($c) . " ";
                    }
                    if ($thread_showSubject) {
                        echo formatSubject($c, $group, $ajax) . " ";
                    }
                    if ($thread_showAuthor) {
                        echo "(" . formatAuthor($c) . ")";
                    }
                    echo $thread_fontPost;
                    echo "<br>\n";
                    break;
                case 1:
                    // html-auflistung, kein baum
                    echo "<li>";
                    echo "<nobr>" . $thread_fontPre;
                    if ($thread_showDate) {
                        echo formatDate($c) . " ";
                    }
                    if ($thread_showSubject) {
                        echo formatSubject($c, $group, $ajax) . " ";
                    }
                    if ($thread_showAuthor) {
                        echo "<i>(" . formatAuthor($c) . ")</i>";
                    }
                    echo $thread_fontPost . "</nobr>";
                    echo "</li>";
                    break;
                case 2:
                    // table
                    echo "<tr>";
                    if ($thread_showDate) {
                        echo "<td>" . $thread_fontPre . formatDate($c) . " " . $thread_fontPost . "</td>";
                    }
                    if ($thread_showSubject) {
                        echo '<td nowrap="nowrap">' . $thread_fontPre . formatSubject($c, $group, $ajax);
                        echo $thread_fontPost . "</td>";
                    }
                    if ($thread_showAuthor) {
                        echo "<td></td>";
                        echo '<td nowrap="nowrap">' . $thread_fontPre . formatAuthor($c);
                        echo $thread_fontPost . "</td>";
                    }
                    echo "</tr>\n";
                    break;
                case 3:
                    // html-tree
                    echo "<li>";
                    echo "<nobr>" . $thread_fontPre;
                    if ($thread_showDate) {
                        echo formatDate($c) . " ";
                    }
                    if ($thread_showSubject) {
                        echo formatSubject($c, $group, $ajax) . " ";
                    }
                    if ($thread_showAuthor) {
                        echo "<i>(" . formatAuthor($c) . ")</i>";
                    }
                    echo $thread_fontPost . "</nobr>";
                    echo "</li>\n";
                    break;
                case 4:
                    // thread
                    echo "<nobr><tt>" . $thread_fontPre;
                    if ($thread_showDate) {
                        echo formatDate($c) . " ";
                    }
                    /*echo formatTreeText($newtree)." ";*/
                    echo formatTreeText($newtree) . $thread_fontPost . "</tt> " . $thread_fontPre;
                    if ($thread_showSubject) {
                        echo formatSubject($c, $group, $ajax) . " ";
                    }
                    if ($thread_showAuthor) {
                        echo "<i>(" . formatAuthor($c) . ")</i>";
                    }
                    echo $thread_fontPost . "</nobr><br>";
                    break;
                case 5:
                    // thread, graphic
                    echo "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr>\n";
                    if ($thread_showDate) {
                        echo '<td nowrap="nowrap">' . $thread_fontPre . formatDate($c) . " " . $thread_fontPost . "</td>";
                    }
                    echo "<td>" . $thread_fontPre . formatTreeGraphic($newtree) . $thread_fontPost . "</td>";
                    if ($thread_showSubject) {
                        echo '<td nowrap="nowrap">' . $thread_fontPre . "&nbsp;" . formatSubject($c, $group, $ajax) . " ";
                    }
                    if ($thread_showAuthor) {
                        echo "(" . formatAuthor($c) . ")" . $thread_fontPost . "</td>";
                    }
                    echo "</tr>";
                    if ($ajax == true && ($thread_showSubject || $thread_showAuthor)) {
                        echo '<tr>';
                        if ($thread_showDate) {
                            echo '<td colspan=2></td>';
                        } else {
                            echo '<td></td>';
                        }
                        echo '<td><div id="msg' . $c->number . '" class="dynmsg"></div></td>';
                    }
                    echo "</table>";
                    break;
                case 6:
                    // thread, table
                    echo "<tr>";
                    if ($thread_showDate) {
                        echo '<td nowrap="nowrap"><tt>' . $thread_fontPre . formatDate($c) . " " . $thread_fontPost . "</tt></td>";
                    }
                    /*echo '<td nowrap="nowrap"><tt>'.$thread_fontPre.formatTreeText($newtree)." ";*/
                    echo '<td nowrap="nowrap"><tt>' . $thread_fontPre . formatTreeText($newtree) . "</tt>";
                    if ($thread_showSubject) {
                        echo formatSubject($c, $group, $ajax) . $thread_fontPost . "</td>";
                        echo "<td></td>";
                    }
                    if ($thread_showAuthor) {
                        /*echo '<td nowrap="nowrap"><tt>'.$thread_fontPre.formatAuthor($c).$thread_fontPost."</tt></td>";*/
                        echo '<td nowrap="nowrap">' . $thread_fontPre . formatAuthor($c) . $thread_fontPost . "</td>";
                    }
                    echo "</tr>";
                    break;
                case 7:
                    // thread, table, graphic
                    echo "<tr>";
                    if ($thread_showDate) {
                        echo '<td nowrap="nowrap">' . $thread_fontPre . formatDate($c) . " " . $thread_fontPost . "</td>";
                    }
                    echo "<td><table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n";
                    echo "<td>" . formatTreeGraphic($newtree) . "</td>";
                    if ($thread_showSubject) {
                        echo '<td nowrap="nowrap">' . $thread_fontPre . "&nbsp;" . formatSubject($c, $group, $ajax) . $thread_fontPost . "</td>";
                    }
                    echo "</table></td>";
                    if ($thread_showSubject) {
                        echo "<td></td>";
                    }
                    if ($thread_showAuthor) {
                        echo '<td nowrap="nowrap">' . $thread_fontPre . formatAuthor($c) . $thread_fontPost . "</td>";
                    }
                    echo "</tr>";
                    break;
            }
        }
        if (isset($c->answers[0]) && count($c->answers) > 0 && $article_count <= $article_last) {
            if ($thread_treestyle >= 4) {
                if (substr($newtree, $depth - 2, 1) == "+") {
                    $newtree = str_change($newtree, $depth - 2, "i");
                }
                $newtree = str_change($newtree, $depth - 1, "+");
                $newtree = strtr($newtree, "`", ".");
            }
            if (!isset($newtree)) {
                $newtree = "";
            }
            showThread($headers, $c->answers, $depth + 1, $newtree . "", $group, $article_first, $article_last, $article_count, $ajax);
        }
        flush();
    }
    if ($thread_treestyle == 3) {
        echo "</UL>";
    }
}