I'm using the like button from Facebook...(it seems to have changed many times over the p ast two years so I am talking about the most recent version).
Is there a way to not show the initial message which says,
"Be the first of your friends to like this"
I would like to have just the button and count (and keep the count empty if no one has liked it yet.
Related
I have a CListCtrl in Report view, and I noticed that I can search by typing the first few letters of an item (the control selects the first item that matches as I type), and that this search "resets" after a second or so (so if I've typed "abc", pause, then type "d", then it searches for "d" only). For usability, I want the user to realize that this search-by-typing feature exists.
So here are the options I can think of, in order of preference, and the question I have in each case:
Use whatever existing built-in support there is in MFC.
Is there such a thing?
Some other solution that's been implemented before.
Again, is there such a thing?
Add another textbox to the dialog box, and handle its ON_EN_CHANGE message to somehow trigger CListCtrl's search behavior. In other words, similar to the find dialog/toolbar in browsers.
How do I trigger the search behavior?
Did take a look into the List-View controls documentation on Microsoft Docs.
This behavior is described in the Default List-View Message Processing (WM_CHAR message). The search-string is indeed reset after one second.
However, I didn't find any notification message that seems to be relative, eg returning the current search-string, which you can display. There is the
LVN_INCREMENTALSEARCH, but the documentation is rather confusing (eg what is an "incremental search"? etc), and I don't know if you are going to receive this at all, as this seems to be about Virtual List-View controls. Anyway, you can give it a try.
But resetting the test entered by the user in just 1 sec may rather be unwelcome to users or reviewers (actually I have never seen an application doing so). So you can implement some "Search" operation in your dialog, as you said add an edit box and search for its content. You can use the LVM_FINDITEM message (or the ListView_FindItem() macro) requesting a partial-match search (LVFI_PARTIAL), or do the search yourself (find the matching item and move there).
Just started to learn Imacros, recorder macros for Facebook to like page, but when i play macros it gives me this kind of error
RuntimeError: element BUTTON specified by
TYPE:submit&&ID:u_0_1c&&DATA-OWNERID:u_0_1b&&DATA-PROFILEID:106053553060414&&CLASS:_42ft_4jy0PageLikeButton_4jy4_517h_9c6&&VALUE:1
was not found, line 6 (Error code: -921)
You problem is,
"submit&&ID:u_0_1c&&DATA-OWNERID:u_0_1b&&DATA-PROFILEID:106053553060414&&CLASS:_42ft_4jy0PageLikeButton_4jy4_517h_9c6&&VALUE:1 "
points to a spesific a specific button, I assume you want to click any like button from whatever page you are on you should choose a more general selector. On the record in imacros you can choose multiple methods of recording choose a different one.
I would like to display a confirmation message after a choice in the menu.
For example if you want to delete an image in the Timeline, you tap on the glass to open the menu, you select "Delete", you have a progression bar to cancel if you want, when the progressbar is complete a kind of toast appear to say "Deleted" and disappear.
I would like to reproduce only the "Deleted" part but I've searched everywhere and cannot find a way to do it. Is there an API or should I manually implement it with a layout containing the text wanted and display it for 3 seconds... ?
Thanks
There is no API for this to work you will need to build a layout and then set it as the current view using setContentView for a specific amount of time and then return to your main view.
My questions are about this (pasted from http://developers.facebook.com/docs/reference/plugins/like/)...
"What makes up the number shown on my Like button?
"The number shown is the sum of:
-The number of likes of this URL
-The number of shares of this URL (this includes copy/pasting a link back to Facebook)
-The number of likes and comments on stories on Facebook about this URL
-The number of inbox messages containing this URL as an attachment."
With that in mind, let's say I create a feature to let users submit ideas to improve my site, and I want to let users vote on the ideas by clicking Like buttons next to each idea.
(For simplicity, let's also say it's okay if they click more than one Like button.)
When a user clicks a Like button, a story about it shows up in his/her friends' newsfeeds, which brings up my 2 questions:
1.) If one of those friends comments on it with "That idea sucks," will that comment still add to the Likes count?
I know the content of the comment doesn't matter, but that user is clearly expressing his dislike of the idea, not liking it.
2.) Can the same user generate 2 or more Likes?
From the above, it seems like he/she could click the Like button, and then send a FB message with the URL as an attachment, which would generate another Like.
Thanks for the clarity!
P.S. This other thread was useful, but there were no conclusive answers:
Voting for items via facebook like?
When the user clicks the OK or APPLY button on a property sheet and the program determines data on some page is invalid, how can I cause the page containing the error to be displayed along with a message box describing the error?
Currently the procedure doing the validation does the following while processing the PSN_APPLY notification.
MessageBox (hDlg, "Data must be positive!", "Error", MB_OK);
SetWindowLong (hDlg, DWL_MSGRESULT, PSNRET_INVALID);
This works ok if the page doing the validation (A) is currently displayed but if some other page (B) is being displayed, the message box appears with that page (B) being displayed, then when the message box is answered, the page with the validation error (A) is displayed. I thought about setting some flag so that when that page (A) gets the PSN_SETACTIVE notification it displays the message box but that seems kind of hokey.
Win32 API in c++, no MFC, no NET, nothing fancy.
I think the problem is in the design of your validation and it's presentation.
Am I right in thinking that you iterate through your property sheets, validate them and display a message box if something is awry? Because of course, what you have witnessed will happen, if I am on property page 3 and I wrote crap in to a field on property page 1.
The easiest solution is, when validating, note which property page the field in question is, and set that one active if the user has written crap in to one of your fields. This seems the fastest way possible.
Also, rather than spring up an annoying message box, reserve some room beneath the property pages to display a textual (red or otherwise) warning as to why, and then change to the appropriate property page, and highlight the offending control. Your validation routine can do this nice and easily as it loops through.
Even better, don't stop at the first error. One thing I HATE is correcting one field that I think is the only issue, only to be told every time I hit "OK" or "SUBMIT" that there's something else I missed.
I seriously think you should consider going the extra mile here... loop through ALL controls, and add all invalid ones to a list. Then change each offending control's background colour, tab colour etc... Then the user can work through and correct, no matter how many errors he or she made.