Скочи на садржај
WordPress.org

Српски

  • Теме
  • Додаци
  • Новости
    • Документација
    • Форуми
  • Информације
  • Упутства
  • Речник
  • @wp_sr
  • Организација
  • Get WordPress
Get WordPress
WordPress.org

Plugin Directory

User Object Framework

  • Submit a plugin
  • My favorites
  • Log in
  • Submit a plugin
  • My favorites
  • Log in

Овај додатак није испробан са последња 3 главна издања Вордпреса.Можда се више не одржава или подржава и можда има грешке са усклађеношћу са новијим издањима Вордреса.

User Object Framework

Jennifer M. Dodd
Преузимање
  • Детаљи
  • Прегледи
  • Постављање
  • Изградња
Подршка

Опис

This plugin creates a user-object relationship table and a user-object relationship metadata
table. Relationships between a user (logged-in or IP) are created and added to the relationship
table; metadata (ex. votes, flags, and ratings) is attached to that particular relationship
via the metadata table. This is a framework; it is intended for use in voting, flagging,
and similar user applications where a user-affiliated metadata is attached to an object.
Supported object tables include wp_posts, wp_comments, wp_users, and wp_bp_activity.

Functions are provided to add/get/delete relationships; metadata is added via the native WordPress
metadata-handling functions.
Functions provided by this framework include:

  • ucc_uof_object_reference() returns an array of object-integer assignments. Use this to look up the
    appropriate value for $object_ref based on the object table (wp_posts, wp_comments, wp_users,
    wp_bp_activity are currently supported) to which you are attaching a user relationship.
  • ucc_uof_add_relationship( $user_id = 0, $user_ip = 0, $object_id, $object_ref ) adds a relationship
    to the relationship table if none exists and returns the relationship id for that user/object pairing.
  • ucc_uof_delete_relationship( $user_id = 0, $user_ip = 0, $object_id, $object_ref ) will delete a
    relationship if there are no metadata entries left for that relationship.
  • ucc_uof_get_relationship() returns the relationship id for that user/object pairing.
  • ucc_uof_get_user_id() returns the current user id or 0 if not logged in.
  • ucc_uof_get_user_ip() returns 0 if the current user is logged in, or an ip2long() if anonymous.

Example code:

// Create or get the user-object relationship.
$relationship = ucc_uof_get_relationship( $user_id, $user_ip, $object_id, $object_ref );
if ( empty( $relationship ) )
    $relationship = ucc_uof_add_relationship( $user_id, $user_ip, $object_id, $object_ref );

// Add user_object_meta.
if ( $mode == 'delete' )
    delete_metadata( 'uof_user_object', $relationship, '_your_meta_key' );
else
    update_metadata( 'uof_user_object', $relationship, '_your_meta_key', 'your meta key value' );

Постављање

  1. Upload the directory user-object-framework and its contents to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.

Прегледи

Нема рецензија за овај додатак.

Сарадници и градитељи

„User Object Framework“ је софтвер отвореног кода. Следећи људи су допринели овом додатку.

Сарадници
  • Jennifer M. Dodd

Преведите „User Object Framework“ на свој језик.

Заинтересовани сте за градњу?

Прегледајте код, проверите SVN складиште или се пријавите на белешку градње преко RSS-а.

Белешка о изменама

0.1

  • Initial release.

Мета

  • Version 0.1
  • Last updated 14 година раније
  • Active installations Мање од 10
  • WordPress version 3.4 или новије
  • Tested up to 3.4.2
  • Language
    English (US)
  • Tags
    frameworkmetadataobjectrelationshipuser
  • Напредни преглед

Оцене

No reviews have been submitted yet.

Your review

See all reviews

Сарадници

  • Jennifer M. Dodd

Подршка

Имате нешто да кажете? Потребна вам је помоћ?

Види форум подршке

  • About
  • News
  • Hosting
  • Privacy
  • Showcase
  • Themes
  • Plugins
  • Patterns
  • Learn
  • Support
  • Developers
  • WordPress.tv ↗
  • Get Involved
  • Догађаји
  • Donate ↗
  • Five for the Future
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org

Српски

  • Visit our X (formerly Twitter) account
  • Посетите наш Bluesky налог
  • Visit our Mastodon account
  • Посетите наш налог на Threads-у
  • Visit our Facebook page
  • Посетите наш Инстаграм налог
  • Visit our LinkedIn account
  • Посетите наш TikTok налог
  • Visit our YouTube channel
  • Посетите наш Tumblr налог
Кôд је поезија.
The WordPress® trademark is the intellectual property of the WordPress Foundation.