Plugin integration - RSS

This section can be edited only by v2.0 beta testers.

You prefer to see RSS data even if outdated?

Poll ended at Tue Feb 09, 2010 8:32 pm

yes
3
30%
no
7
70%
 
Total votesCOLON 10

User avatar
admin
Site Admin
PostsCOLON 76
JoinedCOLON Thu Feb 04, 2010 11:10 am

Plugin integration - RSS

Post by admin » Thu Feb 04, 2010 8:32 pm

Several comments to notify that they can't have the RSS Plugin to work.

Actually, if you made all the basic verifications like checking if it's enabled and those kind of stuff,
there are lots of possibilities.

Most probable is that the RSS plugin is not very fast, it has lots of data to grab over (a usually) slow connection.
This theme works with the JSON data the plugin sends,
until there is no data sent, there is no data displayed.

What happens on my phone:
when I'm home, my phone is always on (never on standby) and always connected to the wi-fi, RSS works perfectly.
But, if i put it in back screen for more than 10 secs, then i loose the internet connection which causes the plugin to send empty data so that the theme removes any data present.

What i can do:
setting the RSS section a special section, with a special behavior: do not remove the data until there is new data received. This could result in seeing obsolete data lots of time...

you can vote here:

User avatar
DavidPatrick
PostsCOLON 15
JoinedCOLON Thu Feb 04, 2010 9:43 pm

Re: Plugin integration - RSS

Post by DavidPatrick » Thu Feb 04, 2010 10:38 pm

The one problem I see so far is the RSS feed works in that it changes the stories i.e on CNN RSS feed as an example, but the Date and Time show 12/31/69 and the time always shows 6:00pm

User avatar
admin
Site Admin
PostsCOLON 76
JoinedCOLON Thu Feb 04, 2010 11:10 am

Re: Plugin integration - RSS

Post by admin » Thu Feb 04, 2010 10:44 pm

Yup noticed that, and read your previous comment,
sorry i couldn't merge those previous comments here..

well that looks to me as the time the news has been posted on their website.
at least it's the was it works with my feeds for ame235.com:
if i make a post at 2:00pm, it shows 2:00pm, maybe their feeds send a wrong date,
have you checked if the date is the same on a "normal" RSS reader?

User avatar
StarSoft
PostsCOLON 42
JoinedCOLON Thu Feb 04, 2010 10:56 pm

Re: Plugin integration - RSS

Post by StarSoft » Fri Feb 05, 2010 10:22 am

I voted to see old data, ill explain why.
Right now (yes my phone seems to be weird...) when I receive push notifications they don't always get cleared. This can also have to do with the apps I use, and sometimes I receive push notifications I don't need to open the app for, like TV guide or IM+. The thing is when I hide them with the current method and I receive a new one, it will display the old ones again.
What I did is create a mod for your theme (didn't implement it in this version yet) which will allow me to remove separate messages and keep track of which messages are removed. So when I receive a push message I can select that I saw it and it will be cleared.
Then when I receive a new one, it sees I removed a couple of messages and will not show those.
If you make it that the old data is displayed I can use the same method I currently have in Push for the RSS feeds.
This is IF i would use the RSS feed, as my RSS reader has Push and I don't like how the RSS plugin checked at a certain time (as it can drain the battery faster).

So thats my preference.. :)

User avatar
StarSoft
PostsCOLON 42
JoinedCOLON Thu Feb 04, 2010 10:56 pm

Re: Plugin integration - RSS

Post by StarSoft » Fri Feb 05, 2010 10:30 am

Ohh, can only edit posts for a few mind after posting :)
A little offtopic but...
I'm thinking of building that mod for every section in my lockInfo and make it with a Apple delete method (sweep -> show delete button). Sometimes some sections get stuck it seems. Had it a couple of times now that the plugin (or the theme) wont update. So that results of having a SMS or mail stuck in the list which I did already read. See the mod as some sort of overide.
When (if ever) I have it completed I will send it to you Ame235. It will require a bit of more modding as you use the sweep method for the globalHide function (which I dont use).

