Creating photo albums with Wordpress on an existing site - upload

I'm looking for a solution to a particular query. I've got a website that I have made for a client and I coded my own image uploader/thumbnail creator but it's not handling what he wants very well.
So basically I'm looking for alternatives, and someone suggested using Wordpress and one its plugins to help upload albums. This seems straight forward after a bit of reading. But can I integrate it with my current set up:
A user logs into their account on the site (I've set up user accounts in a DB),
They see which albums are associated with this account.
They open the album and the images appear.
So I guess what I'm asking is, how configurable is wordpress to fit in with my current set up. I need to be able to only display albums related to the logged in user to them.
Tbh if my current way worked consistently (the upload/thumbnail creation is all done in PHP), I would prefer to use that, but this has gone on for a while and I just want to give him a clean solution.

You can consider to use this wordpress plugin:
http://wordpress.org/extend/plugins/nextgen-gallery/

Related

Rails app for food truck, using twitter to update the google map.

So I am writing a rails application for my friends food truck business.
The functionality that I am trying to create with this specific application is the ability for him to update the google map by posting a Geo-location tag on twitter.
A lot of the ruby gems that deal with google maps seem to be depreciated so I'm a bit lost at the moment. If anyone could just point me in the correct direction I would appreciate it.
I realize that this feature is just a quality of life feature but id like to be able to do it with embedded ruby and not have to break out the JavaScript (ugh). Ideal this kind of automation would be great for this particular type of website because my friend won't always have access to the back-end of the website when he is on the move. (Already able to update a map from an admin backend but its not good enough for a business that moves multiple places in a given day.)
anyways, thanks in advance. (if anyone wants me to post any of my code I will.)
So after reading your question, I thought it would be fun to tinker with the Twitter API again since I haven't used it in a while.
I went ahead and created a sample application for you that basically does what you were asking for. It looks for recent tweets from a user, grabs the latest one, then updates a Google map with a marker on that location.
Keep in mind that this was quickly thrown together, so it's far from perfect. But all the concepts should be there!
Feel free to reach out if you have any questions about the app or anything else. I'm always happy to help.

Rails - Dynamic vs static application for an e-learning platform

I am about to start developing an e-learning platform where users will be able to watch educational videos for school curriculums and take quizes and so on. The part im not sure about is how exactly should i go about creating each course on the website. Should I create it as a static page where all the content is added manually through code for each course and each video, or should i make it as a CMS whereby each video for each course is uploaded through an upload form and then displayed (using paperclip for example)? Can someone explain to me which is the best approach and why? Baring in mind that video uploading will not be on the user's part, only I will be uploading and adding content to the website.
You should go the CMS way, because it will make your life easier. By generating a lot of static pages, you will see that there are things you want to reuse at another point and then you have to code them another time. With a CMS you can predefine objects like a survey or video content, so that the admin or course leader can use these things in a more efficient way. Mostly, admins aren't techies, so they would be thankful for such a CMS.
This is also important for the following development. Let me give you an example:
You created hundrets of surveys, but then somebody discovers a bug. You need to change your code in too much places. While generating only one model of a survey means also only one fix.

Google+ Authorship: #REL, GET Parameters and Redirects

I recently decided to start to take advantage of rich snippets to improve my personal website's content for the search engines and, IMHO most importantly, the site readers – hi, Mam! ;-). One of these are Google Authorship. Personally, I think the idea behind Google Authorship is a sound one: it helps to brings a sense of identity, personality and – arguably, most importantly – credibility to what is still largely an anonymous web.
Normally, I would link my article to Google Authorship using the following line of HTML:
<A REL="author" HREF="https://plus.google.com/112431363835029530079?rel=author">Jordan Clark</A>
However, in the instance of a website that publishes articles that are written by multiple authors, manually entering each another’s Google+ UID string starts to become a tiresome process.
Is is valid to do the following:
(a) Link to the author like so, using the script "author.php" (or other type of server-side script).
<A REL="author" HREF="/author.php?by=Alice&rel=author/[UID]?rel=author">Alice</A>
(b) The file "author.php" scripts simply do a quick check for Alice's (or whoever) User ID string provided by Google, and then uses a simple HTTP redirect header to pass this data to Google.
What I would like to know is:
Is it okay to use a local script to redirect to your Google+ user profile? (i.e. will it affect the PageRank of already indexed page or have any other unforeseen negative effects on new and indexed pages?)
Why do I not see more people linking with Google’s “prettified” version:
http://profiles.google.com/clarky.y2k?rel=author
Are there any drawbacks to using the “prettified” version of this method?
Ideally, I would like to use the intermediate PHP script, as I have already described above (see part 1). However, any tips, suggestions or other ways you may have implemented on your websites are very welcome!
For item (1), you can maintain your own app's profiles (author.php in your case) for your authors. On your own app's profile page (author.php), you would add a link from that page to Google and specify the rel="me" attribute on that link. So Alice's profile page might say something like "Find Alice on Google+.
This indirect authorship linking is supported. You also will need the link from Alice's Google+ profile that lists her as a contributor to your site. Once the linking is setup in both directions, authorship can start to show up. Authorship won't always display in all cases and can take some time for it to start appearing as Google would need to reindex your pages.
For item (2), I don't think the profiles URL will enable authorship. Some people use that URL as a vanity URL, but as far as I know it isn't supported for use with things like authorship, badges, etc.
You should test if your redirects are followed using the Rich Snippets Testing Tool: http://www.google.com/webmasters/tools/richsnippets
rel="author" is no longer supported.

Tracking users' clicks and page visits in Rails

I would like to monitor users' page visits and clicks in my Rails app to make recommendations. My questions are:
Is there a Rails gem for this, or Google Analytics is the standard? If latter is true, then how should I link a page visit to a particular user profile?
It is typical in Rails to have a section in application.html.erb, which is shared for all pages. If I add Google Analytics pageview tracking code to in application.html.erb, will it be able to track all individual pages?
There are other ways, but the vast majority probably use Google Analytics. Several gems exist that help you integrate with GA to get at the data. See here: https://www.ruby-toolbox.com/categories/Web_Analytics.
Based on your first question, it seems you may want more insight than GA can provide. I've used ClickTale (http://www.clicktale.com) and Woopra (http://www.woopra.com) before, to good effect. This article lists several other alternatives, too - notice the high marks for Clicky: http://imimpact.com/web-stats-alternatives-to-google-analytics/.
Google Analytics (and almost all of these others) will take care of your second question automatically whenever the user loads a new page, since it keyed by URL. That means that, although you put the GA script code in a single place, each unique page is tracked individually.
If you have AJAX requests that change that page without changing the URL, you'll need to dig in to the GA script API. Essentially you'll need to push a new url (possibly with a # in it) whenever you want to track an AJAX-driven link/button click. See here: http://davidwalsh.name/ajax-analytics
I am biased, but I would recommend checking out impressionist, if you need to integrate the page views into the app in real-time. With analytics you will always have some lag time and you are also relying on an external dependency. Impressionist is good if you need this kind of control, but if you are just looking for simple metrics and don't need to pull them into the app, then analytics is probably the way to go.
Check out Ahoy, at https://github.com/ankane/ahoy. With just a few lines of code in your app, you can track page views and tie them to user accounts.
You can further customize Ahoy to track custom events, both the client (with JavaScript) and server.
Ahoy does not depend on any third-party services.

Is it OK to use Twitter and Facebook profile images without storing them in my server?

Currently I'm using Facebook connect and Twitter oauth to authenticate users. and I'm using their profile image urls directly instead of storing them on my server. I guess it's better to save the thumbnails and think eventually may need to do that, but for now am trying to save as much money as possible. (I'm currently using Heroku to host my project and can't store files unless I use S3 or the likes, which would cost me money)
I'm wondering if this is OK, and if most web apps start out this way. Or if I need to store the images.
Also, now I want to let users set up accounts without Twitter or Facebook. In this case, is there a way to use a "third party thumbnail hosting site" (I don't even know if such a thing exists) for free instead of using S3? It can even be a short term hack, since I plan to eventually implement image storage if this gets traction.
I think not storing them is the best way. If someone changes their picture, you always show the latest this way, if you stored them, well then you would have an old version of their picture after time which could make your app look stale.
As for where to store alternatives, I would really consider s3. It is very cheap storage, and thumbnails won't need a lot of space. It would only get expensive if you had a LOT of users, and if you have a LOT of users, you should be able to afford the storage.
Also, have you looked at Gravatar? A lot of people have those linked to their email addresses, it might be another good way to get their picture. http://en.gravatar.com/site/implement/

Resources