Hi guys,
I'm attempting to embed the elgg topbar in an external site. The idea being that the user can still access elgg functionality from an external site. The external site would also access the elgg user object to get a unique user ID for DB storage.
I've been playing around with the code for a while and can't find a proper way to do this.
One idea was to use the customhtml plugin. This allowed me to embed the external site somewhat. However, the plugin only allows the external code to appear within the document body. I need to:
I have attempted to override the following files:
Basically, I don't know how to define a "more global override" to be interpretted by elgg before it outputs the Activity, Dicussion header, and then, only on the specific external page.
Also, once I manage to override this view, I want to customise the elgg topbar on that page (no elgg logo, dashboard, etc. links + extra links)
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- MacGyverMan@MacGyverMan
MacGyverMan - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- MacGyverMan@MacGyverMan
MacGyverMan - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- MacGyverMan@MacGyverMan
MacGyverMan - 0 likes
You must log in to post replies.Side note, I have also attempted to do this the other way around, by creating an external php file that calls the needed elgg functions.
This works more or less, however, for some reason, usersettings won't hide even if I call remove_menu_item ...I also feel that this approach might be a bit too "hackish".
Simplified example:
<?php
require_once(dirname(dirname(__FILE__)) . "/elgg/engine/start.php");
//Disable unwanted elements in the elgg menu
elgg_unregister_menu_item('topbar', 'elgg_logo');
elgg_unregister_menu_item('topbar', 'dashboard');
elgg_unregister_menu_item('topbar', 'administration');
elgg_unregister_menu_item('topbar', 'usersettings');
$topbar = elgg_view('page/elements/topbar', $vars);
$messages = elgg_view('page/elements/messages', array('object' => $vars['sysmessages']));
$body = elgg_view('page/elements/body', $vars);
$footer = elgg_view('page/elements/footer', $vars);
// Set the content type
header("Content-type: text/html; charset=UTF-8");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<?php echo elgg_view('page/elements/head', $vars); ?>
</head>
<body>
<div class="elgg-page elgg-page-default">
<div class="elgg-page-messages">
<?php echo $messages; ?>
</div>
<div class="elgg-page-topbar">
<div class="elgg-inner">
<?php echo $topbar; ?>
</div>
</div>
<!-- external page embed -->
<iframe src='index.html' style='position:relative;top:0px;left:0px;width:100%;height:700px;'/>
<div class="elgg-page-footer">
<div class="elgg-inner">
<?php echo $footer;?>
</div>
</div>
</div>
<?php echo elgg_view('page/elements/foot'); ?>
</body>
</html>
it seems you're trying for something similar to
http://elgg.org/ -- with it's global topmenu and the ability to move in/out of the community =>
| Home | About | Blog | Services | Hosting | Community | Developers | Download |
Not exactly (I think).
If my live site looks like this:
I'd like to be able to have this on an external page:
Note how certain menu items are disabled on the external page. Basically, while the user navigates my site, I want them to stay connected to the basic elg functionality.
i kinda intentionally said " something similar to .. " ;-)
you do want want somethwang similar, but with extras..
the elgg.org topbar sorta disappears while in the @comm,
which has it's own topbar menu..
you want the connexn w/ yr @comm *all the time,
while moving between the strict 'elgg' areas and
other non-elgg areas of your whole setup.
if this is so -- i am sure it can be done with some
creativeness & imagination for the initial design of navigation.
i'll be doing this after/ when i have set up my own littwle
embracheee site for proper elgg tech & prods integration..
if i only had more time.. only time...;-oO one of these days;-O
Hehe...yeah...if I only understood the model more, I'd get this done. I've been hacking at it for 3 days straight and am at my wit's end right now.