User avatar
admin
Site Admin
PostsCOLON 76
JoinedCOLON Thu Feb 04, 2010 11:10 am

Re: Plugin integration - RSS

Post by admin » Fri Feb 05, 2010 10:43 am

Maybe we i can adapt that with a simple delete button..
Wou be great o see that code, if i can integrate, it could in fact simplify some things.

User avatar
StarSoft
PostsCOLON 42
JoinedCOLON Thu Feb 04, 2010 10:56 pm

Re: Plugin integration - RSS

Post by StarSoft » Fri Feb 05, 2010 1:53 pm

With a delete button it works fine. I have it now that you press the notification and it will disappear from the list. But this might not be the best solution for everything to prevent accidental deletions, thats why i wanted to add the swipe-and-show-delete-button method :)
I made a small proof-of-concept for it but it has a few flaws.

Anyway... I modified the hide-push notifications function to work with this version.

... The forum wont allow me to post code still :-p
But here it is. Everyone can add it in the lockinfo.js if they want to, and know how to do it as i'm not gone make a guide or help in any way how to implement it.
So only use it when you know what you are doing and where to put it! If you don't know it, too bad, maybe it will make it in the final version.

http://pastie.org/810980

There might be some modifications to be done, especially in the last part to make the code look a little better, but it wont improve functionality.

Feel free to ask questions Ame235 as understanding someone else's code might be hard.

[edit]Oh feel free to use it or adapt it for the RSS feeds or anything else. If you need help let me know.

User avatar
admin
Site Admin
PostsCOLON 76
JoinedCOLON Thu Feb 04, 2010 11:10 am

Re: Plugin integration - RSS

Post by admin » Fri Feb 05, 2010 3:27 pm

I understand it very well ;)
in fact it is really well written!
This does not include swipe and del, correct me if i mistake.

Swipe and del could be used in lockscreen (collapsing all is not that useful) but would be impossible to use in homescreen mode of lockinfo.
BUT, it's a really great idea so what about a confirmation deletion?
lets say, adapting your code, clicking on a push notification would ask for confirm deletion (click instead of swipe) ?

User avatar
StarSoft
PostsCOLON 42
JoinedCOLON Thu Feb 04, 2010 10:56 pm

Re: Plugin integration - RSS

Post by StarSoft » Fri Feb 05, 2010 3:43 pm

Nope its not with the swipe, as the swipe code needs a big adjustment to get that working.
If you make it with the swipe/delete button you don't need the confirmation as noone will accidentally swipe and then press the button. Thats why I wanted that way, and it looks professional like Apple has it :)

All I need is to finish the swipe function. How I did it so far, but it doesn't work 100% yet, it will send a new variable with catchSwipe() which defines if it is a swipe movement or a click, as you use the swipe function also for the normal clicks (to prevent accidental clicking when you mean to scroll up and down i think).

I have the part where the delete button shows up done, only need to find a way to hide the button again when you click somewhere else or scroll the screen. This might be the tricky part as it would have to go through all the elements and find the delete buttons and remove them (not very efficient).

OR...

The delete button gets an ID and we make sure there can only be 1 delete button visible at the same time.
Now I think of it that is the better solution. That way you can easy check if a delete button is on the screen, and delete it when it is.

This would need more adjustment in catchSwipe(), where it will check everytime it is called if the deletebutton-element is available and remove it. Not too hard.

You focus on the things that need to be done, first and add this as a possible update. I'll see if I can get something done this weekend.

User avatar
admin
Site Admin
PostsCOLON 76
JoinedCOLON Thu Feb 04, 2010 11:10 am

Re: Plugin integration - RSS

Post by admin » Fri Feb 05, 2010 4:10 pm

copy that ;)

