Is there a way to let a pictures add-on navigate across page breaks? - xbmc

I am currently trying to create a Kodi add-on that provides pictures to the user. From what I understand from the Kodi programming instructions this is done by providing a set of links with a title from a Python script.
The pictures I want to provide are online, i.e. I need to fetch the URL and the title for each picture via an API. Since the total number of pictures is somewhat above 1000 and I can only get the title for each picture with a separate request, I would like to limit the number of entries I display and provide the user with paging as I have seen several other add-ons do.
However, the downside to this approach seems to be that when you are looking at a picture and navigating via the right/left arrow keys to next/previous picture, Kodi will not be able to load the next page. Instead, it will only cycle through pictures on the current page.
Is there a way to avoid this, i.e. to tell Kodi to load the next page once it reaches the end of the current page?

Related

How to develop a button for followers of a web site

I apologize for my English it is not very good.
I am developing a website that will have own followers.
I need to create a button by followers such as facebook, twitter or google plus buttons.
Thank you for any information that will allow me to begin to develop the button next to the platform.
Thank you
First, your English is fair enough. For creating your own follow button you will have to have an image that will be displayed on your website. When someone clicks on that button, your webapp should be able to know who clicked it and your should be able to remember that user in future as well. So first you will have users to register on your website (like facebook and twitter) for unique identification of each user.
Next, for remembering that a particular user is following your website you need to persist some information about that user. The obvious approach is having a database table to store the information. For instance you can have IS_FOLLOWING column in your USER table
But there are some considerations. First, the user must remain on the same page or be able to continue his activity even after cicking the follow button. For example, if the user is filling some form then his data should remain intact even after clicking the follow button. If the user is directed to some other page, he might lose information.
Second, database operations are costly. So you need to use them wisely.
One approach that I could think of is having AJAX do the work. If you want to learn AJAX you can visit this website and for AJAX database operations this one will be helpful.
Ajax will do all the work in background and both the problems mentioned above will be addressed. I hope this was helpful.

Google Analytics in footer file

I have a question about how Google Analytics tracks pages in a Wordpress site or any other site that uses a template file to include the code for Google Analytics in the footer or header. Since the file is generated and used in all the pages, that would mean that the analytics code is counting all the pages that are viewed correct? Also, is it possible to view what pages are getting hits and have a more detailed report in Google Analytics? I just have a feeling that the page i'm tracking is displaying inaccurate reports since the same code is used on every page. Can anyone help clear this up and educate me a bit on this topic?
The code is always the same, it loads in the footer so you dont have to put it on every single page.
in the code there is a unique code for your website so analytics knows wich analytics account needs to get the information.
The code dosn't need to be changed everypage.
You can see the pageviews like this:
-->google analytics
--->contents
-->Site content
-->all pages
Now you get a list with urls and the page view for every url
You can sort the list by pageviews (how many times is the page loaded) and unique page views(How many uniqe ip addresses have visited the page.).
You can also find bounce rate wich shows how many % of the users left you site on that page.

Facebook like button - how to prevent activity stream from getting into the user's wall?

Can someone please help me out as to how I can completely prevent the user's activity stream from posting back into their wall after they liked a linked? Because, I really find that to be annoying. Afterall, mine is an application that needs to be integrated into an image gallery viewer serving more than 7.5K photos each with its own like button.
If this seems impossible, is there a way to specifically set an image as thumbnail, description, etc as is with the cases of feed and send buttons?
Because, my application is purely dynamic in nature built out of 100% Javascript where more than 80% of its contents are generated by using Ajax calls under a static single URL.
As a result, the like button activity stream always end up pulling the wrong image and descriptions than desired(but this is not so for feed and send buttons),
Thank you
No, you won't have control over not sending items to peoples activity feeds when they click like, unless your domain gets blocked for spam. You would need to create a dynamic url or hashbang url for each independent image and when those images are requested the page hosting it would need to have the proper open graph meta tags sets for thumbnail image, description, etc. Then for each like button in the gallery, you would need to set the href property to this url.

Help with design a facebook integration for my website.. App or Page?

I´m building a website to post my own videos using JW Player running my own ads as overlay.
www.planetsnowmobile.com
All my videos will be
Instead of register my own users, having my own forum etc etc I want to use facebook to interact with my visitors:
Individual discussions/comments on individual films instead of my own comment/forum-function
facebook-like-button for individual films (so induvidual like buttons for individual films)
Share induvidual films
Grab location from every unique visitor
Where do I start?
Do I need to create an application or should I use a Facebook "page"?
Maybe both?
I see that i can add an application to a "page" but what does that really do? How do I use that?
What would be the best way for me to do this?
I already have a Facebook "page" for my website and I just created an App as well.
Which one should I use?
Do I need both?
What is the difference?
I know that I can create a like button for a website address on http://developers.facebook.com/docs/reference/plugins/like/
But can I monitor that like button from example an application if I can connect them somehow?
Is that something I want to do?
My Facebook-page already have a user-base where my Facebook-application does not.. is my best option to delete my "page" and start all over with my "application"?
App is their encompassing term for any application that uses their API, this could be on Facebook or on your own personal website - these require an API key to make authenticated calls for users. Pages are FB's own in-Facebook content that users have created, like page for a business located at facebook.com/mybusiness. It sounds like you already have a website and want to add Facebook functionality to it, so you don't want to make another Page. You may not even need to create an App. Things like comment boxes and like buttons can be dropped in as stand-alone copy-and-paste widgets. You can track the like button by enabling FB insights for your website.
So like you noticed you can add a like button to your page using the social plugin from http://developers.facebook.com/docs/reference/plugins/like/ - similar to the like button you can add comment boxes with the plugin at http://developers.facebook.com/docs/reference/plugins/comments/
You can track the results from these plugins by adding your website to Facebook's analytics (Insights) at http://www.facebook.com/insights/
Most of these things are powered by the opengraph metadata in the headers of your website's pages. You can read up on what tags FB uses here http://developers.facebook.com/docs/opengraph/
Everything at http://developers.facebook.com/docs/plugins/ can be used without an application or page ID, and is very good about being responsive to the page they are hosted on: you can add a like button to your video view template without a defined URL in the like button's parameters, and it will automatically direct any likes to the url of the currently viewed video.
You could also direct a like button to point to your existing FB Page, in which case any likes collected from it would be added to the Page's total. Most companies that have a home-page like button do this, so their likes all accumulate to a single total for their business.
Hope that helps.

Django - Preview uploaded picture prior to deciding to save

Like the title suggested, I want to implement a two-steps picture uploading mechanism.
User selects a picture to upload and
click on "Upload". Once the server
receives the request that contains
the picture, it would save the
picture in a temporary location, on
disk or memory, and the resize it to
a standard size, if needed. The
server then renders a new response
for the user to preview the uploaded
picture.
After previewing the picture, the user needs to click on "Save" to confirm for the server. The server then moves the picture from the temporary location to a permanent one and updates the corresponding entry in the DB.
What's a good way to implement this? What are some of the apps out there that might be able to help me? Thanks.
I would suggest either rolling your own (you might find it surprisingly easy, start with reading the docs on forms) or customizing django-photologue or django-filebrowser.