Is it possible to search (or display) the listings by Alexa ranking?

Discussion in 'Web Directory Script' started by VioletB, Sep 24, 2016.

  1. VioletB

    VioletB New Member

    Can people search listings in Web Directory by Alexa ranking? e.g. say you want to identify listings with a certain keyword but with an Alexa number better than a certain threshold, can it be done?

    Or if we cannot specify Alexa rank in search parameters, is it possible to display the results of a search in the order of Alexa rank?
  2. Dayir_A.

    Dayir_A. Staff Member

    Hello @VioletB

    By default if you make a field searchable, it should be available as a filter in Refine search.
    However Alexa rank value is not a field, it's just a column in db.
    You can add custom field named alexa_rank, but our system wouldn't allow add field with such name, because of check for duplicate columns.
    So you can insert field directly into database. Please run following query, whether in System -> Database section or in DB Tools or via Phpmyadmin:
    Code (Text):
    INSERT INTO `{prefix}fields` (`extras`, `name`, `item`, `length`, `order`, `required`, `adminonly`, `searchable`, `for_plan`, `image_width`, `image_height`, `thumb_width`, `thumb_height`, `use_editor`, `timepicker`, `link_to`, `allow_null`)
    VALUES ('directory', 'alexa_rank', 'listings', 70, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0);
    Don't forget to replace the {prefix} with your database prefix.

    After that you should add a phrase for Alexa rank. It will be displayed as {field_alexa_rank}, you can either go to admin panel -> content -> phrases -> click on Add phrase -> fill Key field with field_alexa_rank string -> fill Value field with desired text ( Alexa Rank, for example ) -> Choose "Common" category -> Click on Add button.
    Go to Admin panel -> Directory -> Listing fields -> edit alexa_rank field (click on pen icon next to it) -> in edit page fill Title field -> and save changes.

    Unfortunately, there is no way to do it with default functionality of Subrion CMS and we don't think that we need it in the system.
    Can be implemented as a custom modification on paid basis. If you are interested in this, you can submit a ticket in our Help Desk -> Custom Modifications department and we can quote this modification for free.

    Greg and VioletB like this.
  3. VioletB

    VioletB New Member

    Thanks @Dayir_A. , this was extremely helpful to me.

    I like the elegant design that if a field is searchable it should be available as a filter in Refine search. That's great.

    I also like the code you provided to add the custom field. However I have one question: This field would be a string then, wouldn't it? So any searches or limits could not treat Alexa rank as a number, right? Or could it? I mean, with the solution you suggested, Alexa rankings would be ordered 1000< 11000 < 9000 right? When really I would want it to be 1000 < 9000 < 11000 ?

    Don't spend too much time on this string vs number question - I'd love an answer one way or another about if it'll be a string or a number. But I realize that a way around this might become complicated quickly. So don't worry about trying to find a way around the problem (unless you already have an idea off the top of your head).

    Thank you for clarifying that sorting results Alexa rank is not part of the default functionality of Subrion:
    I definitely understand that such a feature would be a custom modification, and it's one I would certainly consider in the longer term. I might ask for a quote later on when I have a better grasp on exactly what specifications I would need from such a custom modification.

    I do feel though that for a Web Directory, an argument could be made that sorting by Alexa rank should be a default feature. There's clearly been superb development of the directory, and it's still a truly wonderful (and powerful) piece of software as it currently stands. But, unlike an Auto Directory or a Local Restaurants directory, users browsing listings of a Web Directory might reasonably expect to then locate which of those search results could be considered the most authoritative sites - which would involve some order-results-by or searchable limits on the Alexa rank as a numerical data.
  4. Dayir_A.

    Dayir_A. Staff Member

    Hello @VioletB,

    Yes, if it was a column in listings table, however it just a field, which we added in order to be visible in filters and the column in the listings table is BIGINT.
    Anyway you may execute this query (I didn't check it, but sure, that it will work):
    Here I just defined the type of the field - number.
    Code (Text):

    INSERT INTO `{prefix}fields` (`extras`, `name`, `item`, `length`, `order`, `required`, `adminonly`, `searchable`, `for_plan`, `image_width`, `image_height`, `thumb_width`, `thumb_height`, `use_editor`, `timepicker`, `link_to`, `allow_null`, `type`)
    VALUES ('directory', 'alexa_rank', 'listings', 70, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'number');
    VioletB likes this.
  5. setupechodots

    setupechodots New Member

    thanks for sharing this info, it is really helpful.
  6. mrsmith688

    mrsmith688 New Member

    Geek Squad Chat is a well-known tech service provider company in the world. Our experts offer support for all types of technical problems faced in computers, laptops and smartphones. They even provide solutions for home appliances, TV, smart wearable and home theatre. We help our customers in setup, installation, repair, uninstallation, replacement, damage and other issues. Our dedicated support team is always available at your service and assures you for the quick resolutions. Book geek squad chat today and get your device fixed without wasting much time.
    Geek Squad Chat
    Geek Squad Chat

Share This Page