aboutsummaryrefslogtreecommitdiff
path: root/mod/sitepages/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'mod/sitepages/views/default')
-rw-r--r--mod/sitepages/views/default/settings/sitepages/edit.php7
-rw-r--r--mod/sitepages/views/default/sitepages/analytics.php13
-rw-r--r--mod/sitepages/views/default/sitepages/css.php9
-rw-r--r--mod/sitepages/views/default/sitepages/footer_menu.php11
-rw-r--r--mod/sitepages/views/default/sitepages/forms/edit.php92
-rw-r--r--mod/sitepages/views/default/sitepages/forms/editfront.php52
-rw-r--r--mod/sitepages/views/default/sitepages/forms/editmeta.php48
-rw-r--r--mod/sitepages/views/default/sitepages/keywords.php14
-rw-r--r--mod/sitepages/views/default/sitepages/menu.php22
-rw-r--r--mod/sitepages/views/default/sitepages/metatags.php17
10 files changed, 285 insertions, 0 deletions
diff --git a/mod/sitepages/views/default/settings/sitepages/edit.php b/mod/sitepages/views/default/settings/sitepages/edit.php
new file mode 100644
index 000000000..22f03abaf
--- /dev/null
+++ b/mod/sitepages/views/default/settings/sitepages/edit.php
@@ -0,0 +1,7 @@
+<p>
+ <?php echo elgg_echo('sitepages:ownfront'); ?>
+ <select name="params[ownfrontpage]">
+ <option value="yes" <?php if ($vars['entity']->ownfrontpage == 'yes') echo " selected=\"yes\" "; ?>><?php echo elgg_echo('option:yes'); ?></option>
+ <option value="no" <?php if ($vars['entity']->ownfrontpage != 'yes') echo " selected=\"yes\" "; ?>><?php echo elgg_echo('option:no'); ?></option>
+ </select>
+</p> \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/analytics.php b/mod/sitepages/views/default/sitepages/analytics.php
new file mode 100644
index 000000000..0a8e94b67
--- /dev/null
+++ b/mod/sitepages/views/default/sitepages/analytics.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Elgg Analytics view
+ */
+
+//get analytics content
+$contents = elgg_get_entities(array('type' => 'object', 'subtype' => 'analytics', 'limit' => 1));
+if($contents){
+ foreach($contents as $c){
+ echo $c->description;
+ }
+}
+
diff --git a/mod/sitepages/views/default/sitepages/css.php b/mod/sitepages/views/default/sitepages/css.php
new file mode 100644
index 000000000..5d7eabcd4
--- /dev/null
+++ b/mod/sitepages/views/default/sitepages/css.php
@@ -0,0 +1,9 @@
+<?php
+/**
+ * Elgg sitepages CSS
+ */
+?>
+
+/* IE6 */
+* html #front_left_tbl { width:676px !important; }
+* html #front_right_tbl { width:676px !important; } \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/footer_menu.php b/mod/sitepages/views/default/sitepages/footer_menu.php
new file mode 100644
index 000000000..5137e0f21
--- /dev/null
+++ b/mod/sitepages/views/default/sitepages/footer_menu.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Elgg External pages footer menu
+ */
+?>
+
+<div class="footer_toolbar_links">|
+<a href="<?php echo $vars['url']; ?>pg/sitepages/read/About/"><?php echo elgg_echo('sitepages:about'); ?></a> |
+<a href="<?php echo $vars['url']; ?>pg/sitepages/read/Terms/"><?php echo elgg_echo('sitepages:terms'); ?></a> |
+<a href="<?php echo $vars['url']; ?>pg/sitepages/read/Privacy/"><?php echo elgg_echo('sitepages:privacy'); ?></a> |
+</div> \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/forms/edit.php b/mod/sitepages/views/default/sitepages/forms/edit.php
new file mode 100644
index 000000000..94ec786b1
--- /dev/null
+++ b/mod/sitepages/views/default/sitepages/forms/edit.php
@@ -0,0 +1,92 @@
+<?php
+
+ /**
+ * Elgg sitepages edit
+ *
+ * @package Elggsitepages
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ *
+ */
+
+ //get the page type
+ $type = $vars['type'];
+
+ //action
+ $action = "sitepages/add";
+
+ //grab the required entity
+ $page_contents = elgg_get_entities(array('type' => 'object', 'subtype' => $type, 'limit' => 1));
+
+ if($page_contents){
+ foreach($page_contents as $pc){
+ $description = $pc->description;
+ $tags = $pc->tags;
+ $guid = $pc->guid;
+ }
+ }else {
+ $tags = "";
+ $description = "";
+ }
+
+ // set the required form variables
+ $input_area = elgg_view('input/longtext', array('internalname' => 'sitepagescontent', 'value' => $description));
+ $tag_input = elgg_view('input/tags', array('internalname' => 'sitepagestags', 'value' => $tags));
+ $submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
+ $hidden_value = elgg_view('input/hidden', array('internalname' => 'content_type', 'value' => $type));
+ $hidden_guid = elgg_view('input/hidden', array('internalname' => 'expage_guid', 'value' => $guid));
+ $tag_label = elgg_echo('tags') . "<br/>";
+
+ //type
+ $type = $vars['type'];
+ //set the url
+ $url = $vars['url'] . "pg/sitepages/index.php?type=";
+
+ if($type == 'about') {
+ $external_page_title = elgg_echo('sitepages:about');
+ }
+ else if($type == 'terms') {
+ $external_page_title = elgg_echo('sitepages:terms');
+ }
+ else if($type == 'privacy') {
+ $external_page_title = elgg_echo('sitepages:privacy');
+ }
+ //preview link
+ // echo "<div class=\"page_preview\"><a href=\"#preview\">" . elgg_echo('sitepages:preview') . "</a></div>";
+
+ //construct the form
+ $form_body = <<<EOT
+
+ <h3 class='settings'>$external_page_title</h3>
+ <p class='longtext_editarea'>$input_area</p>
+ <p>
+ $tag_label
+ $tag_input
+ </p>
+ $hidden_value
+ $hidden_guid
+ <br />
+ $submit_input
+
+EOT;
+?>
+<?php
+ //display the form
+ echo elgg_view('input/form', array('action' => "{$vars['url']}action/$action", 'body' => $form_body));
+?>
+
+<!-- preview page contents -->
+<!--
+<div class="expage_preview">
+<a name="preview"></a>
+<h2>Preview</h2>
+<?php
+ if($description)
+ echo $description;
+ else
+ echo elgg_echo('sitepages:nopreview');
+?>
+</div>
+--> \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/forms/editfront.php b/mod/sitepages/views/default/sitepages/forms/editfront.php
new file mode 100644
index 000000000..faea356f2
--- /dev/null
+++ b/mod/sitepages/views/default/sitepages/forms/editfront.php
@@ -0,0 +1,52 @@
+<?php
+/**
+ * Elgg edit frontpage
+ */
+
+//action
+$action = "sitepages/addfront";
+
+//grab the required entity
+$page_contents = elgg_get_entities(array('type' => 'object', 'subtype' => 'frontpage', 'limit' => 1));
+
+if($page_contents){
+ foreach($page_contents as $pc){
+ $css = $pc->title;
+ $frontContents = $pc->description;
+ $guid = $pc->guid;
+ }
+}else {
+ $tags = "";
+ $description = "";
+}
+
+// set the required form variables
+$input_css = elgg_view('input/plaintext', array('internalname' => 'css', 'value' => $css));
+$input_pageshell = elgg_view('input/plaintext', array('internalname' => 'frontContents', 'value' => $frontContents));
+$submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
+$hidden_guid = elgg_view('input/hidden', array('internalname' => 'front_guid', 'value' => $guid));
+$pageshell = elgg_echo("sitepages:frontContents");
+$css = elgg_echo("sitepages:css");
+
+//preview link
+$preview = "<div class=\"page_preview\"><a href=\"#preview\">" . elgg_echo('sitepages:preview') . "</a></div>";
+
+//construct the form
+$form_body = <<<EOT
+
+ <h3 class='settings'>$css</h3>
+ <p class='longtext_editarea'>$input_css</p><br />
+ <h3 class='settings'>$pageshell</h3>
+ <p class='longtext_editarea'>$input_pageshell</p>
+
+ $hidden_guid
+ <br />
+ $submit_input
+ $preview
+
+EOT;
+?>
+<?php
+ //display the form
+ echo elgg_view('input/form', array('action' => "{$vars['url']}action/$action", 'body' => $form_body));
+?> \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/forms/editmeta.php b/mod/sitepages/views/default/sitepages/forms/editmeta.php
new file mode 100644
index 000000000..7eb731f76
--- /dev/null
+++ b/mod/sitepages/views/default/sitepages/forms/editmeta.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Elgg edit frontpage
+ */
+
+//action
+$action = "sitepages/addmeta";
+
+//grab the required entity
+$page_contents = elgg_get_entities(array('type' => 'object', 'subtype' => 'sitemeta', 'limit' => 1));
+
+if($page_contents){
+ foreach($page_contents as $pc){
+ $metatags = $pc->title;
+ $description = $pc->description;
+ $guid = $pc->guid;
+ }
+}else {
+ $metatags = "";
+ $description = "";
+}
+
+// set the required form variables
+$input_keywords = elgg_view('input/plaintext', array('internalname' => 'metatags', 'value' => $metatags));
+$input_description = elgg_view('input/plaintext', array('internalname' => 'description', 'value' => $description));
+$submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
+$hidden_guid = elgg_view('input/hidden', array('internalname' => 'seo_guid', 'value' => $guid));
+$description = elgg_echo("sitepages:metadescription");
+$metatags = elgg_echo("sitepages:metatags");
+
+//construct the form
+$form_body = <<<EOT
+
+ <h3 class='settings'>$description</h3>
+ <p class='longtext_editarea'>$input_description</p><br />
+ <h3 class='settings'>$metatags</h3>
+ <p class='longtext_editarea'>$input_keywords</p>
+
+ $hidden_guid
+ <br />
+ $submit_input
+
+EOT;
+?>
+<?php
+ //display the form
+ echo elgg_view('input/form', array('action' => "{$vars['url']}action/$action", 'body' => $form_body));
+?> \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/keywords.php b/mod/sitepages/views/default/sitepages/keywords.php
new file mode 100644
index 000000000..2b4666256
--- /dev/null
+++ b/mod/sitepages/views/default/sitepages/keywords.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Available keywords, this will be pulled from activated plugin that expose a keyword function
+ **/
+?>
+<div class="contentWrapper">
+ <h3>Available keywords</h3>
+ <ul>
+ <li>{{element:loginbox}}</li>
+ <li>{{element:stats}}</li>
+ <li>{{object:blog}}</li>
+ <li>{{group:4}}</li>
+ </ul>
+</div> \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/menu.php b/mod/sitepages/views/default/sitepages/menu.php
new file mode 100644
index 000000000..5f074f489
--- /dev/null
+++ b/mod/sitepages/views/default/sitepages/menu.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Elgg Site pages menu
+ */
+
+//type
+$type = $vars['type'];
+
+//set the url
+$url = $vars['url'] . "pg/sitepages/index.php?type=";
+
+?>
+
+<div class="elgg_horizontal_tabbed_nav">
+<ul>
+ <li <?php if($type == 'front') echo "class = 'selected'"; ?>><a href="<?php echo $url; ?>front"><?php echo elgg_echo('sitepages:frontpage'); ?></a></li>
+ <li <?php if($type == 'about') echo "class = 'selected'"; ?>><a href="<?php echo $url; ?>about"><?php echo elgg_echo('sitepages:about'); ?></a></li>
+ <li <?php if($type == 'terms') echo "class = 'selected'"; ?>><a href="<?php echo $url; ?>terms"><?php echo elgg_echo('sitepages:terms'); ?></a></li>
+ <li <?php if($type == 'privacy') echo "class = 'selected'"; ?>><a href="<?php echo $url; ?>privacy"><?php echo elgg_echo('sitepages:privacy'); ?></a></li>
+ <li <?php if($type == 'seo') echo "class = 'selected'"; ?>><a href="<?php echo $url; ?>seo"><?php echo elgg_echo('sitepages:seo'); ?></a></li>
+</ul>
+</div> \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/metatags.php b/mod/sitepages/views/default/sitepages/metatags.php
new file mode 100644
index 000000000..73a7cd17f
--- /dev/null
+++ b/mod/sitepages/views/default/sitepages/metatags.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Meta tags
+ **/
+
+$meta_details = elgg_get_entities(array('type' => 'object', 'subtype' => 'seo', 'limit' => 1));
+if($meta_details){
+ foreach($meta_details as $md){
+ $metatags = $md->title;
+ $description = $md->description;
+ }
+}
+
+?>
+
+<meta name="description" content="<?php echo $description; ?>." />
+<meta name="keywords" content="<?php echo $metatags; ?>" /> \ No newline at end of file