26 messages in com.googlegroups.sweetcron[Sweetcron] Re: Different Looks for D...
FromSent OnAttachments
Cory O'BrienNov 1, 2008 3:27 pm 
MilanNov 1, 2008 4:29 pm 
ChanNov 6, 2008 4:40 pm 
chrisskeltonNov 6, 2008 4:59 pm 
onefish2Nov 6, 2008 10:04 pm 
yongfookNov 6, 2008 10:22 pm 
onefish2Nov 7, 2008 6:21 am 
yongfookNov 7, 2008 6:40 am 
onefish2Nov 7, 2008 6:58 am 
yongfookNov 7, 2008 7:03 am 
onefish2Nov 7, 2008 7:16 am 
ChanNov 8, 2008 7:59 pm 
yongfookNov 8, 2008 8:49 pm 
Jeroen SmeetsNov 9, 2008 2:32 am 
docfloNov 9, 2008 3:10 am 
xzolianNov 9, 2008 6:30 am 
Jeroen SmeetsNov 9, 2008 10:35 am 
Jeroen SmeetsNov 9, 2008 11:42 am 
ChanNov 9, 2008 6:11 pm 
yongfookNov 9, 2008 6:24 pm 
ChanNov 10, 2008 5:37 pm 
TomakunDec 9, 2008 10:19 pm 
Jon Yongfook CockleDec 10, 2008 2:47 am 
TomakunDec 10, 2008 5:22 am 
TomakunDec 18, 2008 6:17 pm 
Jon Yongfook CockleDec 19, 2008 12:43 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[Sweetcron] Re: Different Looks for Different Feeds from Same Site?Actions...
From:Chan (chan@gmail.com)
Date:Nov 10, 2008 5:37:47 pm
List:com.googlegroups.sweetcron

Thanks for your reply, I'm still learning php and I wasn't sure this was a good way to it.

Thanks again.

On Nov 10, 11:24 am, yongfook <yong@gmail.com> wrote:

think about it for a second....

you have twodifferenturls from the same domain...what better way of telling them apart is there than the url itself?

it's fine as it is.  it might not look amazingly pretty, but it's better than obfuscating the code by using something neater-but-less-obvious than the url.

On Mon, Nov 10, 2008 at 11:12 AM, Chan <chan@gmail.com> wrote:

Yes, sorry about this.

I'm getting this error: Fatal error: Call to a member function get_feed_url() on a non-object in (...) _activity_feed.php on line 9

Now, I've got this working by using $item->get_feed_url() instead of $item->get_feed_domain() in my <!-- domain-specific boxes --> section, and with an array thatlookslike this (not that pretty) :

Is there anyway I can achieve this with your method, instead of calling the feed url? Not a big deal though...

On Nov 9, 1:49 pm, yongfook <yong@gmail.com> wrote:

when you say it "doesn't work", what exactly does that mean?  are you getting an error?  or is it displaying the actions correctly but not showing the right one for scrnshots.com ?

On Sun, Nov 9, 2008 at 1:00 PM, Chan <chan@gmail.com> wrote:

This doesn't work for me, am I doing something wrong? Here's my array:

<?php $toma['flickr.com'] = 'I uploaded a picture on'; $toma['youtube.com'] = 'Got a new favorite on'; $toma['twitter.com'] = 'I twitted on'; $toma['tomakun.com'] = 'New blog post at'; $toma['wishlistr.com'] = 'I got a new item on my'; if ($item->get_feed_url() == 'http://www.scrnshots.com/users/Tomakun/ screenshots.rss') { $toma['scrnshots.com'] = 'Found on'; } else { $toma['scrnshots.com'] = 'I took a screenshot on'; }

?>

On 8 nov, 00:17, onefish2 <stev@gmail.com> wrote:

Thank you. That worked.

On Nov 7, 10:03 am, yongfook <yong@gmail.com> wrote:

your conditional statement isn't a conditional.

it should be something like

if ($item->get_feed_url() == 'whatever.com/blah') {

} On Fri, Nov 7, 2008 at 11:58 PM, onefish2 <stev@gmail.com> wrote:

Thanks for your quick help yongfook.

These are my feeds:

This is my array before:

<?php $myarray['exploitthesystem.com'] = 'I blogged on '; $myarray['onefish2.com'] = 'I blogged on '; $myarray['twitter.com'] = 'I tweeted on '; $myarray['brightkite.com'] = 'I checked in on '; $myarray['pikchur.com'] = 'I put this photo on '; $myarray['digg.com'] = 'I dugg this on '; $myarray['delicious.com'] = 'I bookmarked this on '; $myarray['furl.net'] = 'I researched this on '; $myarray['youtube.com'] = 'I watched this video on '; ?>

After the change:

<?php $myarray['exploitthesystem.com'] = 'I blogged on '; $myarray['onefish2.com'] = 'I blogged on '; $myarray['twitter.com'] = 'I tweeted on '; $myarray['brightkite.com'] = 'I checked in on '; $myarray['pikchur.com'] = 'I put this photo on '; $myarray['digg.com'] = 'I dugg this on '; $myarray['delicious.com'] = 'I bookmarked this on '; $myarray['furl.net'] = 'I researched this on '; $myarray['flickr.com'] = 'I put this photo on '; if (http://www.youtube.com/profile_videos?user=onefish2) { $myarray['youtube.com'] = 'I posted this video to'; } else { $myarray['youtube.com'] = 'I favorited this video on'; } ?>

And this is the error: Parse error: syntax error, unexpected ':' in /home/content/o/n/e/ onefish2/html/system/application/views/themes/boxy_green/ _activity_feed.php on line 30

On Nov 7, 9:41 am, yongfook <yong@gmail.com> wrote:

how about you post yours, and I tell you what you're doing wrong?

On Fri, Nov 7, 2008 at 11:21 PM, onefish2 <stev@gmail.com> wrote:

I still could not get this to work. Can some one please post the exact snippet of code that they used in their activity_feed.php.

On Nov 7, 1:22 am, yongfook <yong@gmail.com> wrote:

I posted the solution to this already, trying doing a search next time:

$myarray['flickr.com'] = 'I snapped a photo'; $myarray['digg.com'] = 'I dugg something';

and then in your item loop just echo out the array key you want using $item->get_feed_domain() as the key:

echo $myarray[$item->get_feed_domain()];

if you want to usedifferentmessages from the same site just put a conditional in when building your array:

if (some conditional) { $myarray['flickr.com'] = 'I snapped a photo';} else {

$myarray['flickr.com'] = 'I favourited a photo';}

$myarray['digg.com'] = 'I dugg something';

the conditional could be the feed url or the feed ID (if you know it, from the database).

easy.

On Fri, Nov 7, 2008 at 3:05 PM, onefish2 <stev@gmail.com> wrote:

I would like to know the answer to this as well. I tried doing this on my site to no avail.

On Nov 6, 8:00 pm, chrisskelton <ske@gmail.com> wrote:

I was wondering the exact same thing. If someone that has that setup could please upload the contents of their _activity_feed.php file it would be greatly appreciated.

On Nov 6, 7:41 pm, Chan <chan@gmail.com> wrote:

Can somebody help with this please?

How can we have adifferentcaption for adifferentfeed from the same domain? Example on Yongfook.com : 'I recorded a video on Youtube' // 'I favoured a video on Youtube'

Help would be really appreciated.