Beskrivning
Detta tillägg är utvecklat av Cyclonecode och kan användas för att ladda och exponera nyheter från Cision
To start pulling feed items from Cision you first need to add the unique identifier for you json feed at the configuration page for the plugin.
You can also change how many feed items to pull, type of feed items, enable pagination, configure caching and much more.
Om du har frågor eller kanske någon funktionalitet som du tycker borde implementeras kan du även prova slack.
Pro Version
Det finns en PRO version av tillägget som innehåller utökade funktioner, som exempelvis:
★ Support to fetch entire feed and not only the last 50 entries.
★ Custom post types. Creates a post for each item in WordPress. This means that all news have standard WordPress links.
★ Manually created posts can be added to the feed.
★ Custom taxonomies for categories and tags fetched from Cision.
★ Use standard article template from your active theme.
★ Support to create, update and delete posts based on PUSH events sent from Cision.
★ Support to create, update and delete posts during CRON at configurable intervals.
★ Calendar module.
★ Cron module.
★ Insider module.
★ Link Back module.
★ Media module.
★ Ownership module.
★ Share Graph module.
★ Share Calculator module.
★ Subscription module.
★ Ticker module.
★ Translation module.
★ Use normal or ajax based load more button for pagination.
★ Annual free support and quicker response times.
★ Discount for multisite licenses.
Jag har som standard ett inledande möte där jag pratar om tillägget och förklarar olika funktioner och svarar på eventuella frågor.
En test sida som visar några av modulerna kan hittas här.
To get more information about the Pro version, email me at cisionblock@gmail.com or give me a call at +(46)-767013987.
Hjälp sökes
För stunden så letar jag efter någon som skulle vilja hjälpa till med någonting av följande:
- Skapa en ikon som kan användas i adminpanelens meny.
- Skapa en baner som kan visas på tilläggets hemsida på wordpress.org.
- Ta fram ett mer intuitivt och tilltalande gränssnitt.
- Skapa en ny ikon som kan användas på olika platser.
If you would like to help with anything of the above, please do not hesitate and contact me either on Slack or by email.
Utvecklare
Jag letar efter utvecklare som tycker det skulle vara intressant att hjälpa till med antingen gratis eller premium versionen av tillägget.
Would be great just to get some ideas and input from others who have some experience in WordPress plugin development.
At this point I am pretty much on my own, which will sometimes result in me just thinking around some issues in my own way; here I think it would be awesome to have others to talk to and collaborate.
Om detta låter intressant, skicka mig gärna ett e-post meddelande eller kontakta mig på Slack.
Widget
Du kan visa ett flöde i valfritt sidofält genom att lägga till en widget.
Kortkod
Kortkoden [cision-block] kan antigen användas gentom att lägga till den i innehållsfältet för en post eller genom att använda do_shortcode funktionen i någon av dina mallar.
Kortkod attribut:
-
id
Ge ett block ett eget id. -
source_uid
Käll-ID för ditt cision-flöde -
language
Språkkod för varje objekt. Till exempel ’en’ för engelska. -
date_format
Datum format som ska användas. -
readmore
Läs mer knappens text. -
count
Maximalt antal objekt i flödet. -
view
This states what kind of items to include:
1 – include both regulatory and non-regulatory items.
2 – include only regulatory items.
3 – include only non-regulatory items. -
start
Anger startdatumet för datumintervallet, inom vilket pressmeddelanden och/eller rapporter hämtas. Formatet är 2001-12-31. -
end
Anger slutdatumet för datumintervallet, inom vilket pressmeddelanden och/eller rapporter hämtas. Formatet är 2001-12-31. -
show_filters
Enable filtering of feed items. -
filter_all_text
Button text for ’all’ filter. -
filter_regulatory_text
Button text for ’regulatory’ filter. -
filter_non_regulatory_text
Button text for ’non-regulatory’ filter. -
items_per_page
Antal objekt som ska visas per sida. -
types
Endast utgåvor av dessa typer kommer inkluderas. -
image_style
Bildstil som ska användas:- DownloadUrl
- UrlTo100x100ArResized
- UrlTo200x200ArResized
- UrlTo400x400ArResized
- UrlTo800x800ArResized
- UrlTo100x100Thumbnail
- UrlTo200x200Thumbnail
-
show_excerpt
Visa utdrag för varje nyhet. -
template
The template file to use. If no template is set in settings and this parameter is not set then cision-block.php in either the active
theme or in the plugin will be used as a default.
You can either use the name of the template as given in the template header e.g ’Foo’ or the actual filename e.g. foo.php. -
flush
Rensar blockets cache.
Här är ett exempel där man använder samtliga av ovanstående attribute:
[cision-block id=example_block source_uid=A275C0BF733048FFAE9126ACA64DD08F language=sv date_format=m-d-Y readmore="Read more" show_excerpt=0 view=1 count=6 items_per_page=2 types="PRM, RDV" start=2016-01-12 end=2019-06-12 image_style=UrlTo400x400ArResized show_filters=1 filter_all_text=*none* filter_regulatory_text=Regulatory filter_non_regulatory_text=Non-regulatory template=foo.php flush=true]
Notice that all shortcode attributes are optional and that they must be on a single line.
Default values is taken from the plugins settings page.
Här är en komplett lista på alla olika typer av pressmeddelanden:
- KMK – Årsredovisning
- RDV – Årlig rapport
- PRM – Företagsmeddelande
- RPT – Delårsrapport
- INB – Inbjudan
- NBR – Nyhetsbrev
More than one block in a page
To use more than one block in a single page you will need to set a unique id for each block or else they will both share the same cache entry.
Filter feed items
On the ’Filters’ tab you can enable filtering on you feed and add a text for the different kind of filters or use the default ones.
If for some reason you would like to hide a specific filter button you can enter the special value *none*
in the corresponding text field.
Mall
The template used to render the feed is cision-block/templates/cision-block.php, you can override
this template by copying it to either the root or under a templates folder in your theme.
You can also select a specific template which will be used to render the feed under the plugins settings page.
To create a new template, you can follow the steps as described in this link: Page Templates:
For instance adding a file with the following header comment would create a new ’Foo’ template:
<?php
/**
* Template name: Foo
* Template Post Type: cision-block-post
*
* Template used to display a feed from Cision.
**/
?>
Display single press releases in WordPress
Since version 2.0.0 it is possible to fetch and display press releases directly from within WordPress.
The template used in this case is cision-block/templates/cision-block-post.php, you can override
this template by copying it to either the root or under a templates folder in your theme.
The $CisionItem
feed object that is available in the template contains all raw data fetched from Cision.
Under the Resurser section there is a link that explains all the different fields that is available.
For example if you use the $CisionItem->HtmlBody
to display content from the feed item you might have to add custom
css since this contains pre formated html which may include inline css and so on.
Fält
By default, only the following fields are collected for each feed item:
- Rubrik
- Intro
- Body
- Publiceringsdatum
- CisionWireUrl
- IsRegulatory
- Images[0]
- DownloadUrl
- Beskrivning
Filter
Lägger till fler fält för varje objekt i flödet:
add_filter('cision_map_source_item', function($item, $data, $block_id) {
$item['Header'] = sanitize_text_field($data->Header);
$item['LogoUrl'] = esc_url_raw($data->LogoUrl);
$item['SocialMediaPitch'] = sanitize_text_field($data->SocialMediaPitch);
return $item;
}, 10, 3);
Ändra sortering av objekt i flödet:
add_filter('cision_block_sort', function($items, $block_id) {
usort($items, function($a, $b) {
return $a->PublishDate > $b->PublishDate;
});
return $items;
}, 10, 2);
Lägg till egna attribut till paginering:
add_filter('cision_block_pager_attributes', function(array $attributes, $block_id) {
return array_merge(
$attributes,
array(
'class' => 'custom-class',
'id' => 'custom-id',
)
);
}, 10, 2);
Sätt en egen klass för pagineringens aktiva objekt:
add_filter('cision_block_pager_active_class', function($class, $block_id) {
return 'custom-class';
}, 10, 2);
För att lägga till attribut för section behållaren i mallen:
add_filter('cision_block_wrapper_attributes', function(array $attributes, $block_id) {
return array(
'class' => array(
'custom-class',
),
);
}, 10, 2);
För att lägga till attribut för article behållaren i mallen:
add_filter('cision_block_media_attributes', function(array $attributes, $block_id) {
return array(
'class' => array(
'custom-class',
),
);
}, 10, 2);
Lägger till prefix som visas i början av behållaren.
add_filter('cision_block_prefix', function($prefix, $block_id) {
return '<h1>Prefix</h1>';
}, 10, 2);
Lägger till suffix som visas i slutet på behållaren.
add_filter('cision_block_suffix', function($suffix, $block_id) {
return '<h1>Suffix</h1>';
}, 10, 2);
Resurser
En komplett lista med fält kan hittas här: https://websolutions.ne.cision.com/documents/P2_Feed.pdf
Följande Käll-ID kan användas för testning: A275C0BF733048FFAE9126ACA64DD08F
Förbättringar
If you have any ideas for improvements, don’t hesitate to email me at cisionblock@gmail.com or send me a message on slack.
Hjälp
Om du stöter på problem så tveka inte att skapa ett nytt inlägg under hjälp sektionen:
https://wordpress.org/support/plugin/cision-block
Du kan även prova kontakta mig på: slack.
Skärmdumpar
A feed from Cision with a pager at the bottom. Inställningsformulär. A single press release displayed in WordPress. Ticker modul. Tillgänglig i Pro versionen. Prenumerations modul. Tillgängligt i Pro versionen. Ownership module. Available in the Pro version. Insyns modul. Tillgänglig i Pro versionen. Share Graph module. Available in the Pro version. A Share Graph and a pie chart. Shareholder areas. Available in the Pro version.
Installation
- Upload cision-block to the /wp-content/plugins/ directory,
- Aktivera tillägget under Tilläggs menyn i WordPress.
- Add your feed identifier and configure the plugin at /wp-admin/options-general.php?page=cision-block in WordPress.
- You can then add either a shortcode or set up a widget in order to display the feed.
Vanliga frågor
-
You can contact me by sending on an email to: cisionblock@gmail.com.
-
Can I fetch more than the last 50 news?
-
You will need to use the Pro version or an addon in order to do this.
-
How do I get a unique feed identifier?
-
This is something that Cision will provide you with.
You can contact them at support@cision.com. -
Är det möjligt att ha fler än ett Käll-ID?
-
Det är möjligt att använda olika käll-ID för olika block genom att använda
source_uid attributet i kortkoden som i följande exempel:[cision-block source_uid=A275C0BF733048FFAE9126ACA64DD08F]
-
Possible to create multiple blocks?
-
Ja, det är möjligt att skapa flera olika block genom att använda kortkod argument för varje block.
-
Kan jag använda vanliga permalänkar för nyheter?
-
This is something that is possible using the Pro version, since all news are imported as custom posts into WordPress.
Recensioner
Bidragsgivare och utvecklare
”Cision Block” är programvara med öppen källkod. Följande personer har bidragit till detta tillägg.
Bidragande personer”Cision Block” har översatts till 1 språk. Tack till översättarna för deras bidrag.
Översätt ”Cision Block” till ditt språk.
Intresserad av programutveckling?
Läs programkoden, kika på SVN-filförvaret eller prenumerera på utvecklarloggen via RSS.
Ändringslogg
= Latest
Remove: Freemius integration.