-
Notifications
You must be signed in to change notification settings - Fork 1
/
helpstart.php
39 lines (28 loc) · 1.11 KB
/
helpstart.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?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');
}
?>