Topic-icon jfbcsocials Joomla User custom plugin

3 months 4 weeks ago - 3 months 3 weeks ago #68357 by joomleb
Hi guys, 
Please, Do you have any update about the "jfbcsocials" Joomla User custom plugin ?
www.sourcecoast.com/forums/jfbconnect-9-...ge-etc?start=0#67985 As far as I know, it could be simply added by: 

A - to create a new User “jfbcsocials” plugin …/plugins/user/jfbcsocials/jfbcsocials.php 

B - that it calls directly the …/components/com_jfbconnect/views/account/tmpl/default.php file (to don't create unnecessary code duplication) 

C - to pay attention to modify the …/components/com_jfbconnect/controllers/account.php submit redirect page to "same page": stackoverflow.com/questions/17125688/php...ck-the-submit-button 

A temporary workaround could be to use the ACF PHP plugin: www.tassos.gr/joomla-extensions/advanced...-joomla-custom-field
to write PHP code into the User Profile that can call the "JFBConnect account" file. I tried:
        include ("/components/com_jfbconnect/views/account/tmpl/default.php");

But, it is not running and I have just back "1". Please, Can you help with the PHP code to run ?
Last edit: 3 months 3 weeks ago by joomleb.
Support Specialist
3 months 2 weeks ago #68373 by alzander
We don't have an update on this. It's something we may investigate, but it's not a critical feature and I don't have a timeline on when it may be implemented.

If you happen to implement anything for it, feel free to share and we can include or refine it for a future release.

Thanks,
Alex
3 months 2 weeks ago - 3 months 2 weeks ago #68375 by joomleb
Hi Alex, 
many thanks for your reply. Yes, I'm investigating on it looking to find the best / simplest solution and sure, as always, I'll share here the results.

A - For a temporary workaround by using the ACF PHP plugin:  www.tassos.gr/joomla-extensions/advanced...-joomla-custom-field
to write PHP code into the User Profile that can call the "JFBConnect account" file. I tried:
        include ("/components/com_jfbconnect/views/account/tmpl/default.php");
But, it is not running and I have just back "1".
Please, What am I missing ? Do you have any suggestions ?

B - For building the jfbcsocial user plugin, I'm testing, I could load the "JFBC Account menu item" by adding this code:

<?php
function getbody($filename) {
$file = file_get_contents($filename);
$dom = new DOMDocument();
$dom->loadHTML($file);
$bodies = $dom->getElementsByTagName('body');
assert($bodies->length === 1);
$body = $bodies->item(0);
for ($i = 0; $i < $body->children->length; $i++) {
$body->remove($body->children->item($i));
}
$stringbody = $dom->saveHTML($body);
return $stringbody;
}
$url = "mysite.com/terms?tmpl=component";
$bodycontent = getbody($url);
?>
<html>
<body>
<?php
echo $bodycontent;
?>
</body>
</html>


Do you agree ?
But I'm calling a static URL: $url = " mysite.com/terms?tmpl=component ";
and I'd like to use an Internal Dynamic URL like mentioned  here  with code (for example):
use Joomla\CMS\Router\Route;
$url = Route::_("index.php?option=com_content&view=article&id=4");

Please, Can you help me to invoke an Internal Dynamic Url ?
Last edit: 3 months 2 weeks ago by joomleb.
2 months 3 weeks ago #68405 by joomleb
HI guys, 
maybe I found a (really articulate) workaround. I'm testing it, I'll post my results here in few days...
1 month 3 weeks ago #68474 by joomleb
Hi guys, 
few days and I'll reply here with a detailed "how to"...
1 month 2 weeks ago #68486 by joomleb
Hi guys, 
let me repeat, in first of all, that:

- to have a "jfbcsocials Joomla User custom" plugin is a nutural logical Joomla integration must have to show the connected socials into the User Profile. GDPR etc. require to make available to the Users all their informations and their management.

- the "jfbcsocials Joomla User custom" plugin in a Backend point of view would be the useful alterego of the User Map, where the plugin permit to the Administrator to see and manage the single User Social connections through Backend User Profile editing (per User view). While the User Map permits is a recap of all the Socials connections (per Connections view).  

- As I suggested for the User Map here: www.sourcecoast.com/forums/jfbconnect-9-...-app-athorized#68484  would be useful to have the Social Icons linked directly to the Socials Profiles.

- the simplifications discussed here: www.sourcecoast.com/forums/jfbconnect-9-...ge-etc?start=0#67985  should be included for a User Friendly experience

Please, Can you add it in the next release ?

Now, as promised, for a temporary solution to use the ACF plugin PHP Custom Field:  www.tassos.gr/joomla-extensions/advanced...-joomla-custom-field   to write PHP code into the User Profile that can call the "JFBConnect account" file would be a good solution, but:
- we have to consider that the ACF plugin PHP Custom Field is not free
- I have limited PHP knoledge and at the end I'm not been able to have back a running code.

(Thinking can be useful to other users) So, I used the ACF plugin iFrame Custom Field, but due that Socials do not permit calling through an iFrame, I had to hide connection links through CSS and anyway to open JFBC in a new tab to run connections. So, not a "very good" solution. I add an image here for you.
Attachments:
2 weeks 2 days ago #68510 by joomleb
Hi guys, 
waiting your reply, I'm writing to keep alive the topic here...
Social Stream
Hide. Seek. Play!

Countdown Hide & Seek Game

Countdown, the new hide & seek toy, is available now! Designed and developed by the founders of SourceCoast, it's the perfect toy to get your kids moving at all ages.

Get the Hide and Seek Toy on Amazon