Back to vBulletin 3 Articles

How to Add New Album Using The Album Data Maganer
by mokujin 05 Nov 2008

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'$vbulletinERRTYPE_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.

Similar Mods

Social Group and Album Enhancements Album Picture Clicks to Next Picture in Album vBulletin 3.7 Template Modifications

vblts.ru supports vBulletin®, 2022-2024