Welcome to Geeklog, Anonymous Sunday, September 01 2024 @ 12:59 am EDT
Geeklog Forums
Touch2 - Geeklog Hacks for Smartphone
Status: offline
ivy
Forum User
Full Member
Registered: 11/25/04
Posts: 314
Location:Tokyo Japan
Touch2 , Geeklog hacks for smartphones ver. 0.8 is now available for download.
http://www.geeklog.net/article.php/Touch2-Geeklog-Hacks-for-Smartphone
You can see it works on the Geeklog japanese or im-ltd site by accessing on iPhone or Android phones (or any other browsers, emulating UA to iPhone or Android).
http://www.geeklog.jp
http://im-ltd.ath.cx/
This hacks display pages optimized for smartphones, using jQuery Mobile ver. 1.0.
- This version does not need lib-common.php hack.
Geeklog Japan https://www.geeklog.jp
http://www.geeklog.net/article.php/Touch2-Geeklog-Hacks-for-Smartphone
You can see it works on the Geeklog japanese or im-ltd site by accessing on iPhone or Android phones (or any other browsers, emulating UA to iPhone or Android).
http://www.geeklog.jp
http://im-ltd.ath.cx/
This hacks display pages optimized for smartphones, using jQuery Mobile ver. 1.0.
- This version does not need lib-common.php hack.
Geeklog Japan https://www.geeklog.jp
17
13
Quote
Status: offline
ivy
Forum User
Full Member
Registered: 11/25/04
Posts: 314
Location:Tokyo Japan
We have no idea not to display html layout first, sorry.
Geeklog Japan https://www.geeklog.jp
Geeklog Japan https://www.geeklog.jp
10
10
Quote
Status: offline
im-ltd
Forum User
Newbie
Registered: 07/19/11
Posts: 2
Location:Chiba, Japan
Thank you for trying, Laugh.
This is caused by the Geeklog policy. Geeklog 1.8 bundles jQuery, and it is loaded by calling
$_SCRIPTS->setJavaScriptLibrary('jquery')
This makes code like
<script src="http://example.com/javascript/jquery-1.6.4.min.js"></script>
in footer.thtml. jQuery Mobile must be loaded after jQuery. Till html is loaded and rendered befor jQuery Mobile works. So, you see raw html page for a while.
You can avoid this problem by loading jQuery and other scripts in header.thtml(older way).
But this may make other problems. I think, perhaps plugins based on Geeklog 1.8 way(using $_SCRIPTS) will not work...
If you want, you can try below.
1.Add code below before </head>tag in header.thtml.
<link rel="stylesheet" href="{layout_url}/style.css" />
<link rel="stylesheet" href="{layout_url}/custom.css" />
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script>
function setCookie(key, val) {
document.cookie = key + "=" + val + ";path=/";
}
jQuery(document).bind("mobileinit", function(){
jQuery.mobile.ajaxEnabled = false;
jQuery.mobile.hashListeningEnabled = false;
});
function mob_show_date() {
d = jQuery('#admin-storyeditor-publish_month').val() + '/' +
jQuery('#admin-storyeditor-publish_day').val() + '/' +
jQuery('#admin-storyeditor-publish_year').val();
jQuery('#mob_admin_date span.ui-btn-text').html(d);
}
function mob_show_time() {
d = jQuery('#admin-storyeditor-publish_hour').val() + ':' +
jQuery('#admin-storyeditor-publish_minute').val();
jQuery('#mob_admin_time span.ui-btn-text').html(d);
}
function mob_init_date() {
d = jQuery('#admin-storyeditor-publish_month').val() + '/' +
jQuery('#admin-storyeditor-publish_day').val() + '/' +
jQuery('#admin-storyeditor-publish_year').val();
jQuery('#mob_admin_date').html(d);
}
function mob_init_time() {
d = jQuery('#admin-storyeditor-publish_hour').val() + ':' +
jQuery('#admin-storyeditor-publish_minute').val();
jQuery('#mob_admin_time').html(d);
}
jQuery('#home').live('pagecreate', function() {
if(jQuery('#mob_admin_date').length > 0) {
mob_init_date();
}
if(jQuery('#mob_admin_time').length > 0) {
mob_init_time();
}
jQuery('.mob_date_selector').change(function(){
mob_show_date();
});
jQuery('.mob_time_selector').change(function(){
mob_show_time();
});
jQuery('div#menu h3, div#submenu h3').click(function() {
var position = $(this).position();
jQuery.mobile.silentScroll(position.top);
});
jQuery('div#menu h3, div#submenu h3').live('tap', function() {
var position = $(this).position();
jQuery.mobile.silentScroll(position.top);
});
});
</script>
<script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
2. Comment out line 10 to 14 and line 18 to 80 in functions.php
Quote by: Laugh
Thanks for the info Ivy.
I checked this out on Android and it is a neat hack. Is there any chance of them figuring out how to stop the html displaying first?
This is caused by the Geeklog policy. Geeklog 1.8 bundles jQuery, and it is loaded by calling
Text Formatted Code
$_SCRIPTS->setJavaScriptLibrary('jquery')
This makes code like
Text Formatted Code
<script src="http://example.com/javascript/jquery-1.6.4.min.js"></script>
in footer.thtml. jQuery Mobile must be loaded after jQuery. Till html is loaded and rendered befor jQuery Mobile works. So, you see raw html page for a while.
You can avoid this problem by loading jQuery and other scripts in header.thtml(older way).
But this may make other problems. I think, perhaps plugins based on Geeklog 1.8 way(using $_SCRIPTS) will not work...
If you want, you can try below.
1.Add code below before </head>tag in header.thtml.
Text Formatted Code
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" /><link rel="stylesheet" href="{layout_url}/style.css" />
<link rel="stylesheet" href="{layout_url}/custom.css" />
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script>
function setCookie(key, val) {
document.cookie = key + "=" + val + ";path=/";
}
jQuery(document).bind("mobileinit", function(){
jQuery.mobile.ajaxEnabled = false;
jQuery.mobile.hashListeningEnabled = false;
});
function mob_show_date() {
d = jQuery('#admin-storyeditor-publish_month').val() + '/' +
jQuery('#admin-storyeditor-publish_day').val() + '/' +
jQuery('#admin-storyeditor-publish_year').val();
jQuery('#mob_admin_date span.ui-btn-text').html(d);
}
function mob_show_time() {
d = jQuery('#admin-storyeditor-publish_hour').val() + ':' +
jQuery('#admin-storyeditor-publish_minute').val();
jQuery('#mob_admin_time span.ui-btn-text').html(d);
}
function mob_init_date() {
d = jQuery('#admin-storyeditor-publish_month').val() + '/' +
jQuery('#admin-storyeditor-publish_day').val() + '/' +
jQuery('#admin-storyeditor-publish_year').val();
jQuery('#mob_admin_date').html(d);
}
function mob_init_time() {
d = jQuery('#admin-storyeditor-publish_hour').val() + ':' +
jQuery('#admin-storyeditor-publish_minute').val();
jQuery('#mob_admin_time').html(d);
}
jQuery('#home').live('pagecreate', function() {
if(jQuery('#mob_admin_date').length > 0) {
mob_init_date();
}
if(jQuery('#mob_admin_time').length > 0) {
mob_init_time();
}
jQuery('.mob_date_selector').change(function(){
mob_show_date();
});
jQuery('.mob_time_selector').change(function(){
mob_show_time();
});
jQuery('div#menu h3, div#submenu h3').click(function() {
var position = $(this).position();
jQuery.mobile.silentScroll(position.top);
});
jQuery('div#menu h3, div#submenu h3').live('tap', function() {
var position = $(this).position();
jQuery.mobile.silentScroll(position.top);
});
});
</script>
<script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
2. Comment out line 10 to 14 and line 18 to 80 in functions.php
12
12
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1468
Location:Canada
Hmmm ... I see your problem.
I am currently working on adding sub topics and allowing stories to have multiple topics in Geeklog 1.9.0 so I do not have any extra time at the moment to work on improving the scripts library.
I am open to ideas for improvements to the scripts library. If you (or anyone else) come up with ideas or a patch that addresses your problems with the script library while still keeping everything else compatible I am more than willing to look at it and add it to core if everything is okay with the patch (code, testing, etc).
Tom
One of the Geeklog Core Developers.
I am currently working on adding sub topics and allowing stories to have multiple topics in Geeklog 1.9.0 so I do not have any extra time at the moment to work on improving the scripts library.
I am open to ideas for improvements to the scripts library. If you (or anyone else) come up with ideas or a patch that addresses your problems with the script library while still keeping everything else compatible I am more than willing to look at it and add it to core if everything is okay with the patch (code, testing, etc).
Tom
One of the Geeklog Core Developers.
18
9
Quote
All times are EDT. The time is now 12:59 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content