Exemple #1
0
/** Tarkasta kysymys
 * @param $title string
 * @param $body string
 * @param $tags string
 * @return boolean
 */
function validate_input($title, $body, $tags)
{
    echo "sisalla validaatiossa";
    if (!validate_title($title)) {
        echo "Virheellinen title";
        return false;
    } else {
        if (!validate_body($body)) {
            echo "Virheellinen body";
            return false;
        } else {
            if (!validate_tags($tags)) {
                echo "Virheellinen tag";
                return false;
            } else {
                return true;
            }
        }
    }
}
Exemple #2
0
if ($_SAFE['use_weighting_bloglines']) {
    print "checked";
}
?>
> Use term weighting (terms found more frequently in your subscriptions are weighted higher)
<p><input type='submit' value='Go'/>
</form>	
</td>
</tr>
</table>
<?php 
$blog_ids = array();
$blog_names = array();
$blog_tags = array();
if ($connotea_tags) {
    $valid_tags = validate_tags(array_keys($connotea_tags));
    if (!$valid_tags) {
        print "<h3>Sorry</h3>";
        print "<p>None of the tags in " . $_SAFE['connotea_username'] . "'s library are in the Postgenomic index.";
        print_r($connotea_tags);
    } else {
        print "<h3>Matched Connotea tags</h3>";
        print_tagcloud($valid_tags);
        # try and match up tags with blogs in the database
        foreach ($connotea_tags as $tag => $freq) {
            $post_ids = get_posts_with_tag($tag);
            # what blogs are these posts from?
            if ($post_ids) {
                $done = array();
                $posts = get_posts("cited", array("post_id" => $post_ids));
                if ($posts) {