function flexgroupprofile_pagesetup() { global $CONFIG; $page_owner = page_owner_entity(); // Group submenu option if ($page_owner instanceof ElggGroup && get_context() == 'groups') { $form = flexgroupprofile_get_profile_form($page_owner, $page_owner->group_profile_category); if (!$form->profile_format || $form->profile_format == 'default') { $title = friendly_title($page_owner->name); add_submenu_item(elgg_echo('form:extended_profile_link_text'), $CONFIG->wwwroot . 'pg/flexgroupprofile/' . $page_owner->getGUID() . '/' . $title . '/', '0extendedprofile'); } } }
<?php /** * Elgg flexprofile extended profile * * @package FlexProfile * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Kevin Jardine <*****@*****.**> * @copyright Radagast Solutions 2008 * @link http://radagast.biz/ */ // Load Elgg engine require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php"; global $CONFIG; // Define context set_context('groups'); set_page_owner(get_input('group_guid', 0)); $group = page_owner_entity(); $title = friendly_title($group->name); add_submenu_item(elgg_echo('form:main_profile_link_text'), $group->getUrl(), '0extendedprofile'); $body = elgg_view('flexgroupprofile/extended', array('entity' => $group)); $title = sprintf(elgg_echo('form:extended_profile_title'), $group->name); page_draw($title, elgg_view_layout("two_column_left_sidebar", '', elgg_view_title($title) . $body));
/** * Populates the ->getUrl() method for file objects * * @param ElggEntity $entity File entity * @return string File URL */ function file_url($entity) { global $CONFIG; $title = $entity->title; $title = friendly_title($title); return $CONFIG->url . "pg/file/" . $entity->getOwnerEntity()->username . "/read/" . $entity->getGUID() . "/" . $title; }
/** * Populates the ->getUrl() method for blog objects * * @param ElggEntity $blogpost Blog post entity * @return string Blog post URL */ function blog_url($blogpost) { global $CONFIG; $title = $blogpost->title; $title = friendly_title($title); return $CONFIG->url . "pg/blog/" . $blogpost->getOwnerEntity()->username . "/read/" . $blogpost->getGUID() . "/" . $title; }
/** * Populates the ->getUrl() method for plugin releases * Redirects to the project page. * * @param ElggEntity $entity * @return string */ function plugins_release_url_handler($entity) { global $CONFIG; $title = $entity->title; $title = friendly_title($title); return $CONFIG->url . "pg/plugins/release/{$entity->guid}/developer/{$entity->getOwnerEntity()->username}/{$title}"; }
/** * Populates the ->getUrl() method for group objects * * @param ElggEntity $entity File entity * @return string File URL */ function groups_url($entity) { global $CONFIG; $title = friendly_title($entity->name); return $CONFIG->url . "pg/groups/{$entity->guid}/{$title}/"; }
<a href="http://twitter.com/home/?status=<?php echo $url; ?> " target="_blank"> Twitter </a> <br /> <img src="<?php echo $iconPath; ?> myspace.png" alt="MySpace"> <a href="http://www.myspace.com/Modules/PostTo/Pages/?u=<?php echo $url; ?> &t=<?php echo friendly_title($title); ?> &c=<?php echo urlencode($embedCode); ?> " target="_blank"> Myspace </a> <br /> <img src="<?php echo $iconPath; ?> linkedin.png" alt="LinkedIn"> <a href="http://www.linkedin.com/shareArticle?url=<?php echo $url; ?>
function publication_url($publicationpost) { global $CONFIG; $title = $publicationpost->title; $title = friendly_title($title); return $CONFIG->url . "pg/publications/" . $publicationpost->getOwnerEntity()->username . "/read/" . $publicationpost->getGUID() . "/" . $title; }
public function getURL() { global $CONFIG; return $CONFIG->wwwroot . 'pg/videos/play/' . get_entity($this->container_guid)->username . '/' . $this->guid . '/' . friendly_title($this->title); }
$filtered_tags[] = $tag; } } if ($filtered_tags) { $izap_videos->tags = array_unique($filtered_tags); } } else { if ($izap_videos->tags == '' || !$izap_videos->tags) { unset($izap_videos->tags); } } if (!$izap_videos->save()) { register_error(elgg_echo('izap_videos:error:save')); forward($_SERVER['HTTP_REFERER']); exit; } // save the file info for converting it later in queue if ($postedArray['videoType'] == 'ONSERVER' && $postedArray['guid'] == 0) { $izap_videos->videosrc = $CONFIG->wwwroot . 'pg/izap_videos_files/file/' . $izap_videos->guid . '/' . friendly_title($izap_videos->title) . '.flv'; if (izap_get_file_extension($tmpUploadedFile) != 'flv') { // will only send to queue if it is not flv izapSaveFileInfoForConverting_izap_videos($tmpUploadedFile, $izap_videos, $postedArray['access_id']); } } if ($postedArray['guid'] == 0) { add_to_river('river/object/izap_videos/create', 'create', $izap_videos->owner_guid, $izap_videos->guid); } system_message(elgg_echo('izap_videos:success:save')); unset($_SESSION['izapVideos']); forward($izap_videos->getUrl()); exit;
/** * Format and return the correct URL for blogs. * * @param ElggObject $entity * @return string URL of blog. */ function blog_url_handler($entity) { global $CONFIG; if (!($user = get_entity($entity->owner_guid))) { // default to a standard view if no owner. return FALSE; } $friendly_title = friendly_title($entity->title); $url = "{$CONFIG->site->url}pg/blog/{$user->username}/read/{$entity->getGUID()}/{$friendly_title}"; return $url; }