Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Version 0.2.10 #18

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,8 @@ fabric.properties
### Custom ###

modxextraid.txt
vendor
_build/deps/*
_build/package/*

!.gitkeep
15 changes: 4 additions & 11 deletions .idea/facebook_feed.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
language: php

cache:
directories:
- vendor/

services:
- mysql

php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3

before_script:
- mysql -e "CREATE USER 'revo'@'localhost' IDENTIFIED BY '';CREATE DATABASE IF NOT EXISTS revo_test; GRANT ALL PRIVILEGES ON revo_test.* TO 'revo'@'localhost'; FLUSH PRIVILEGES;"
- composer install
- cd _build/
- php unattended-modx-cli-install.php

script:
- php build.transport.php
- cd ..

deploy:
provider: releases
api_key:
secure: GVXd61OtA2WFxeneuwe3adqimzXRg71eVyhWjK5SK7ou15bU/Ns1r7GJdiIRzz1b/aiEwkMtXwkoynZxtlY1hmvUwbKFL5DDh+4MIAtb2sUibSvOx55BlA0G+89jqdpl1U0jQQsakcFIW5XGiZaIMI3BxpK0OVFthnnTJW1ifqmmZHE+3CsFMLYhZgu/g6T8MD6Mioc2RZKZrCj6IL8lEIgMpvHWMGTz0TsRtkmtrd/qa334Ze0VM9EqYR4WBZaIPtIy0+Q8/d4cwc1KOXPNooF9dHdQFZqFWy/e7hOvji8ow9ugWvBM8nqHwrM146JzM7E7wQ7/PdHY1rqA0JmTaYsvZkI5ynP2uLhiiJ5csr778lfHtojRLyuogb8KyDOLXAGG8oRhGG8I2L4Nxfr5LqDA2otLwcp3htMVbMP37xLrFAc/C/bqgPKC0nda/EeNGtoioOPgLjPfhS581o8VgpImUq7C98s3mDp//zE2aRY76jYvqqimRojli1s277C9dIKxLwx1ZJYBQ6kEGg+xy8f0WKOlT/hY2GpUES9zol+VlN26wf0QgNviOkjTqtF3UnU3yVtsr4rQ3jqe9hEiM1tyyd3xF48cQ6gG6CB0cT/M5UJHt+eipe34NbVyzXEkK/rtC8LX2mdwMfxxldNh32VX57Dg5SOfiD04YgErXNM=
file_glob: true
file: _build/package/*.zip
skip_cleanup: true
draft: true
on:
repo: 749/modx_facebook_feed
php: '7.2'
tags: true
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# ModX Facebook Feed
This piece of Software will allow you to add a Facebook Feed from one of your
Facebook pages to your site. This is great for companies that want to update
clients using the Facebook page, but not want an ugly Facebook widget on their
clients using the Facebook page, but do not want an ugly Facebook widget on their
page.


Requirements
------------
* Tested with ModX 2.5.1
* Tested with ModX 2.7.1
* Needs PHP 5.4 or newer (Facebook API)


Expand Down Expand Up @@ -80,7 +80,7 @@ The default template for the snippet uses almost all fields available. The defau

```html
<div class="post">
<img src="[[+img]]">
<img src="[[+img]]" alt="by [[+name]]">
<p class="posted">by [[+name]] [[+time_ago]]</p>
<p>[[+message]]</p>
<p>Liked [[+likes]] times and shared [[+shares]] times. <a href="[[+link]]">View on Facebook</a></p>
Expand All @@ -103,6 +103,10 @@ The default template for the snippet uses almost all fields available. The defau

Will insert a nicely formatted time since posted from the created_time field of facebook

* ``[[+created_time]]``

Will insert the non-formatted created_time field of facebook

* ``[[+message]]``

Will insert the message from the message or description field of facebook
Expand Down Expand Up @@ -167,7 +171,7 @@ The default template for the snippet some of the fields available. The default t

```html
<div class="post">
<img src="[[+img]]">
<img src="[[+img]]" alt="by [[+name]]">
<p>[[+name]] in [[+place_name]]</p>
<p>[[+description]]</p>
<p>From [[+start_time]] until [[+end_time]]</p>
Expand Down
2 changes: 1 addition & 1 deletion _build/build.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
* @package facebook_feed
* @subpackage build
*/
define('MODX_CORE_PATH', 'C:\\xampp\\htdocs\\modx\\core\\');
define('MODX_CORE_PATH', dirname(__FILE__) . '/deps/modx/core/');
define('MODX_CONFIG_KEY','config');
18 changes: 16 additions & 2 deletions _build/build.transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
* @package facebook_feed
* @subpackage build
*/
$package_name = 'facebook_feed';
$package_version = '0.2.10';
$package_release = 'beta';

$mtime = microtime();
$mtime = explode(" ", $mtime);
$mtime = $mtime[1] + $mtime[0];
Expand All @@ -21,9 +25,12 @@
'lexicon' => $root . 'core/components/facebook_feed/lexicon/',
'source_assets' => $root.'assets/components/facebook_feed',
'docs' => $root.'core/components/facebook_feed/docs/',
'source_vendor_facebook' => $root.'vendor/facebook/graph-sdk/src/Facebook'
);
unset($root); /* save memory */

$package_file = $package_name . '-'.$package_version . '-' . $package_release . '.transport.zip';

require_once dirname(__FILE__) . '/build.config.php';

require_once MODX_CORE_PATH . 'model/modx/modx.class.php';
Expand All @@ -35,8 +42,8 @@

$modx->loadClass('transport.modPackageBuilder','',false, true);
$builder = new modPackageBuilder($modx);
$builder->createPackage('facebook_feed','0.2.9','beta');
$builder->registerNamespace('facebook_feed',false,true,'{core_path}components/facebook_feed/');
$builder->createPackage($package_name, $package_version, $package_release);
$builder->registerNamespace($package_name,false,true,'{core_path}components/facebook_feed/');

/* load action/menu */
$menu = include $sources['data'].'transport.menu.php';
Expand Down Expand Up @@ -100,6 +107,10 @@
'source' => $sources['source_core'],
'target' => "return MODX_CORE_PATH . 'components/';",
));
$vehicle->resolve('file',array(
'source' => $sources['source_vendor_facebook'],
'target' => "return MODX_CORE_PATH . 'components/facebook_feed/model/';",
));
$vehicle->resolve('file',array(
'source' => $sources['source_assets'],
'target' => "return MODX_ASSETS_PATH . 'components/';",
Expand All @@ -125,6 +136,9 @@
$modx->log(modX::LOG_LEVEL_INFO,'Packing...'); flush();
$builder->pack();

$modx->log( modX::LOG_LEVEL_INFO, 'moving to "_build/package/"');
file_put_contents($sources['build'] . 'package/' . $package_file, fopen(MODX_CORE_PATH . 'packages/'. $package_file, 'r'));


$mtime= microtime();
$mtime= explode(" ", $mtime);
Expand Down
39 changes: 39 additions & 0 deletions _build/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!--
This file is part of MODX Revolution.

Copyright (c) MODX, LLC. All Rights Reserved.

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
-->
<modx>
<database_type>mysql</database_type>
<database_server>localhost</database_server>
<database>revo_test</database>
<database_user>revo</database_user>
<database_password></database_password>
<database_connection_charset>utf8</database_connection_charset>
<database_charset>utf8</database_charset>
<database_collation>utf8_general_ci</database_collation>
<table_prefix>modxtest_</table_prefix>
<https_port>443</https_port>
<http_host>localhost</http_host>

<!-- Set this to 1 if you are using MODX from Git or extracted it from the full MODX package to the server prior
to installation. -->
<inplace>1</inplace>

<!-- Set this to 1 if you have manually extracted the core package from the file core/packages/core.transport.zip.
This will reduce the time it takes for the installation process on systems that do not allow the PHP time_limit
and Apache script execution time settings to be altered. -->
<unpacked>0</unpacked>

<!-- The language to install MODX for. This will set the default manager language to this. Use IANA codes. -->
<language>en</language>

<!-- Information for your administrator account -->
<cmsadmin>admin</cmsadmin>
<cmspassword>password</cmspassword>
<cmsadminemail>email@address.com</cmsadminemail>
<remove_setup_directory>0</remove_setup_directory>
</modx>
Empty file added _build/deps/.gitkeep
Empty file.
Empty file added _build/package/.gitkeep
Empty file.
Loading