Multiple like buttons on blog page acting as one button despite separate anchor names - facebook-like

I have added facebook like buttons to each entry on my blog - although I have given each entry it's own URL by including an anchor name, clicking Like on one adds to the like count of all of them. Any advice on how to sort this?
An example of the code is:

Well my initial guess is that Facebook ignores the anchor. You could try passing a parameter, e.g.
www.example.com/myblog.html?entry=1#entry1
www.example.com/myblog.html?entry=2#entry2
Good luck

Related

Optimizely: measure page impressions

I want to include a new link block on my pages. But before I activate it I want to test if it makes sense.
So following Optimizelys Article on Pageview goals I set up a test to measure page view conversions. But obiously I am doing it wrong.
As a simplified example let's assume, all my pages have URLs of the following pattern: www.mydomain.com/page_[0-9]+.htm
(for example www.mydomain.com/page_123.htm).
And my new link will lead the user to another page of the above pattern.
The problem seems to be that Optimizely does not really count the number of pages visited, but instead counts the first visit already as a conversion (given that the URL pattern always matches).
So both my test variations turn out the same results.
What am I doing wrong here?
I found a workaround which seems to do the trick (although not being the perfect solution):
Using Javascript I append #opt (or whatever you like) to the links in question.
And the goal pattern is accordingly changed to www.mydomain.com/page_[0-9]+.htm#opt.
This way...
the first page the visitor visits will not be counted as a conversation (since #opt is missing)
all the other pages on the page won't be counted for the same reason
except the ones that are specifically targeted in my tested links.

Facebook Like Button Cache. Linter useless

Looks like an issue was closed related to the question I'm about to ask, so I wonder if I'm going to be skating on thin ice, but here goes. I feel like even though this is kind of localized by nature, it could be a useful example for other developers dealing with the Like button.
I seem to be having issues regarding the Facebook like button. The infuriating part is that I'm pretty confident I have everything setup properly, and even though the linter says "hey, this all looks kosher!" the like button fails to get the correct content and uses cached info from a different page.
Here's the case: referlocal.com. We serve daily deals, and list them right off the homepage. There can be one of many deals listed on that homepage, so obviously Facebook is seeing just one when it goes to take a peek at the root directory. Now, on the homepage, whatever deal your viewing has a FB Like XFBML tag with href and ref attributes set. Every page that displays a deal also has OG tags pointing directly to the offer view page. Deals can also be viewed on user pages. So, on these three paths:
/
/{username}
/offers/{city}/{title-url-alias}
a like button is included as well as OG tags that point to /offers/{city}/{title-url-alias}. For about 3 weeks, the button worked like a champ. But recently, it's been performing strangely. For any deal, regardless of the 3 locations, it always uses the information cached from the previous days "/" deal. Regardless of the OG tags or origination.
Here's the wildly confusing part. The Facebook Linter is supposed to recache the information on the page, right? Well, it sort of does. It picks up on all of the appropriate information set in the OG tags, but when you click the Like button at the bottom of the page, no dice, still uses the deal FB saw on the homepage from the day before.
I know this is probably killing my argument for localization, but check this out:
http://developers.facebook.com/tools/lint/?url=http%3A%2F%2Freferlocal.com%2Foffers%2Fdallas%2Fget-20-of-authentic-italian-american-cuisine-for-only-10-at-leggios-italian-ristorante-dallas
Regardless of the fact that the linter finds all the appropriate information, the like button at the bottom still is liking a deal FB cached from the previous day.
Any ideas?
I had this problem too. The linter caches things in a very weird manner - seems like the best thing to do is either to add a query string and change it every time, or just rename the file every time you're checking.

Is it ok to hardcode dynamic links in a permanent view?

Let's say I wanted to showcase 2-3 clickable buttons on my homepage which will be there permanently. These are links to the css, html, and javascript tag listing pages.
Is it fine to just hardcode href=/tags/css and href=/tags/html right in my django templates/view?
I won't change them for at least a year or so, meaning I don't think I need to add a column to the tags table to distinguish them - is this common or should I try to make it somewhat dynamic? These tags are in a table but so are 1000 other tags.
Just remember to document that you did it in some place obvious, like in tagging/views.py, or maybe you have an equivalent of my When_Peter_Gets_Hit_By_A_Bus.txt, in which I document all of these types of optimizations. No, I really do have a file like that for each of my customers.

How do you post content to a specific template position?

I purchased a template / theme from RocketTheme, but I can't figure out how to add content at a specific position.
The templates have "module positions" that collapse. I'd like to add some content at one of the module positions.
If I add articles, they seem to go into "mainbody". But I'd like to have content in other areas of the template.
How do I take some text, images, or other content, and get them to display in these other positions (i.e., TOP-A, or FEATURE-A, etc)?
I've tried this
Go to Extensions->Module Manager
Select "New", Select "Sections"
Under "Details", I select Position->Top-A
I give it a title.
Nothing seems to happen. I don't see anything new exposed in the admin UI, and I don't see a way to get any content into this newly defined section. What am I not understanding?
go to JED and look up html in module or content in module or content in component there are a bunch of them. http://extensions.joomla.org/search?q=module+content&start=20
Essentially
you create and save an article. Make sure it is saved to a section or category on your menu
open the module one of the paramaters will ask for the article id...decide which position and which pages you want it on and then publish.
You can also get modules that will take some or all of your articles in a category and then show them either as a slidedhow or one randomly when someone visits the page

What is the best UI for selecting tags from a list of existing tags?

I am using django-tagging. My model simply contains a field with a comma separated list of tags. I would like the user to be able to select tags from a list of already existing tags and also allow the user to add tags. Still resulting a comma-separated list of tags. How would I do that?
A pull down list doesn't work. I was thinking about simply listing all tags beneath the tag field and when a user clicks on an existing tag this is added to the tag field with a bit of javascript.
Other ideas are very welcome.
If you can use jquery there are several plugins to handle this and save you the JS coding:
Tag Suggest which can handle comma delimited tag lists and Autocomplete which also has the advantage of being used by Jannis Leidel's excellent autocomplete form widget for ForeignKey model fields
Having a separate complete list is a good start. I would also suggest an autocomplete implementation while the user is typing a tag name into the box. This helps eliminate the problem of having Batman and Bat-man and Bat Man as three separate tags.
I think your proposal of showing all tags and allowing the user to select them individually is a sound approach. Delicious.com uses this exact interface and it works wonderfully.
How about implementing it the same way Stack Overflow does for the ignored and interesting tags on the front page? Wait for the user to start typing, and as they do, fire off AJAX requests to the server and start returning the five most likely results, which you can then display in a hovering white box below the text box.