aboutsummaryrefslogtreecommitdiff
path: root/mod/sitepages/views
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-09 04:22:35 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-09 04:22:35 +0000
commit9bb993778bc7a0c6f17673e509ed147202e69ee7 (patch)
treeafb5951de431ea1cb5e0e0048d7f120ff28b23ef /mod/sitepages/views
parent4e2a58e02ae4fe55ebc801a816c6ddb304df4b18 (diff)
downloadelgg-9bb993778bc7a0c6f17673e509ed147202e69ee7.tar.gz
elgg-9bb993778bc7a0c6f17673e509ed147202e69ee7.tar.bz2
Added dynamic keywords for view and entity.
Separated logged in and logged out front page views. Fixed a problem with saving metatags. Added PHPDoc headers. Updated language strings. git-svn-id: http://code.elgg.org/elgg/trunk@5315 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/sitepages/views')
-rw-r--r--mod/sitepages/views/default/settings/sitepages/edit.php12
-rw-r--r--mod/sitepages/views/default/sitepages/custom_frontpage.php10
-rw-r--r--mod/sitepages/views/default/sitepages/footer_menu.php10
-rw-r--r--mod/sitepages/views/default/sitepages/forms/editfront.php25
-rw-r--r--mod/sitepages/views/default/sitepages/forms/editmeta.php2
-rw-r--r--mod/sitepages/views/default/sitepages/keywords.php3
-rw-r--r--mod/sitepages/views/default/sitepages/metatags.php12
7 files changed, 55 insertions, 19 deletions
diff --git a/mod/sitepages/views/default/settings/sitepages/edit.php b/mod/sitepages/views/default/settings/sitepages/edit.php
index 22f03abaf..9705aaae5 100644
--- a/mod/sitepages/views/default/settings/sitepages/edit.php
+++ b/mod/sitepages/views/default/settings/sitepages/edit.php
@@ -1,3 +1,15 @@
+<?php
+/**
+ * Settings Site Pages
+ *
+ * @package SitePages
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.org/
+ */
+?>
+
<p>
<?php echo elgg_echo('sitepages:ownfront'); ?>
<select name="params[ownfrontpage]">
diff --git a/mod/sitepages/views/default/sitepages/custom_frontpage.php b/mod/sitepages/views/default/sitepages/custom_frontpage.php
index fb0b673cc..429478280 100644
--- a/mod/sitepages/views/default/sitepages/custom_frontpage.php
+++ b/mod/sitepages/views/default/sitepages/custom_frontpage.php
@@ -10,8 +10,12 @@
* @link http://elgg.org/
*/
-$object = sitepages_get_sitepage_object('front');
+$sitepage = sitepages_get_sitepage_object('front');
-if ($object) {
- echo $object->description;
+if ($sitepage) {
+ if (get_loggedin_userid()) {
+ echo $sitepage->logged_in_content;
+ } else {
+ echo $sitepage->logged_out_content;
+ }
} \ 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
index 5137e0f21..d0addd3e1 100644
--- a/mod/sitepages/views/default/sitepages/footer_menu.php
+++ b/mod/sitepages/views/default/sitepages/footer_menu.php
@@ -1,10 +1,16 @@
<?php
/**
- * Elgg External pages footer menu
+ * Footer view to add links to the semi-static pages.
+ *
+ * @package SitePages
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.org/
*/
?>
-<div class="footer_toolbar_links">|
+<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> |
diff --git a/mod/sitepages/views/default/sitepages/forms/editfront.php b/mod/sitepages/views/default/sitepages/forms/editfront.php
index cc09b8cc8..e13f16f6e 100644
--- a/mod/sitepages/views/default/sitepages/forms/editfront.php
+++ b/mod/sitepages/views/default/sitepages/forms/editfront.php
@@ -12,21 +12,23 @@
$action = 'sitepages/addfront';
if ($sitepages_object = sitepages_get_sitepage_object('front')) {
- $css = $sitepages_object->title;
- $sitepages_content = $sitepages_object->description;
- $guid = $sitepages_object->guid;
+ $css = $sitepages_object->css;
+ $logged_in_content = $sitepages_object->logged_in_content;
+ $logged_out_content = $sitepages_object->logged_out_content;
} else {
$css = '';
- $sitepages_content = '';
- $guid = '';
+ $logged_in_content = '';
+ $logged_out_content = '';
}
// set the required form variables
$input_css = elgg_view('input/plaintext', array('internalname' => 'css', 'value' => $css));
-$input_sitepages_content = elgg_view('input/plaintext', array('internalname' => 'sitepages_content', 'value' => $sitepages_content));
+$input_logged_in_content = elgg_view('input/plaintext', array('internalname' => 'logged_in_content', 'value' => $logged_in_content ));
+$input_logged_out_content = elgg_view('input/plaintext', array('internalname' => 'logged_out_content', 'value' => $logged_out_content ));
$submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
-$pageshell_title = elgg_echo("sitepages:front_content");
+$logged_in_content_title = elgg_echo("sitepages:logged_in_front_content");
+$logged_out_content_title = elgg_echo("sitepages:logged_out_front_content");
$css_title = elgg_echo("sitepages:css");
//preview link
@@ -38,8 +40,13 @@ $form_body = <<<___EOT
<h3 class='settings'>$css_title</h3>
<p class='longtext_editarea'>$input_css</p><br />
- <h3 class='settings'>$pageshell_title</h3>
- <p class='longtext_editarea'>$input_sitepages_content</p>
+
+
+ <h3 class='settings'>$logged_in_content_title</h3>
+ <p class='longtext_editarea'>$input_logged_in_content</p><br />
+
+ <h3 class='settings'>$logged_out_content_title</h3>
+ <p class='longtext_editarea'>$input_logged_out_content</p>
$hidden_guid
<br />
diff --git a/mod/sitepages/views/default/sitepages/forms/editmeta.php b/mod/sitepages/views/default/sitepages/forms/editmeta.php
index d94f32114..84a8297fc 100644
--- a/mod/sitepages/views/default/sitepages/forms/editmeta.php
+++ b/mod/sitepages/views/default/sitepages/forms/editmeta.php
@@ -19,7 +19,7 @@ if ($sitepages_object = sitepages_get_sitepage_object('front')) {
$meta_description = '';
}
-$input_keywords = elgg_view('input/plaintext', array('internalname' => 'metatags', 'value' => $meta_tags));
+$input_keywords = elgg_view('input/text', array('internalname' => 'metatags', 'value' => $meta_tags));
$input_description = elgg_view('input/plaintext', array('internalname' => 'description', 'value' => $meta_description));
$submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
diff --git a/mod/sitepages/views/default/sitepages/keywords.php b/mod/sitepages/views/default/sitepages/keywords.php
index e5348678a..d46efb5bc 100644
--- a/mod/sitepages/views/default/sitepages/keywords.php
+++ b/mod/sitepages/views/default/sitepages/keywords.php
@@ -12,6 +12,7 @@
$keywords = $vars['config']->sitepages_keywords;
$title = elgg_echo('sitepages:keywords_title');
$instructions = elgg_echo('sitepages:keywords_instructions');
+$more_info = elgg_echo('sitepages:keywords_instructions_more');
$keywords_html = '';
foreach ($keywords as $keyword => $info) {
@@ -22,6 +23,8 @@ foreach ($keywords as $keyword => $info) {
echo "
<h3>$title</h3>
<p>$instructions</p>
+<span id=\"sitepagesKeywordMoreInfo\" class=\"xhidden\">$more_info</span>
+
<ul>
$keywords_html
</ul>
diff --git a/mod/sitepages/views/default/sitepages/metatags.php b/mod/sitepages/views/default/sitepages/metatags.php
index c536dbe29..107a5871a 100644
--- a/mod/sitepages/views/default/sitepages/metatags.php
+++ b/mod/sitepages/views/default/sitepages/metatags.php
@@ -16,8 +16,10 @@ if ($meta_details) {
$description = $meta_details->description;
echo <<<___END
+
<meta name="description" content="$description" />
<meta name="keywords" content="$metatags" />
+
___END;
}
@@ -25,11 +27,13 @@ ___END;
if (get_context() == 'sitepages:front') {
$custom_css = sitepages_get_sitepage_object('front');
- if ($custom_css && $custom_css->title) {
- echo "
+ if ($custom_css && $custom_css->css) {
+ echo <<<___END
+
<style>
- {$custom_css->title}
+ {$custom_css->css}
</style>
- ";
+
+___END;
}
} \ No newline at end of file