• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Events Listing module - cross domain
PostPosted: Wed Jun 13, 2018 1:06 pm 
Offline
Forum Members
Forum Members

Joined: Wed Mar 04, 2009 11:04 pm
Posts: 244
Hi all

I have 4 sites using the module 'Events Listing' (a simple calendar events module). What I want to know is is it possible to have a 5th site that pulls the Events data from the other 4 sites and displays it (in the correct date order)

I cant think this is possible but somebody cleverer than me may know a way!

Thanks for any advice


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Events Listing module - cross domain
PostPosted: Wed Jun 13, 2018 1:56 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 7500
Location: The Netherlands
RSS Feed(Reader) or use Cache Remote File tag? http://cms.ms/7S86

Example:
CGBlog content from main website made available as plain HTML "file" https://www.zeijen.nu/feeds/feed-svz-nieuws
With CacheRemoteFile tag read, stored and displayed at another site https://sportvereniging.zeijen.nu/

_________________
Image

Did my post help you solving a problem at your (customers) website and it saved you many hours of work? Great!! Consider buying me a cup of coffee in return! [ Click here ]



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Events Listing module - cross domain
PostPosted: Wed Jun 13, 2018 2:12 pm 
Offline
Forum Members
Forum Members

Joined: Wed Mar 04, 2009 11:04 pm
Posts: 244
Thanks for this Rolf

Will this be able to merge the data from 4 different sites though? So take a list of unique dates from 4 different sites and display them on a separate site as one list, all in date order. Thats the bit I'm struggling to get my head around

j


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Events Listing module - cross domain
PostPosted: Wed Jun 13, 2018 4:54 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 7500
Location: The Netherlands
What is the output of each site? List, table? Have a link?

_________________
Image

Did my post help you solving a problem at your (customers) website and it saved you many hours of work? Great!! Consider buying me a cup of coffee in return! [ Click here ]



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Events Listing module - cross domain
PostPosted: Thu Jun 14, 2018 8:41 am 
Offline
Forum Members
Forum Members

Joined: Wed Mar 04, 2009 11:04 pm
Posts: 244
I haven't built them yet, Its the output from the Events Listing module, which tends to look like

Code:
<div class="events">
<div class="eventitem">
<span class="eventdate">
1.02.2017, 02:00 - 03:00 Uhr
</span>
<h2 class="eventtitle">Test event</h2>         
<div class="eventcontent">
<p>Test event</p>
</div>      
</div>
</div>


But the module itself runs off this template:

Code:
<div class="events">
   {foreach from=$events item='event'}
      <div class="eventitem">
         <span class="eventdate">
         {if $event->start|date_format:"%Y-%m-%d" == $event->end|date_format:"%Y-%m-%d"}
            {$event->start|date_format:"%e.%m.%Y"}{if $event->start|date_format:"%H:%M" == $event->end|date_format:"%H:%M"}
               {*{$event->start|date_format:"%H:%M"} Uhr*}
            {else},
               {$event->start|date_format:"%H:%M"} - {$event->end|date_format:"%H:%M"} Uhr
            {/if}
         {else}
            {$event->start|date_format:"%e.%m.%Y"} - {$event->end|date_format:"%e.%m.%Y"}
         {/if}
         </span>
         {if $event->linkid>1}<a href="{cms_selflink href=$event->linkid}" class="eventlink" title="{$event->title|strip_tags|replace:'"':''}"><h2 class="eventtitle">{$event->title}</h2></a>{else}<h2 class="eventtitle">{$event->title}</h2>{/if}
         {if $event->content}<div class="eventcontent">{$event->content}</div>{/if}
      </div>
   {/foreach}
</div>


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Events Listing module - cross domain
PostPosted: Thu Jun 14, 2018 9:26 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 7500
Location: The Netherlands
I am playing in my mind with the idea it could be possible with something like a table or list.
You can sort them at the receiving website.

Very quick example using a table:

Client websites, 4 times something like:
Code:
{foreach from=$events item='event'}
  <tr>
    <td>{$the_date_tags}</td>
    <td>{$the_description_tags}</td>
  </tr>
{/foreach}


Call the Event Listing module at a hidden page and no template, so plain HTML. Like described in my tutorial http://cms.ms/7S86

At the receiving website
Code:
<table>
  <th>
    <td>Date</td>
    <td>Description</td>
  </th>
  {cache_remote_file url='http://www.website-1.com/index.php?page=some-alias'}
  {cache_remote_file url='http://www.website-2.com/index.php?page=some-alias'}
  {cache_remote_file url='http://www.website-3.com/index.php?page=some-alias'}
  {cache_remote_file url='http://www.website-4.com/index.php?page=some-alias'}
</table>


With jQuery table sorting you can put them in the correct order... At least that is how it could work in my brain right now :)
You should setup a test small test install to see how (if!) it works in real life...

_________________
Image

Did my post help you solving a problem at your (customers) website and it saved you many hours of work? Great!! Consider buying me a cup of coffee in return! [ Click here ]



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Events Listing module - cross domain
PostPosted: Thu Jun 14, 2018 9:36 am 
Offline
Forum Members
Forum Members

Joined: Wed Mar 04, 2009 11:04 pm
Posts: 244
hmm interesting - I've not come across jQuery table sorting before, I'll look into this. I really appreciate your thinking about this - thanks!


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
HostPapa CMS Made Simple hosting