• No results found

Article Widgets for publishers

N/A
N/A
Protected

Academic year: 2021

Share "Article Widgets for publishers"

Copied!
6
0
0

Loading.... (view fulltext now)

Full text

(1)
(2)

The use of plista Article Widgets for publishers is based on the integration of a small piece

of JavaScript into the HTML code of your website. This document will guide you through the

neccessary steps of the setup.

Our script mainly consists of two different function calls:

1. PLISTA.items.push({ ... })

This function is used to send article data to plista. In the following, you will learn how to correctly fill in the data that is to be sent. Usually a dynamic scripting language, such as PHP, is used to achieve this. Content Management Systems often provide the neccessary variables, too. Please continue to the next page for more information.

2. PLISTA.partner.init()

The second function initializes and displays the Article Widget. Depending on whether the list of recommendations is to be placed below an article on a detail page or on an overview page (e.g. your startpage or category landing page), it is neccessay to include the corresponding DIV-containers in the code – thus ensuring that the right widget design will be returned.

(3)

Calling plista!

PLISTA.items.push({...}) is used on article pages to send data to plista. On pages that are not devoted to a single article, this call does not need to be included.

Handing over an article‘s "meta data":

In order to send an article‘s data to plista, fill in ist different parameters here, such as „$title“ or „$text“ (please refer to the exmple code on the left). In most cases, the completed section of the code will look similar to this:

objec tid: "<?php echo $ar ticle_id; ?>", title: "<?php echo $title; ?>",

tex t: "<?php echo $ar ticle_tex t; ?>", url: "<?php echo $ar ticle_url; ?>", img: "<?php echo $ar ticle_image_url; ?>", categor y: "<?php echo $ar ticle_categor y; ?>", created_at: "<?php echo $ar ticle_created_at; ?>"

Please note the hints on the following page!

"Recommendations, please!"

The PLISTA.parter.init()-call causes the recommendations to be dis-played. Please note that the plista script needs to be placed after the

"plista_widget_standard_1" -respectively the "plista_widget_belowArticle" -DIV container in your HTML code (see our example on the left).

Depending on whether you are integrating the script on a start-, overview- or detail page (e.g. article page), you only need to include one of the DIV containers within your HTML code – unless you intend to display more than one widget at a time.

Integration tips

<div id="plista_widget_standard_1"></div> <div id="plista_widget_belowAr ticle"></div>

<script t ype="tex t/javascript" src="http://static.plista.com/beispiel.de_v1.js"></script> <script t ype="tex t/javascript">

/* <![CDATA[ */

PLISTA.items.push({

objec tid: "f0ad8173", title: "Neuigkeit des Tages",

tex t: "Dies ist der Beginn des Ar tikeltex tes...",

url: "http://w w w.beispiel.de/news/2009/newsf0ad8173.html", img: "http://w w w.beispiel.de/img/newsf0ad8173.jpg", categor y: "news", created_at: "1341394623" }); PLISTA.par tner.init(); /* ]]> */ </script>

(4)

Overview of the different data fields

What data needs to be sent to plista, using the different JavaScript fields?

The above mentioned fields are the most important ones. As we create individual JavaScripts for each of our partners to integrate plista as tight into each website as possible, the list of fields in your exact copy of our script might vary.

objectid

The object-ID should be an alphanumeric code (a-z|0-9), furthermore it has to be unique for every recommendation, since plista is using it for the distinction of different recommendations. If your website is using a database, it is probably the easiest way to use the database ID of your articles. Alternatively, you can use any other unique combination of characters. Maximum length: 128 characters

title

Use this field to send plista the title of your article (please note: an article can also be a product, if your website is an online shop or any other kind of catalogue)! If your text contains double-quotes, you have to escape them by preceding them with a backslash: \“ instead of “. Guaranteed 60 signs - max. 255.

text

