|
Revision 84, 1.5 kB
(checked in by dave, 3 years ago)
|
A series of changes to push Elgg's approach to themes in a more CSS driven direction. There are still a couple of small tables which house admin data in a tabular format. Over time these will be replaced. I will also send a message around to the development mailing list detailing what I have done. All themes prior to these changes are now obsolete.
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
// Run includes |
|---|
| 6 |
require("../includes.php"); |
|---|
| 7 |
|
|---|
| 8 |
run("profile:init"); |
|---|
| 9 |
run("friends:init"); |
|---|
| 10 |
run("weblogs:init"); |
|---|
| 11 |
|
|---|
| 12 |
define("context", "weblog"); |
|---|
| 13 |
|
|---|
| 14 |
global $profile_id; |
|---|
| 15 |
global $individual; |
|---|
| 16 |
|
|---|
| 17 |
$individual = 1; |
|---|
| 18 |
|
|---|
| 19 |
if (isset($_REQUEST['post'])) { |
|---|
| 20 |
|
|---|
| 21 |
$post = (int) $_REQUEST['post']; |
|---|
| 22 |
|
|---|
| 23 |
$where = run("users:access_level_sql_where",$_SESSION['userid']); |
|---|
| 24 |
$post = db_query("select * from weblog_posts where ($where) and ident = $post"); |
|---|
| 25 |
|
|---|
| 26 |
if (sizeof($post) > 0) { |
|---|
| 27 |
$post = $post[0]; |
|---|
| 28 |
} else { |
|---|
| 29 |
$post = ""; |
|---|
| 30 |
$post->weblog = -1; |
|---|
| 31 |
$post->owner = -1; |
|---|
| 32 |
$post->title = gettext("Access denied or post not found"); |
|---|
| 33 |
$post->posted = time(); |
|---|
| 34 |
$post->ident = -1; |
|---|
| 35 |
$post->body = gettext("Either this blog post doesn't exist or you don't currently have access privileges to view it."); |
|---|
| 36 |
} |
|---|
| 37 |
|
|---|
| 38 |
global $page_owner; |
|---|
| 39 |
global $profile_id; |
|---|
| 40 |
$profile_id = $post->weblog; |
|---|
| 41 |
$page_owner = $post->weblog; |
|---|
| 42 |
|
|---|
| 43 |
$title = run("profile:display:name") . " :: " . gettext("Weblog") . " :: " . stripslashes($post->title); |
|---|
| 44 |
|
|---|
| 45 |
$time = gmdate("F d, Y",$post->posted); |
|---|
| 46 |
$body = "<h2 class=\"weblog_dateheader\">$time</h2>\n"; |
|---|
| 47 |
|
|---|
| 48 |
$body .= run("weblogs:posts:view:individual",$post); |
|---|
| 49 |
|
|---|
| 50 |
$body = run("templates:draw", array( |
|---|
| 51 |
'context' => 'contentholder', |
|---|
| 52 |
'title' => $title, |
|---|
| 53 |
'body' => $body |
|---|
| 54 |
) |
|---|
| 55 |
); |
|---|
| 56 |
|
|---|
| 57 |
echo run("templates:draw:page", array( |
|---|
| 58 |
$title, $body |
|---|
| 59 |
) |
|---|
| 60 |
); |
|---|
| 61 |
|
|---|
| 62 |
} |
|---|
| 63 |
|
|---|
| 64 |
?> |
|---|