User avatar
StarSoft
PostsCOLON 42
JoinedCOLON Thu Feb 04, 2010 10:56 pm

Re: Plugin integration - RSS

Post by StarSoft » Sat Feb 06, 2010 10:46 am

And its done! :)
It was a pretty big job to adjust the code, expecially catchSwipe();
I removed the globalHide as I didnt use it and it was easier to get rid of it. Basicaly I didnt bother finding a sollution to keep it in :oops:

I also found a tiny mistake in the code i posted earlier, nothing serious, just something which wasn't needed in the hidePush function and was left behind from the previous version I had.

I won't make a Pastie link as I changed too much to show clearly.
The main change is in catchSwipe() which got a new variable to decide if the function should be ran on a swipe (and which direction) action or not (false=tap).
So everywhere where you used that function you need to change it.
Also I added a couple of functions (2 in functions.js and 1 in lockinfo.js). And the only change in the css is in the bottom, #deleteBtn.

User avatar
Schwarz Bruder
PostsCOLON 5
JoinedCOLON Fri Feb 05, 2010 1:06 am

Re: Plugin integration - RSS

Post by Schwarz Bruder » Sat Feb 06, 2010 1:13 pm

Looks great, the alignment problem seems to be gone too, dunno if that was supposed to happen :-P
I still have the problem with the black dots in the calendar section, but then again, that goes in a different section!

Thanks a lot! :-D

User avatar
admin
Site Admin
PostsCOLON 76
JoinedCOLON Thu Feb 04, 2010 11:10 am

Re: Plugin integration - RSS

Post by admin » Sat Feb 06, 2010 2:41 pm

I tested out your solution, it works really nice !
As we completely loose the "collapse all" on swipe, but there must be a way to do both :p !!

also there needs to be a 50% transp layer on the deleted object underneath the del button.. that would make it much more clear. (shouldn't be hard to add)

i think I'll make lots of trying this WE.. :evil: .

One question though: as you always care about the variables and memory....
when does that "deleted items array" get emptied ? couldn't see it in the code :roll:

User avatar
StarSoft
PostsCOLON 42
JoinedCOLON Thu Feb 04, 2010 10:56 pm

Re: Plugin integration - RSS

Post by StarSoft » Sat Feb 06, 2010 3:30 pm

Schwarz Bruder wroteCOLONLooks great, the alignment problem seems to be gone too, dunno if that was supposed to happen :-P
I still have the problem with the black dots in the calendar section, but then again, that goes in a different section!

Thanks a lot! :-D
That was done in the CSS with a sollution posted elsewhere in this forum. So I didn't do that.

@Ame
I'm not sure what you mean with the 50% layer.
About the deleted items array it is never really deleted until the deleted items are not to be found in the plugin output.
What it does is it compares the plugin output with the hidePushArr and when it is found it is copied to the tempPushArr. After the whole array is checked, tempPushArr is copied over hidePushArr and tempPushArr is removed. So the hidePushArr is always filled with data which is up-to-date and never contains unused data.

Hope it's clear :)

User avatar
admin
Site Admin
PostsCOLON 76
JoinedCOLON Thu Feb 04, 2010 11:10 am

Re: Plugin integration - RSS

Post by admin » Sat Feb 06, 2010 3:34 pm

very clear, and it's ok like that.
for the 50%layer i mean that the "going to be deleted" item under he delete button has to be grayed so that usr understands well what is going to be deleted.

User avatar
StarSoft
PostsCOLON 42
JoinedCOLON Thu Feb 04, 2010 10:56 pm

Re: Plugin integration - RSS

Post by StarSoft » Sat Feb 06, 2010 4:00 pm

Ahh I get it. It could be done by changing the style of the <tr> when the showDelete is called I think. I'll check it out later.

You could possibly add a functionality with catchSwipe(function, arg, "left") so the globalHide can use that I think. But I won't use it :)

BUTTON_POST_REPLY