How to upgrade your plugins to new DAO classes

In version 2.3 we introduced much better DAO (Data Access Object) classes. The new classes introduce an easier way to work with the database. Also, all* input is sanitized now, so you not need to worry about insecure input anymore. Yay! The best way to work with the new DAO, is to create a new model (class) […]

Read More

How to extend fields

This page will show you hot to create an attributes plugin to extend the fields of the ads in your Osclass installation. In most cases the built-in functionality custom fields of Osclass is enough to extend the fields of an ad, however, sometime is necessary to add a search functionality or have a more deep customization. In […]

Read More

Plugin info

How to use the plugin info you added at the top of the index.php file of your plugin. /*   Plugin Name: My Plugin Plugin URI: myPlugin.com Description: This is my plugin. Version: 1.0 Author: me Author URI: me.com Short Name: myPlugin Plugin update URI: my-plugin-update */ To retrieve the data you need to first […]

Read More

List of filters

name_of_filter / file_where_it_is.php / short description item_title / item.php / affects the title of the item item_description / item.php / affects the description of the item slug / model/Category.php / could change the slug of the categories (usefull for especial characters as ä, ü, …) resource_path / media_processing.php(oc-admin) / affects the resource path * actions_manage_items / items_processing.php / could […]

Read More

How to create osclass plugin

Osclass functionality could be extended via Plugins, refer to Plugins page to know more about plugins, this page is about to create them. Plugins files structure Each plugins should consist in one plugin folder, you can call it whatever you want, and one index.php file at least. You could add several files and libraries. Plugins use Hooks to trigger functions at several places […]

Read More

Plugins

In computing, a plug-in is a set of software components that adds specific capabilities to a larger software application. If supported, plug-ins enable customizing the functionality of an application. For example, plug-ins are commonly used in web browsers to play video, scan for viruses, and display new file types. (from Wikipedia) There is a large […]

Read More

Hooks

A hook is a small piece of code that allows you to insert more code (plugin) in the middle of certain Osclass’ actions. Usage of hooks To use a hook add the following code to your plugin file : osc_add_hook(‘hook_name’, ‘function_name’); Substitute ‘hook_name’ by the name of the hook you want to attach ‘function_name’, and ‘function_name’ […]

Read More