diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-14 13:52:13 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-14 13:52:13 +0000 |
commit | 641dc210aaebb8db131db9100397fc4c386963da (patch) | |
tree | 1a2f3abded3a9d895c2f92563cf0a4346d4b213f /index.php | |
parent | 31feeca2e8bfe62bc47f11e24bbaea213936d0c5 (diff) | |
download | elgg-641dc210aaebb8db131db9100397fc4c386963da.tar.gz elgg-641dc210aaebb8db131db9100397fc4c386963da.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* Metadata code
git-svn-id: https://code.elgg.org/elgg/trunk@220 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 29 |
1 files changed, 22 insertions, 7 deletions
@@ -91,18 +91,18 @@ error_log("GETTIGN SITE ".$_SESSION['id']. " " . print_r($site, true)); */ // get site annotations -$site = get_site(1); +$site = get_site_by_url("http://localhost/"); error_log("GETTIGN SITE ".$_SESSION['id']. " " . print_r($site, true)); if (empty($site)) { $site = new ElggSite(); - $site->title = "Test title"; + $site->name = "Test title"; $site->description = "Test description"; - $site->url = "http://dushka/~icewing/Workingdirectory/elggnew/"; - $site->owner_id = 1; - $site->access_id = 0; + $site->url = "http://localhost/"; + $site->owner_guid = 1; + $site->access_guid = 0; error_log("LOADED NEW SITE: Saving" . print_r($site,true)); @@ -112,12 +112,27 @@ error_log("GETTIGN SITE ".$_SESSION['id']. " " . print_r($site, true)); { $site = new ElggSite($site); - $site->title = "Test title " . time(); + $site->name = "Test title " . time(); $site->save(); error_log("UPDATING SITE " . print_r($site, true)); } - error_log("SITE Annotations : " . print_r($site->getAnnotations("Test"), true)); + // add meta data + $site->setMetadata("Metaname", "Value"); + + + + // change site metadata + $site->setMetadata("Metaname", "Value2"); + + error_log("SITE Metadata : " . print_r(get_entities_from_metadata("Metaname","","site"), true)); + + + // Get objects belonging to a site + + // get objects of type + + ?>
\ No newline at end of file |