I am working on a plugin that generates a personal page for a new webuser, now I want to send the url for that new page to the new user.
the page is created but how do i return a value to the websignup snippet? (how do you return from a plugin in general is maybe a better question)
I tryed the $result array but that did not had it.
this is my plugin:
<?php //for nice colors only
if($mode=="new"){
//maak nieuwe pagina aan
$sql = "INSERT INTO ".$modx->getFullTableName('site_content')."
(type,contentType,pagetitle,longtitle,published,parent,isfolder,template,cacheable,createdby,createdon,editedon,publishedon,hidemenu)
VALUES ('document','text/html','".$username."',' ".$fullname."','1','9','0','4','0','".$userid."','".time()."','".time()."','".time()."','1')";
$result = $modx->db->query($sql);
$eigenpaginaid = $modx->db->getInsertId();
return $eigenpaginaid;
}
Plugins are realy nice but still not realy documented yet.
DImmy