Harrenmedia Slider Ad
This document provides a simple and straightforward description of how to work in the repository (developers), and how the app works. There are some details to bear in mind about the project and what it's expected from the same. If any piece of code that may cause any problem is found, the same should be reported.
If you are encouraged to fix it, please submit a pull request with the changes.
Project Repository (Developers Only)
- Clone your fork in order to work over it, if you haven't forked the repository yet, just fork it.
- The main directories are:
- css: This directory contains all the css styles (
.css
file) used for this app. - images: This directory contains the images (
.png
files) used for this app. - js: This directory contains the main plugin (
.js
file) with its respective file obfuscated (.js
file). The maintenance process affects to both files, it means if the main plugin is updated, the obfuscated file must be updated as well due to the same will be used into the app tag. We can use two tools for the obfuscation process: Closure Compiler and Javascript Obfuscator.
- css: This directory contains all the css styles (
- The tests directory contains a simple html file, it was created just for testing purposes. A new file can be added here or the same file can be updated in order to run some tests.
- Push your commits and create a pull request, after the merge, a new tag must be created in case of being necessary.
- This plugin is hosted in Amazon S3 and the container bucket is ad.static1.harrenmedia.com. Inside the libs directory, the subdirectory called slider preserves a similar structure to the project, the difference is there isn't a js directory, that's because instead, there's a directory related to the last project's version/tag, where the obfuscated file is located.
- Once the new directory was created and the new obfuscated file was uploaded, that directory must be published in order to reproduce the app everytime is invoked, it's very important to realize this last step because the proper working of the app depends on it, otherwise the app won't be loaded in the site where it was integrated.
Installation
Add these javascript tags <script type="text/javascript"></script>
before closing the body tag </body>
into your html
file:
<script type="text/javascript" src="http://ad.static1.harrenmedia.com/libs/slider/1.1.0/slider.min.js"></script>
<script type="text/javascript">
withJquery(function() {
$(function() {
$("body").sliderAd(
'<iframe FRAMEBORDER="0" SCROLLING="no" MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0" LEFTMARGIN="0" width=300 height=250 src="//34.teracreative.com/WhiteLabelBidRequestHandlerServlet?oid=34&width=300&height=250&pubid=104208&tagid=637458&pstn=ENTER_PLACEMENT_ID_HERE&noaop=1&revmod=INSERT_CONTENT_TYPE&encoded=1&cb=INSERT_CACHEBUSTER&keywords=INSERT_COMMA_SEPARATED_KEYWORDS&cirf=INSERT_ENCODED_REFERER"></iframe>'
);
});
});
</script>
Note:
This ad gets just one value, and that value is an
iframe
tag, just take a look at the example above.