hValidate.php

osc_validate_text ($value = , $count = 1, $required = true) – Validate the text with a minimum of non-punctuation characters (international) osc_validate_int ($value) – Validate one or more numbers (no periods) osc_validate_nozero ($value) – Validate one or more numbers (no periods), must be more than 0. osc_validate_number ($value = null, $required = false) – Validate $value […]

Read More

hUtils.php

__get($key) – Getting from View the $key index osc_get_param($key) – Get variable from $_REQUEST[$key] osc_field($item, $field, $locale) – Generic function for view layer, return the $field of $item osc_show_widgets($location) – Print all widgets belonging to $location osc_show_recaptcha($section = ) – Print recaptcha html, if $section = “recover_password” osc_format_date($date) – Formats the date using the appropiate format. […]

Read More

hUsers.php

osc_user_field($field, $locale = “”) – Gets a specific field from current user osc_user() – Gets user array from view osc_is_web_user_logged_in() – Gets true if user is logged in web osc_logged_user_id() – Gets logged user id osc_logged_user_email() – Gets logged user mail osc_logged_user_name() – Gets logged user email osc_logged_user_phone() – Gets logged user phone osc_logged_user() – […]

Read More

hTranslations.php

__($key, $domain = ‘core’) – Translate strings _e($key, $domain = ‘core’) – Translate strings (echo them) _m($key) – Translate string (flash messages) _n($single_key, $plural_key, $count, $domain = ‘core’) – Retrieve the singular or plural translation of the string. _mn($single_key, $plural_key, $count) – Retrieve the singular or plural translation

Read More

hTheme.php

osc_admin_render_theme_url($file = ) – Gets urls for current theme administrations options osc_render_file($file = ) – Render the specified file osc_render_file_url($file = ) – Gets urls for render custom files in front-end osc_theme_get_info($theme) – Returns information about front-office theme (from index.php of theme). Enter only theme name (name of theme folder). Example: bender, sigma, delta osc_resend_flash_messages($section = “pubMessages”) […]

Read More

hSearch.php

osc_search() – Gets search object osc_list_orders() – Gets available search orders osc_search_page() – Gets current search page osc_search_total_pages() – Gets total pages of search osc_search_has_pic() – Gets if “has pic” option is enabled or not in the search osc_search_order() – Gets current search order osc_search_order_type() – Gets current search order type osc_search_pattern() – Gets current […]

Read More

hSanitize.php

osc_sanitize_url($value) – Sanitize a website URL osc_sanitize_name($value) – Sanitize capitalization for a string. Capitalize first letter of each name. If all-caps, remove all-caps. osc_sanitize_allcaps($value) – Sanitize string that’s all-caps osc_sanitize_int($value) – Sanitize number (with no periods) osc_sanitize_phone($value) – Format phone number. Supports 10-digit with extensions, and defaults to international if cannot match US number. osc_esc_html($str […]

Read More

hPremium.php

Functions that returns object from static class (view) osc_get_premiums($max = 2) – Gets new premiums ads osc_premium() – Gets current premium array from view osc_premium_field($field, $locale = “”) – Gets a specific field from current premium Helpers for single premiums osc_premium_id() – Gets id from current premium osc_premium_user_id() – Gets user id from current premium […]

Read More

hPreference.php

osc_time_cookie() – Gets cookie’s life osc_comments_enabled() – Gets if comments are enabled or not osc_comments_per_page() – Gets comments per page osc_timezone() – Gets comments per page osc_reg_user_post_comments() – Gets if only users can post comments osc_reg_user_can_contact() – Gets if only users can contact to seller osc_users_enabled() – Gets if users are enabled or not osc_user_registration_enabled() […]

Read More

hPlugins.php

osc_run_hook($hook) – Run a hook osc_apply_filter($hook, $content) – Apply a filter to a text osc_add_hook($hook, $function, $priority = 5) – Add a hook osc_add_filter($hook, $function, $priority = 5) – Add a filter osc_remove_hook($hook, $function) – Remove a hook’s function osc_remove_filter($hook, $function) – Remove a filter’s function osc_is_this_category($name, $id) – If the plugin is attached to […]

Read More

hPagination.php

osc_search_pagination() – Gets the pagination links of search pagination osc_comments_pagination() – Gets the pagination links of comments pagination osc_pagination($params = null) – Gets generic pagination links

Read More

hPage.php

osc_static_page() – Gets current page object osc_static_page_field($field, $locale = ) – Gets current page field osc_static_page_title($locale = ) – Gets current page title osc_static_page_text($locale = ) – Gets current page text osc_static_page_id() – Gets current page ID osc_static_page_order() – Get page order osc_static_page_mod_date() – Gets current page modification date osc_static_page_pub_date() – Gets current page publish date osc_static_page_url($locale = ) […]

Read More

hMessages.php

osc_add_flash_message($msg, $section = ‘pubMessages’) – Adds an ephemeral message to the session. (error style) osc_add_flash_ok_message($msg, $section = ‘pubMessages’) – Adds an ephemeral message to the session. (ok style) osc_add_flash_error_message($msg, $section = ‘pubMessages’) – Adds an ephemeral message to the session. (error style) osc_add_flash_info_message($msg, $section = ‘pubMessages’) – Adds an ephemeral message to the session. (info […]

Read More

hLocation.php

osc_country() – Gets current country osc_region() – Gets current region osc_city() – Gets current city osc_city_area() – Gets current city area osc_has_countries() – Iterator for countries, return null if there’s no more countries osc_has_regions($country = ‘%%%%’) – Iterator for regions, return null if there’s no more regions osc_has_cities($region = ‘%%%%’) – Iterator for cities, return […]

Read More

hLocale.php

osc_locale_field($field, $locale = ”) – Gets locale generic field osc_locale() – Gets locale object osc_get_locales() – Gets list of locales osc_priv_count_locales() – Private function to count locales osc_goto_first_locale() – Reset iterator of locales osc_count_web_enabled_locales() – Gets number of enabled locales for website osc_has_web_enabled_locales() – Iterator for enabled locales for website osc_locale_code() – Gets current locale’s code […]

Read More

hItems.php

Helpers that return objects from the static class (view) 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, […]

Read More

hErrors.php

osc_die($title, $message) – Kill OSClass with an error message osc_get_absolute_url() – Gets absolute URL

Read More

hDefines.php

osc_base_url($with_index = false) – Gets the root url for your installation osc_admin_base_url($with_index = false) – Gets the root url of oc-admin for your installation osc_base_path() – Gets the root path for your installation osc_admin_base_path() – Gets the root path of oc-admin osc_lib_path() – Gets the libraries path osc_content_path() – Gets the content path osc_themes_path() – […]

Read More

hDatabaseInfo.php

osc_db_name() – Gets database name osc_db_host() – Gets database host osc_db_user() – Gets database user osc_db_password() – Gets database password osc_multisite_url() – Gets multisite url

Read More

hCategories.php

osc_category() – Gets current category osc_get_categories() – Gets the list of categories as a tree osc_field_toTree($item, $field) – If the result of toTree had the same format as items or comments, it would be the same as osc_field osc_category_field($field, $locale = ) – Gets the value of the category attribute osc_priv_count_categories() – Gets the number of […]

Read More