Recent Updates Toggle Comment Threads | Keyboard Shortcuts

  • garciademarina 2:25 pm on July 25, 2014 Permalink | Reply  

    Osclass cache – Performance testing 

    Comparison of the average download time of Osclass 3.4 with cache (memcache) and Osclass 3.3.2 without cache simulating a constant user loading on both installations. Performance testing is an non-functional testing performed to determine how a system performs in terms of responsiveness and stability under a particular workload.

    We will perform a Load/Capacity testing

    A load test is usually conducted to understand system performance under a specific expected load.

    This load can be the expected concurrent number of users on the application performing a specific number of transactions within the set duration.

    The test will give out the response time of all the important business critical transactions.

    We will make load testing using JMeter

    Apache JMeter is an Apache project that can be used as a load testing tool for analysing and measuring the performance of a variety of services, focusing on web applications.

    Our test plan:

    We need to define these parameters:

    • Number of users ( This is the number of concurrent users we want to simulate )
    • Ramp-Up period (in seconds) (If 14 users are used, and the ramp-up period is 1 second, then JMeter will take 1 second to simulate all 14 users)
    • Loop count (how many times is executed)

    We’ve added the following requests to be simulated:

    • Homepage
    • Search – Region Barcelona
    • Search – Category Cars
    • Search – Category Car Parts
    • Search – Category Animals

    Osclass 3.3.2 vs Osclass 3.4 with memcache

    Test note:

    • Unregistered users. ( no login is performed )
    • Simulates a constant traffic (14 or 58 users  browsing the web simultaneously)
    • 2 simulations, normal load (14 concurrent users) and traffic peak (58 concurrent users).
    • Target machine: 4 cpu + 8 Gb (digitaloceans vps)
    • 420.000 listings per installation.

    Normal workload

    Based on one month data

    • 300k unique visitors per month.
    • 640k page views per month.
    • 120 seconds

    14 concurrent users in 1 sec ( 50 times ) 26.3% improvement from the previous version

    High workload (peak of traffic)

    Based on the data corresponding to a possible peak

    • 1,5k visitors in one hour.
    • 3,2k páginas vistas in one hour
    • 140 seconds

    58 concurrent users in 1 sec (50 times) 31% improvement from the previous version NOTE: Factor between concurrent users and page views will vary depending on the site. A lower concurrence of users can generate more petitions in a site than another one with a lower amount of users. For this reason, knowing the server capacity to hold a given number of users may be enough or not, depending on the number of page views generated by users. 

    • Testernikk 5:41 am on February 19, 2015 Permalink | Reply

      Hey I am a old user of osclass . I have handled every starting problems and running this script but i am facing a main problem that unable to login into admin panel many time . In starting everything works fine and then Not able to login in admin panel . its very painful

  • juanramon 3:12 pm on July 19, 2013 Permalink | Reply  

    Use categories, countries, regions or cities as subdomains 

    It’s not plug and play configure Osclass or any other service to work with multiple subdomains. There are three steps:

    • DNS Wildcard
    • Apache Wildcard
    • Osclass subdomain configuration

    DNS Wildcard

    First of all you need to let know to the whole internet which IP resolve any of your subdomains. So, will resolve the same IP as

    In the examples I will use as your IP server and as a domain You should replace this values for your IP and domain. Furthermore, I’m not sure if the following solutions varies depending the DNS Manager you use but here I put two examples:


    *    A


    As you can see the value you have to change is the A record. Finally, if you have another subdomain pointing to another IP, you should just specify it before the *.

    Once you’ve done this, it could take up to 24 or 72 hours to take

    Apache Wildcard

    I’m not sure how it can be done in each specific hosting service, so I would explain what you have to specify in the VirtualHost configuration.

    <VirtualHost *:80>
        ServerAlias *
        CustomLog /var/log/apache2/example.net_access_log combined
        ErrorLog /var/log/apache2/example.net_error_log
        <Directory /var/www/>
            Options -Indexes FollowSymLinks -MultiViews
            AllowOverride All
            Order allow,deny
            allow from all

    What we’re saying with this configuration is that all the petitions that come to any subdomain of will go to the folder where Osclass is installed.

    Changes in config.php

    In order to accept any subdomain, Osclass’ config.php have to be modified, the line that contain the WEB_PATH have to be changed to


    define('WEB_PATH', 'http://'.$_SERVER['HTTP_HOST'].'/path/to/Osclass/');


    Cookies configuration

    Cookies have to be set to accept all subdomains as only one website, change your php.ini file, search for the line

    session.cookies_domain =


    and change it to


    session.cookies_domain = .domain.tld

    Note: From Osclass 3.3 and newer versions, if you’re not able to modify your server’s configuration files, you could define COOKIE_DOMAIN in the config.php

    define('COOKIE_DOMAIN', '.domain.tld');


    Note: It’s important to have a “.” (dot) before the domain. Do not include “www” or anything else.


    Osclass subdomain configuration

    Now we have to specify which type of subdomain we want: categories, countries, regions or cities. You can change this configuration in your oc-admin > Settings > Advanced.

    Let me know if you have problems with your configuration in the comments of this post.

    • BbuySell 7:45 pm on July 26, 2013 Permalink | Reply

      i am new here so i need to know details about Osclass subdomain configuration, how to setup and how to use…please help me…

    • Elvis 10:21 pm on July 27, 2013 Permalink | Reply

      Hi Juan,
      I think i managed to configure step 1 (DNS Wildcard.) But im having a lot of trouble with step 2 (Apache Wildcard)

      This is what i’ve done so far: I added an A Record from my hosting service (HostGator) as *, along with my hosting’s/site IP address.

      But how do I find this Apache Wildcard? Is it hidden somewhere in my hosting service (HostGator?) or is it something I access through my FTP client? I have no idea how to even get started on this Apache Wildcard step. Can you offer some more details please?

    • Andrei 2:09 pm on July 29, 2013 Permalink | Reply

      “Now we have to specify which type of subdomain we want: categories, countries, regions or cities. You can change this configuration in your oc-admin > Settings > Advanced”

      Hi !

      I cannot find the Advanced TAB in admin, i looked for it, but it`s not there, is it possible to have some problems with the platform ?


      • _mahesh 3:02 pm on October 21, 2013 Permalink | Reply

        it will appear in osclass 3.2.1 , mouse over on settings icon in admin panel there you will see advanced link , if your current version is below the version 3.2.1 you have to upgrade to it

    • Umair Khan 3:44 pm on August 15, 2013 Permalink | Reply


    • Umair Khan 12:48 pm on August 16, 2013 Permalink | Reply

      Can any Expert make Video Tutorial of it ? and can upload it on Youtube ?

    • RayJay 10:18 pm on August 20, 2013 Permalink | Reply

      there are two issues with subdomain feature

      1- The city names with sapce are not converted into subdomain
      2- User is asked to login again when he moves from main domain to subdomain.. [session.cookies_domain = .domain.tld] still does not fix the issues.

    • tausif 7:04 am on August 21, 2013 Permalink | Reply

      i have everything but i see error at my subdomain see here

    • jesus 4:11 am on August 22, 2013 Permalink | Reply

      do you have a demo or something to see hows it works?

    • clau 3:00 am on August 28, 2013 Permalink | Reply


      Can someone help me with the region subdomains?
      I have hosting with hostgator and i added a DNS wildcard, modified the config file, disabled/enabled friendly links, and selected the region from settings->advanced.

      My domain is not primary domain, it is a addon domain, is it possible that this is the problem?

      Please let me know what should i do,
      Thank you!

    • Karthik 10:32 pm on October 25, 2013 Permalink | Reply

      Works Perfectly, Check city based sub domains.

      I done the first two steps long before, but not came across the WEB_PATH and cookies work, now I have done it and the sub domains works perfectly.

      • TMKHAN 3:02 pm on January 4, 2014 Permalink | Reply

        Hi Karthik
        Seen you ad site. It has a clean theme. Which theme are you using or you have designed your own. Can you please guide are you using same DB for all city subdomains? Do all city subdomains have speraate osclass installations, if one then how?

    • Karthik 10:41 pm on October 25, 2013 Permalink | Reply

      A small suggestion for Apache Wildcard, if you were in shared hosting where custom Apache configuration is not allowed, you can simply create a sub domain with * and point it to public_html. Simple.

      Proof : my site’s Apache Wildcard is done by above said method and it works.

      • alfa 12:19 am on February 10, 2014 Permalink | Reply

        Hi Karthik,
        Nice site. 2 related questions:
        1. Are you using the same DB for all city subdomains?
        2. If a user is registered with, does the user need to reregister to use post in another city subdomain, eg.


    • _mahesh 4:30 pm on October 30, 2013 Permalink | Reply

      can any one tell me how to change in config.php , i am confusing with /path/to/osclass/ what i have to replace in that…..give with example…… urgent…thanks

    • _mahesh 6:38 am on October 31, 2013 Permalink | Reply

      Hi ,
      I got two problems while i am trying to get city subdomains, iam having two subdomains

      1) i did not get common login for the subdomains…user gets asked to login again while he goes to subdomains

      2) Please clarify the which data i have to insert in the host in advanced settings in at admin

    • IM Classified 6:27 pm on November 26, 2013 Permalink | Reply

      Hello Jesus ….. Yes I have a demo at . If you have any query please do let me know.. Its working fine apart from individual post. Its not redirecting to….. sub-domain rather than…... I dont know how to solve it. if someone have solution pls do let me know..

    • Yash 11:30 am on January 7, 2014 Permalink | Reply

      If I do the config file setting as described here in version 3.3.2, I cant login to OC-admin. I think the problem is with the java script path. It was working in osclass 3.0 .

      Pls advice


    • India free classifieds 2:46 pm on January 14, 2014 Permalink | Reply

      can you have the detailed screen shot step by step to fix this .

    • India free classifieds 3:37 pm on January 14, 2014 Permalink | Reply

      how to config in hosting panel , for

    • Yash 8:34 am on January 21, 2014 Permalink | Reply

      Hi all,
      I think version 3.3.2’s sub domain configuration screwed up this great project, unfortunately nobody even in the forums are responding to this matter. Sub domain configuration , common user login for different sub domains, admin login everything is geting problem if you configure the sub domain.
      Someone’s help is highly appreciated.


      • _CONEJO 9:08 am on January 21, 2014 Permalink | Reply

        Login problem in different subdomains is probably caused by an incorrect cookie configuration. Did you follow the guide? It’s explained there.

        • keerthisone 2:25 pm on March 27, 2014 Permalink | Reply

          Conejo i followed the steps mentioned above, the subdomain working but i could not login into my admin account. my site is

        • Mehmood 9:13 am on June 14, 2014 Permalink | Reply


          I would like osclass to work with both Region and city specific subdomain.

          Suppose Country X has three regions A,B & C. And each Region has its own cities. Say Region A has city 1, city 2 and city 3. I want sub domain to be region specific and at the same time city specific.. Suppose my website is Now i want that if i have use subdomain ( then it should show me ads from all cities of region A. And also if i select ( then it should show me ads from only city 1.

          Right now in Osclass we can either go for city specific sub domain or region specific. And i feel this is an important feature that need to be added.

          If someone has already worked out a solution for this, please share the same.


    • Yash 7:48 am on January 22, 2014 Permalink | Reply

      I have installed the script in public_html/domain folder/ and this site is directly pointing to this folder. I have edited A record for wild char * and in config.php

      define(‘WEB_PATH’, ‘http://’.$_SERVER[‘HTTP_HOST’].’/’);

      define(‘COOKIE_DOMAIN’, ‘.domain.tld’);

      The sub domain is working fine but the problem is I cant login to admin anymore. But in older version it was working fine.

      Thanks for your time and consideration


      • Serma raj 2:19 pm on April 13, 2014 Permalink | Reply

        Same problem here bro…..subdomains working fine. but cant login to admin

    • gumpul 9:35 pm on February 26, 2014 Permalink | Reply

      can i use multiple subdomins at once ?

      as of now we can choose only any of one option like catrgories or citis or countries to set domains

      but i want to use like

      categories and cities and countries combination how to make it ??

    • Anilkumar Astra 11:25 pm on March 10, 2014 Permalink | Reply

      can i enable subdomians for multiple locations at once ?

      Now we just can choose country or region or city or category unlike this

      can i set subdomain for all at once ??

    • Anilkumar Astra 6:47 pm on April 10, 2014 Permalink | Reply

      can i configure subdomain for both cities and countries at once ?

    • mandi007 10:09 am on April 12, 2014 Permalink | Reply

      the sub domain is working for me but same problem i cant login to admin and also i cant post new post…………but no help to solve it

    • Anilkumar Astra 7:31 pm on April 12, 2014 Permalink | Reply

      hello friends use this

      define(‘WEB_PATH’, ‘http://’.$_SERVER[‘HTTP_HOST’].’/’);

      as webpath in config.php

    • Anilkumar Kanneboina 10:47 pm on April 22, 2014 Permalink | Reply

      shall i use city & country subdomain at a time?

    • Orova 6:19 am on May 7, 2014 Permalink | Reply

      Hi I am using country based sub-domain when I select a country, in “Other searches that may interest you” it shows regions of other countries also. I want to show regions of only active country. how to do this? thanks in advance… Also country name not showing in page title.

    • Anilkumar Kanneboina 9:29 pm on June 27, 2014 Permalink | Reply

      after following your instructions my webpage showing blank :P?

    • Daniel 12:33 am on July 31, 2014 Permalink | Reply

      My subdomains works fine, but no show the items filtered by region, any idea?

    • govindak 12:58 pm on August 7, 2014 Permalink | Reply

      can i enable subdomians for multiple locations at once ?

      Now we just can choose country or region or city or category unlike this

      can i set subdomain for all at once ??

      any body got it working ?

    • Subhojit Mukherjee 1:32 pm on October 6, 2014 Permalink | Reply

      If you are a cPanel user then don’t try step 1 & 2. Go to cPanel “Subdomains” tab and create a subdomain, name it *.yourdomain.yourTld and point it to your osclass installation directory.

    • Ayesha Mirza 12:41 am on October 16, 2014 Permalink | Reply

      hello dears, please help me anyone and tell me how to Use categories, countries, regions or cities as subdomains i don’t understand how to make cities as subdomains Thanks

    • Al-tutor 8:20 pm on October 23, 2014 Permalink | Reply

      hi, I liked the post, it was a great work, but I’m thinking of another idea, not sure if it is possible, if i had one ad space on a blog but two banner to show, and i want to show banner1 to a specific country, and the second for the remaining countries! is it possible?
      It would be great if you answer me! ^^’

      thnx in advance.

    • Ajit Sahane 6:26 pm on December 7, 2014 Permalink | Reply

      Hi guy’s – i solved city wise sub-domain issue. check my website – and sub-domain

      for setup sub-domain kindly contact personally – / 9762105756

    • Ajit Sahane 3:42 am on December 8, 2014 Permalink | Reply

      hi guy’s DNS Wildcard implement work perfectly need to some other changes. here is my site once user login then hi can post ads any sub-domain without logout and admin normally access there admin panel. thanks to osclass team.

    • abyanetwork 8:45 pm on December 29, 2014 Permalink | Reply

      How to do that with cpanel ?

    • Kim Chu 5:09 am on January 17, 2015 Permalink | Reply

      if my osclass installation is under /public_html/ folder
      what will be my web path configuration

      define(‘WEB_PATH’, ‘http://’.$_SERVER[‘HTTP_HOST’].’/’); ?

    • Shubham Takodes 9:23 am on April 14, 2015 Permalink | Reply

      Its not working

  • _CONEJO 10:15 am on June 4, 2013 Permalink | Reply  

    New feature in 3.2: Routes 

    You could extend Osclass with plugins, and sometimes you need to create a special page, for example to show more options to your users. In previous versions, the url will look like domain.tld/index.php?page=custom&file=your_plugin/page.php which isn’t the prettiest url you could see, and also the file path are visible which is not a problem, but it’s not good. In 3.2 we added “routes” that will transform that ugly url into a more beauty one, like domain.tld/your_plugin_page , they even works with regular expressions to accept variables on the url.


    If you are a plugin developer, please take a look at the information on the wiki and the example plugin in Github.


    • samanthabazarelena 11:28 am on June 29, 2013 Permalink | Reply

      Hello, I’m sorry but when will the release of version 3.2?

    • N00SA 7:27 am on July 12, 2013 Permalink | Reply

      This is awesome! Looking forward to 3.2. Thank you for this feature. Bouncing between Laravel projects and Osclass, this is the one feature I missed in Osclass. Stoke to see it coming in 3.2.

    • tausif 7:41 pm on July 16, 2013 Permalink | Reply


    • phmig 7:39 am on July 17, 2013 Permalink | Reply

      Fantastic. Now testing 3.2. Great job for you and the team!

    • dilip 9:57 am on July 20, 2013 Permalink | Reply

      I have developed a classified portal using OSCLASS, Its amazing. you can see it using the link . contact me for any osclass development my email id id

    • myblogspot 3:36 pm on July 30, 2013 Permalink | Reply

      how to use ?
      Advertise by regions feature using subdomains

    • Alex 11:04 pm on May 3, 2014 Permalink | Reply

      I used your example.php file. Only the last image would get imported. I can’t find a way to fix that.

  • _CONEJO 9:16 am on May 30, 2013 Permalink | Reply  

    Hooks removed in version 3.2 



    This is a really important issue to all the plugins developers out there, some hooks were marked as “deprecated” in previous version and will be delete in version 3.2. Please update your plugins as soon as possible to use the new hook.

    The hooks that are going to be deleted are “item_form_post” and “after_item_post”, they will be replaced by “posted_item”.


    They were located in oc-includes/osclass/ItemActions.php and this is the change made.


    posted_item will received only the $item object as a parameter. posted_item is already in 3.x version, so all plugins changed now to it, will continue to work with current (and a few previous) version of Osclass.

    • Groomain 9:50 am on May 30, 2013 Permalink | Reply

      Have you any idea when this version will be released?
      Great works!

    • fri 3:37 pm on June 2, 2013 Permalink | Reply

      @_Conjo can you please update when this version is available, I am customizing some latest version, if this is going to be released soon then I can save some time and effort to work on new version.

    • _CONEJO 6:46 am on June 3, 2013 Permalink | Reply

      It will be released soon, can not give you a date yet

    • NAOVisa 9:31 pm on June 3, 2013 Permalink | Reply


      sorry out of topic

      is os class based on WordPress? just curious to know 🙂


    • _CONEJO 5:43 am on June 4, 2013 Permalink | Reply

      No, Osclass is not based, nor related to WordPress in anyway. We built it from scratch.

    • NAO Visa 6:16 pm on June 16, 2013 Permalink | Reply

      Hi _CONEJO

      thanks for kind reply,
      I just curious to know because your directory structure is something looks similar to wordpresss 🙂

      btw, I am now trying os class for my classified website, hope I can easily understand the programming side of osclass 🙂


    • Matías Barmat 2:04 pm on November 12, 2013 Permalink | Reply

      Hola Conejo. La estructura de carpetas oc-admin, oc-content y oc-includes está de alguna manera inspirada en WordPress. Incluso ciertas funcionalidades y features son muuuy parecidas. Es demasiado parecido para decir que no recibieron influencia alguna de WP.

  • _CONEJO 9:25 am on March 19, 2013 Permalink | Reply  

    Upcomming changes in Osclass 3.2 

    We’re going to make a few changes in Osclass 3.2, one of them is we’re updating Jquery library to its 1.9 version, that means JQuery will be on 1.9, JQuery-ui on 1.10.2, Fancybox on 2.1.4 and JQuery-uniform will be on current development branch (since stable does not support JQuery 1.9 yet). We also have added JQuery-migrate plugin, which makes JQuery 1.9 backward compatible, but it’s not used by default.



    I suggest you to start updating your themes and plugins to work with  JQuery 1.9


    • pubic52 7:12 pm on March 23, 2013 Permalink | Reply

      please please try include this in next version
      basically user manage page in admin panel is directly that (search by name + directory list)
      i so damn wanna use osclass but absence of this keep me away
      some donate will follow for sure 😉 thx

    • Ankita 2:19 pm on April 7, 2013 Permalink | Reply

      how do I download the latest version of OS Class.. I am only able to download the 3.1 version from the website. Please advice

    • M 6:33 pm on April 9, 2013 Permalink | Reply

      Please include in the new version the option to remove “PRICE” from any category that has not sense for price. but example .. Personals, Adults, Community…. etc… it should be an option.

      Thanks you.. great job. hope very soon when I get more involve with the code give my collaboration.



    • valdis 1:15 pm on April 13, 2013 Permalink | Reply

      When it is available OSclass 3.2?

    • guillermovilla906 3:00 am on May 2, 2013 Permalink | Reply

      How to control favicon from admin?? Please!

    • greg 4:29 am on May 17, 2013 Permalink | Reply

      Unfortunately no one is fixing this bug. If the “PRICE” box remains in the Personals, it basically makes it out to be a prostitution service.

    • Govind Agrawal 6:49 am on June 17, 2013 Permalink | Reply

      when osclass 3.2 is going release ?

      • _CONEJO 6:54 am on June 17, 2013 Permalink | Reply


        • Govind Agrawal 7:08 am on June 17, 2013 Permalink | Reply

          is there any specific date ?
          i m so curious about osclass 3.2

          • _CONEJO 7:21 am on June 17, 2013 Permalink | Reply

            No, not specific date yet. We have some features we want to add + we need to do a lot of test on the software yet. We don’t know how much time we’ll need to finish it, we could make an estimation but usually we will need more time.

            This happens with all software development, and it’s the reason why we’ll never have released dates until 1 or 2 weeks before.

            • osclasslover 10:00 am on July 9, 2013 Permalink

              Can we participate in testing before you release it.

            • juanramon 8:41 am on July 12, 2013 Permalink

              Sure! Before making the official release we’ll upload a version so you can try it out.

    • Anwar 10:09 am on June 26, 2013 Permalink | Reply

      That’s great. how ever os class is good but still i recomnded few things

      1) Geo Location tool
      2) based n Geo Location an visitor can have rout for the business on map with distence
      3) based on geo location redirect to geo city
      4) paid module for 3,612 month


    • anunturi 2:29 pm on July 8, 2013 Permalink | Reply

      Make from Osclass something like WordPress features: simple (it is now) and SEO Friendly, and it hasn’t to be a free script.
      The big problem: the description on categories and subcategories – it has to be visible in meta description AND possibilty to add meta keywords – the basic rules for a good SEO.
      I hope the osclass 3.2 will resolve those problems.
      Best regards!

    • Dennis 6:09 pm on August 19, 2013 Permalink | Reply

      would be good to have sub categories

  • _CONEJO 12:48 pm on February 19, 2013 Permalink | Reply  

    Make your plugins more secure with anti CSRF functions 

    In Osclass 3.1 we included some anti-csrf functions. What is CSRF? Wikipedia has a good explanation about Cross-site request forgery (CSRF). You probably have seen it in some videos or images shared on social networks. You think you’re clicking on the play button, but instead, you’re doing a “like”, “share” or “retweet” without even knowing.


    This attack relays on cookies and session that keep alive the identity and login of the victim, for example, I do not enter my password every time I go to Facebook or Twitter, therefor someone could craft an URL and open it inside an iframe. So when I visit the attacker’s page, an iframe with a specially crafted url is opened by the browser (but invisible to the user), it will take the credentials from the browsers (if cookies and session are not cleaned) and access the iframe impersonating me, and it could do a like, share or whatever, it could make any change that the website allows me.


    To avoid this, we included anti-csrf functionality in Osclass 3.1. It works creating two variables an storing them in the session and sending it to the user, on each form or link, the user should send back the variables and Osclass will check them against the stored values, after that, delete them to never be used again. In short, you tell the visitor a random number, and if he wants to do something on your site has to tell you that number or he will not be allowed. Each time he wants to do something, you think of a different number.


    Most of functions that make this possible are at the end of utils.php, but in theory your only need to work with the three helpers at hSecurity.php osc_csrf_token_form, osc_csrf_token_url and osc_csrf_check.

    • osc_csrf_token_form(): Will include the two variables in form format (<input type=”hidden” />). NOTE: To maintain compatibility with themes, this  is added automatically in every form, no need to do it by yourself.
    • osc_csrf_token_url(): Will include the two variables in url format (CSRFName=ABC&CSRFToken=XYZ). NOTE: There’s no character befor “CSRFName”, sometimes you will need a “&” and others a “?”, depends on your url
    • osc_csrf_check($drop): This will perform the check if the tokens are correct or not, if not, it will ouput the message “Probable invalid request” and stop the execution of the PHP file. This function should be used on the code that receives the information. NOTE: $drop is a boolean (true / false) variable. It will drop (clear, delete) the variables every time (to be more secure), but ajax request needs to reuse the tokens, so if you’re doing an ajax request, use osc_csrf_check(false) to not clear the variables (but they will be invalid after an hour of the creation).


    If you want to make more secure your plugins, start using these functions but remember they’re only available on Osclass 3.1 (and later)

    • rumah 3:33 am on March 19, 2013 Permalink | Reply

      how to apply this function in real estate attributes plugin?

    • Armand Jordaan 2:00 am on June 5, 2014 Permalink | Reply

      What would be the best way to disable the CSRF for just one php file? We adding a payment gateway, and the gateway provider is asking us to disable CSRF for the notify URL.

    • _CONEJO 7:23 am on June 5, 2014 Permalink | Reply

      Armand Jordaan, no need to do anything extra, since the CSRF check has to be called by a function, if your file do not have said function (osc_csrf_check()) it will not be called. Additionally, if you don’t want to add CSRF variables to form, add “nocsrf” as a class in the form tag.

  • _CONEJO 2:34 pm on January 7, 2013 Permalink | Reply  

    Going back to work 

    Some of you maybe have noticed that the development of Osclass has slowed down a little bit, that’s true and we’re going to fix that. We’ve lost focus for a moment, but we’re back on tracks and next version (3.1) will be released very soon with some new features (a lot of them!).

    In the meantime, we’ve opened a new website for your suggestions about Osclass, so if you have any idea tell us there. Please, for problems, we still have the forums.

    Happy new years!

    • David 11:41 pm on February 4, 2013 Permalink | Reply

      Customize columns and data in admin’s tables

      What happened to the example plugin?

    • enjoyPB 12:42 am on February 6, 2013 Permalink | Reply

      Hi there. I posted a request to help fix the map of the USA because it’s missing our nation’s capital, which is not a state but, a 51st zone (in Maryland). I also recently discovered this open-source CSS based US map ( and was wondering if you might be able to incorporate it in OSClass. My site is at and if anyone wants to help please let me know! Thanks 🙂

  • juanramon 1:43 pm on October 22, 2012 Permalink | Reply
    Tags: database, host, mysql, port, port-number   

    MySQL alternate port number 

    If your host uses an alternate port number you just need to add it after the mysql host name constant: DB_HOST. For example:

    define('DB_HOST', 'localhost:3300');

    Another example:

    define('DB_HOST', '');
    • Dan 9:17 am on October 24, 2012 Permalink | Reply

      Thanks for the information! I was testing Osclass with MAMPP at localhost, so the mysql default port was the 8889 and I didn’t know how to fix the problem. Cleaner that than change the default mysql port!

  • garciademarina 4:25 pm on September 7, 2012 Permalink | Reply  

    Email templates improvements 

    Osclass have email templates for multiple purposes such as verify user account, notify new items, etc.

    You can customize your email templates like you want, going to

    ‘Admin panel -> Settings -> Email templates’

    As you can see, email templates can have email variables  like {EMAIL_VAR}  in Title and Description (  title as email subject and description as email body ).

    For example you can have a email template with a subject like this:

        ‘Hi {USER_NAME} welcome to {WEB_TITLE}’

    There are two email variables, which will be replaced before email is sent.

        {WEB_TITLE}  , will be replaced by web title.

        {USER_NAME}, will be replaced by user name.

    We will receive an email with subject like:

        ‘Hi Carlos, welcome to’

    Recently added :

    •  Test it button, that allows you given an email to send a template preview of the actual template.
    •  A legend with short descriptions of email variables to make email templates more understandable.

    Example of Use

    Plugin name: send_email_example

    Description: This is an example that create his own email template and send emails with custom email variables.

    This plugin sends an email saying thanks and showing the number of items belonging to a user, when a listing is added by user and only if user have more than one item published.

    This plugin use EmailVariables class, that is used when edit email templates for show the legend, in this case add {NUMBER_LISTINGS} variable and set a description.

    EmailVariables::newInstance()->add(‘{NUMBER_LISTINGS}’, __(‘Number of listing that belong to user.’, ‘send_email_example’));

    Here you can download a plugin example. ( Plugin is well documented If you have any doubt don’t hesitate to ask )

    NOTE: This features are only available if you use a develop branch of Osclass. Will be added on Osclass 3.1.0.

  • _CONEJO 7:26 am on August 29, 2012 Permalink | Reply  

    Import listings from other sources easily 

    We’ve just created a new plugin that allows you to batch import listings from other sources. The plugin import a XML file with all the information of your listings, the XML have to be carefully crafted in order to work smoothly. Please, consider the plugin as in test state, it works well under specific circumstances, it could fail if something is wrong with the XML structure. There’s included an example.xml file to serve as an example, it’s pretty self-explanatory

    Some notes about the XML structure:

    • The first line has to be  <?xml version=”1.0″ encoding=”utf-8″?>
    • You could import as many listings as you want, but we suggest to import them few by few to avoid timeouts (strongly suggested if you’re also importing pictures) In order to import pictures, the oc-content/downloads folder should be writable
    •  Importing pictures could take quite a time, please, be sure to set the PHP script timeout is enough high so it will not fail
    • The plugin will insert the basic data, if you have any plugin that required some kind of extra data (as cars, jobs, real estate attributes,…) it will fail (we’re working on that)
    • Only one field is required to set the category, <categoryid> is a NUMBER, the category’s id which already exists, <category> is a string, the title of the category, it may exists or not, if it does not exists, it will create one with that title
    • category, title and content fields required an attribute “lang” to specify the language, if none is set, the default language of OSClass will be used
    • If a field is not set, an empty string will be used

    Remember, this is an importer, it WILL NOT create the XML by itself. We’re working on solutions for most popular classifieds softwares, that will allow you to export the data in the correct XML format.


    Warning: It’s a beta version, DO NOT use it on a production environment or with data you don’t have backup of. We’ve just released it via our plugin market.

    • Jay 2:05 pm on August 29, 2012 Permalink | Reply

      This looks like a great plugin. For some reason though I cannot import the example.xml file. The error it gives me is “Category invalid. (Item 0) Category invalid. (Item 1)”


      • mmks 7:51 pm on October 8, 2012 Permalink | Reply

        Hi, problem is file index.php line 37, now is:

        $catId = @$listing->getElementsByTagName(“catehgoryid”)->item(0)->nodeValue;
        must be
        $catId = @$listing->getElementsByTagName(“categoryid”)->item(0)->nodeValue;

    • _CONEJO 2:11 pm on August 29, 2012 Permalink | Reply

      Hi Jay,

      That’s probably because you have no category with ID = 1, I leave and as an example, feel free to remove tags on both listings, and it should work (and create new categories with the names specified).

      We’re currently working on a plugin for Classipress to export listings to this format, not sure which other software should be interesting to.

      • Jay 3:27 am on August 30, 2012 Permalink | Reply

        I tried it by removing the category id and it created a new category but did not add the ads. I also tried setting the category id to the id of the new category that was created and got the same error as above.


    • Alejandro 6:11 pm on September 2, 2012 Permalink | Reply

      Hola CONEJO, me alegra mucho la idea de desarrollo del plugin de importación de anuncios en formato XML. Desconozco en que avance del plugin estas ene ste momento. Mi consulta o sugerencia es si no será recomendable insertar las imágenes en los anuncios desde la url donde se realiza el anuncio e insertarlo con DIV IMAGE en lugar de descargar las imágenes al servidor del sitio. Esto nos ahorraría demoras con el plugin, además al desconocer el tamaño de las imágenes creo que puede generar muchas demoras tal como te está sucediendo.

      • _CONEJO 6:25 pm on September 2, 2012 Permalink | Reply

        Hola Alejandro,

        Es una idea, claro y perfectamente realizable tal cual está el plugin (ahora mismo). En el contenido del anuncio solo debes concatenar las imágenes en tags “” y listo. Sin embargo, ocurren varios problemas con eso:
        Al estar en el contenido puede ser que las imágenes no se adapten al estilo/theme que tengas, haciendo que se vea raro (en mitad del contenido y no en el sitio especificado por el theme). También, las imágenes estarían alojadas en la vieja ruta, si estas cambiando de servidor, de dominio o cualquier otra cosa, se vería que la imagen está alojada en otro sitio.

        En cualquier caso, tu idea se puede hacer tal como está el plugin, nosotros solo ofrecemos una posibilidad más, en mi humilde opinión, la más correcta, o al menos que debería hacerse.

        Como bien dices, puede tardar demasiado en descargarse las imágenes, por eso hago tanto incapié en ese tema. En teoría, un servidor decente tiene 1000/100Mbps más o menos, lo cual hace que la descarga sea bastante más rápida que tu conexión de casa y no debería haber mucho problema. Sin embargo, el timeout por defecto de PHP es de 30 segundos, si estás importando una gran cantidad de anuncios, está claro que vas a superar ese límite, por eso, simplemente aviso. Sin embargo, mover gran cantidad de información y datos, es lo que tiene, tiempo de proceso/transferencia.

    • claudio klemp 8:24 pm on October 25, 2012 Permalink | Reply

      Hi everyone… I’m pretty new to this board, but can you tell me where I can find this plugin, in I couldn’t find it.

    • claudio klemp 4:45 pm on October 27, 2012 Permalink | Reply

      Hi _CONEJO, first of all thanks for the speed in answering, furthermore before answering enjoy the weekend… here in Brazil it becomes just summer….

      Now the question :

      If the xml file does have additional fields outside of :


      Only one field is required to set the category, is a NUMBER, the category’s id which already exists, is a string, the title of the category, it may exists or not, if it does not exists, it will create one with that title


      1.) Will those fields become database fields , so usable or will those fields just been ignored ?

      .. or better ( might be a good idea for programming )

      If I have an XML File , I have also the fields and the field names, accordingly I can copy the basic template structure and build an automatically the input / output screens / reports and data tables.

      2.) I guess a major issue of whoever is setting up the system is that you start up with an empty market / database, generating the problem of other people to start to post their announcements.
      Accordingly one technic could be to scrape some data and import it for the startup …

      Might be a good idea to share this scraping info between users.

      3.) Same is valid to identify the right xml file splitter, as you ask already to use small numbers.

      This by the way could become a module of the same importer allowing you to rewrite also the field names of the xml file , thus setup category and categoryid, then rewriting the original xml file 10 records per time to be thenafter imported.

      Hope , my ideas are a bit useful to you and the board here, looking forward to hear from you.

      Claudio Klemp

      • _CONEJO 5:27 pm on November 5, 2012 Permalink | Reply

        Hi Claudio, sorry for the late reply.

        1.- Yes, if the category’s name is supplied and it does not exists in your current database, a new category will be created (it will be a parent category)

        2.- Default information depends a lot on which kind of classifieds sites you are going to host. Generic info will be useless if your classifieds site is about used cars, that’s the reason (plus add location issues and language) why we didn’t release any “starter pack” to boost your site at the beginning with some bogus/fake ads.

        3.- Great! Thanks for the suggestions, I hope to have a little more free time and improve the plugin with your ideas, I really like them.

        • claudio klemp 7:40 pm on November 7, 2012 Permalink | Reply

          Back again…

          I’m actually struggeling with my point 3 suggestion … which should work with a major real estate network and more than awful xml files ( 6MB and more not UTF-8 … guess you know well what that means )

          At this time I have build a splitter to devide the xml into records and now writing a reader to rebuild the entire thing ….

          Problem arising :

          If you do not have geo-localizzation you get a problem …

          Thus I’m playing again with some combined google / yahoo and java scripts allowing to :

          1.) identify the geolocation lat/long based upon the geo- localization capacities of the browser , depending on the internet provider exact up to 2 meters.

          2.) guessing the ip coordinates using your ip against a database.

          3.) guessing your location analyzing the text ( yahoo experimental interface )

          a sample is viewable on

          Thus now the idea and major question :

          In the module where you enter what you want to sell, you need to place your address data more or less completely…
          why not guess it and accordingly rebuild the street address automatically and fill up the field ?

          Accordingly the question … who dealt with the addressing data, to have a talk with ?


          Claudio Klemp

    • ronny das 3:49 pm on November 5, 2012 Permalink | Reply

      when i am login my panel shown me this error ..what can i do for this.. please help me ….

      osc_add_admin_submenu_page() in /home/adxp/public_html/oc-content/plugins/importer/index.php on line 15

      • juanramon 4:39 pm on November 5, 2012 Permalink | Reply

        Are you using Osclass 3.0.x? It’ll work only in version 3.0 or higher.

    • claudio klemp 2:43 pm on November 12, 2012 Permalink | Reply

      Hi Coneo_, The script is working fine and you should advice that the language tag lang=”en_US” is mandatory in certain fields , as the import stucks if missing.

      Unfortunately I also identified an issue …

      Issue : Multiple Image importing

      If the xml features images to be imported , and may be also 10 or 11 with the relative http address we obtain may be three or four images usually three out of them with different names, but the same image.

      I understand that there is a problem in streaming, as one image is going to be fetched and in the between the next is overwriting the previous image, problem which could arise as I’m processing 10 xml records per file.

      Here some pages :

      I suggest :

      A.) Prior check if one or more images…, in case of one image fetch it and save it locally, otherwise leave the the external http address and place the hyperlink into the database, which might generate a problem regarding the local-directory/imagename local-directory/imagename_preview, local-directory/imagename_thumbnail construct.

      B.) The importer opens an inner frame ( iframe ) processes the first xml record, then posts the second into the iframe and so on, generating a loop of single posts, where the timeout (new post) could be managed by a callback of the last loaded image.

      I would prefer the solution B.), as in my case I had a 6GB xml file to be imported, thus I had to split it into single records, then I rearranged the xml tags to fit the importer requirements and assembled new xml files of 10 units.

      Thus thinking in terms of automating the task with your importer I would play it the way :

      1.) Upload the XML file whatever size it is ….
      2.) Split the XML file in single records
      3.) Process the XML tags against the required fields through a mask or convert them automatically

      ………. = input xml field name
      …… = input xml field name
      …. = … etc

      *********** note *************

      see postscriptum

      *********** note *************

      4.) Post every single transformed xml record into the plugins/importer/index.php instead
      of the uploaded xml file, issuing a callback (javascript calling the a parent frame function) from plugins/importer/index.php once all images have been loaded, to restart from point 3 fetching the next record.

      Let me know your ideas, or by return give me an email to submit the code of 1,2,3 which is already working for us.


      PS.: I took a open source code working with the Google Api written by Vinsensius Angelo
      ( ) allowing to obtain an address by latitude / longitude or viceversa obtain latitude / longitude by passing an address, thus complete the requested dataset.

      • _CONEJO 8:59 am on November 19, 2012 Permalink | Reply

        Hi Claudio,

        I took note of your suggestions, they’re very good ones,


      • Jake G. 9:25 pm on February 11, 2013 Permalink | Reply

        Complete newby, first post. I’m blown away by the quality of this SW and the community, keep up the good work!

        Re: Multiple Image Importing using Ad Importer

        Hopefully this feedback is helpful for someone experiencing the same problem.

        Had some trouble with duplicate images when importing listings with multiple images. I found a quick fix by changing one line in index.php:

        $tmp_name = “adimporterimage_”.time();
        $tmp_name = “adimporterimage_”.time().”_”.rand().rand();

        Appears to work for me, so I am assuming that the files were being downloaded faster than one second and therefore creating duplicate download filenames. Disclaimer – Zero PHP experience here, so maybe someone could verify and/or post a better solution. -Jake

    • claudio klemp 2:54 pm on November 12, 2012 Permalink | Reply

      Please read the above :

      ………. = input xml field name
      …… = input xml field name
      …. = … etc

      *********** note *************

      see postscriptum

      *********** note *************

      as :

      title lang=”en_US” ………. = input xml field name
      content lang=”en_US” ……. = input xml field name
      category lang=”en_US” … etc
      address*********** note *************
      postcode see postscriptum
      longitude*********** note *************



      the minor / major signes went truncated in the post


    • Salva 4:00 pm on November 17, 2012 Permalink | Reply

      Hi I think that this would be interesting to include a field to embed a link. It would be possible and if so how? thank you very much

      • claudio klemp 2:11 pm on November 30, 2012 Permalink | Reply

        Hi Salva I’m testing actually additional fields to be imported , let you know asap


    • jose 12:28 pm on November 28, 2012 Permalink | Reply

      Hello, I have ClassiPress theme and I get the following error:

      Fatal error: Call to undefined function osc_register_plugin () in / home / mganware / / wp-content / plugins / importer / index.php on line 222

      any solutions?



      • _CONEJO 12:38 pm on November 28, 2012 Permalink | Reply

        Hi jose,

        This plugin is for Osclass, not for classipress. This plugin should be installed in your Osclass installation and will allow you to import your classpress ads to Osclass.


    • jose 12:44 pm on November 28, 2012 Permalink | Reply


    • jose 3:54 pm on November 28, 2012 Permalink | Reply

      Hello, I installed the USA osclass themes folder and I can not run,


      Fatal error: Call to undefined function osc_add_hook() in /home/mganware/ on line 42

      any suggestions?



      • _CONEJO 4:01 pm on November 28, 2012 Permalink | Reply

        Hi jose,

        All those themes and plugins are meant to be used with Osclass, open source classifieds. We’re not related to wordpress or classipress in any way. They are two different softwares and unfortunately, themes and plugins are not interchangeable among them.


    • jose 4:21 pm on November 28, 2012 Permalink | Reply

      as installed osclass system on my hosting ?

      download link?



    • jose 4:48 pm on November 28, 2012 Permalink | Reply

      Thank you very much for your attention

      I’ll try and install one of one my domains


    • jose 6:26 pm on November 29, 2012 Permalink | Reply


    • ashok 5:51 am on December 19, 2012 Permalink | Reply

      hi i am using OS class but unable use the import listing plugin i have few queries in my mind
      how i come to know category id ?
      please provide sample standard xml so user can understand

      • claudio klemp 2:33 pm on January 7, 2013 Permalink | Reply


        I use Navicat ( works on Apple as well as on Windows ), connect to the database and look into oc_t_category and oc_t_category_description (if you maintain the default naming) otherwise refer to something + category.

        Otherwise install and use the php myadmin (freeware) which allows you to do the same serverwise.


    • James 2:24 pm on December 23, 2012 Permalink | Reply

      Great plugin! Thanks.

      How many custom fields can it create?

      • James 1:08 pm on December 27, 2012 Permalink | Reply

        Has anyone successfully used the custom field with the ad import plugin? I’ve tried everything I can think of and yet can’t get it to work. It works fine from within the add a new ad from the site but I can’t get it to work in the upload xml file.

    • James 9:36 pm on January 10, 2013 Permalink | Reply

      The postcode field doesn’t make it to the db and I can’t get the custom field to work. Anyone else have this problem?

    • Claudio klemp 11:25 pm on January 10, 2013 Permalink | Reply

      As i already mentioned in another post above, you are sometimes required to use such a xml structure to get it working, may be it helps.

      title lang=”en_US” ………. = input xml field name
      content lang=”en_US” ……. = input xml field name


    • James 12:12 am on January 15, 2013 Permalink | Reply

      Thanks Claudio, but that didn’t work. Are postcode and custom fields working for you?

      • Claudio klemp 7:41 pm on January 15, 2013 Permalink | Reply

        Postcode is working, also several custom fields… But regarding these i changed the entire program to generate other xml files and comma delimited files to allow a further import on , so pls consider just postcode.

        It might be, that you enter into a problem regaring a missing postcode, which in my case didnot happens as i regenerate the address fields using google maps.

        Thus look if the import hangs due to missing values.

        I hope it helps, we have changed that much the original code for our processing here that i have to remember by heart the problems we faced, but the ode sorks for us importing 6.6 mb xml files, thus 3.000 records per file.

    • allan 12:36 pm on January 17, 2013 Permalink | Reply

      Cannot create categories in version osclass.3.0.2 .

    • Chema 2:50 pm on January 19, 2013 Permalink | Reply

      _CONEJO,… a ver si me puedes ayudar,… estoy teniendo problemas en la importación con las imágenes,… solo me toma una, osea si el nodo incluye pe. 4 tags pues inserta 4 imágenes pero es la misma imagen, osea toma la ruta de una ellas, alguna vez 2, es como si no bajara la imagen correctamente,…

      otro detalle menor, en la función adimporter_ad() se indica que se lea el tag “cityarea” pero el tag en el example.xml esta como “city_area”

      si consigo montar un entorno real para testar osclass me gustaría trasladar un site con 60.000 anuncios y 300.000 imágenes pero es fundamental ver como manejamos el tema de importar tanto los anuncios como las cuentas (15.000)

      te agradecería mucho una ayudita

    • Max 5:56 pm on January 19, 2013 Permalink | Reply

      Guys can you explain us how to import ads from Craigslist, if possible?

      • claudio klemp 1:00 pm on January 25, 2013 Permalink | Reply

        You have to take the example file in the distro, then setup a sort of translation between craigslist xml field names and the one of the example file… attention to the language tag, you should copy as it is.
        I did it directly in the importer.php with such a costruction :

        if(is_array($xmlarray1) ) {
        foreach($xmlarray1 as $counter => $fieldarray) {
        if($fieldarray[‘name’] == ‘title’) {
        $dataset .= ”.” \n\r”;
        if($fieldarray[‘name’] == ‘content’) {
        $dataset .= ”.” \n\r”;

        where xmlarray1 would be the field array (in your case Craigslist) to be translated into the $dataset string, thus building the xml file to be injected.

        I guess, as you say Craigslist the thing will be pretty huge as in my case, thus I’m going to save with file_put_contents every dataset, then seperately with another routine read one dataset after the other and inject the same into the importer.php routines adding the record to the data tables and importing the images , thus redimensioning them into thumbnails, etc.

        The hook I used to issue these different behaviours is in the upload xml file routine :

        If a file is mentioned I upload and split it into thousands of small xml files (1 record each), if I do not mention a file and press submit, I just pass one xml file (record) after the other into the program routine, (as it would be the import.xml example file) deleting it afterwards.

        By placing an :

        osc_add_flash_error_message(__(“Processing “. $counter .” (“.$filename.”)”, ‘adimporter’), ‘admin’);

        in the middle of the file reading loop, you escape too the php processing timeout of 30 seconds, although you will not show the message except on the last record. I nay case i setted the php timeout in the php.ini file to 300 seconds = 5 minutes to be sure to process 3.000 and more records (more or less 5 hours processing time ).

        Hope it helps


        • claudio klemp 1:05 pm on January 25, 2013 Permalink | Reply

          Sorry the dataset tag did not went through :

          foreach($xmlarray1 as $counter => $fieldarray) {
          if($fieldarray[‘name’] == ‘title’) {
          $dataset .= ‘[title lang=”en_US”][![CDATA[‘. $fieldarray[‘text’] .’]] ][/title]’.” \n\r”;
          if($fieldarray[‘name’] == ‘content’) {
          $dataset .= ‘[content lang=”en_US”][ ![CDATA[‘. $fieldarray[‘text’] .’]] ][/content]’.” \n\r”;

          Have exchanged the minor / major brackets with angle brackets one.

          Sorry for inconvenience


    • Nikolsy 1:25 pm on January 20, 2013 Permalink | Reply

      Hello, and can be imported to Russian text?

    • Nikolsy 1:27 pm on January 20, 2013 Permalink | Reply

      And to do this, please tell me

    • Jagoman 9:46 am on January 25, 2013 Permalink | Reply

      Hi, Looks great! But, rather than importing information from an XML file, is there a way to read XML files that are online (data feeds), which are constantly updated?

      • faustovalsecchi 9:31 pm on August 24, 2013 Permalink | Reply

        Right! Is there any way for this feature? Thank u!

    • Nikolsy 9:37 pm on January 27, 2013 Permalink | Reply

      you open the xml file? how to edit?

      • jagoman 9:44 pm on January 27, 2013 Permalink | Reply

        Its for agencies to edit. You just read it and update your database on a daily basis

    • Matthew 5:49 pm on January 29, 2013 Permalink | Reply

      Hi I’m still having problem I tried importing the example xml file into excel and then pasting my data into the columns into the right columns within the example file.

      Does the program require latitude and longitude or can you remove some fields?

      Is there any way of automating the process of creating an xml file from a csv or some excel spreadsheet?

      Kind Regards,


    • Jim 12:17 pm on March 19, 2013 Permalink | Reply

      stupid question but how do you actually import. I installed the plugin fine and everything but how do you actually ‘import’ the data onto your osclass site?

      • Jim 1:39 pm on March 19, 2013 Permalink | Reply

        oh, ok i see but um now its says no ad dectected lol

        • Jim 2:04 pm on March 19, 2013 Permalink | Reply

          ok ok you guys can delete by comments. i figured it out lol but the ads doesnt add to the counter but i guess thats a small price to pay. thanks

          • Jim 2:08 pm on March 19, 2013 Permalink | Reply

            well the counter is updated on the actual category fields but if you have the states listed the right the counter remains the same.

    • umberto 9:00 pm on May 13, 2013 Permalink | Reply

      Hello, I have a problem with the plugin adimport.
      I can not import anything, and it does not work the example file, it gives me the mistake of not importing.
      Why is this?

      This in file example.xlm, i usda the 3.1.2 version Osclass:

      My Own Category
      Mr. False Name


      fake street
      your city area
      fake region


      2012-08-08 12:34:56

      My Own Category
      Mrs. True Name


      bunny street
      some city area
      fake region


      2012-08-08 12:34:56

    • Trent Hamilton 12:45 am on June 5, 2013 Permalink | Reply

      Hi, I can’t get multiple ads to import. I’ve tried everything I can think of. There are no PHP errors in the OSClass error log, no errors in the chrome console or in firebug that I can see. The first ad of any batch imports successfully, but the progress dialog box doesn’t ever change.

      • Claudio Klemp 4:36 pm on June 16, 2013 Permalink | Reply

        Check your server log file too ( errors.log ), the problem might be speed , we had great issues with speed (timeout) and same fotos copying others (slow servers we spidered); next point check the soft and hardlink setups in your htaccess or better host server setup file, you may have allowance problems (user is here www or web or whatever not you, same is valid for goup settings), last but not least chmod 775 or 777 the destination directory, but you said “the first add if any batch imports successfully “, thus the allowance should be ok.
        Hope you can manage it…
        Claudio Klemp (still Brasil)

        • Trent Hamilton 12:47 am on June 17, 2013 Permalink | Reply

          Hi, I found the issue – the paypal plus plugin killed it for some reason. I’ve disabled the paypal plugin for now and it works. I also have found that if a lonely ampersand (Ie: ” & ” (with spaces either side)) is anywhere in the listing description, the import will fail.

    • skbrasil 10:26 pm on June 25, 2013 Permalink | Reply

      I’m trying the importer of the ads, but it does not work can not import custom fields, what should I do

    • Claudio Klemp 7:20 pm on July 4, 2013 Permalink | Reply

      Are you in Brasil, in case you can get in contact with Jasper one of my programmers , who is managing oc-class for us

    • Balazs 7:49 am on July 7, 2013 Permalink | Reply

      This xml thing if very difficult for “simple” people… Please make csv import function also(simply can edit in office or open office, etc..) Or make a csv/xml parser, and that can work universal with all type and structure csv/xml in 3 steps: 1, import from url or file, 2, pair columns, 3 set cron job for update datafeed automaticaly.. Osclass is a roboust classifieds system, lot of people using. With a good importer it can grow very fast..


    • Suresh 3:55 pm on July 14, 2013 Permalink | Reply

      It will be great if we can export the details from a .xls (excel) file

    • karzisonlin 2:44 pm on July 18, 2013 Permalink | Reply

      How can we add the tag for car make, model, Mileage in xml

    • kumar 8:35 pm on September 29, 2013 Permalink | Reply

      Hai…. am installed the plugin Adimportar in oc-adim plugins. after that what i want to do. how can i add .XML fields into listings…

    • web design 1:53 am on October 12, 2013 Permalink | Reply

      Any suggestion how to bulk edit a wordpress posts exported xml? i get an xml with ALOT of unreservedness fields that are only useful for wordpress, any ideas how to bulk craft the template to meet osclass requirements?

    • Andre 3:16 pm on November 15, 2013 Permalink | Reply

      Thats nice for one time import. but it would be nice to have one import XML from a site and keep it updated with the last data available.

    • marcelo 7:12 pm on November 18, 2013 Permalink | Reply

      lo primero . gracias a todo el equipo por colaborar en el open source . plas plas plas !!!
      ahora lo malo 🙂
      no me funciona el adimporter.
      he creado una instalacion limpia y todo para ver si era problema de configuraciones, pero no me va.
      me da el siguiente error , con el archivo demo xml que viene por defecto. y con el osclass sin tocar nada. help !!!!

      0 ads were imported
      2 ads failed to import
      (Ads numbers: #0 : Category invalid.
      ,#1 : Category invalid.

    • Juan 1:03 am on November 28, 2013 Permalink | Reply

      Hola, alguien sabe si se puede importar un xls directamente?

    • Trent Hamilton 2:58 am on December 1, 2013 Permalink | Reply

      Hi, is there any way of automating this process at all? I’d like to be able to call the script using php cli.

    • marcelo 12:41 pm on December 1, 2013 Permalink | Reply

      hi there
      first all. Thanks to all the team for working on open source. plas plas plas!
      secondo : the bad notice 🙂
      adimporter does not work in my site
      I ´ve created a clean install for check the problem.
      I get the following error with the demo xml file that comes by default. and the OSClass without anything modification. help !!help !!

      0 ads were imported
      2 ads failed to import
      (Ads numbers: #0 : Category invalid.
      ,#1 : Category invalid.

    • Dragos Andy 10:07 am on December 15, 2013 Permalink | Reply

      Hello. I try to use this great plugin, but I get some errors at some of the ads.

      First error is “Email invalid”, even though the si correctly setup.

      Second error is “Image with an incorrect extension”, which I saw it comes when the image specified in the tags do not exist on the remote server.
      I think it can be fixed?

      I saw in the index.php file at some point the function:

      foreach($image_list as $image) {
      $tmp_name = “adimporterimage_”.time();
      $image_ok = osc_downloadFile($image->nodeValue, $tmp_name);
      if($image_ok) {
      $photos[‘error’][] = 0;
      $photos[‘size’][] = 100;
      $photos[‘type’][] = ‘image/jpeg’;
      $photos[‘tmp_name’][] = osc_content_path().”downloads/”.$tmp_name;

      I think this should be altered so it skips the image downloading in case it is not present on the website.
      Can anyone help on those issues please. Thank you so much.

    • Dragos Andy 12:10 am on December 22, 2013 Permalink | Reply

      Sorry, I am coming back on my comment with a fix about the “Email invalid” error.
      You HAVE TO have a field in the xml in order to work, which is fair enough.
      I still have not fixed the image error. Maybe someone else…

    • Silvio 9:30 am on December 26, 2013 Permalink | Reply

      Hola Conejo,
      Muy bien el tuyo aporte, pero se haces un tutorial video de come utlisar el pluggin te lo agradezco….Un saludo y Feliz Navidad!

    • PusMan 8:22 pm on January 13, 2014 Permalink | Reply

      I’m testing the importer, but i receive a error in console with some listings, and process hangs with no error message. If i check error_log i receive that message:

      [Mon Jan 13 15:07:05 2014] [error] [client] PHP Fatal error: Uncaught exception ‘Exception’ with message ‘/html/localhost/srv/osclass/oc-content/downloads/adimporterimage_1389643621 does not exist!’ in /html/localhost/srv/osclass.3.3.2/oc-includes/osclass/classes/ImageResizer.php:43\nStack trace:\n#0 /html/localhost/srv/osclass.3.3.2/oc-includes/osclass/classes/ImageResizer.php(28): ImageResizer->__construct(‘/html/local…’)\n#1 /html/localhost/srv/osclass.3.3.2/oc-includes/osclass/ItemActions.php(1370): ImageResizer::fromFile(‘/html/local…’)\n#2 /html/localhost/srv/osclass.3.3.2/oc-includes/osclass/ItemActions.php(233): ItemActions->uploadItemResources(Array, 11)\n#3 /html/localhost/srv/osclass.3.3.2/oc-content/plugins/importer/index.php(215): ItemActions->add()\n#4 /html/localhost/srv/osclass.3.3.2/oc-content/plugins/importer/index.php(72): adimporter_ad(Object(DOMElement), Array, Array)\n#5 /html/localhost/srv/osclass.3.3.2/oc-content/plugins/importer/ajax.php(17): adimporter in /html/localhost/srv//osclass.3.3.2/oc-includes/osclass/classes/ImageResizer.php on line 43, referer: http://localhost/srv/osclass/oc-admin/index.php

      It looks like a issue with a image? but i don’t know what could be the problem.
      Thank you

    • Mr Will Needham 10:53 am on January 30, 2014 Permalink | Reply

      Hello Mr Rabbit,

      Estoy intentando a hacer un importacion XML…tengo la tema de España y pero parece que cuando hago un importacion que la region ya existe no le gusta.

      Algun idea donde voy mal ?

      Un Abrazo de un guiri en Torrevieja


    • 12:19 pm on February 8, 2014 Permalink | Reply

      thanks support me always

    • khurram 11:35 am on February 19, 2014 Permalink | Reply

      Hi, I’m trying to import ads in my OSclass, but the script giving error as following:

      0 ads were imported
      360 ads failed to import
      (Ads numbers: #0 : Title too long (en_US). Email invalid. Region too short.
      ,#1 : Email invalid. Region too short.
      ,#2 : Email invalid.
      ,#3 : Email invalid.
      ,#4 : Email invalid.
      ,#5 : Title too long (en_US). Email invalid.
      ,#6 : Email invalid.
      ,#7 : Email invalid.
      ,#8 : Email invalid.
      ,#9 : Email invalid.
      ,#10 : Email invalid.
      ,#11 : Email invalid.
      ,#12 : Email invalid.
      ,#13 : Email invalid.
      ,#14 : Email invalid.
      ,#15 : Email invalid.

      Kindly help me to resolve this error

      Thank you.

    • Khurram 11:56 am on February 19, 2014 Permalink | Reply

      Hi, I’m trying to import ads, and facing error ‘Invalid Email’ repeatedly in all 360 ads, although I’m not importing email field.

      Kindly help me to fix the error.

      Thank you

    • Ali 1:10 am on March 5, 2014 Permalink | Reply

      I was able to import a test add, it displayed the message that 1 add was imported the count in the category went 1 up to indicate that as well on the site But I cannot find the add anywhere on the site or in manage listing? not sure where it is and if it was not imported then not sure why the category add count went up by one…….

    • jedemonte 7:29 pm on April 9, 2014 Permalink | Reply

      importing xml ok BUT
      i have problem in database fields fk_i_region_id and fk_i_city_id are missing
      Do you know why please?
      I try many way with xml BUT not ok
      Many Thanks!

    • Alberto 11:14 am on April 11, 2014 Permalink | Reply

      Hola Conejo,

      He alojado las imagenes a importar en la carpeta html de mi servidor pero no consigo importar más de una foto por anuncio. El plugin se queda colgado importando, genera el anuncio pero la única foto que se carga es la última. Puedes ayudarme con este problema?

      Gracias de antemano

      • Claudio Klemp 7:58 am on June 5, 2014 Permalink | Reply

        Velocidade de streaming e velocidade de esecucao du programma differente !!!!

        Quando voce chega a primera foto, u programma chier a secunda, tercera, etc… Resuldado sol ultima foto esta salvata porche ten tempo sufficiente de busca e escrittura no disco.

        Soluciones possivel :

        1.) Trocca u programma com um timeout / pause de attesa, atencion por u tempo de esecucao no php.ini !!! (isso e uma solucao mas o menos certa)

        2.) combinado com a solucao 1.) troca u nom de imagens na entrada eg.001,002,003.( Foi faito, mas as vezez tenemos mas de uma copia da mesima foto. )

        3.) cria um script differente por a busca das imagens, Ajax , XMLhttprequest ( e nominar as fotos em uma funcion de call back on completition, Curl.

        Desculpa u portughese ruin, ma soy allemand.

        Claudio Klemp

    • Balazs 9:32 am on June 5, 2014 Permalink | Reply

      Any plan for develop a parser function for the importer? We can set any datafeed with that!


    • Webdev 1:06 pm on June 22, 2014 Permalink | Reply

      I want to know how to use custom attribute plugin in xml for a listing. I have many attributes that are defined for each category.

    • mavin 10:00 pm on September 3, 2014 Permalink | Reply

      anybody to help import ads from oodle to osclass website? Will pay for help. email address;

    • Tamanna 5:59 am on September 25, 2014 Permalink | Reply

      ad importer not working in os class version 3.4.2…..

      plz help

    • Talha 5:37 am on October 14, 2014 Permalink | Reply

      Need help I`m having 2 different issues image importing:
      1. Im using the images provided in example.xml but they are they are not importing (no error, nothing it just says importing ad). If I remove the images tag the ad is imported in a second or so.
      2. What is the format for uploading the image can i upload an image by giving the local path or i have to use the link really confused

    • Victor 6:11 pm on October 14, 2014 Permalink | Reply

      Hey huys,
      I have installed the ad import plugin but I can’t get it work since I can’t find it into my admin panel. Why is that?

    • victor 2:33 pm on October 18, 2014 Permalink | Reply

      Guys I have installed the ad import plugin like all the others. Though I cannot find it into plugins directory in my admin panel. Is it something I should do? Does it work with a different way? Thanks in advance!

    • deniss 9:28 am on October 30, 2014 Permalink | Reply

      Has anyone exported a xml or excel for basic realestate theme? I’m new to databases but if i could see the file construction it would help. Thanks in Avance.

    • Victor 11:58 pm on November 15, 2014 Permalink | Reply

      Hey guys I am testing the example.xml and I get the error

      0 ads were imported
      10 ads failed to import
      (Ads numbers: #0 : Image with an incorrect extension.
      ,#1 : Image with an incorrect extension.
      ,#2 : Image with an incorrect extension.
      ,#3 : Image with an incorrect extension.
      ,#4 : Image with an incorrect extension.
      ,#5 : Image with an incorrect extension.
      ,#6 : Image with an incorrect extension.
      ,#7 : Image with an incorrect extension.
      ,#8 : Image with an incorrect extension.
      ,#9 : Image with an incorrect extension.

    • Ted Morris 7:10 am on December 1, 2014 Permalink | Reply

      I tried using this plugin , the latest version actually.
      The problem is when i try to import the xml file , it just displays a blank page. just like some php error might have occoured , i tried to look into the code , but it seems fine (may be i am not a expert )

      is there any way this could be solved ? i googled it but seems like only i have this problem

    • Yifei Wu 3:50 pm on January 14, 2015 Permalink | Reply

      This plugin works. For people having problems with the example xml, make sure to change to and insert a cat id that’s valid for your forum.

      • Yifei Wu 3:52 pm on January 14, 2015 Permalink | Reply

        Sorry it should say change

        {{}} to {{}} sorry, don’t know what the escape character is on this form, remove the curly brackets.

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc