If you are a blog writer and using blogger.com for writing your blogs, then you might be interested in placing a facebook like button on your blog posts. This may increase your blog traffic in a wide range via facebook. As soon as someone likes your post, his/her friends get about this notified by facebook news feed. So, there is a lot more chance to get some of those come and visit your post, may be they also like it, resulting a huge scope.
So, now you are extremely interested to place the button. Lets place it. Go to the link: http://developers.facebook.com/docs/reference/plugins/like . There you will have a widget to create a button. url link, width etc options. Fill them up and click get code, you will receive an html iframe code.
You might be thinking, there you used only homepage url, so everybody will get the homepage url only, not individual post url, yes its true. We have to do a little hack to make our needs happen, that's the main target of this post.
Now login to your blogger account, goto 'design' section, then 'edit html' sub section, tick the checkbox 'Expand Widget Templates'. now find the div with id 'post-body' section in the template html. Place your facebook button code there. Now comes the small tricky part. place your code as lke the following code:
<b:if cond='data:blog.pageType == "item"'>
<iframe allowTransparency='true' expr:src='"http://www.facebook.com/plugins/like.php?href=" + data:post.url + "&layout=standard&show_faces=false&width=100&action=like&font=arial&colorscheme=light"' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:450px; height:40px;'/>
<b:else/>
<iframe allowTransparency='true' expr:src='"http://www.facebook.com/plugins/like.php?href=" + data:blog.homepageUrl + "&layout=standard&show_faces=false&width=100&action=like&font=arial&colorscheme=light"' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:450px; height:40px;'/>
</b:if>
Notice that we have used data:blog.homepageUrl and data:post.url instead of static url to achieve our needs and make it compatible for blogger blog. These are code from blogger's markup language which returns the actual url when rendering. Although i am not blogger markup expert, but managed this code snippet easily as its not that tough :)
Now as result you will get facebook like button on your post page and also home page(on each post of home page), just like my blog. So, do you like my article? Then prove it :D
0
If you are retrieving data from mysql db and showing them to result page in raw php coding, then associative array retrieving is best way to be chosen. To achieve this, you have to write like:
$result = mysql_query($query);
$rows = mysql_fetch_assoc($result);
Then you can use it like:
echo $row["id"];
echo $row["name"];
I use associative array instead of normal 0-indexed array as they are more meaningful and understandable by seeing the code only. However I have seen an interesting thing regarding this today while working on a enhancement small project on an existing raw php application. This is a very simple issue and you will get a quick help if you are facing a problem like you are showing data using associative array to web page, but no data are being showed, although you are sure that spelling is correct.
The main fact was, the associative indexes are 'case sensitive'. If you are writing insert,update,delete query, then case won't matter, in any case will be accepted. however, when you are retrieving data using mysql_fetch_assoc($result), then the returned is a associative array and that array will be case sensitive indexed, that means, then $row["Id"] and $row["id"] will be different. Just by copy-pasting the index names with my incorrect code solved me the problem. SO, i had to write:
echo $row["Id"]
instead of
echo $row["id"]
as the database had column "Id".
I think, in these kind of case, it is best to copy paste the data column name from database table to your code to get rid of this kind of unexpected errors. Also, case sensitivity also be occurred in some sql queries, i found this problem also, where table structures are copy-pasted, but worked differently(local version is case insensitive and server version was case sensitive), so its better to use always the same case.
$result = mysql_query($query);
$rows = mysql_fetch_assoc($result);
Then you can use it like:
echo $row["id"];
echo $row["name"];
I use associative array instead of normal 0-indexed array as they are more meaningful and understandable by seeing the code only. However I have seen an interesting thing regarding this today while working on a enhancement small project on an existing raw php application. This is a very simple issue and you will get a quick help if you are facing a problem like you are showing data using associative array to web page, but no data are being showed, although you are sure that spelling is correct.
The main fact was, the associative indexes are 'case sensitive'. If you are writing insert,update,delete query, then case won't matter, in any case will be accepted. however, when you are retrieving data using mysql_fetch_assoc($result), then the returned is a associative array and that array will be case sensitive indexed, that means, then $row["Id"] and $row["id"] will be different. Just by copy-pasting the index names with my incorrect code solved me the problem. SO, i had to write:
echo $row["Id"]
instead of
echo $row["id"]
as the database had column "Id".
I think, in these kind of case, it is best to copy paste the data column name from database table to your code to get rid of this kind of unexpected errors. Also, case sensitivity also be occurred in some sql queries, i found this problem also, where table structures are copy-pasted, but worked differently(local version is case insensitive and server version was case sensitive), so its better to use always the same case.
Yesterday, i received my new freelancer.com debit Mastercard that i have ordered at the last week of the month. So, it took around 2-3 weeks to receive it here in Bangladesh. I have already discussed about the extended features of new debit Mastercard .
An interesting thing that i noticed, this new mastercard doesn't include the freelancer.com new logo. May be it hasn't been processed yet.
If you are member of freelancer.com, then few days ago, you might have received an email about the announcement of the new card. If not, then may be you are not eligible for this :). Also, if you have ordered the card, then you need to know one thing, your new card number will be different than your existing one.
This facility(use of mastercard) has bring the most efficiency in roaming around the world. If you make a withdrawal request, it will be processed within a week(usually processed every monday/tuesday; so, if you request it in wednesaday, it will take a week, if you request on saturday,it will take 2 days :)). And after that, you have the money to be withdrawn from anywhere in the world!!!! So, it is taking up to only 2 days to receive money to your pocket from freelancer.com account just using the mastercard. So, why wait? Become a proud owner of payoneer mastercard...
An interesting thing that i noticed, this new mastercard doesn't include the freelancer.com new logo. May be it hasn't been processed yet.
If you are member of freelancer.com, then few days ago, you might have received an email about the announcement of the new card. If not, then may be you are not eligible for this :). Also, if you have ordered the card, then you need to know one thing, your new card number will be different than your existing one.
This facility(use of mastercard) has bring the most efficiency in roaming around the world. If you make a withdrawal request, it will be processed within a week(usually processed every monday/tuesday; so, if you request it in wednesaday, it will take a week, if you request on saturday,it will take 2 days :)). And after that, you have the money to be withdrawn from anywhere in the world!!!! So, it is taking up to only 2 days to receive money to your pocket from freelancer.com account just using the mastercard. So, why wait? Become a proud owner of payoneer mastercard...
I didn't know about google web master tools or what google page indexing is, at the beginning when i started blogging around 1.5 years ago. But, day by day, i just wanted to get my bog focused to search engine without any manual effort like link sharing to social network sites, link building or blog commenting etc, i was not either interested about page rank of my site. Only interested was to get focused to search engine, specially google, this covers the majority consumers those reach to site from search results.
While surfing around, studying little about search engine optimization, i came to know about the term 'page indexing'. As i was mainly concerned about google page index, i came to know how much my pages are indexed to google by searching like "site:ranacseruet.blogspot.com". Using your site url this will result all the indexed page that google currently have for your site only. But, later on forums, i also came to know about a free online tool that google currently serving its users to determine their details site status on google, which is google webmaster tools.
This helps a lot more for a site owner. Such as, if you see that google haven't yet crawl your site yet, you can submit your sitemap to google using this tool, from where google will check your site very soon. And thus the probability of quick indexing of pages on google increases much more. Where, indexing of page doesn't occur even after a long time although the page has better content only because of site's overall position to google.
You can also find out if there is any broken links(in/out) on your site, those are recorded on the 'diagnostics' section. You can see, how much page impressions occurred for a specific keywords even after a visitor didn't visit your site for that keywords, but this will let you know which keywords are doing better. Also, you will also be given keywords strength/significance for particular keywords. You can see details in linking of your pages, that means which pages links to your site pages.
Another important useful of this tool is that, although you can see the pages indexed by google using "site:yoursiteurl" search, but remember that, google is showing from its cached database, not from the latest crawler reports. As, google also do De-indexing also, you won't be able to know for a lot of time that your particular page aren't being liked by google, you must improve that. But, this info can be gathered on on webmaster tool. There you can check how much pages are submitted and how much are indexed currently, result you how much weak pages you have presently.
So, if you havn't yet, start using google web master tools and focus yout site/blog to the search engine giant 'Google' on the web very fast by getting pages of your sites indexed and diagnosis about recommended actions given as feedback. If you are having any problem in sitemap submission, you can checkout my another post describing solving webmaster sitemap submission problem
While surfing around, studying little about search engine optimization, i came to know about the term 'page indexing'. As i was mainly concerned about google page index, i came to know how much my pages are indexed to google by searching like "site:ranacseruet.blogspot.com". Using your site url this will result all the indexed page that google currently have for your site only. But, later on forums, i also came to know about a free online tool that google currently serving its users to determine their details site status on google, which is google webmaster tools.
This helps a lot more for a site owner. Such as, if you see that google haven't yet crawl your site yet, you can submit your sitemap to google using this tool, from where google will check your site very soon. And thus the probability of quick indexing of pages on google increases much more. Where, indexing of page doesn't occur even after a long time although the page has better content only because of site's overall position to google.
You can also find out if there is any broken links(in/out) on your site, those are recorded on the 'diagnostics' section. You can see, how much page impressions occurred for a specific keywords even after a visitor didn't visit your site for that keywords, but this will let you know which keywords are doing better. Also, you will also be given keywords strength/significance for particular keywords. You can see details in linking of your pages, that means which pages links to your site pages.
Another important useful of this tool is that, although you can see the pages indexed by google using "site:yoursiteurl" search, but remember that, google is showing from its cached database, not from the latest crawler reports. As, google also do De-indexing also, you won't be able to know for a lot of time that your particular page aren't being liked by google, you must improve that. But, this info can be gathered on on webmaster tool. There you can check how much pages are submitted and how much are indexed currently, result you how much weak pages you have presently.
So, if you havn't yet, start using google web master tools and focus yout site/blog to the search engine giant 'Google' on the web very fast by getting pages of your sites indexed and diagnosis about recommended actions given as feedback. If you are having any problem in sitemap submission, you can checkout my another post describing solving webmaster sitemap submission problem
Subscribe to:
Posts (Atom)





