The error events showed this
Error
Event Id: 1 Source: Auto Page - Plugin
Date: 28-Apr-2008 04:38 PM User:
syntax error, unexpected ’<’
Parse error: syntax error, unexpected ’<’ in /home/sites/rossco-designs.com/public_html/manager/includes/document.parser.class.inc.php(745) : eval()’d code on line 1
Ok I may need to rethink how I want to do this! I know what I want to do but doing it is another matter.
I’ll start again...
Customer registers for an account using webloginPE and signs in to the private page welcome area. This is a single document that all registered members arrive at to show that they have signed in successfully. With them signing up I would like a document created that only they can have access to but I would also like the document to be a parent folder so I can drop new documents in there that could be only specifically to do with that client.
How would go about creating a parent folder document that only that member can see... how could I create a menu that would navigate them to their private pages?
As I will be using this site for web designs, I may want to submit artwork or ideas so ONLY that client would be able to see the documents. I would like these documents being able to be moved in a clients folder for their viewing only.
My main quest is how to create a parent document that only viewable to the client but it was auto generated when they registered. I would also need to figure out how they would know where to navigate to as well.
Does this make sense at all? I’m confusing myself lol!
Here is the code i pasted in to a new plugin
<?php //only for the nice colors
if($mode=="new"){
$table_name = $modx->getFullTableName( 'site_content' );
$fields = array(
'type' => $data['name'],
'contentType' => 'document',
'pagetitle' => 'texthtml',
'longtitle' => 'my longtitle goes here',
'published' => '1', //is the page published?
'parent' => '60', //what is the parent of this new page?
'isfolder' => '0',
'template' => '1', //type template id here
'cacheable' => '0',
'createdby' => '-".$userid."', // yes the -# is good there webusers are -# because manager users are +#
'createdon' => '".time()."',
'editedon' => '".time()."',
'publishedon' => '".time()."',
'hidemenu' => '1'
);
$modx->db->insert( $fields, $table_name); // put the fields in the db (id wil be created incremental.)
//Create placeholder and put the id in a session to use for mail or whatever.
$_SESSION['eigenpaginaid'] = $modx->db->getInsertId();
$modx->setPlaceholder('eigenpaginaid', $modx->db->getInsertId());
return;
}
It’s exactly the same as your code but I made the parent document 60 which is my parent folder for client pages on my MODx