DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:facebookevents

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:facebookevents [2015-10-28 14:15] jdtplugin:facebookevents [2019-01-12 15:09] (current) – Added bugtracker LarsDW223
Line 2: Line 2:
  
 ---- plugin ---- ---- plugin ----
-description: This plugin allows you to display your Facebook events in DokuWiki.+description: This plugin allows you to display your Facebook events in DokuWiki
 author     : Jannes Drost-Tenfelde  author     : Jannes Drost-Tenfelde 
 email      : info@drost-tenfelde.de email      : info@drost-tenfelde.de
 type       : syntax  type       : syntax 
-lastupdate : 2012-03-26 +lastupdate : 2016-09-29 
-compatible : 2012-01-252011-05-252010-11-07 +compatible : 2016-06-262015-08-102014-09-29, 2014-05-05 
 depends    :  depends    : 
 conflicts  conflicts 
-similar    : facebookwall, facebookalbum+similar    : importfacebookevents, facebookwall, facebookalbum
 tags       : facebook, events, calendar tags       : facebook, events, calendar
  
-downloadurl: https://github.com/jdtProjects/dokuwiki/blob/master/published/plugin_facebookevents_1_1.zip +downloadurl: https://github.com/jdtProjects/dokuwiki/raw/master/published/plugin_facebookevents_1_2.zip 
-bugtracker : +bugtracker : https://github.com/jdtProjects/dokuwiki/issues
 sourcerepo : https://github.com/jdtProjects/dokuwiki/tree/master/facebookevents sourcerepo : https://github.com/jdtProjects/dokuwiki/tree/master/facebookevents
-donationurl: http://drost-tenfelde.de/doku.php/donate+donationurl: http://drost-tenfelde.de/donate 
 + 
 +screenshot_img: 
 ---- ----
  
 This pluging allows you to connect to your Facebook page and display the page's events in DokuWiki. This pluging allows you to connect to your Facebook page and display the page's events in DokuWiki.