Any special characters that your test might contain should be sent in clear format, instead of HTML entities. Again, if your text contains double-quotes, you have to escape them by preceding them with a backslash: \“ instead of “. Please note that this piece of text is meant to be an introduction only and might be cut and succeded by a trailing „...“, depending on the given widget that is displaying your recommendation. Maximum length: 255 characters (up to 100 characters are guaranteed to be displayed).

url

Please send the URL of your article using this field. The URL must include your domain name and start with the protocol, e.g. http://. Maximum length: 255 characters.

img

If your articles have an image and/or you would like to add an image to your plista recommendation as well, you can fill in the image URL here. The thumbnails should be cubic and no larger than 150x150 pixels, unless you are using larger thumbnails on your site already. You can leave out this line if you do not intend to add images to your recommendations.

category

The category of current article: If there is no category, leave it empty please.

created_at

Please make sure, that you transfer the creation date of the article as a unix timestamp, so that we can consider the creation date for our recommendations.

(5)

FAQ

What do I need to look at while editing the JavaScript?

—

— Since the fields within our script are an enumeration, it is important to omit the comma at the end of the last line, i.e. before the closing brackets if the PLISTA.items.push() call.

—

— In case any of the texts you send to plista is containing double quotes, they need to be preceded by a blackslash, i.e. they need to be escaped: \“ instead of “

—

— Please avoid linebreaks in the texts you send to plista. —

— For a php-based CMS use json_encode to fill in the variables into the push-method: echo json_encode(array( 'objectid' => $article_id, 'title' => $title, 'text' => $article_text, 'url' => $article_url, 'img' => $article_image_url, 'category' => $article_category, 'created_at' => $article_created_at ));

Thereby possible mistakes will be avoided.

How can I remove an article from plista's database?

Removing an article from the plista database can easily be achieved through a simple HTTP-request. Please contact us for further information on this. Refer to the end of this document for contact information.

Where do I find usage statistics for my plista integration?

Usage statistics can be found at http://plista.com . In case you have any further questions, please contact us.

Where can I find additional information on HTML and JavaScript?

Die Webseite SelfHTML bietet ein kostenfreies und umfangreiches Kompendium zu den Themen HTML und JavaScript, aber auch CSS:

(6)

Description of key elements

—

— Image (optional)

—

— Background (highlighted lightly)

—

— Link (open in new window)

—

— "Advertisement" incl. Icon

How Article Widgets look like?

Example-Widget

This may also interest you

ADVERTISMENT

Movie Highlights of the Month

Spectacular 3D blockbusters, romantic comedies, gripping documentaries. Here are this month’s movie highlights.

Birthday gifts: 10 of the best presents

Birthdays are truly special days and most celebrate them with gifts. But the tricky part is what to give. This list will help.

Try Now: New Ideas for Your Cooking Skills

Enjoy every day new ideas for great dishes. Request our eCookbook now!

Better Than Their Reputation

Off the beaten track, we recommend you 15 stunning but underrated travel destinations for your next holiday.

References

Related documents

I n March, 18 months after the United States Securities and Exchange Commission (‘SEC’) adopted a conflict minerals rule, the European Commission released its own proposal

Next we give a result of existence and uniqueness of a type II sequence of vector orthogonal polynomials with respect to a regular vector of linear functionals U , and using a

The researcher determined teacher attitudes toward co-teaching in elementary reading classrooms by conducting a survey with questions geared toward teacher experiences and

The results of the database show that only 18 % of all jurisdictions with water supply watersheds, 19% of jurisdictions with groundwater recharge areas and just 9% of those

I wish to extend my sincere thanks to all those who participated/who took part in the competition I would also like to thank all those who contributed to the success of the IST

In the default configuration, CAN interfaces have attached pfifo fast queuing discipline which, when enqueueing the packet, checks whether the number of queued packets is greater

Performances of single-environment and multi-environment genomic prediction models were compared using kernel regression based methods (GBLUP and RKHS) under two cross

As a round of the FIA World Rally Championship, LOTOS 72nd Rally Poland follows the Guidelines set out by the FIA for media accreditation and published on the FIA