By pedenon on Thursday, 05 December 2013
Posted in Technical Issues
Replies 1
Likes 0
Views 727
Votes 0
Hi,
We have some issues with the mod_easysocial_stream module and the native EasySocial apps like the photo app which allow, for example, users to change their profile picture and add the info to the frontend activity stream module.
1. If John change his profil picture, in the stream generated by mod_easysocial_stream, the following sentence will be added : « John updated his profil picture »
And this sentence his generated by the following code :
<?php echo JText::_( 'APP_PHOTOS_STREAM_UPDATED' ); ?> <?php echo $term; ?> <?php echo JText::_( 'APP_PHOTOS_STREAM_PROFILE_PICTURE' ); ?>

from the file media\com_easysocial\apps\user\photos\themes\default\streams\uploadAvatar.title.php
The problem is that the value of $term (his, her, their) is determined by the gender of the user who changed his profil picture which is perfect for english but it doesn’t work for other language as french for example. In french the value of $term should be determinbed by the « gender » of 'APP_PHOTOS_STREAM_PROFILE_PICTURE'…
So, correct me if I am wrong, but I can’t have the french translation of the activity sentence without changing the core of the photo app (no override so in the next upgrade I will have to reimplement the changes) or put a blank val for the translation of « his, her, and their » which is also not a solution we want to implement.
So can you please define a clean way to solve this issue.
2. Still regarding the previous issue, as the sentence is generated in a theme file, I thought about creating a theme file for each app (like I did for the global easysocial) and in the theme file replace the code by something like :
<?php echo JText::_( 'APP_PHOTOS_STREAM_UPDATED' ); ?> <?php echo JText::_( 'APP_PHOTOS_STREAM_PROFILE_PICTURE_INTRO' ); ?> <?php echo JText::_( 'APP_PHOTOS_STREAM_PROFILE_PICTURE' ); ?>

But after reading the very small documentation, did some themes tests, and finally explore the huge amount of code I discovered in \administrator\components\com_easysocial\includes\themes\themes.php line 82 :
// @TODO: For apps, we need a proper way to detect the apps theme configuration.
$theme = 'default';
So correct me if I am wrong, but today there is no theme function for apps, so their his no possibility to properly change the code generated by apps …
I saw some new functions on the roadmap which are nice but definitly less important than the theme function of apps from my point of view.
3. Last but not least, if you add the previous problems (translation, no theme for app) with a requirement that we have : we have to add a class=’modal’ and a &tmpl=component to all the user permalink or badges links of the stream module... So I wanted to do it at theme level but as discussed previously we can’t, so I thought about overriding the mod_easysocial_stream module view properly in the html folder of our template, problem if you do a var_dump on $stream->toArray() or on $stream there is no possibility to acces the infos of the app… I think that getting all the stream infos for each stream in the $stream would help to do the job at module level.
Thanks a lot for your help regarding all those issues.
Hello Pedenon,

Wow, thanks for the lengthy feedback but I do apologize in advance if my reply is a little short as I tend to prefer keeping things simple. Now back to your inquiries:

1. Yes, this is an issue that we are trying to sort out internally. I guess the best work around is to convert everything into a single line of string rather than breaking things apart.

2. Yes, this is being planned in the future versions once the basic framework of the "apps" is more stable. We're waiting for more 3rd party apps to join in the Apps market so that we can evaluate this based on their feedback.

3. We actually reuse the same library to display the stream and most of these theme files are located in /components/com_easysocial/themes/wireframe/stream/ . If you need to create an override, you probably want to override the files in this folder instead.
·
Friday, 06 December 2013 01:23
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post