Changeset 643 for team

Show
Ignore:
Timestamp:
09/16/07 17:00:23 (14 months ago)
Author:
www-data
Message:

automerge commit

Location:
team/michiel/import_blogs
Files:
3 modified
2 copied

Legend:

Unmodified
Added
Removed
  • team/michiel/import_blogs

    • Property svnmerge-integrated changed from /trunk:1-639 to /trunk:1-642
  • team/michiel/import_blogs/common/mvblog.php

    r640 r643  
    480480 
    481481                                foreach ($comments as $comment_id=>$comment) { 
    482                                         ?> 
    483                                         <a name="comment<?php echo $comment_id; ?>"></a> 
    484                                         <div class="log_comment_head"> 
    485                                                 <span class="log_comment_subject"> 
    486                                                         <h1 class="log_comment_h1"><?php echo $comment["title"]; ?></h1> 
    487                                                 </span> 
    488                                         </div> 
    489                                         <div class="log_comment_body"> 
    490                                                 <?php echo $comment["comment"]; 
    491                                                 ?> 
    492                                         </div> 
    493                                         <div class="log_comment_foot"> 
    494                                                 <span class="log_comment_author"> 
    495                                                         <?php 
    496                                                                 echo gettext("posted by").": ".$comment["name"]; 
    497                                                                 if ($comment["ip"]) 
    498                                                                         echo "&nbsp;(".$comment["ip"].")&nbsp;"; 
    499                                                                 echo gettext("on").": ".$comment["hdate"]; 
    500                                                         ?> 
    501                                                 </span> 
    502  
    503                                                 <?php if ($comment["email"]) { ?> 
    504                                                         <br /><span class="log_comment_email"><a href="mailto:<?php echo $comment["email"]; ?>"><?php echo $comment["email"]; ?></a></span> 
    505                                                 <?php } ?> 
    506                                                 <?php if ($comment["website"] && $comment["website"] != "http://") { ?> 
    507                                                         <span class="log_comment_website"><a href="<?php echo $comment["website"]; ?>"><?php echo $comment["website"]; ?></a></span> 
    508                                                 <?php } ?> 
    509                                         </div> 
    510                                         <?php 
     482                                        echo $this->show_comment($comment); 
    511483                                } 
    512484                        } 
    513485                        ?> 
     486                </div> 
     487                <div class="log_comment" id="commentpreviewdiv" style="visibility: hidden;"> 
    514488                </div> 
    515489                <div class="log_form"> 
     
    546520                                        } 
    547521                                        ?> 
    548                                         <form name="comment" method="post" action="index.php"> 
     522                                        <form name="comment" id="commentform" method="post" action="index.php"> 
    549523                                        <input type="hidden" name="action" value="post_comment" /> 
     524                                        <input type="hidden" name="id" id="id" value="" /> 
    550525                                        <input type="hidden" name="articles_id" value="<?php echo (int)$id; ?>" /> 
    551526                                        <table><tr> 
     
    581556                                        </tr><tr> 
    582557                                                <td class="log_form_name"><?php echo gettext("title"); ?>:</td> 
    583                                                 <td class="log_form_value"><input type="text" name="comment_title" size="30" value="" /></td> 
     558                                                <td class="log_form_value"><input type="text" name="comment_title" size="30" value="<?php if (array_key_exists("comment_title", $_POST)) echo $_POST["comment_title"]; ?>" /></td> 
    584559                                        <?php if ($locked == 0) { ?> 
    585560                                                </tr><tr> 
     
    594569                                                                echo "[b][i][u][url=http...][quote][code][strike][email][img]<br />"; 
    595570                                                        ?> 
    596                                                         <textarea name="comment_content" rows="20" cols="50"></textarea><br /> 
     571                                                        <textarea name="comment_content" rows="20" cols="50"><?php if (array_key_exists("comment_content", $_POST)) echo $_POST["comment_content"]; ?></textarea><br /> 
    597572                                                        <?php 
    598573                                                                if ($anoncomments && !array_key_exists("blog_user", $_SESSION) && !array_key_exists("author_email", $_SESSION)) 
    599574                                                                        $this->show_captcha(); 
    600575                                                        ?> 
     576                                                        <script type="text/javascript" language="Javascript1.2" src="common/js/xmlhttp.js"></script> 
     577                                                        <script type="text/javascript" language="Javascript1.2"> 
     578                                                                function previewComment() { 
     579                                                                        var commentform = document.getElementById('commentform'); 
     580                                                                        var title = escape(commentform.comment_title.value); 
     581                                                                        var comment = escape(commentform.comment_content.value); 
     582                                                                        var name = escape(commentform.comment_author.value); 
     583                                                                        var email = escape(commentform.comment_email.value); 
     584                                                                        var website = escape(commentform.comment_url.value); 
     585                                                                        var previewurl = 'common/previewcomment.php?action=show_comment_preview&title=' + title + '&comment=' + comment + '&name=' + name + '&email=' + email + '&website=' + website; 
     586                                                                        document.getElementById('commentpreviewdiv').innerHTML = loadXMLContent(previewurl); 
     587                                                                        document.getElementById('commentpreviewdiv').style.visibility='visible'; 
     588                                                                } 
     589                                                        </script> 
     590                                                        <input type="button" onclick="javascript: previewComment();" value="<?php echo gettext("preview comment"); ?>" /> 
    601591                                                        <input type="submit" value="<?php echo gettext("post comment"); ?>" /> 
    602592                                                </td> 
     
    607597                </div> 
    608598                <?php 
     599        } 
     600        /* }}} */ 
     601        /* show_comment {{{ */ 
     602        /** 
     603         * Format the output for a comment. 
     604         * 
     605         * @param array $commentdata The data for this comment 
     606         */ 
     607        public function show_comment($commentdata) { 
     608                $output =""; 
     609                $output .= "<div class=\"log_comment_head\">\n"; 
     610                $output .= "\t<span class=\"log_comment_subject\">\n"; 
     611                $output .= "\t\t<h1 class=\"log_comment_h1\">".$commentdata["title"]."</h1>\n"; 
     612                $output .= "\t</span>\n"; 
     613                $output .= "</div>\n"; 
     614                $output .= "<div class=\"log_comment_body\">\n"; 
     615                $output .= "\t".$commentdata["comment"]."\n"; 
     616                $output .= "</div>\n"; 
     617                $output .= "<div class=\"log_comment_foot\">\n"; 
     618                $output .= "\t<span class=\"log_comment_author\">\n"; 
     619                $output .= "\t\t".gettext("posted by").": ".$commentdata["name"]; 
     620                if ($commentdata["ip"]) 
     621                        $output .= "&nbsp;(".$commentdata["ip"].")&nbsp;"; 
     622                if (array_key_exists("hdate", $commentdata)) 
     623                        $output .= gettext("on").": ".$commentdata["hdate"]."\n"; 
     624                else 
     625                        $output .= gettext("on").": ".date("d-m-Y H:i")."\n"; 
     626                $output .= "\t</span>\n"; 
     627                if ($commentdata["email"]) 
     628                        $output .= "\t<br /><span class=\"log_comment_email\"><a href=\"mailto:".$commentdata["email"]."\">".$commentdata["email"]."</a></span>\n"; 
     629                if ($commentdata["website"] && $commentdata["website"] != "http://") 
     630                        $output .= "\t<span class=\"log_comment_website\"><a href=\"".$commentdata["website"]."\">".$commentdata["website"]."</a></span>\n"; 
     631                $output .= "</div>\n"; 
     632 
     633                return $output; 
    609634        } 
    610635        /* }}} */ 
  • team/michiel/import_blogs/common/mvblog_admin.php

    r638 r643  
    10131013                        <select name="options[year]"> 
    10141014                                <option value="0">---</option> 
    1015                                 <? 
     1015                                <?php 
    10161016                                /* find the first post we made so we know the start year */ 
    10171017                                $sql1 = sprintf("SELECT %s FROM articles ORDER BY date ASC", $this->db_quote("date"));