PDA

View Full Version : Remote Adverts plugin instruction



Mike
January 20, 2010, 06:47 AM
Greetings,

I'm glad to inform our customers that we have finished to develop JS Adverts plugin.

This plugin works like Google Adsense - you can give code to your partners, they place code on their website. On partner's website then we will see block with adverts from your Flynax website.

Will explain How to make it working :

- you have your classified website builded with flynax software for example mystore.com (source website)

- you have also another website, and you want to place few listings there, btw this will help to promote your Flynax website. Let it be myblog.com for example (remote website).

So what you need to do.

Source website (MyStore.com in my example)

1. Upload plugin to plugins directory
2. Install plugin (admin panel>>plugins)
3. Add Rewrite Rule in .htaccess file placed in root folder of website.


RewriteRule ^listing-blocks.js(.*)$ /plugins/js_blocks/blocks.inc.php$1 [QSA,L]

that's all for mystore.com, we need now paste few lines of code to myblog.com

Remote website (MyBLog.com)

Paste html code in place where you want listings.

Simplest example:

<div id="jl"></div>
<script src="http://mystore.com/listing-blocks.js" type="text/javascript"></script>

!Do not forget to replace mystore.com with your domain

Block will show 10 newest listings. By the way, you can use any file name instead of
listing-blocks.js here, just make sure that you use same file name in rewrite rule.

Let's see how we can customize this block - what listings to show, how many pages, change colors etc.

For example we need 20 oldest listings on myblog.com, and change colors to fit myblog.com design (dark), make pictures smaller, etc.



<script type="text/javascript">
conf_img_width = "60%";
conf_img_height = "60%";
conf_advert_bg = "#2D2D2E";
conf_advert_border = "1px solid #C1C5C8";
conf_advert_bg_hover = "#1B1C1D";
conf_advert_border_hover = "3px solid black";
conf_field_first_color = "#fff";
conf_field_color = "#fff";
conf_field_names_color= "#fff";
conf_paging_bg = "#C1C5C8";
conf_paging_border = "5px solid #2D2D2E";
conf_paging_bg_hover = "#1B1C1D";
conf_paging_border_hover = "3px solid black";
</script>
<div id="jl"></div>
<script src="http://mystore.com/listing-blocks.js?limit=20&per_page=5&order_by=date&order_type=asc&field_names=true" type="text/javascript"></script>

Let's investigate part of url after listing-blocks.js? (GET variables), of course you can change these variables

limit=20&per_page=5&order_by=date&order_type=asc&field_names=true

limit=20 // how many listings you want to get from mystore.com (default value - '10')

per_page=5 // think all clear with it (: default value - '5')
order_by = date // order by field. we need new listings so we use date as order field. (default value -'date').
list of available fields which you can use:
-ID
-Shows //you can get most popular listings by this field
-Date
-Price
you can also try to use your custom fields here

order_type = asc // Ascending or descending, in my example if change it to desc, we will get 20 new listings (default value - 'desc') Can be asc, desc

field_names = true //show field names (default value - false)

lang = de //you can specify language here (default value is default language of flynax website)

featured = false //set true if you want only featured listings

Javascript configuration part (styling)
// width and height of images
conf_img_width = "60%"; //you can use value in px also
conf_img_height = "60%";

//advert area styles
conf_advert_bg = "#2D2D2E";
conf_advert_border = "1px solid #C1C5C8";

//advert area hover styles
conf_advert_bg_hover = "#1B1C1D";
conf_advert_border_hover = "3px solid black";

//colors for advert information
conf_field_first_color = "#fff";
conf_field_color = "#fff";

//styles for paging area
conf_paging_bg = "#C1C5C8";
conf_paging_border = "5px solid #2D2D2E";
conf_paging_bg_hover = "#1B1C1D";
conf_paging_border_hover = "3px solid black";



* New version (1.2) functions.

Now in your js block you can get listings of specific category or owner and filter by any dynamic field from listing fields.

Kind_ID or category - get listings only of specific category by category id

if listing_get_children option enabled (website configuration>listings>Display listings from child categories in parent category) you will get listings from subcategories also

Example:
Kind_ID =100
or
category=100 - here is no difference, 100 - ID of category

account_id=128 - get listings by account id

And also you can try any other dynamic listing field now in url.
Example:
body_style=sedan, bathrooms=5 etc.


Statistics. Another new implementation is statistics module (disabled by default)

If statistics enabled plugin will write in log each remote show and click- Remote Website, Visitor IP, Date.

For example if we have few pages in block - when page loads plugin increase shows for first page listings only, then if visitor clicks on 2nd page will increase shows for 2nd page listings. etc.
By default website will keep statistic logs only 1day and will delete older entries (in case cron job is configured and working), change it if necessary.
So if you do not want to keep statistic logs configure cron job and set period you want.
Also you have ability to clear log manually

Another small thing added - you can now display listings horizontally[/b], add in url-
direction=horizontal

Another implementation - custom_id, it allows to add more than one block to one page

Example. I want one block with cars and second with laptops from my general classified website.
1st block.

<div id="cars"></div>
<script src="http://mystore.com/listing-blocks.js?category=1&custom_id=cars" type="text/javascript"></script>

2nd block.

<div id="laptops"></div>
<script src="http://mystore.com/listing-blocks.js?category=2&custom_id=laptops" type="text/javascript"></script>

By the way - we have detected problem with rewrite on few servers - in case you have same problem - try to use real path to file
http://mystore.com/plugins/js_blocks/blocks.inc.php?variables

That's all for now, feel free to ask in case you have problems/questions/suggestions.

ICompanny
August 10, 2010, 02:09 PM
Hi,

I have added the plugin code in another website,but i want to change listings from vertical to horizontal,so new listings will be visible on my website but horizontally.

How can i do this ?

This is the actual code used :

<div id="jl"></div>
<script src="http://www.websiteurl.com/listing-blocks.js" type="text/javascript"></script>

I must add some lines in the code ?

Thanks,

Mike
September 28, 2010, 06:45 AM
Dear Amir,

We have added function you requested to new version of plugin, please install new version and add direction=horizontal in your block url.

Adoracion melania Calvo gonzalez
November 17, 2011, 05:39 PM
How I can obtain a report of a specific single supplier? And how I can get a listing for a unique reference number of one owner?

Greetings and thanks

---------------------------------

Como puedo obtener los listados de un determinado unico proveedor ? como puedo conseguir un listado unico para un numero de referencia de un solo propietario?

Mike
November 29, 2011, 06:03 AM
Hello,



How I can obtain a report of a specific single supplier?

There is no very convenient way to do it unfortunately. Only for each listing of a supplier separately.
On Admin panel > Remote Adverts you may sort listings by an owner and check log of each listing separately.



And how I can get a listing for a unique reference number of one owner?

just add ref_number=ref_number to the url

Mike
December 27, 2012, 04:25 AM
For those who use the updated version of the plugin (2+ for 4 software version ) - it still possible to add all parameters from the first post manually to the box code such as direction=horizontal, body_style=sedan etc.

autocy
January 9, 2013, 08:42 AM
Hello,
Is it possible to configure this plugin to display only featured listings on the remote website?

Thanks

Mike
January 9, 2013, 11:18 AM
Yes you have to add "featured = true" to the url of the box code manually



<script src="http://yourdomain.com/plugins/js_blocks/blocks.inc.php?featured=true" >