Project

trustlink

0.0
No commit activity in last 3 years
No release in over 3 years
Trustlink.ru links exchange system integration
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

##Trustlink module for Ruby On Rails

Gem Version Build Status

###Rewritten from scratch

Changes

  • parsing xml file instead of php serialized string
  • storing in database instead of text file
  • requesting by rake task instead of checking on every page load
  • customizable rails friendly erb templates

Installation

Include the gem in your Gemfile:

gem 'trustlink'

Preparing db

  • rails g trustlink:migration
  • rake db:migrate

Generating config

  • create config/trustlink.yml
key: _YOUR_TRUSTLINK_HASH_
domain: example.com
encoding: UTF-8

Inserting links

Simply put helper call in desired place. Like this:

<%= trustlink_links -%>

Fetching links

  • rake trustlink:fetch

Run it by cron or use whenever gem or something other way you like.

Customizing templates (optional)

  • rails g trustlink:views

Templates will be copied to views/trustlink folder.

Notes

  • In _link.html.erb first and last string inserting trustlink code recognized by trustlink bots. It should not be removed. Also important to levae url untouched.
  • By default no style included. You can use styles extracted from trustlink's template. Just replace class to 'ads' used by default or use your own.
  • Multi-domain feature currently not supported. Ask if you need this feature.

For more information please follow http://www.trustlink.ru/

License

This project rocks and uses MIT-LICENSE. Copyright © 2014 Artyom Nikolaev and Trustlink