Today, we will take a look how simple are basic modifications of your Osclass theme, plugin or simply layout. We strongly recommend to check some CSS basics before you start with modifications. You may find CSS Cheat Sheet at bottom of this guide. What we are going to do today: Hide unwanted box Change background […]
Category: Customization
Item publish & edit hook variants
In Osclass v8.2.0, we brought possibility to use multiple category-based hooks for item publish and item edit pages. Until now, there was one and only one hook for publish/edit, that was very limiting. This hook was usually shown at the end of publish/edit page. (Keep in mind default one still need to exists on publish/edit […]
Integrate user image uploader to user profile
Osclass now provides built-in profile (avatar) image uploader feature, however most of themes does not leverage it as they were built on profile picture or avatar plugins. Let’s take a look how to quickly integrate built-in image uploader to your theme as well. We will use “your_theme” as sample, replace it with folder name of […]
Subdomains configuration
Osclass has very powerful feature that allows you to setup subdomains based on your data (dynamical subdomains). Subdomain types: User based subdomains Category based subdomains Location based subdomains. This includes country, region and city Updates in Osclass Go to your file system or FTP open config.php located in root folder of your osclass installation Change: […]
Translate osclass locations
Osclass major release v4.1 will bring a lot of cool improvements and updates, one of them is that you can setup native name for countries, regions and cities. Main objective of location translations is not to allow translate cities or regions into 5 different languages (who would even do it?) as such structure change would […]
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”); […]
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 […]
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. […]
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 […]
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, […]
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 […]
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 […]
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 […]
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 […]
Change a price format and currency position
Osclass enables you to setup different price format for every single language on your site. To modify currency position in price field or number of decimals, go to “Settings > Languages”, select language you would like to update (click on “Edit” button in pane). Now you have list of options available in regards to price […]
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 […]
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> […]
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 […]