Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions plugins/UserProfiles/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: User Profiles Pro
id: UserProfiles
description: Adds user profiles to your MT4 blogs. Pro Version"
doc_link: http://mt-hacks.com/userprofiles.html"
plugin_link: http://mt-hacks.com/userprofiles.html"
author_name: Mark Carey"
author_link: http://mt-hacks.com/"
version: 1.64
system_config_template: system_settings.tmpl
blog_config_template: blog_settings.tmpl
schema_version: 18

settings:
profile_upload_path:
default:
scope: system
profile_blog_id:
default:
scope: system

object_types:
author:
profile_asset_id: integer meta
profile: UserProfiles::Pro::Object::Profile

applications:
cms:
methods:
install_userprofiles_templates: $UserProfiles::UserProfiles::App::CMS::install_templates
edit_userprofile: $UserProfiles::UserProfiles::Pro::App::CMS::cms_edit_userprofile
save_userprofile: $UserProfiles::UserProfiles::Pro::App::CMS::cms_save_userprofile

userprofiles:
handler: UserProfiles::App
methods:
edit_userprofile: $UserProfiles::UserProfiles::App::UserProfiles::edit_userprofile
save_userprofile: $UserProfiles::UserProfiles::App::UserProfiles::save_userprofile
start_image: $UserProfiles::UserProfiles::App::UserProfiles::start_image
add_image: $UserProfiles::UserProfiles::App::UserProfiles::add_image
save_image: $UserProfiles::UserProfiles::App::UserProfiles::save_image
remove_image: $UserProfiles::UserProfiles::App::UserProfiles::remove_image
save_extendedprofile: $UserProfiles::UserProfiles::Pro::App::UserProfiles::save_extendedprofile
get_image: $UserProfiles::UserProfiles::Pro::App::UserProfiles::get_image

config_settings:
UserProfilesScript:
default: plugins/UserProfiles/mt-userprofiles.cgi
path: 1

callbacks:
MT::App::CMS::template_source.users_content_nav: $UserProfiles::UserProfiles::Pro::Callbacks::users_content_nav
MT::Comment::post_save: $UserProfiles::UserProfiles::Pro::Callbacks::post_save_comment
MT::Entry::post_save: $UserProfiles::UserProfiles::Pro::Callbacks::post_save_entry
MT::Author::post_save: $UserProfiles::UserProfiles::Pro::Callbacks::post_save_author
UserProfiles::Pro::Object::Profile::post_save: $UserProfiles::UserProfiles::Pro::Callbacks::post_save_profile
MT::Template::post_save: $UserProfiles::UserProfiles::Pro::Callbacks::post_save_template
tags:
function:
AuthorImageURL: $UserProfiles::UserProfiles::Tags::author_image_url
CommenterImageURL: $UserProfiles::UserProfiles::Tags::commenter_image_url
UserProfilesScript: $UserProfiles::UserProfiles::Tags::user_profiles_script
AuthorProfileURL: $UserProfiles::UserProfiles::Pro::Tags::author_profile_url
CommenterProfileURL: $UserProfiles::UserProfiles::Pro::Tags::commenter_profile_url
UserProfile: $UserProfiles::UserProfiles::Pro::Tags::user_profile_tag
CommentAuthorLink: $UserProfiles::UserProfiles::Pro::Tags::comment_author_link
EntryAuthorLink: $UserProfiles::UserProfiles::Pro::Tags::entry_author_link
UserPostCount: $UserProfiles::UserProfiles::Pro::Tags::post_count
AuthorPostCount: $UserProfiles::UserProfiles::Pro::Tags::post_count
CommenterPostCount: $UserProfiles::UserProfiles::Pro::Tags::post_count
UserJoinDate: $UserProfiles::UserProfiles::Pro::Tags::join_date
AuthorJoinDate: $UserProfiles::UserProfiles::Pro::Tags::join_date
CommenterJoinDate: $UserProfiles::UserProfiles::Pro::Tags::join_date
block:
'IfAuthorImage?': $UserProfiles::UserProfiles::Tags::if_author_image
'IfCommenterImage?': $UserProfiles::UserProfiles::Tags::if_commenter_image
'IfUserProfilesPro?': sub { return 1; },
AuthorComments: $UserProfiles::UserProfiles::Pro::Tags::author_comments

upgrade_functions:
import_images:
version_limit: 1.231, # runs for schema_version < 1.231 -- plugin version 1.5x
updater:
type: author
label: Importing author photos...
condition: sub { !$_[0]->profile_asset_id && !$_[0]->userpic_asset_id },
code: $UserProfile::UserProfiles::Pro::Util::import_images
migrate_userpics:
version_limit: 17, # plugin version 1.61
updater:
type: author
label: Migrating userpics...
condition:>
sub { $_[0]->profile_asset_id && !$_[0]->userpic_asset_id }
code: $UserProfile::UserProfiles::Upgrade::migrate_userpics