Installation:
1. Deactivate previous version if any
2. Delete entire folder
3. Upload this version of mobilize and activate
Changes:
- Updated to Elgg 1.8.16
View Per Jensen's plugins
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.
Ahh, thanks! That was a stupid mistake.
Works now it seems, and I was wrong above, menu_builder somewhat works.
I still have some trouble with the theming (I use the easy_theme plugin), but overall the site seems to work.
Thanks a lot!
@Krischan this is the code i'm using and working fine now.! "Make sure to clear cache after uploading new file to take into affect.
hello
Sorry for asking this question again here
please help
I am typing old question and answers here
hello
I am using elgg 1.8.16 and mobilze Mobilize 2013.07.11
I am using tinymce 4 in my elgg website with mobilize plugin. I want to dsiable tinymce when user open website from mobile. plz help
@shehbaz In start.php (Mobilize plugin) after
Add
thanks for instant help
I add code as above
flushed cache
run upgrades from my admin dashboard
and open website in mobile in firefox and mexthon
but tinymce is still present
2 tricks.
1. Go to Administration->Advanced settings:
- Uncheck 'Use simple/system cache"
- Flush the caches again
- Check on 'Use simple/system cache"
2. Find your mobile device/OS in function detectmobile(){ (start.php Mobilize plugin)
It not should be missed in there
hello
thanks again
mobile device/OS is listed in function detectmobile(){
and I also used above methon of flushing but
tinymce is still present
Try this:
hello
Thanks RvR
this is also not working
@shehbaz Well, answer in here too ;)
I agree that
elgg_unregister_js('tinymce');
elgg_unregister_js('elgg.tinymce');
may not working on some websites.
But with elgg_unextend_view('input/longtext', 'tinymce/init'); you'll "kill" TinyMCE forever.
I've created PR for better setting of this issue even.
I think that you're using another call to TinyMCE (via 3-rd party plugins, perhaps, or some configuration)
@shehbaz
By default mobilize unregister timymce, you should find this line in start.php,
elgg_unregister_js('elgg.tinymce');
On my test installation it works with both tinymce and tinymce 4. I think RvR is right, something else is causing the problem.
mobile version of my site has a lot of space on header is there away to shorten the height of it????
@LT Open mobilize css and find,
.elgg-page-default .elgg-page-header > .elgg-inner {
adjust the height.
Made changes but didn't work but just found out it was being overwriten by theme header_logo.php!
Thanks for the help though!
hello
thanks gillie and RvR
what may be the problem
I have tried all three codes but tinymce in mobilze is still present I am sending my start.php codes to you please help.
<?php
/*
*
* Elgg Mobilize
*
* @package mobilize
* @author Per Jensen - Elggzone
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
* @copyright Copyright (c) 2013, Per Jensen
*
* @link http://www.perjensen-online.dk/
*
*/
elgg_register_event_handler('init','system','mobilize_init');
function mobilize_init(){
$action_path = dirname(__FILE__) . '/actions';
elgg_register_action("mobilize/admin/settings", "$action_path/settings.php", 'admin');
elgg_register_admin_menu_item('configure', 'mobilize', 'settings');
elgg_extend_view('css/admin', 'mobilize/admin');
elgg_register_page_handler('about', 'mobilize_expages_page_handler');
elgg_register_page_handler('terms', 'mobilize_expages_page_handler');
elgg_register_page_handler('privacy', 'mobilize_expages_page_handler');
elgg_register_css('elgg.mobilize', '/css/mobilize.css');
detectmobile();
$mobile = detectmobile();
if($mobile == true) {
elgg_unregister_js('elgg.tinymce');
elgg_set_viewtype('mobile');
if (!elgg_is_active_plugin('custom_index')) {
elgg_unregister_plugin_hook_handler('index','system','custom_index');
elgg_register_plugin_hook_handler('index', 'system', 'index_handler');
}
if (elgg_get_plugin_setting('use_friendspicker', 'mobilize') == 'yes'){
elgg_unregister_js('elgg.friendspicker');
}
elgg_extend_view('page/elements/head','mobilize/meta', 1);
elgg_register_js('mobilize', 'mod/mobilize/vendors/js/mobilize.js', 'footer');
elgg_load_js('mobilize');
elgg_register_event_handler('pagesetup', 'system', 'mobilize_setup_handler', 1000);
}
elgg_register_viewtype_fallback('mobile');
}
function index_handler($hook, $type, $return, $params) {
if ($return == true) {
// another hook has already replaced the front page
return $return;
}
if (!include_once(dirname(__FILE__) . "/index.php")) {
return false;
}
// return true to signify that we have handled the front page
return true;
}
function mobilize_expages_page_handler($page, $handler) {
if ($handler == 'expages') {
expages_url_forwarder($page[1]);
}
$type = strtolower($handler);
$title = elgg_echo("expages:$type");
$content = elgg_view_title($title);
$object = elgg_get_entities(array(
'type' => 'object',
'subtype' => $type,
'limit' => 1,
));
if ($object) {
$content .= elgg_view('output/longtext', array('value' => $object[0]->description));
} else {
$content .= elgg_echo("expages:notset");
}
$body = elgg_view_layout('one_sidebar', array('content' => $content));
echo elgg_view_page($title, $body);
return true;
}
function detectmobile(){
if(preg_match('/(alcatel|amoi|android|avantgo|blackberry|benq|cell|cricket|docomo|elaine|htc|iemobile|iphone|ipaq|ipod|j2me|java|midp|mini|mmp|mobi|motorola|nec-|nokia|palm|panasonic|philips|phone|sagem|sharp|sie-|smartphone|sony|symbian|t-mobile|telus|up\.browser|up\.link|vodafone|wap|webos|wireless|xda|xoom|zte)/i', $_SERVER['HTTP_USER_AGENT'])) {
return true;
} else {
return false;
}
}
function mobilize_setup_handler() {
if (!elgg_in_context('admin')) {
elgg_load_css('elgg.mobilize');
}
// remove more menu dropdown
elgg_unregister_plugin_hook_handler('prepare', 'menu:site', 'elgg_site_menu_setup');
/*elgg_unextend_view('page/elements/header', 'search/header');
elgg_unregister_menu_item('footer', 'report_this');
*/
/*// Extend footer with elgg link
$href = "http://elgg.org";
elgg_register_menu_item('footer', array(
'name' => 'elgg',
'href' => $href,
'text' => elgg_echo('mobilize:elgg'),
'priority' => 2,
'section' => 'alt',
));
*/
if (elgg_is_logged_in()) {
if (elgg_is_active_plugin('dashboard')) {
elgg_register_menu_item('topbar', 'dashboard');
elgg_register_menu_item('site', array(
'name' => 'dashboard',
'href' => '/dashboard',
'text' => elgg_echo('dashboard'),
));
}
$user = elgg_get_logged_in_user_entity();
elgg_register_menu_item('footer', array(
'name' => 'logout',
'href' => '/action/logout',
'is_action' => TRUE,
'text' => elgg_echo('logout'),
'priority' => 100,
'section' => 'alt',
));
elgg_register_menu_item('footer', array(
'name' => 'usersettings',
'href' => "/settings/user/$user->username",
'text' => elgg_echo('settings'),
'priority' => 101,
'section' => 'alt',
));
elgg_unregister_menu_item('topbar', 'friends');
elgg_register_menu_item('site', array(
'name' => 'friends',
'text' => elgg_echo('friends'),
'href' => "/friends/$user->username",
));
if (elgg_is_active_plugin('profile')) {
elgg_unregister_menu_item('topbar', 'profile');
elgg_register_menu_item('site', array(
'name' => 'profile',
'text' => elgg_echo('profile'),
'href' => "/profile/$user->username",
));
}
if (elgg_is_active_plugin('messages')) {
elgg_unregister_menu_item('topbar', 'messages');
$num_messages = (int)messages_count_unread();
if ($num_messages != 0) {
$text .= "<span class=\"messages-new\">$num_messages</span>";
}
elgg_register_menu_item('site', array(
'name' => 'messages',
'href' => 'messages/inbox/' . elgg_get_logged_in_user_entity()->username,
'text' => elgg_echo('messages') . $text,
));
}
}
if (elgg_is_admin_logged_in()) {
elgg_register_menu_item('footer', array(
'name' => 'administration',
'href' => 'admin',
'text' => elgg_echo('admin'),
'priority' => 102,
'section' => 'alt',
));
}
}
@shehbaz Try it:
instead of:
new one method is showing internal server error or white page error
thanks for reply
Is it possible to change background and font color on walled garden cause i have my site restricted and looks fine on desktop but comes out different on mobile!!!
@LT You should use a css inspector to find the elements you want to change.
In this case you want to make changes to .../css/walled_garden.php
How would I prevent "team webgalli" chat 1.6.1 plugin from loading on mobilize??
Chat plugins have been discussed before, check out the previous comments. For example here,
http://community.elgg.org/plugins/847027/2012.11.14/mobilize-mobile-plugin
I had seen that page but it was for bottom bar plugin but next page had the FreiChat plugin by Team Webgalli! Thanks I had over looked that section. THANKS!
Any opion on maybe a toolbar icon for uploads beside profile icon or message icon?
@ LT Not planning to change the menus.
Will there be a theme similar to the one made for elgg 1.9 mobile. Cause was testing out demo page and format is great and works alot better?
@LT On the contrary, mobilize is made so that it leaves your current theme shine through. The responsive layout that comes with elgg 1.9 is also a theme, it changes colors padding, fonts, etc.
OH! Well that theme available for 1.8 or is it excusive to 1.9 and any date on release so looking forward to it..! Nice work!
@LT It's included in 1.9. You can follow the release schedule here but I think a 1.9 rc is getting close,
https://github.com/Elgg/Elgg/issues/milestones
I added a a new menu link from the Appearance/menu items/add a custom menu item!
And works fine on desktop view but under mobilize it doesn't display the new menu link?
@LT Open start.php and comment out this line,
elgg_unregister_plugin_hook_handler('prepare', 'menu:site', 'elgg_site_menu_setup');
Got it working but it also shows the "more" link is it possible t remove that if not its ok!
@LT Try this in mobile css,
.elgg-menu-site option[value="#"] {
display: none;
}