PHP Warning: Undefined array key "rating" in ..../includes/class_postbit.php(368) : eval()'d code on line 68
How to Add New Album Using The Album Data Maganer - vb.org Archive
Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
How to Add New Album Using The Album Data Maganer
mokujin's Avatar
mokujin
Join Date: Oct 2005
Posts: 345

 

Czech
Show Printable Version Email this Page Subscription
mokujin mokujin is offline 11-03-2008, 10:00 PM

This is a tutorial of how to add new albums using data managers.

Just paste this code in to your file:
PHP Code:
$albumdata =& datamanager_init('Album', $vbulletin, ERRTYPE_ARRAY);

$albumdata->set('userid', $vbulletin->userinfo['userid']);
$albumdata->set('title', 'Auto-Album');
$albumdata->set('description', 'Auto-Album description');
$albumdata->set('state', 'public');

$albumdata->pre_save();

if (empty($albumdata->errors))
{
    $albumdata->save();
}
else
{
    print_r($albumdata->errors);
} 
'title' - Title of the Album
'description' - Album description
'state' - public, private or profile.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:57 AM.


Powered by vBulletin® Version 3.9.0
Copyright ©2000 - 2017, vBulletin Solutions Inc.