Skip to content

Instantly share code, notes, and snippets.

@vikhyat
Created June 2, 2009 11:26
Show Gist options
  • Save vikhyat/122204 to your computer and use it in GitHub Desktop.
Save vikhyat/122204 to your computer and use it in GitHub Desktop.
<%
## TODO: While refactoring, perform all calculations _out_ of this file.
# Function to easily give out something like "The reviewer noted the following: The board looks great!"
def noted(a, t)
t == '' ? '' : 'The reviewer ' + a + ' the following: ' + t
end
def yes
'[img]http://s242.photobucket.com/albums/ff244/9861_omikron/famfamfamsilk/accept.png[/img] '
end
def no
'[img]http://s242.photobucket.com/albums/ff244/9861_omikron/famfamfamsilk/error.png[/img] '
end
def subheading(text, *image)
if image != []
"[img]#{image[0]}[/img] [size=17px]#{text}[/size]"
else
"[size=17px]#{text}[/size]"
end
end
# Final Rating
@the_rating = 0
%>
[size=16pt]Review for [url=<%=@data[:url]%>]<%=@data[:title]%>[/url][/size]
The review was conducted by a staff member on <%=Time.now.utc%>. The board reviewed uses the <%=@data[:system]%> forum system.
<%= subheading 'First Impression', 'http://i242.photobucket.com/albums/ff244/9861_omikron/famfamfamsilk/asterisk_orange.png' %> [i]<%= @data[:initial_rating].to_s %>/10[/i]
At first glance, the board was given a score of <%=@data[:initial_rating]%>. <%= noted 'noted', @data[:initial_text] %>
<%= @data[:board_online] ? yes + "Board was online." : no + "Board was offline." %>
<%= @data[:accepting_registrations] ? yes + "Accepting registrations." : no + "Not accepting registrations." %>
<%= @data[:hidden_to_guests] ? no + "Hidden from guests." : yes + "Visible to guests." %>
<%= subheading 'Load Time', 'http://s242.photobucket.com/albums/ff244/9861_omikron/famfamfamsilk/clock.png' %> [i]<%= (@data[:load_time].split(' seconds ')[0].to_f < 1) ? "1/1" : "0/1" %>[/i]
The index page loaded up in [b]<%= @data[:load_time].split(' seconds ')[0] %> seconds[/b]. [b]<%= (@data[:load_time].split(' seconds ')[1]).delete('()') %>[/b] of data was transferred.
<%=
if @data[:load_time].split(' seconds ')[0].to_f < 1
@the_rating += 1
"This is a very good load time. Keep it up!"
else
"Pages do seem to take a while to load. While this may depend on the server, using fewer codes and a theme that is less graphic intensive can help."
end
%>
<%= subheading 'Skin', 'http://s242.photobucket.com/albums/ff244/9861_omikron/famfamfamsilk/color_wheel.png' %> [i]<%= @data[:skin_rating] %>/10[/i]
<%= @data[:exclusive_skin] ? yes + "Skin is exclusive." : no + "Skin isn't exclusive." %>
<%= @data[:matching_gfx] ? yes + "Has matching graphics." : no + "Doesn't have matching graphics." %>
<%= noted 'suggested', @data[:skin_improvements] %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment