• I love your plugin, and I have implemented a solution over tagregator to add the posts of my client’s facebook into his social feed.

    Also I have created a special page into my client’s site so he can add custom hashtags without creating a page for each one.

    Also I have created a way to use cron to update hashtags and facebook posts.

    I would replicate this solution in other pages, but I have had to modify tagreator’s code (just four lines).

    Can I ask you to add these changes in the next release? If so, I could send you them.

    https://ww.wp.xz.cn/plugins/tagregator/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Ian Dunn

    (@iandunn)

    Hey Sebaxtian, I’d love to take a look at the code. The cron job is something that’s already on the TODO list, so it’d be great to integreate into the plugin.

    I’d also be happy to add any filters or hooks that you need, so that you don’t have to modify the plugin to extend it.

    Thread Starter Sebastian Echeverry

    (@sebaxtian)

    Glad to hear you would see the changes.

    If you want to see it working here is the link to the page. It is the Rock Fest from the second biggest city in my country.

    http://altavozfest.co/inicio/redes/

    *******************************************************

    Changes in tagregator:

    *****

    bootstrap.php

    In order to allow tagregator to use my external plugin (the one that adds the feeds from my clients fb page) the bootstrap instance has to be declared after the plugin activation. So, the last part of the code in the bootstrap (the one tat declares the tagregator instance) has to be a function called with this:

    add_action( ‘plugins_loaded’, ‘tagregator_start’ );

    *****

    tggr-shortcode-tagregator.php

    In order to have a page without javascript where a cron call would update the feed, I have modified the import_new_items visibility so it can be called publicly.

    *******************************************************

    My cron solution:

    I don’t want to force a random user to wait while the cron updates the feed (sometimes 10 seconds each hashtag), so I prefer to use an external cron service for these calls.

    page-hashtag.php

    This is the page in my site called by the cronjob (https://www.setcronjob.com/). Inside the theme I have a place to configure the hashtags separated by commas, so my user doesn’t have to create a special page with a shortcode on it for each hashtag. This special page would detect the “page number” and look for that item in the hastags list, and call the page using the import_new_items function (that’s why I modified it to be public).

    *******************************************************

    My FB-page-source class:

    This is the link to my ‘facebook page feeds’ class.

    I have this directory inside my plugin and I called it using this:

    function fes_register_tggr( $media_sources ) {
    	require_once( dirname( __FILE__ ) . '/tagregator/classes/tggr-source-facebook.php' );
    	$media_sources[ 'TGGRSourceFacebook' ] = TGGRSourceFacebook::get_instance();
    
    	return $media_sources;
    }
    add_filter( 'tggr_media_sources', 'fes_register_tggr' );
    Plugin Contributor Ian Dunn

    (@iandunn)

    Awesome, thanks. The Facebook source sounds pretty interesting too.

    I’m really busy this week and next, but I’ll take a look as soon as I can and give you props for anything I merge.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Third party sources’ is closed to new replies.