diff options
Diffstat (limited to 'mod/guidbrowser')
-rw-r--r-- | mod/guidbrowser/index.php | 54 | ||||
-rw-r--r-- | mod/guidbrowser/languages/en.php | 24 | ||||
-rw-r--r-- | mod/guidbrowser/start.php | 60 | ||||
-rw-r--r-- | mod/guidbrowser/views/default/guidbrowser/browser.php | 35 | ||||
-rw-r--r-- | mod/guidbrowser/views/default/guidbrowser/entity.php | 32 | ||||
-rw-r--r-- | mod/guidbrowser/views/default/guidbrowser/entity_full.php | 125 | ||||
-rw-r--r-- | mod/guidbrowser/views/default/guidbrowser/newentity.php | 11 | ||||
-rw-r--r-- | mod/guidbrowser/views/default/guidbrowser/prevnext.php | 30 |
8 files changed, 0 insertions, 371 deletions
diff --git a/mod/guidbrowser/index.php b/mod/guidbrowser/index.php deleted file mode 100644 index cbb3986d2..000000000 --- a/mod/guidbrowser/index.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php - /** - * Elgg GUID browser - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - require_once("../../engine/start.php"); - - $eguid = get_input('eguid'); - $limit = get_input('limit', 10); - $offset = get_input('offset'); - $type = get_input('type'); - $subtype = get_input('subtype'); - - $action = get_input('subtype'); - $key = get_input('key'); - $value = get_input('value'); - - $relationship = get_input('relationship'); - $guid2 = get_input('guid2'); - - - switch ($callaction) - { - case 'metadata' : - if (!create_metadata($eguid, $key, $value)) - echo "Could not create metadata with $eguid:$key:$value"; - break; - - case 'annotations' : - if (!create_annotation($eguid, $key, $value)) - echo "Could not create metadata with $eguid:$key:$value"; - break; - - case 'relationship' : - if (!add_entity_relationship($eguid, $relationship, $guid2)) - echo "Could not create relationship between $eguid:$relationship:$guid2"; - break; - } - - // Get the current page's owner - $page_owner = page_owner_entity(); - - // Display - $body = elgg_view_layout("one_column", guidbrowser_display($offset, $limit, $type, $subtype)); - - // Display page - page_draw(elgg_echo("guidbrowser"), $body); -?>
\ No newline at end of file diff --git a/mod/guidbrowser/languages/en.php b/mod/guidbrowser/languages/en.php deleted file mode 100644 index 0eee183eb..000000000 --- a/mod/guidbrowser/languages/en.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - /** - * Elgg GUID browser - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - $english = array( - - /** - * Menu items and titles - */ - - 'guidbrowser' => "GUID Browser" - - - ); - - add_translation("en", $english); -?>
\ No newline at end of file diff --git a/mod/guidbrowser/start.php b/mod/guidbrowser/start.php deleted file mode 100644 index a75711c1d..000000000 --- a/mod/guidbrowser/start.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - /** - * Elgg GUID browser - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - function guidbrowser_init($event, $object_type, $object = null) { - - global $CONFIG; - // register_translations($CONFIG->pluginspath . "guidbrowser/languages/"); - add_menu("GUID Browser",$CONFIG->wwwroot . "mod/tasklist/",array( - menu_item("The GUID browser",$CONFIG->wwwroot."mod/guidbrowser/"), - )); - } - - function guidbrowser_displayentity($entity) - { - return elgg_view("guidbrowser/entity", - array( - 'entity_guid' => $entity->guid, - 'type' => $entity->type, - 'subtype' => $entity->getSubtype(), - 'full' => elgg_view( - "guidbrowser/entity_full", - array( - 'entity' => $entity, - 'metadata' => get_metadata_for_entity($entity->guid), - 'annotations' => get_annotations($entity->guid), - 'relationships' => get_entity_relationships($entity->guid) - ) - ) - ) - ); - } - - function guidbrowser_display($offset = 0, $limit = 10, $type = "", $subtype = "") - { - $entities = get_entities($type, $subtype, page_owner(), "time_created desc", $limit, $offset); - $display = ""; - - foreach ($entities as $e) - $display .= guidbrowser_displayentity($e); - - return elgg_view("guidbrowser/browser", - array( - 'entities' => $display, - 'prevnext' => elgg_view("guidbrowser/prevnext", array("limit" => $limit, "offset" => $offset)) - ) - ); - } - - - // Make sure test_init is called on initialisation - register_elgg_event_handler('init','system','guidbrowser_init'); -?>
\ No newline at end of file diff --git a/mod/guidbrowser/views/default/guidbrowser/browser.php b/mod/guidbrowser/views/default/guidbrowser/browser.php deleted file mode 100644 index c1f5bb792..000000000 --- a/mod/guidbrowser/views/default/guidbrowser/browser.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - /** - * Elgg GUID browser - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - $navbar = $vars['prevnext']; - $entities = $vars['entities']; -?> -<script type="text/javascript" language="javascript"> -<!-- -function showhide(oid) -{ - var e = document.getElementById(oid); - if(e.style.display == 'none') { - e.style.display = 'block'; - } else { - e.style.display = 'none'; - } -} -// --> -</script> - -<div id="browser"> - <div id="entities"> - <?php echo $entities; ?> - </div> - - <?php echo $navbar; ?> -</div>
\ No newline at end of file diff --git a/mod/guidbrowser/views/default/guidbrowser/entity.php b/mod/guidbrowser/views/default/guidbrowser/entity.php deleted file mode 100644 index 94fd4e92c..000000000 --- a/mod/guidbrowser/views/default/guidbrowser/entity.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - /** - * Elgg GUID browser - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - $guid = $vars['entity_guid']; - $type = $vars['type']; - $subtype = $vars['subtype']; - $full = $vars['full']; - -?> - -<div id="guid-<?php echo $guid; ?>"> - <span onClick="showhide('guid-<?php echo $guid; ?>-full')"> - <table width="100%"> - <tr> - <td width="50"><b><?php echo $guid; ?></b></td> - <td><?php echo "$type / $subtype"; ?></td> - - </tr> - </table> - </span> - <div id="guid-<?php echo $guid; ?>-full" style="display:none"> - <?php echo $full; ?> - </div> -</div>
\ No newline at end of file diff --git a/mod/guidbrowser/views/default/guidbrowser/entity_full.php b/mod/guidbrowser/views/default/guidbrowser/entity_full.php deleted file mode 100644 index 62dd78264..000000000 --- a/mod/guidbrowser/views/default/guidbrowser/entity_full.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php - /** - * Elgg GUID browser - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - $entity = $vars['entity']; - $metadata = $vars['metadata']; - $annotations = $vars['annotations']; - $relationships = $vars['relationships']; - -?> -<div> - <?php - foreach ($entity as $k => $v) - { -?> - <div> - <table> - <tr> - <td><b><?php echo $k; ?></b></td> - <td><?php echo $v; ?></td> - </tr> - </table> - </div> -<?php - } - ?> -</div> -<div id="metadata"> -<h2>Metadata</h2> - <?php - if ($metadata) foreach ($metadata as $m) - { -?> - <div> - <table> - <tr> - <td><b><?php echo $m->name; ?></b></td> - <td><?php echo $m->value; ?></td> - </tr> - </table> - </div> -<?php - } - ?> - - <div> - <form method="post"> - <input name="eguid" type="hidden" value="<?php echo $entity->guid; ?>" /> - <input name="owner_id" type="hidden" value="<?php echo page_owner(); ?>" /> - <input name="callaction" type="hidden" value="metadata" /> - Key : <input name="key" type="text" /> - Value : <input name="value" type="text" /> - <input name="submit" type="submit" value="submit" /> - </form> - </div> - -</div> - -<div id="annotations"> -<h2>Annotations</h2> - <?php - if ($annotations) foreach ($annotations as $a) - { -?> - <div> - <table> - <tr> - <td><b><?php echo $a->name; ?></b></td> - <td><?php echo $a->value; ?></td> - </tr> - </table> - </div> -<?php - } - ?> - - <div> - <form method="post"> - <input name="eguid" type="hidden" value="<?php echo $entity->guid; ?>" /> - <input name="owner_id" type="hidden" value="<?php echo page_owner(); ?>" /> - <input name="callaction" type="hidden" value="annotations" /> - Key : <input name="key" type="text" /> - Value : <input name="value" type="text" /> - <input name="submit" type="submit" value="submit" /> - </form> - </div> -</div> - -<div id="relationship"> -<h2>Relationships</h2> - <?php - if ($relationships) foreach ($relationships as $r) - { -?> - <div> - <table> - <tr> - <td><?php echo $r->guid_one; ?></td> - <td><b><?php echo $r->relationship; ?></b></td> - <td><?php echo $r->guid_two; ?></td> - </tr> - </table> - </div> -<?php - } - ?> - - <div> - <form method="post"> - <input name="eguid" type="hidden" value="<?php echo $entity->guid; ?>" /> - <input name="owner_id" type="hidden" value="<?php echo page_owner(); ?>" /> - <input name="callaction" type="hidden" value="relationship" /> - Relationship : <input name="relationship" type="text" /> - Guid : <input name="guid2" type="text" /> - <input name="submit" type="submit" value="submit" /> - </form> - </div> -</div>
\ No newline at end of file diff --git a/mod/guidbrowser/views/default/guidbrowser/newentity.php b/mod/guidbrowser/views/default/guidbrowser/newentity.php deleted file mode 100644 index f46524e94..000000000 --- a/mod/guidbrowser/views/default/guidbrowser/newentity.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - /** - * Elgg GUID browser - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ -?>
\ No newline at end of file diff --git a/mod/guidbrowser/views/default/guidbrowser/prevnext.php b/mod/guidbrowser/views/default/guidbrowser/prevnext.php deleted file mode 100644 index 0624173cf..000000000 --- a/mod/guidbrowser/views/default/guidbrowser/prevnext.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - /** - * Elgg GUID browser - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - global $CONFIG; - - $limit = $vars['limit']; - $offset = $vars['offset']; - $type = $vars['type']; - $subtype = $vars['subtype']; - - - $common = "&type=$type&subtype=$subtype"; -?> - -<div id="guidbrowser_navbar"> - <table width="100%"> - <tr> - <td align="left"><?php if ($offset>0){?><a href="<?php echo $CONFIG->wwwroot . "mod/guidbrowser/?offset=" . ($offset-$limit) . $common ?>">Previous</a><?php } ?></td> - <td align="right"><a href="<?php echo $CONFIG->wwwroot . "mod/guidbrowser/?offset=" . ($offset+$limit) . $common ?>">Next</a></td> - </tr> - </table> -</div>
\ No newline at end of file |