-This plugin uses the [[https://github.com/facebook/php-sdk/|Facebook PHP SDK]], [[http://php.net/|PHP]] and [[https://developers.facebook.com/docs/reference/fql/|FQL]]+ 
 +The latest Version has been updated to use Facebook's Graph API, rather than the Facebook PHP SDK.
  
 ===== Installation ===== ===== Installation =====
  
-:!: **External requirements:*This plugin requires the following additional components that must be installed separately: +  You must create a [[https://developers.facebook.com/apps/|Facebook App]], which allows you to connect to Facebook using
-  * This plugin uses the [[https://github.com/facebook/php-sdk/|Facebook PHP SDK]], which requires +
-    * The CURL PHP extension to be installed  +
-    * The JSON PHP extension to  be installed +
-  * Additionally, you must create a [[http://www.facebook.com/login.php|Facebook App]], which allows you to connect to Facebook using+
     * App ID, which identifies your Facebook App (you can have multiple Apps)     * App ID, which identifies your Facebook App (you can have multiple Apps)
     * App Secret, which secures your Facebook App         * App Secret, which secures your Facebook App    
  
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually.+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
 ===== Examples/Usage ===== ===== Examples/Usage =====
  
-  * ''%%{{facebookevents>appid=123456&secret=123456&fanpageid=123456}}%%'' ((Displays all status messages on the facebook wall)) +  * Displays all status messages on the facebook wall<code>{{facebookevents>appid=123456&secret=123456&fanpageid=123456}}</code> 
-  * ''%%{{facebookevents>appid=123456&secret=123456&fanpageid=123456&numberOfEntries=3&sort=DESC}}%%'' ((Displays the 3 newest status messages on the facebook wall)) +  * Displays the 3 newest status messages on the facebook wall<code>{{facebookevents>appid=123456&secret=123456&fanpageid=123456&numberOfEntries=3&sort=DESC}}</code> 
-  * ''%%{{facebookevents>appid=123456&secret=123456&fanpageid=123456&numberOfEntries=3&sort=ASC&from=today}}%%'' ((Displays the 3 events after today))   +  * Displays the 3 events after today<code>{{facebookevents>appid=123456&secret=123456&fanpageid=123456&numberOfEntries=3&sort=ASC&from=today}}</code>
- +
-See the plugin in action [[http://www.drost-tenfelde.de/?id=dokuwiki:plugins:facebookevents:demo|here]]. The sample page shows all the styles available with the plugin.+
  
 +See the plugin in action [[http://www.drost-tenfelde.de/?id=dokuwiki:plugins:facebookevents:demo|here]] FIXME. The sample page shows all the styles available with the plugin.
  
 ===== Syntax ===== ===== Syntax =====
Line 55: Line 54:
  
 ^ Key  ^ Type  ^ Comments  ^ Requirement  ^  Version  ^ ^ Key  ^ Type  ^ Comments  ^ Requirement  ^  Version  ^
-| appid | string | This is the mandatory App ID of your [[https://developers.facebook.com/apps/|Facebook App]] | **mandatory** | all | +| appid | string | This is the mandatory App ID of your Facebook App | **mandatory** | all | 
-| secret | string | This is the mandatory App Secret of your [[https://developers.facebook.com/apps/|Facebook App]] | **mandatory** | all |+| secret | string | This is the mandatory App Secret of your Facebook App | **mandatory** | all |
 | fanpageid | string | This is the ID of your Facebook page. You can find this ID by going to your Facebook page. Typically, the link of your page looks like %%https://www.facebook.com/#!/pages/<page name>/<page ID>%%. Copy the page ID from the URL and use it in the syntax. | **mandatory** | all | | fanpageid | string | This is the ID of your Facebook page. You can find this ID by going to your Facebook page. Typically, the link of your page looks like %%https://www.facebook.com/#!/pages/<page name>/<page ID>%%. Copy the page ID from the URL and use it in the syntax. | **mandatory** | all |
 | showAs | string | Default: **default**. Allows you to use alternate display of the wall posts using configuration parameters. You can add more templates by editing the default.php and metadata.php files in the conf/ directory. | optional | all | | showAs | string | Default: **default**. Allows you to use alternate display of the wall posts using configuration parameters. You can add more templates by editing the default.php and metadata.php files in the conf/ directory. | optional | all |
Line 62: Line 61:
 | to | date | This indicates the date to which the wall posts should be displayed. Newer wall posts are disregarded. Format is DD/MM/YYYY. The value 'today' is also valid. | optional | all | | to | date | This indicates the date to which the wall posts should be displayed. Newer wall posts are disregarded. Format is DD/MM/YYYY. The value 'today' is also valid. | optional | all |
 | numberOfEntries | number | Indicates the maximum number of entries to display. | optional | all | | numberOfEntries | number | Indicates the maximum number of entries to display. | optional | all |
-| sort | string | Default: **DESC**Allows you to sort by the date of the wall post. Valid values are 'ASC' and 'DESC'. | optional | all | +| sort | string | Default: **DESC**\\ Allows you to sort by the date of the wall post. Valid values are ''ASC'' and ''DESC''. | optional | all | 
-| showEndTimes | onoff | Default: **on**Allows you to display end times of the event. | optional | all |    +| showEndTimes | onoff | Default: **on**\\ Allows you to display end times of the event. | optional | all |    
-| limit | number | Default: **0**Allows you to limit the maximum number of characters displayed for the message. | optional | [[http://www.drost-tenfelde.de/lib/exe/fetch.php?media=dokuwiki:plugin_facebookevents_1_1.zip|Version 1.1]] +| limit | number | Default: **0**\\ Allows you to limit the maximum number of characters displayed for the message. | optional | Version 1.1 or newer 
  
 ===== Configuration and Settings ===== ===== Configuration and Settings =====
Line 71: Line 70:
 | dformat  | date   | Formatting of the event date (See [[phpfn>strftime|Format]]) | required | all | | dformat  | date   | Formatting of the event date (See [[phpfn>strftime|Format]]) | required | all |
 | tformat  | date   | Formatting of the event time (See [[phpfn>strftime|Format]]) | required | all | | tformat  | date   | Formatting of the event time (See [[phpfn>strftime|Format]]) | required | all |
-| default | string | Default template for displaying wall posts. | required | all |+| default  | string | Default template for displaying wall posts. | required | all |
  
  
Line 109: Line 108:
  
 ^ Tag  ^ Comments  ^ Version  | ^ Tag  ^ Comments  ^ Version  |
-| ''{date}'' | The date of the wall post. The date format can be configured in the conf/default.php file. | all | +| ''%%{date}%%'' | The date of the wall post. The date format can be configured in the conf/default.php file. | all | 
-| ''{time}'' | The time of the wall post. The time format can be configured in the conf/default.php file. | all | +| ''%%{time}%%'' | The time of the wall post. The time format can be configured in the conf/default.php file. | all | 
-| ''{datetime}'' | The date and time of the wall post. This functions as ''{date} {time}'' | all | +| ''%%{datetime}%%'' | The date and time of the wall post. This functions as ''%%{date} {time}%%'' | all | 
-| ''{title}'' | The title of the event. | all | +| ''%%{title}%%'' | The title of the event. | all | 
-| ''{description}'' | The event description. | all | +| ''%%{description}%%'' | The event description. | all | 
-| ''{location}'' | The location of the event. | all | +| ''%%{location}%%'' | The location of the event. | all | 
-| ''{image}'' | The original picture of the event. | all | +| ''%%{image}%%'' | The original picture of the event. | all | 
-| ''{image_large}'' | A large version of the picture of the event. | all | +| ''%%{image_large}%%'' | A large version of the picture of the event. | all | 
-| ''{image_small}'' | A small version of the picture of the event. | all | +| ''%%{image_small}%%'' | A small version of the picture of the event. | all | 
-| ''{image_square}'' | A squared version of the picture of the event. | all | +| ''%%{image_square}%%'' | A squared version of the picture of the event. | all | 
-| ''{url}'' | The unformated URL of the event. You can use this in your template to make your own links to the event. | all | +| ''%%{url}%%'' | The unformated URL of the event. You can use this in your template to make your own links to the event. | all | 
-| ''{more}'' | This is a fomated link to the event, using the language files to output a ''[[{url}|Read more...]]'' link. | all | +| ''%%{more}%%'' | This is a fomated link to the event, using the language files to output a ''%%[[{url}|Read more...]]%%'' link. | all | 
-| ''{startdatetime}'' | The date and time of the start of the event. | [[http://www.drost-tenfelde.de/lib/exe/fetch.php?media=dokuwiki:plugin_facebookevents_1_1.zip|Version 1.1]] +| ''%%{startdatetime}%%'' | The date and time of the start of the event. | Version 1.1 | 
-| ''{startdate}'' | The date of the start of the event. | [[http://www.drost-tenfelde.de/lib/exe/fetch.php?media=dokuwiki:plugin_facebookevents_1_1.zip|Version 1.1]] +| ''%%{startdate}%%'' | The date of the start of the event. | Version 1.1 or newer 
-| ''{starttime}'' | The time of the start of the event. | [[http://www.drost-tenfelde.de/lib/exe/fetch.php?media=dokuwiki:plugin_facebookevents_1_1.zip|Version 1.1]] +| ''%%{starttime}%%'' | The time of the start of the event. | Version 1.1 or newer 
-| ''{enddatetime}'' | The date and time of the end of the event. | [[http://www.drost-tenfelde.de/lib/exe/fetch.php?media=dokuwiki:plugin_facebookevents_1_1.zip|Version 1.1]] +| ''%%{enddatetime}%%'' | The date and time of the end of the event. | Version 1.1 or newer 
-| ''{enddatetime}'' | The date of the end of the event. | [[http://www.drost-tenfelde.de/lib/exe/fetch.php?media=dokuwiki:plugin_facebookevents_1_1.zip|Version 1.1]] +| ''%%{enddatetime}%%'' | The date of the end of the event. | Version 1.1 or newer 
-| ''{endtime}'' | The time of the start of the event. | [[http://www.drost-tenfelde.de/lib/exe/fetch.php?media=dokuwiki:plugin_facebookevents_1_1.zip|Version 1.1]] +| ''%%{endtime}%%'' | The time of the start of the event. | Version 1.1 or newer 
-| ''{timestamp}'' | The unix timestamp of the event. | [[http://www.drost-tenfelde.de/lib/exe/fetch.php?media=dokuwiki:plugin_facebookevents_1_1.zip|Version 1.1]] |+| ''%%{timestamp}%%'' | The unix timestamp of the event. | Version 1.1 or newer |
  
 ===== Development ===== ===== Development =====
Line 133: Line 132:
 === Change Log === === Change Log ===
  
-  * **2012-03-26** [[http://www.drost-tenfelde.de/lib/exe/fetch.php?media=dokuwiki:plugin_facebookevents_1_1.zip|Version 1.1]]+  * **2016-09-29** Version 1.2 released. 
 +    * Updated to use Facebook Graph API 2.7 instead of the Facebook PHP SDK. 
 +  * **2012-03-26** Version 1.1 released.
     * Fixed timezone problem, where the times would sometimes not be displayed properly.     * Fixed timezone problem, where the times would sometimes not be displayed properly.
     * Added 'limit' parameter that allows you to set the maximum number of characters displayed for {description}.     * Added 'limit' parameter that allows you to set the maximum number of characters displayed for {description}.
-    * Added template tags {startdatetime}, {startdate, {starttime}, {enddatetime}, {enddate}, {endtime} and {timestamp}. +    * Added template tags {startdatetime}, {startdate}, {starttime}, {enddatetime}, {enddate}, {endtime} and {timestamp}. 
-  * **2012-02-14** [[http://www.drost-tenfelde.de/lib/exe/fetch.php?media=dokuwiki:plugin_facebookevents_1_0.zip|Version 1.0]]+  * **2012-02-14** Version 1.0 released.
     * Initial release     * Initial release
  
Line 158: Line 159:
 ==== How to create a Facebook App ==== ==== How to create a Facebook App ====
 I was wondering where I might find information on what is needed for creating the Facebook App for this plug-in. I was wondering where I might find information on what is needed for creating the Facebook App for this plug-in.
- 
-Error I'm receiving: 
- 
-(Note: Redacted the <fanpageid> used and the full path reported for facebook.php) 
- 
-Fatal error: Uncaught Exception: 602: <fanpageid> is not a member of the event_member table. thrown in ../dokuwiki/lib/plugins/facebookevents/facebook.php on line 515 
- 
---- //[[robert.vice+dokuwiki@gmail.com|Rob Vice]] 2012-8-31// 
  
 ==== Not just Pages? ==== ==== Not just Pages? ====
Line 173: Line 166:
  --- [[user>iainhallam|Iain Hallam]] //2012/10/23 23:05//  --- [[user>iainhallam|Iain Hallam]] //2012/10/23 23:05//
  
-==== External Requirements ==== 
- 
-It appears that the current version of the plugin comes with the Facebook PHP SDK; does the documentation under "External Requirements" need to reflect that? I started looking for the files on GitHub to install before realising that ''facebook.php'' was already in the plugin's files. 
- 
- --- [[user>iainhallam|Iain Hallam]] //2012/10/23 23:12// 
- 
-==== No dates/times ==== 
- 
-I've just installed this, and it appears to be getting the event currently on my page fine, but for some reason has nothing in any of the date/time entries. The only one that has any output is {datetime}, which produces a single "-". Have you got any idea why that might be happening? Thanks! 
- 
- --- [[user>iainhallam|Iain Hallam]] //2012/10/23 23:54// 
- 
-figured out, it must be a php version problem (maybe 5.3+). I fixed it with some tweaks in "syntax.php", replaced 
-   strftime( $date_format, $values['start_time']) 
-with some kind of 
-   date_format(date_create($values['start_time']), "d.m.Y"); 
- 
-Note: it must not be %d but d only for the date-fields (and so on) 
  
- --- MKrischer //2013/06/26 03:10// 
plugin/facebookevents.1446038135.txt.gz · Last modified: 2015-10-28 14:15 by jdt

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki