Created
May 24, 2014 05:29
-
-
Save imarklee/49c07340f22122b384e1 to your computer and use it in GitHub Desktop.
API for rendering popbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Include EasySocial's engine | |
require_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php'); | |
if (JFactory::getDocument()->getType() == 'html') { | |
// We also need to render the styling from EasySocial. | |
$doc = Foundry::document(); | |
$doc->init(); | |
$page = Foundry::page(); | |
$page->processScripts(); | |
} | |
?> | |
<?php | |
// In your respective extension / plugin / module, if you have the user id, | |
// Replace the 62 with the appropriate user id. | |
$userId = 62; | |
$user = Foundry::user($userId); | |
?> | |
<a href="<?php echo $user->getPermalink();?>" | |
data-popbox="module://easysocial/profile/popbox" | |
data-popbox-position="top" | |
data-user-id="<?php echo $user->id;?>" | |
><?php echo $user->getName();?></a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment