Page 4 of 5

Re: GReader-Like Mobile Version

Posted: 05 Apr 2013, 06:15
by G2TT-mobile
ReineW wrote:Can't get the latest update to work, no categories are visible...?


Are you running TT-RSS 1.7.6? It was just released this week and is required for the new changes I made. I initially had to reload a few times before I got categories to show on my phone (but it worked first try on my computer). Maybe changing some options and such to get cookies to reset?

ReineW wrote:* The class="Load-more-message hidden">load more items..., will you continue to work on that? I miss that function.


This is likely the next thing I'll do.

ReineW wrote:* Maybe add a search function?


Not high on my priority as I have never used Google's search, but what are you hoping to search? Titles, excepts, content, category or feed names?

Re: GReader-Like Mobile Version

Posted: 05 Apr 2013, 20:04
by ReineW
G2TT-mobile wrote:
ReineW wrote:Can't get the latest update to work, no categories are visible...?


Are you running TT-RSS 1.7.6? It was just released this week and is required for the new changes I made. I initially had to reload a few times before I got categories to show on my phone (but it worked first try on my computer). Maybe changing some options and such to get cookies to reset?

ReineW wrote:* The class="Load-more-message hidden">load more items..., will you continue to work on that? I miss that function.


This is likely the next thing I'll do.

ReineW wrote:* Maybe add a search function?


Not high on my priority as I have never used Google's search, but what are you hoping to search? Titles, excepts, content, category or feed names?


I'm running 1.7.8, and now i have tried it again after i removed the cookies, and now i see the categories as before but not the specific feeds under the category. When i click a category i get all the feeds of that category mixed in one long list. I would like to, just like in google reader, be able to choose a specific feed that is in a category and read only that feed.

Great, looking forward to it.

With search i mean that in google reader's menu there is a search function, and there you can search for both content and feed names, maybe more, and there is a search function in tt-rss that seems to search for content only. It would be nice to be able to search for title and content.

Re: GReader-Like Mobile Version

Posted: 05 Apr 2013, 20:21
by G2TT-mobile
ReineW wrote:
G2TT-mobile wrote:I'm running 1.7.8, and now i have tried it again after i removed the cookies, and now i see the categories as before but not the specific feeds under the category. When i click a category i get all the feeds of that category mixed in one long list. I would like to, just like in google reader, be able to choose a specific feed that is in a category and read only that feed.


Ah, okay. I added SubCategory support in case you had nested categories. I did not add individual feed support, so it sounds like you are seeing it as currently intended. Individual feed support should be easy enough to add (I even have stub code for it in the current version).

Re: GReader-Like Mobile Version

Posted: 07 Apr 2013, 04:06
by kproth
Hey G2TT-mobile: I like what you've done with the gmobile-ttrss app, but I sure missed the Full Text option that j0nson's version had. So I tried to add it back, on top of the latest gmobile-ttrss.zip version that's posted on this forum. Would you consider patching these changes into your version?

Code: Select all

@@ -91 +91 @@
-<link rel="apple-touch-icon-precomposed" href="/tt-rss/m/apple-touch-icon-precomposed.png" />
+<link rel="apple-touch-icon-precomposed" href="./apple-touch-icon-precomposed.png" />
@@ -211,2 +211 @@
-               $(this).toggleClass('read-state-read').toggleClass('read-state-unread');
-               toggleRead($('.expanded').attr('id'),'<?php echo $sessionID; ?>');
+               toggleRead($(this).attr('read-state-id'),'<?php echo $sessionID; ?>');
@@ -274,2 +273,9 @@
-       $('.expanded').removeClass('expanded');
-       $('#'+id).addClass('expanded');
+       <?php
+       if ( $pref_textType == "content" ){
+               print "\n";
+       }else{
+               print "$('.expanded').removeClass('expanded');\n";
+       }
+       ?>
+       if(!$('#'+id).hasClass('expanded'))
+               $('#'+id).addClass('expanded');
@@ -286 +292,5 @@
-
+       if(!$('#markread_'+id).hasClass('read-state-read')){
+               $('#markread_'+id).addClass('read-state-read');
+               $('#markread_'+id).removeClass('read-state-unread');
+       }
+
@@ -295,0 +306 @@
+       $('#markread_'+id).toggleClass('read-state-read').toggleClass('read-state-unread');
@@ -629,0 +641,2 @@
+                       <li><div class="menuImg" id="showTextType"></div><a onclick="menu('showTextType_<?php echo $pref_textType; ?>');">Full&nbsp;Text</a></li>
+                       <div class="goog-menuseparator" style="-webkit-user-select: none;margin-top: 8px;margin-bottom:-5px;" role="separator" id=":y"></div>
@@ -651,2 +664,6 @@
-       if ($item['unread'] == true){
-               print "<div class='entry-row whisper' id='".$item['id']."'>\n";
+       if ($pref_textType == "content"){
+               if ($item['unread'] == true){
+                       print "<div class='entry-row whisper expanded' id='".$item['id']."'>\n";
+               }else{
+                       print "<div class='entry-row whisper read expanded' id='".$item['id']."'>\n";
+               }
@@ -654 +671,5 @@
-               print "<div class='entry-row whisperi read' id='".$item['id']."'>\n";
+               if ($item['unread'] == true){
+                       print "<div class='entry-row whisper' id='".$item['id']."'>\n";
+               }else{
+                       print "<div class='entry-row whisper read' id='".$item['id']."'>\n";
+               }
@@ -694 +715,6 @@
-       print "<span class='read-state-read read-state link unselectable' title='Mark as read'>Mark as read</span>\n";
+       print "<span id='markread_".$item["id"]."' class='read-state-";
+       if ($item["unread"] == true)
+               print "unread";
+       else
+               print "read";
+       print " read-state link unselectable' title='Mark as read' read-state-id='".$item["id"]."'>Mark as read</span>\n";


Also - I'm running FireFox 19 at the moment, and the "preference" icons don't seem to work. Is that a known issue on other browsers? The menu seems fully-functional, it just doesn't show any difference between a "selected" option and an unselected option...

Thanks!

Re: GReader-Like Mobile Version

Posted: 07 Apr 2013, 06:03
by kproth
kproth wrote:I'm running FireFox 19 at the moment, and the "preference" icons don't seem to work.

OK, so I tracked down my own problem. Seems that FireFox needs to see the units of measure (i.e. "px") on the background-position CSS values. Here's a second patch that adds a fix for this. It also refines slightly the behavior related to mark-read and next-item, to account for having everything expanded by default.

Code: Select all

@@ -227,2 +227,2 @@
-               $('#showCatAllImg').css('background-position', '-10 -275');
-               $('#showCatUnreadImg').css('background-position', '10 -275');
+               $('#showCatAllImg').css('background-position', '-10px -275px');
+               $('#showCatUnreadImg').css('background-position', '10px -275px');
@@ -238,2 +238,2 @@
-               $('#showCatAllImg').css('background-position', '10 -275');
-               $('#showCatUnreadImg').css('background-position', '-10 -275');
+               $('#showCatAllImg').css('background-position', '10px -275px');
+               $('#showCatUnreadImg').css('background-position', '-10px -275px');
@@ -401 +401 @@
-       background-position: -140 -30;
+       background-position: -140px -30px;
@@ -404 +404 @@
-       background-position: -160 -30;
+       background-position: -160px -30px;
@@ -413 +413 @@
-       background-position: -32 -272;
+       background-position: -32px -272px;
@@ -422 +422 @@
-       background-position: -35 -240;
+       background-position: -35px -240px;
@@ -478 +478 @@
-       background-position: 10 -275;
+       background-position: 10px -275px;
@@ -549 +549 @@
-       print "#showFeedStarred{background-position: -10 -275;}\n";
+       print "#showFeedStarred{background-position: -10px -275px;}\n";
@@ -551 +551 @@
-       print "#showFeedShared{background-position: -10 -275;}\n";
+       print "#showFeedShared{background-position: -10px -275px;}\n";
@@ -553 +553 @@
-       print "#showFeedFresh{background-position: -10 -275;}\n";
+       print "#showFeedFresh{background-position: -10px -275px;}\n";
@@ -555 +555 @@
-       print "#showFeedAll{background-position: -10 -275;}\n";
+       print "#showFeedAll{background-position: -10px -275px;}\n";
@@ -559 +559 @@
-       print "#showArticleAll{background-position: -10 -275;}\n";
+       print "#showArticleAll{background-position: -10px -275px;}\n";
@@ -561 +561 @@
-       print "#showArticleUnread{background-position: -10 -275;}\n";
+       print "#showArticleUnread{background-position: -10px -275px;}\n";
@@ -565 +565 @@
-       print "#showTextType{background-position: -10 -275;}\n";
+       print "#showTextType{background-position: -10px -275px;}\n";
@@ -569 +569 @@
-       print "#showCatUnreadImg{background-position: -10 -275;}";
+       print "#showCatUnreadImg{background-position: -10px -275px;}";
@@ -571 +571 @@
-       print "#showCatAllImg{background-position: -10 -275;}";
+       print "#showCatAllImg{background-position: -10px -275px;}";
@@ -641,2 +640,0 @@
-                       <li><div class="menuImg" id="showTextType"></div><a onclick="menu('showTextType_<?php echo $pref_textType; ?>');">Full&nbsp;Text</a></li>
-                       <div class="goog-menuseparator" style="-webkit-user-select: none;margin-top: 8px;margin-bottom:-5px;" role="separator" id=":y"></div>
@@ -645,0 +644,2 @@
+                       <li><div class="menuImg" id="showTextType"></div><a onclick="menu('showTextType_<?php echo $pref_textType; ?>');">Full&nbsp;Text</a></li>
+                       <div class="goog-menuseparator" style="-webkit-user-select: none;margin-top: 8px;margin-bottom:-5px;" role="separator" id=":y"></div>
@@ -678,2 +678,7 @@
-       print "<div class='entry-top-bar' onclick='removeExpanded(\"".$item['id']."\")'>\n";
-       print "<span class='link entry-next' onclick='addExpanded(\"".$data['content'][$key+1]['id']."\");markRead(\"".$data['content'][$key+1]['id']."\",\"".$sessionID."\");'>\n";
+       if ($pref_textType == "content") {
+               print "<div class='entry-top-bar'>\n";
+               print "<span class='link entry-next' onclick='addExpanded(\"".$data['content'][$key+1]['id']."\");markRead(\"".$item['id']."\",\"".$sessionID."\");'>\n";
+       }else{
+               print "<div class='entry-top-bar' onclick='removeExpanded(\"".$item['id']."\")'>\n";
+               print "<span class='link entry-next' onclick='addExpanded(\"".$data['content'][$key+1]['id']."\");markRead(\"".$data['content'][$key+1]['id']."\",\"".$sessionID."\");'>\n";
+       }
@@ -685 +690,4 @@
-       print "<span class='entry-collapse-text'>Collapse</span>\n";
+    if ($pref_textType == "content")
+               print "<span class='entry-collapse-text' onclick='removeExpanded(\"".$item['id']."\")'>Collapse</span>\n
";
+       else
+               print "<span class='entry-collapse-text'>Collapse</span>\n";


I'm also attaching the fully updated index.php.

Re: GReader-Like Mobile Version

Posted: 08 Apr 2013, 17:37
by jonb
When I load G2TT-mobile's latest version, I get the following error at the top of the page:

Code: Select all

Undefined variable: pref_Category_Title in /my-full-path/index.php on line 587


Articles do appear below this and I can click through and see them. However, if I click on the Categories button in the upper left, I see a slew of the following error message repeated under the All Items category:

Code: Select all

Notice: Undefined index: type in /my-full-path/index.php on line 792


Any idea what's causing this? I do have the external API activated.

Re: GReader-Like Mobile Version

Posted: 08 Apr 2013, 18:13
by jonb
I solved the line 587 problem. On line 9 of index.php, $pref_Category_title needs to be $pref_Category_Title (i.e. capital T in Title).

Still baffled by the line 792 error which remains.

Re: GReader-Like Mobile Version

Posted: 09 Apr 2013, 00:14
by ReineW
I just removed the " ['type'] " part on line 792 and no more error message. I think the error is that the variable is not defined?

Re: GReader-Like Mobile Version

Posted: 09 Apr 2013, 10:15
by Bobjespat
I have copied the contents of the Zip to a subdirectory of my TT RSS installation and point my browser to this URL. I get a Login box, logged in with my TT RSS Credentials succesfully, but i get 0 Articles. Must i config something in the script to get it to work?

Edit: Ups. My URL was a https url. Now i switched to a pure http URL and i see the Articles. Is there a way to have this also working via https?

Re: GReader-Like Mobile Version

Posted: 09 Apr 2013, 11:54
by sancho1234
Hi j0nson,

Your mobile patch working for me! Thank you! :)

(My experience: it won't work properly until the another mobile version isn't deleted completely...)

I have a little question: How can I show the date and time of articles? And I would like to add "read" button for every articles separately.

Re: GReader-Like Mobile Version

Posted: 09 Apr 2013, 12:55
by sancho1234
Hungarian translated variation from version 2013-04-01 20:17:27.


Image

Re: GReader-Like Mobile Version

Posted: 09 Apr 2013, 15:56
by justauser
Looks like the get function doesn't check the server port or the https state of the request when building its url. If they add this there should also be an option to have SSL_PEER_VERIFY set to false for self-signed sites.

Re: GReader-Like Mobile Version

Posted: 10 Apr 2013, 11:40
by Bobjespat
maybe this is the reason, why i cant use this mobile version via https, since i use a selfsigned cert.

Re: GReader-Like Mobile Version

Posted: 10 Apr 2013, 18:53
by LifeWOutMilk
bilbo_b wrote:maybe this is the reason, why i cant use this mobile version via https, since i use a selfsigned cert.


You can get a free valid SSL certificate from StartSSL.com btw. It's what I use on my blog.

Edit: Or, you could add the cert to your Android device so that it is trusted.

Re: GReader-Like Mobile Version

Posted: 11 Apr 2013, 12:21
by macfly
+1 for startssl.com

i use certificates from startssl.com since three years without pain. They send reminder, when a cert expires, too. And everything without costs. Just keep in mind that for chrome/firefox/android you need to provide the chain-cert from startssl.com. If you have questions about it, just pm me.

regards,
macfly.