Hello,
I wanted to ask your assistance in regards to installing Text-Links-
Ads script on my Radiant install.
They do not have instructions for Radiant but do for Rails. Their
instructions for Rails include:
1. Copy/Paste the following to the controller:
require 'net/http'
require 'cgi'
def content
...
end
def requester(url)
XmlSimple.xml_in (http_get(url))
end
def http_get(url)
Net::HTTP.get_response(URI.parse(url)).body.to_s
end
def fragment_key(name)
return "TLA/TIME/#{name}", "TLA/DATA/#{name}"
end
2. Copy/Paste the following to view:
<% if @links != nil %>
<% if (@links != nil)&&(@links["Link"] != nil) %>
<ul>
<% for link in @links["Link"] -%>
<li><%= link['BeforeText'][0] -%> <a href="<%= link['URL'][0] -%>"><
%= link['Text'][0] -%></a> <%= link['AfterText'][0] -%></li>
<% end -%>
</ul>
<% end -%>
<% else %>
Advertise here!
<% end -%>
Which controller/ where should I add the above?
Any help would be much appreciated.
Cheers,
Elle
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant