By Sunny on Tuesday, 14 October 2014
Posted in Technical Issues
Replies 3
Likes 0
Views 503
Votes 0
There is an langauge string missing for repost of events (media\com_easysocial\apps\event\shares\hooks\notification.repost.php)

I did an language over ride with "{actor} reposted your event post XXXX."

Now i want to replace XXXX with the event name, how do i achieve it?

i tried %3$s but its not recognising.

thanks & regards
hello Sunny ,

Sorry for late reply to this,
Thanks for reporting on this, I have checked the code, there was only 1 code argument for get who is the person reposted this.

APP_EVENT_STORY_USER_REPOSTED_YOUR_POST="{b}%1$s{/b} reposted your post"
·
Tuesday, 14 October 2014 23:39
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks arlex, will add this to the language file locally.
can an argument be passed for the re-Post Title? e.g: "{b}%1$s{/b} reposted your post %3$s"

regards
·
Wednesday, 15 October 2014 13:29
·
0 Likes
·
0 Votes
·
0 Comments
·
hello Sunny,

Sorry for late reply to this,
You can try apply this code in your following file -> JoomlaFolder\media\com_easysocial\apps\event\shares\hooks\notification.repost.php

public function execute(&$item)
{
// We know that all repost notifications is targeted to the owner of the previous item that is currently being reposted.
$actor = FD::user($item->actor_id);

// Load up the share item
$share = FD::table('Share');
$share->load($item->context_ids);

$item->title = JText::sprintf('APP_EVENT_STORY_USER_REPOSTED_YOUR_POST', $actor->getName());
}

Replace with

public function execute(&$item)
{
// We know that all repost notifications is targeted to the owner of the previous item that is currently being reposted.
$actor = FD::user($item->actor_id);
// Get event information
$event = FD::event($item->uid);

// Load up the share item
$share = FD::table('Share');
$share->load($item->context_ids);

$item->title = JText::sprintf('APP_EVENT_STORY_USER_REPOSTED_YOUR_POST', $actor->getName(), $event->getName());
}


Then this language string should be

APP_EVENT_STORY_USER_REPOSTED_YOUR_POST="{b}%1$s{/b} reposted your post in {b}%2$s{/b}"


hope this help.
·
Wednesday, 15 October 2014 16:16
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post