Updates from _CONEJO Toggle Comment Threads | Keyboard Shortcuts

  • _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 http://akiraplc.com/free.in/ . contact me for any osclass development my email id id dilip@akiraplc.com

    • 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 http://osclass.uservoice.com/forums/183966-general/suggestions/3771363-searching-by-seller-name-list-of-sellers-0-9-a-z
      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.
      Example: http://forums.osclass.org/general-help/category-meta-description/
      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 (http://intridea.github.com/stately/) and was wondering if you might be able to incorporate it in OSClass. My site is at http://www.gunbuyback.us/buy and if anyone wants to help please let me know! Thanks 🙂

  • _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 http://market.osclass.org/plugins/ 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 j.maxmind.com 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 http://morethanvoice.net/auto_map/httpmap.php

          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
      ( http://www.phpclasses.org/package/7595-PHP-Get-the-coordinates-of-an-address-with-Google-Maps.html ) 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 / freeadsclick.com / 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/www.unete-net.com/wp-content/themes/usa/functions.php 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 planyo.com , 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


    • http://boostr.in 12:19 pm on February 8, 2014 Permalink | Reply

      thanks support me always http://boostr.in

    • 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 (https://developer.mozilla.org/de/docs/DOM/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; trafficmavin@aol.com

    • 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.

  • _CONEJO 11:50 am on August 27, 2012 Permalink | Reply  

    Customize columns and data in admin’s tables 

    In next version of OSClass we’ll be introducing some changes on the admin side. Don’t worry, everything will look and behave the same, but it will be more flexible for plugin developers to customize the information displayed. The changes affect to items, users, alerts, comments, media and page tables, and will allow plugin developers to add and remove columns. For example, the cars attributes plugin will show the make and model on the listings’ table, making it easier to manage your listings.


    Example code to modify the columns:

    function columns_items_table_header($table) {
    /* $table is a pointer to the table and not a copy, so the original DataTable is being used
    * USAGE :
    * $table->addColumn("my_identifier", __("Name of the colum", "columns"), $priority);
    * $priority is an integer from 1 to 10, being 1 the first (left) and 10 the last (right)
    $table->addColumn("my_own_first_column", __("My First Column", "columns"), 1);
    $table->addColumn("my_own_last_column", __("My Last Column", "columns"), 10);
    $table->addColumn("my_own_column", __("My Own Column", "columns"));
    function columns_items_row($row, $aRow) {
    /* $row is the current row of the table (formatted)
    * $aRow is the raw data of the row (in this case, an item)
    * USAGE :
    * $row['column_identifier'] = "Cell text";
    $row['my_own_first_column'] = "First (pk_i_id: ".$aRow['pk_i_id'].")";
    $row['my_own_last_column'] = "Last (s_secret: ".$aRow['s_secret'].")";
    $row['my_own_column'] = "Data (fk_i_category_id: ".$aRow['fk_i_category_id'].")";
    return $row;

    As you could see, it’s very easy and intuitive.

    Download the complete example plugin

    • Jay 4:00 am on August 29, 2012 Permalink | Reply

      This will be a great feature. I cannot wait to use it. Thanks

    • Nasrul Kurniawan 5:02 am on March 15, 2013 Permalink | Reply

      Nice plugin..

    • Corey Ward 5:14 pm on July 23, 2013 Permalink | Reply

      Hi _CONJEO, I am trying to change the title displayed to the address (for realestate website) I am having trouble setting it up can you point me in the right direction to a guide or something perhaps?

    • Arnaud 3:55 pm on January 2, 2014 Permalink | Reply

      Hi, the plugin can’t be downloaded (Page not found)

    • Dart 11:48 pm on February 17, 2014 Permalink | Reply

      work with 3.3?

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