A series of changes to push Elgg's approach to themes in a more CSS driven direction...
[elgg.git] / content / mainindex / content_main_index.php
blob5d8e3a4ce3686ab10b12de5dca52e9935be736f7
1 <?php
3 $sitename = sitename;
5 $run_result = "<h3>" . gettext("Welcome") . "</h3>";
6 $run_result .= "<p><b>" . sprintf(gettext("Why not <a href=\"%s\">create your profile</a>?"), url . "profile/edit.php") . "</b></p>";
7 $run_result .= "<p>". gettext("Tell people about yourself and connect to others with similar interests and goals.") . "<br />";
9 $users = db_query("SELECT distinct users.*, icons.filename as iconfile FROM tags LEFT JOIN users ON users.ident = tags.owner left join icons on icons.ident = users.icon WHERE (tags.tagtype = 'biography' OR tags.tagtype = 'minibio' OR tags.tagtype = 'interests')AND users.icon != -1 AND tags.access = 'PUBLIC' and users.user_type = 'person' ORDER BY rand( ) LIMIT 3 ");
11 if (sizeof($users) > 0) {
12 if (sizeof($users) > 1) {
13 $run_result .= gettext("Here are some examples of complete profiles:");
14 } else {
15 $run_result .= gettext("Here is an example of a complete profile:");
17 foreach($users as $key => $user) {
18 if ($key > 0) {
19 $run_result .= ", ";
20 } else {
21 $run_result .= " ";
23 $run_result .= "<a href=\"" . url . $user->username . "/\">" . stripslashes($user->name) . "</a>";
27 $run_result .= "</p>";
29 $run_result .= "<p><b>" . sprintf(gettext("Or you could <a href=\"%s\">start your blog</a>?"),url . "_weblog/edit.php") . "</b><br /><br />";
30 $run_result .= sprintf(gettext("Comment on what you're learning, collect interesting links and decide who gets to see what you're writing. Here's what <a href=\"%s\">everyone else is talking about</a> right now."),url . "_weblog/everyone.php") . "</p>";
31 $run_result .= "<p>&nbsp;</p>";
33 $news = db_query("select weblog_posts.* from weblog_posts left join users on users.ident = weblog_posts.weblog where users.username = 'news' order by posted desc limit 1");
34 if (sizeof($news) > 0) {
36 $news = $news[0];
38 $run_result .= "<div class=\"sitenews\">";
39 $run_result .= "<h2>" . gettext("Latest news") . "</h2>";
40 $run_result .= "<p>" . nl2br(stripslashes($news->body)) . "</p>";
41 $run_result .= "</div>";