Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
borrowed publication with news posts containing images
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Brian Jones  
View profile  
 More options Dec 1 2010, 10:40 am
From: Brian Jones <joneb...@gmail.com>
Date: Wed, 1 Dec 2010 07:40:49 -0800 (PST)
Local: Wed, Dec 1 2010 10:40 am
Subject: borrowed publication with news posts containing images
Hi,

Have a minisite that contains a publication on a page that displays a
list of news posts including title, teaser image, and teaser text.
(See www.luther.edu/headlines).

Another minisite has borrowed the above publication and all displays
as before except the image, which does not display at all. By removing
$this->site_id from the entity selector on line 2151 of publication/
module.php the image appears in the borrowed publication. Don't know
if this behavior is by design or not but have overridden the
get_teaser_image function for our case.

Brian

function get_teaser_image($item)
{
   $es = new entity_selector( );
   $es->description = 'Finding teaser image for news item';
   $es->add_type( id_of('image') );
   $es->add_right_relationship( $item->id(),
relationship_id_of('news_to_teaser_image') );
   $es->set_num (1);
   $result = $es->run_one();
   return $result;


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Ryan  
View profile  
 More options Dec 2 2010, 2:41 pm
From: Matt Ryan <matt.d.r...@gmail.com>
Date: Thu, 2 Dec 2010 13:41:21 -0600
Local: Thurs, Dec 2 2010 2:41 pm
Subject: Re: [reason-discussion] borrowed publication with news posts containing images
Hi, Brian --

Good catch. I will take a look at it; if you're correct (and I suspect
you are) I will make that change in the core.

Matt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Ryan  
View profile  
 More options Dec 2 2010, 4:11 pm
From: Matt Ryan <matt.d.r...@gmail.com>
Date: Thu, 2 Dec 2010 15:11:06 -0600
Local: Thurs, Dec 2 2010 4:11 pm
Subject: Re: [reason-discussion] borrowed publication with news posts containing images
Brian, I think that your solution is good.  I did add one "set_env"
call, which future-proofs the code a little bit, but otherwise your
suggestion is now in the core. You can update to the latest nightly if
you'd like, or you can replace that function with this:

                function get_teaser_image($item)
                {
                        $es = new entity_selector();
                        $es->description = 'Finding teaser image for news item';
                        $es->set_env( 'site' , $this->site_id );
                        $es->add_type( id_of('image') );
                        $es->add_right_relationship( $item->id(),
relationship_id_of('news_to_teaser_image') );
                        $es->set_num (1);
                        $result = $es->run_one();
                        return $result;
                }

-- Matt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »