Beispiel #1
0
<?php

try {
    require_once "Sprinkles.php";
    $sprink = new Sprinkles();
    $top_topic_tags = take(20, $sprink->tags($api_root . 'companies/' . $sprink->company_sfnid . '/tags?on=topics&sort=usage&limit=20'));
    $chunk = intval(ceil(sizeof($top_topic_tags) / 4));
    $top_topic_tags = array_chunk($top_topic_tags, $chunk);
    $entries = $sprink->topics(array("limit" => $helpstart_topic_count, "sort" => 'recently_active'));
    // $sprink->resolve_authors($entries['topics']);
    $smarty->assign('top_topic_tags', $top_topic_tags);
    $smarty->assign('entries', $entries['topics']);
    # Standard stash items
    $smarty->assign('products', $sprink->product_list());
    $smarty->assign('current_url', 'helpstart.php');
    $smarty->assign('totals', $entries['totals']);
    $smarty->assign('filter_style', 'question');
    $sprink->add_std_hash_elems($smarty);
    $smarty->display('helpstart.t');
    finish_request('helpstart');
} catch (Exception $e) {
    error_log("Exception thrown while preparing page: " . $e->getMessage());
    $smarty->assign('error_msg', $e->getMessage());
    $smarty->display('error.t');
}
Beispiel #2
0
            $friendly_style = 'discussion';
            break;
        default:
            $friendly_style = 'topic';
    }
    $sprink->resolve_authors($suggested);
    $smarty->assign('subject', $subject);
    $smarty->assign('details', $details);
    $smarty->assign('tags', $tags);
    $smarty->assign('emoticon', $emoticon);
    $smarty->assign('emotion', $emotion);
    $smarty->assign('style', $style);
    $smarty->assign('friendly_style', $friendly_style);
    $smarty->assign('product', $selected_products);
    $smarty->assign('top_tags', $top_tags);
    $smarty->assign('top_tags_count', count($top_tags));
    $smarty->assign('suggested', $suggested);
    $products = $sprink->product_list();
    foreach ($products as &$product) {
        $product['selected'] = in_array($product['name'], $selected_products);
    }
    $smarty->assign('products', $products);
    $smarty->assign('err_subject', in_array('subject', $validation_errors));
    $smarty->assign('current_url', 'submit.php');
    $sprink->add_std_hash_elems($smarty);
    $smarty->display('submit.t');
    finish_request('submit');
} catch (Exception $e) {
    error_log("Exception thrown while preparing page: " . $e->getMessage());
    $smarty->display('error.t');
}