Display only certain type of listings

In OSClass 3.0 we introduced the function osc_query_item($params) where $params could be a string or an array. Example of usage You should call osc_query_item($params) function and later loop through the items with the “custom_items” helpers as usual Only one keyword: osc_query_item(“keyword=value1,value2,value3,…”); Multiple keywords: osc_query_item(array( “keyword1” => “value1,value2”, “keyword2” => “value3,value4” )); Real live examples Only one keyword: <?php osc_query_item(“region_name=Madrid”); […]

Read More

Customizing the theme and language of reCAPTCHA

This article is outdated as v1 recaptcha is mostly not in use anymore Introduction This customization will show you how to adjust the way reCAPTCHA is displayed on your site. You are able to change both the theme and the language reCAPTCHA is displayed in. ‘red’ (default theme) ‘white’ ‘blackglass’ ‘clean’ Changing the theme To change the reCAPTCHA theme […]

Read More

Change layout of photos on the Item page

This customization will allow you to change the default layout of photos on the item page. The default photo layout in the Modern theme and similar themes (like BCute and Hierarchy), display the images on the right side of the page. This layout can be changed to allow you to show all the images horizontally. […]

Read More

Change locations on main page sidebar from cities to regions/states

Cities at sidebar <div id=”sidebar”> <div class=”navigation”> <?php if(osc_count_list_cities() > 0 ) { ?> <div class=”box location”> <h3><strong><?php _e(“Location”, ‘modern’) ; ?></strong></h3> <ul> <?php while(osc_has_list_cities() ) { ?> <li><a href=”<?php echo osc_search_url( array( ‘sCity’ => osc_list_city_name() ) ) ; ?>”><?php echo osc_list_city_name() ; ?></a> <em>(<?php echo osc_list_city_items() ; ?>)</em></li> <?php } ?> </ul> </div> <?php } ?> </div> </div> Regions at sidebar <div id=”sidebar”> <div class=”navigation”> <?php […]

Read More

Improve image upload: fixes thumbnails that are too small

One issue with the way Osclass currently uploads images is that thumbnail images may appear too small, with excess white space around them. This issue is most noticeable when uploading smaller images. Example: Here is the original full-size image: This is the thumbnail image that is generated. Notice how small the actual image appears. After the fix as outlined below, […]

Read More

Remove category counts when it shows zero

This is a simple customization that will remove ad counts next to categories and subcategories when they do not contain any ads and shows (0). This works with most themes (BCute theme is used here). Here is an example showing the default way category ad counts are displayed: To change this, edit the file main.php within your theme directory. Then, locate […]

Read More

Make fields required at registration

We thought that as less data we required at registration process, the easiest for the user and more probably they complete the process, but some times you want to ask for some useful information at that stage. For that reason we’ve create a plugin but which main goal is to be used as a base […]

Read More

Change pagination menu

Pagination menu can be customized in several ways. There’re a few functions very handy for this. osc_search_pagination() This function add the default zero-configuration pagination for the search pages. osc_comments_pagination() This function add the default zero-configuration pagination for the item’s comments pages. osc_pagination() This is the base function. Previous functions call internally this function. If no-parameter […]

Read More

Changing between drop-down and autocomplete for locations

Since version 2.2, we offer the possibility to change between a drop-down and autocomplete inputs for locations (When users input their country, region, city,…) Drop-down input Pros Easier for users, they just need to select their location from a given list. Cons Limited or incomplete geo data, maybe not every country, region or city is […]

Read More

Change a currency (price) format

To change the way the price is displayed you should go to your admin panel, to your manage languages option. Choose the language you want to edit, for example English and click edit. Chagne from %.02f %s To (or whatever you want to) £%.02f %.02f means you want to display a two-decimal number. To display for example 4 decimals, use %.04f.

Read More

Change a favicon

The favicon is the small image that appear on your browser when you’re visiting any page. Each page has its own favicon to make them unique and recognize them. To change it you only need to create a need favicon which the image editing program of your choice and upload it to the root folder […]

Read More

Changing the color of the category count

Changing the color od the category count in modern theme at the homepage is very easy. We are going to change the following : We are working on the lines 55 and 59 of main.php (oc-content/themes/modern/main.php) Line 55 (a little part of it) <span>(<?php echo osc_category_total_items() ; ?>)</span> Change it to <span class=”parent_cat_total_items”>(<?php echo osc_category_total_items() ; ?>)</span> […]

Read More

Adding a background image

You need to modify your header.php file inside your theme folder (modern by default) or the CSS file your theme is using and add the following In case of HTML: <style type=”text/css”>   url(‘{url of image}’);   </style> In case of CSS: url(‘{url of image}’); It’s better to use a relative path when pointing to […]

Read More