Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(my $delicious_config = MT::PluginData->load({ plugin => 'MT Blogroll', key => 'delicious'.$blog_id })) {
- if($delicious_config && $delicious_config->data->{enabled}) {
- my $username = $delicious_config->data->{username};
- my $password = $delicious_config->data->{password};
- require Net::Delicious;
- my $delicious = Net::Delicious->new({user => $username, pswd => $password });
- my %args;
- my $tags_joined;
- $args{url} = $uri;
- $args{description} = $name;
- $args{extended} = $desc;
- if(defined $tags) {
- require MT::Tag;
- my $tag_delim = chr($app->user->entry_prefs->{tag_delim});
- my @tags = MT::Tag->split($tag_delim, $tags);
- $tags_joined = MT::Tag->join(' ', @tags);
- }
- $args{tags} = $tags_joined || $tags;
- $delicious->add_post(\%args);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement