aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-12 00:58:11 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-12 00:58:11 +0000
commit0a3ba94a2805b8550c45f3fbf9dc9df148ff03a5 (patch)
treeb3a1dd893fd465fbb4706b89a4cb65ded10e2f99
parentf16c546ca85ef1f8c27e0edccfca776a9b74daf1 (diff)
downloadelgg-0a3ba94a2805b8550c45f3fbf9dc9df148ff03a5.tar.gz
elgg-0a3ba94a2805b8550c45f3fbf9dc9df148ff03a5.tar.bz2
light clean up on the embed plugin which doesn't appear to work at present
git-svn-id: http://code.elgg.org/elgg/trunk@8125 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--mod/embed/languages/en.php2
-rw-r--r--mod/embed/start.php13
-rw-r--r--mod/embed/views/default/embed/addcontentjs.php1
-rw-r--r--mod/embed/views/default/embed/lightbox_init.php6
-rw-r--r--mod/embed/views/default/embed/link.php7
-rw-r--r--mod/embed/views/default/embed/metatags.php6
6 files changed, 19 insertions, 16 deletions
diff --git a/mod/embed/languages/en.php b/mod/embed/languages/en.php
index f8edf3812..f3a49e38b 100644
--- a/mod/embed/languages/en.php
+++ b/mod/embed/languages/en.php
@@ -2,8 +2,8 @@
/**
* Embed English language strings
*
- * @var unknown_type
*/
+
$english = array(
'media:insert' => 'Embed content',
'embed:embed' => 'Embed',
diff --git a/mod/embed/start.php b/mod/embed/start.php
index 8ad1a6178..f8a8701fa 100644
--- a/mod/embed/start.php
+++ b/mod/embed/start.php
@@ -5,14 +5,16 @@
* @package ElggEmbed
*/
+
+elgg_register_event_handler('init', 'system', 'embed_init');
+
/**
* Init function
- *
*/
function embed_init() {
elgg_extend_view('css/screen', 'embed/css');
elgg_extend_view('js/elgg', 'embed/js');
- elgg_extend_view('html_head/extend', 'embed/metatags');
+ elgg_extend_view('footer/analytics', 'embed/lightbox_init');
elgg_extend_view('input/longtext', 'embed/link', 1);
// Page handler for the modal media embed
@@ -29,12 +31,10 @@ function embed_page_handler($page) {
$page[0] = 'embed';
}
- switch($page[0]) {
+ switch ($page[0]) {
case 'upload':
echo elgg_view('embed/upload');
-
break;
-
case 'embed':
default:
// trigger hook to get section tabs
@@ -58,12 +58,9 @@ function embed_page_handler($page) {
'upload_sections' => $upload_sections,
'internal_name' => $internal_name
));
-
break;
}
// exit because this is in a modal display.
exit;
}
-
-elgg_register_event_handler('init', 'system', 'embed_init'); \ No newline at end of file
diff --git a/mod/embed/views/default/embed/addcontentjs.php b/mod/embed/views/default/embed/addcontentjs.php
index c32d90871..18d2927fd 100644
--- a/mod/embed/views/default/embed/addcontentjs.php
+++ b/mod/embed/views/default/embed/addcontentjs.php
@@ -1,5 +1,6 @@
<?php
/**
* Blank for compatibility.
+ * @deprecated 1.8
*/
?> \ No newline at end of file
diff --git a/mod/embed/views/default/embed/lightbox_init.php b/mod/embed/views/default/embed/lightbox_init.php
new file mode 100644
index 000000000..9f271067b
--- /dev/null
+++ b/mod/embed/views/default/embed/lightbox_init.php
@@ -0,0 +1,6 @@
+<?php //@todo JS 1.8: no ?>
+<script type="text/javascript">
+ jQuery(document).ready(function($) {
+ $('a[rel*=facebox]').facebox()
+ });
+</script>
diff --git a/mod/embed/views/default/embed/link.php b/mod/embed/views/default/embed/link.php
index c4fae0d42..4ed193047 100644
--- a/mod/embed/views/default/embed/link.php
+++ b/mod/embed/views/default/embed/link.php
@@ -10,5 +10,10 @@ if (elgg_is_active_plugin('ecml')) {
$active_section = '';
}
+$url = "pg/embed/?{$active_section}internal_name={$vars['internalname']}";
+$url = elgg_normalize_url($url);
+
?>
-<a class="elgg-longtext-control small link" href="<?php echo elgg_get_site_url() . 'pg/embed'; ?>?<?php echo $active_section; ?>internal_name=<?php echo $vars['internalname']; ?>" rel="facebox"><?php echo elgg_echo('media:insert'); ?></a>
+<a class="elgg-longtext-control" href="<?php echo $url; ?>" rel="facebox">
+ <?php echo elgg_echo('media:insert'); ?>
+</a>
diff --git a/mod/embed/views/default/embed/metatags.php b/mod/embed/views/default/embed/metatags.php
deleted file mode 100644
index 5ff602362..000000000
--- a/mod/embed/views/default/embed/metatags.php
+++ /dev/null
@@ -1,6 +0,0 @@
- <?php //@todo JS 1.8: no ?>
- <script type="text/javascript">
- jQuery(document).ready(function($) {
- $('a[rel*=facebox]').facebox()
- });
- </script>