The hItems.php helper provides a wide range of functions that return objects from the static view class in Osclass. These functions enable you to retrieve the current item, its associated comments, resources, and various meta details. They are essential for building and customizing the display of listings, handling user interactions with comments, and managing item-related information throughout your Osclass site.
osc_item() – Gets current item array from view
osc_comment() – Gets comment array from view
osc_comment_reply() – Gets comment reply (identical to comment) array from view
osc_resource() – Gets resource array from view
osc_item_field($field, $locale = '') – Gets a specific field from current item
osc_comment_field($field, $locale = '') – Gets a specific field from current comment
osc_resource_field($field, $locale = '') – Gets a specific field from current resource
osc_item_id() – Gets id from current item
osc_item_user_id() – Gets user id from current item
osc_item_description($locale = '') – Gets description from current item
osc_item_title($locale = '') – Gets title from current item
osc_item_category($locale = '') – Gets category from current item
osc_item_category_description($locale = '') – Gets category description from current item
osc_item_category_id() – Gets category id of current item
osc_item_pub_date() – Gets publication date of current item
osc_item_mod_date() – Gets modification date of current item
osc_item_price() – Gets price of current item
osc_item_formated_price() – Gets formated price of current item
osc_item_currency() – Gets currency of current item
osc_item_contact_name() – Gets contact name of current item
osc_item_contact_email() – Gets contact email of current item
osc_item_contact_phone() – Gets contact phone number of current item
osc_item_contact_other() – Gets other contact information of current item
osc_item_country() – Gets country name of current item
osc_item_country_code() – Gets country code of current item (two letters)
osc_item_region() – Gets region of current item
osc_item_city() – Gets city of current item
osc_item_city_area() – Gets city area of current item
osc_item_address() – Gets address of current item
osc_item_show_email() – Gets true if contact email is allowed to be shown at frontend; otherwise, returns false
osc_item_show_phone() – Gets true if contact phone number is allowed to be shown at frontend; otherwise, returns false
osc_item_zip() – Gets zip code of current item
osc_item_latitude() – Gets latitude of current item
osc_item_longitude() – Gets longitude of current item
osc_item_is_premium() – Gets true if current item is marked premium; otherwise, returns false
osc_item_views() – Returns number of views of current item
osc_item_dt_expiration() – Gets expiration date of item in format YYYY-MM-DD HH:ii:ss; set to “9999-12-31 23:59:59” if the item does not expire
osc_item_is_expired() – Returns true if item is expired; otherwise, returns false
osc_item_status() – Gets status of current item
osc_item_secret() – Gets secret string of current item
osc_item_is_active() – Gets whether current item is active
osc_item_is_inactive() – Gets whether current item is inactive
osc_item_is_spam() – Gets if the item is marked as spam
osc_item_link_spam() – Gets link to mark the current item as spam
osc_item_link_bad_category() – Returns link to mark the current item as having a bad category
osc_item_link_repeated() – Gets link to mark the current item as repeated
osc_item_link_offensive() – Gets link to mark the current item as offensive
osc_item_link_expired() – Gets link to mark the current item as expired
osc_item_url_by_id($id, $locale = '') – Creates friendly URL of the item using its ID (Osclass 8.3.0 or higher).
osc_list_page() – Gets the current page number for pagination
osc_list_total_pages() – Gets the total number of pages for pagination
osc_list_items_per_page() – Gets the number of items per page for pagination
osc_item_total_comments() – Gets the total number of comments for the current item
osc_item_comments_page() – Gets the current page of comments in pagination
osc_comment_id() – Gets id of current comment
osc_comment_pub_date() – Gets publication date of current comment
osc_comment_title() – Gets title of current comment
osc_comment_author_name() – Gets author name of current comment
osc_comment_author_email() – Gets author email of current comment
osc_comment_body() – Gets body of current comment
osc_comment_user_id() – Gets user id of current comment
osc_delete_comment_url() – Gets link to delete the current comment of the current item
osc_comment_reply_id() – Gets id of current comment reply
osc_comment_reply_pub_date() – Gets publication date of current comment reply
osc_comment_reply_title() – Gets title of current comment reply
osc_comment_reply_author_name() – Gets author name of current comment reply
osc_comment_reply_author_email() – Gets author email of current comment reply
osc_comment_reply_body() – Gets body of current comment reply
osc_comment_reply_user_id() – Gets user id of current comment reply
osc_delete_comment_reply_url() – Gets link to delete the current comment reply of the current item
osc_resource_id() – Gets id of current resource
osc_resource_name() – Gets name of current resource
osc_resource_type() – Gets content type of current resource
osc_resource_extension() – Gets extension of current resource
osc_resource_path() – Gets path of current resource
osc_resource_thumbnail_url() – Gets thumbnail URL of current resource
osc_resource_preview_url() – Gets preview URL of current resource
osc_resource_url() – Gets URL of current resource
osc_resource_original_url() – Gets original URL of current resource
osc_has_items() – Gets next item if there is one; otherwise, returns null
osc_reset_items() – Resets the internal pointer of the items array to its first element and returns it
osc_reset_latest_items() – Resets the internal pointer of the latestItems array to its first element and returns it
osc_count_items() – Gets the number of items in the current items array
osc_count_item_resources() – Gets the number of resources in the current item's resources array
osc_has_item_resources() – Gets the next resource from the current item's resources array if available; otherwise, returns null
osc_get_item_resources() – Gets the current resource from the current item's resources array
osc_count_item_comments() – Gets the number of comments for the current item
osc_has_item_comments() – Gets the next comment from the current item's comments array if available
osc_has_latest_items() – Gets the next item from the latest items array
osc_count_latest_items() – Gets the number of latest items
osc_has_custom_items() – Gets the next item from the custom items array
osc_count_custom_items() – Gets the number of custom items
osc_reset_custom_items() – Resets the internal pointer of the custom items array to its first element and returns it
osc_format_price($price) – Formats the price using the appropriate currency
osc_priv_count_items() – Gets the number of items (deprecated since version 2.4)
osc_priv_count_item_resources() – Gets the number of item resources (deprecated since version 2.4)
osc_count_item_meta() – Gets the number of item meta fields
osc_has_item_meta() – Gets the next item meta field if available; otherwise, returns null
osc_get_item_meta() – Gets all item meta fields
osc_item_meta() – Gets a specific item meta field
osc_item_meta_value() – Gets the value of a specific item meta field
osc_item_meta_name() – Gets the name of a specific item meta field
osc_item_meta_id() – Gets the id of a specific item meta field
osc_item_meta_slug() – Gets the slug of a specific item meta field
osc_total_active_items() – Gets the total number of active items
osc_total_items() – Gets the total number of all items
osc_total_active_items_today() – Gets the total number of active items today
osc_total_items_today() – Gets the total number of all items today