Automatically Register an Album and Category

Automatically Register an Album and Category

Postby iMUya on Mon Jul 31, 2006 12:09 am

I do not know where and which line for the following codes to put in the dofinishregister.class.php Please help me as soon as possible.

// create a new default category called Moblog
$article2Categories = new ArticleCategories();
$article2Category = new ArticleCategory( Moblog, "", $newblogId, true );
$moblogCat = $article2Categories->addArticleCategory( $article2Category );


// create a new default folder called Moblog
$moblogAlbum = new GalleryAlbum(
$blogInfo->getId(), // id of the new blog
"Moblog", // new name
"Default category for moblog postings", // description
0, // no flags
0, // no parent id yet
, // date not needed, will be set when adding the album
Array(), // no properties
true // the album should appear
);
$albums = new GalleryAlbums();
$albums->addAlbum( $moblogAlbum );


//plugin for each new user by default
$blogInfo->setValue( "plugin_moblog_article_category_id", $this->_categoryId );
$blogInfo->setValue( "plugin_moblog_gallery_resource_album_id", $this->_albumId );
$blogInfo->setValue( "plugin_moblog_resource_preview_type", 1 );
$blogInfo->setValue( "plugin_moblog_enabled", 1 );
iMUya
 
Posts: 1
Joined: Sun Jul 30, 2006 11:39 pm

Postby phunkphorce on Tue Aug 01, 2006 3:49 am

Try at the end of the createBlog() method.
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Postby flys on Thu Dec 14, 2006 9:52 am

Hi,
sorry but i need help with this plugin too.

x phunkphorce:
with "Try at the end of the createBlog() method." you mean inside

"function createBlog($userId)" ?

i try to add those code before this:

----------------------------
return true;
}

/**
* finished registaration
---------------------------

but i get this error:
Parse error: syntax error, unexpected ',' in .....
this line of code:
", // date not needed, will be set when adding the album"


x iMUya:

where did you put your code ? :)

thanks to all
flys
 
Posts: 41
Joined: Wed Dec 06, 2006 6:05 am

Postby phunkphorce on Thu Dec 14, 2006 2:56 pm

If you're running LT 1.1.x, you don't need to do this. LT 1.1.x will automatically create a category and an album for your users when they register, so there is no need for you to do it again.
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Postby flys on Fri Dec 15, 2006 4:52 am

Ah yes, it is !

Thanks, now i try to set up in order to receive email adn mms ...

Thanks again
flys
 
Posts: 41
Joined: Wed Dec 06, 2006 6:05 am


Return to Documentation

cron