Minor Modification to Rails Article App

This project received 7 bids from talented freelancers with an average bid price of $312 USD.

Get free quotes for a project like this
Project Budget
$30 - $250 USD
Total Bids
Project Description

I have a small script for my Rails articles app that puts a piece of HTML between X and Y characters in each article (eg. X = 3000 and Y = 7000, it puts the code somewhere between 3000 and 7000 characters into the article). The three other pieces of logic at the moment are that it searches for a line break to insert the code (so it doesn't break sentences), it prefers numbers to the lower side of the spectrum (but can still be anywhere in it) and that if the article is not at least X characters long, it just puts it at the end.

I would like 1 conditional and 2 more related piece of logic to be added to the code:

#1. Variable in [url removed, login to view] to turn on/off the "prefer lower" functionality the previous coder did. and similar variable to set the value range it prefers if it is on.

#2. Determine if it is attempting to place it within a list (<ul> or <li>) and if so, either place it above or below the <ul> list, according to my preference, and change the HTML code in either scenario. In the existing config file is the original HTML and X/Y variables, and I need 4 more options: 1. Prefer=Above/Below/Split (which tells it what action to take globally), 2. SplitAbove= If "Split" is selected in the previous one, then this variable sets the % of the time it will place the code above the <ul> (and by deduction the remaining % is the % for below), 3. HTMLAbove= Code for HTML to be used when placing above, 4. HTMLBelow = Code for HTML to be used when placing below

#3. Add the functionality to display a different HTML code based on the overall position the existing script chooses from X and Y for where to place the code, in unlimited different ranges. The ranges must all be definable via config, and if possible, the variable to enable more ranges should be in the config.


in config:




Range_A_Code="<br />"

Range_A_Above="<hr />"

Range_A_Below="<br /><hr />



Range_Best_Code="<a name="#me" />

Range_Best_Above="<script type='text/javascript'>"

Range_Best_Below="<br /><hr />"




Range_1_Above="<hr />"

Range_1_Below="<br /><hr />"

So in this set of ranges, for example, if we used the original XY values of 3000,7000, only RangeC would ever be displayed (if within those values). If not within those values, the default HTML code (already defined in [url removed, login to view]) would be used.


This is the first piece of work, it is fairly simple to test price/quality/speed, and afterwards I will require further development and troubleshooting on my App, please provide your hourly rate if it is not already listed in your profile.

Also provide your estimate of time it will take to complete this part (eg. same day, 2-4 hours) and when you can begin (eg. immediately).

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online