Add a Facebook Like and Send Button On Your Site
Just add this. Replace the link.
<script src=”http://connect.facebook.net/en_US/all.js#xfbml=1″></script>
<fb:like></fb:like>
<fb:send href=”http://arvanhalleorg.com/” font=”"></fb:send>
Just add this. Replace the link.
<script src=”http://connect.facebook.net/en_US/all.js#xfbml=1″></script>
<fb:like></fb:like>
<fb:send href=”http://arvanhalleorg.com/” font=”"></fb:send>
OLD:
The old structure only required you to enter a status message, which you sent to the home.
http://twitter.com/home?status=I%20am%20doing%20this%20thing%20on%20Twitter%20@arvanhalleorg%20http://www.test.com/myurl/
NEW:
The new structure requires that you provide, at a minimum, a url, via, and text.
(note that the url and via are appended to your message, so you don’t need to add them to your text)
http://twitter.com/share?url=http://www.test.com/myurl/&via=arvanhalleorg&text=I%20am%20doing%20this%20thing%20on%20Twitter
The url will be shortened by Twitter’s internal API and @arvanhalleorg in this case, would be appended to the text.
Output is something like this:
“I am doing this thing on Twitter http://t.co/pTbu5c0 via @arvanhalleorg”, which appears in a tweet box.
No automatic tweet. This allows you to adjust the message, before blindly putting weird things on your timeline.
I wanted to get the list of providers from the oembed whitelist to use in the NFB Video Plugin’s next update for WordPress 3.0.
The global $OEMBED is the variable that stores all my other variables in the plugin, that’s why it’s there.
There’s probably a function somewhere that does this, but I didn’t find it. So, if there’s anyone else who was having difficulty with it, as a temporary solution you could go with something like this:
$INCLUDE_EXTERNAL_BASE_PATH = dirname(dirname(dirname(dirname(__FILE__))));
require_once($INCLUDE_EXTERNAL_BASE_PATH . ‘/wp-includes/class-oembed.php’);
function populate_list_from_wp_oembed_whitelist(){
global $OEMBED;
$wp_oembed = new WP_oEmbed();
$OEMBED->whitelist = array();
foreach($wp_oembed->providers as $provider=>$oembed_url):
array_push($OEMBED->whitelist, $provider);
endforeach;
return $OEMBED->whitelist;
}
$providers = populate_list_from_wp_oembed_whitelist();
** I would have put it in code tags, but apparently it’s not working correctly at the moment.
This is just a small post to help people out if they have an difficulty getting this particular plugin to work. After the time I wasted, trying to figure it out, I thought I’d go ahead and save you some time.
1. Make sure that wp_footer() is right before your end body tag. <?php wp_footer(); ?>
2. Make sure that there is a container that holds ONLY your posts. (usually #content)
3. Make sure that the posts have a class in common. (usually .post)
4. Make sure navigation has a class or id. (usually #navigation or .navigation)
Reload your homepage and you should see it adding more posts when you scroll down the page.
After a day or so, I finally managed to get some basic Login/Logout functionality working on my Django project. What a pain in the butt, when you have no idea what you’re doing to begin with and you’re trying to do something without having to go back and do it later!
Several pages and much headaches later, I stumbled on one that made it pretty clear to me.
Since I am a fan of trying to lessen the trauma of people everywhere with similar issues as me, I will tell you that if you’re trying to make an authentication (basic one), go to this page. It’s part of the documentation on Django Project.
One mistake I made while trying to make the login() function work after my authentication was some KeyError…I think. No biggie. Just change the name of the view calling it. I had a wonderful stroke of mental prowess and thought…”Hey, why don’t I make this view login(), instead of something like login_page().” Well, I never claimed to be a rocket scientist. So just take my word for it if you’re a newbie and just make it something other than login().
If you guys want to see the result of the code itself, I s’pose I could paste it on here, but really the linked page in the above text was what I used. I haven’t deviated from it yet. Just visit the page and read it and hopefully it’ll help you if you’re having trouble with it.
Sadly, I’m not a python/django expert yet, so I can’t really help too much.
“The page I’m going on about.”
Have an awesome Easter weekend!
The following is just a small blurb from the post I wrote earlier today for a blog we’ve started at work among in the web team. You can go ahead and read more about it here.
“This is a snippet of code that I was working on this morning with the input of a coworker for the concept. Basically we needed to have a way to include a navbar at the top of every site, which includes javascript functionality, but also doesn’t conflict with already present jQuery libraries.”
Small note: In IE, you need the jQuery.noConflict() line to be separate from the rest of your snippet code if you want it to work. IE seems to have an issue with the XML connotation of CDATA Comments. It sucks. I swear I’mma just boycott them until they conform. Okay, I won’t, but it’s nice to dream. I don’t know why IE does this to be honest, it just does.
<script src=”js/jquery-1.4.2.js” type=”text/javascript” language=”javascript”></script>
<script>var $newJS = jQuery.noConflict();</script>
<script>alert(‘do a bunch of stuff here’);</script>
For the past 6 months at least, I’ve had varied versions of ‘JavaScript embedded into Colorbox’ as a search term that has led to my website and after numerous occasions of useless dead ends on my site, I thought that I’d go ahead and write a post about a very basic way to get this done.
The easiest way to call a Colorbox is with the following code:
$(“idColorboxLink”).colorbox({href:”/link/”, open:true});
Visit the demo page for Colorbox to see other ways to open it.
There are exactly 5 ways that you can place your JavaScript so that your colorbox content will be affected by it.
onOpen (Before Colorbox opens)
onLoad (While Colorbox is opening)
onComplete (Content is displayed in the Colorbox)
onCleanup (While Colorbox is closing)
onClosed (Colorbox is closed)
Then you just enter them into the code as follows:
$(“idColorboxLink”).colorbox({href:”/link/”, onOpen:function(){}, onLoad:function(){}, onComplete:function(){}, onCleanup:function(){}, onClosed:function(){}, open:true});
If you had a function like…fillField, you could just call it like this:
$(“idColorboxLink”).colorbox({href:”/link/”, onComplete:function(){fillField()}, open:true});
This probably could have been much more elaborate, but I’m more a use it to learn it kind of person and I thought that this might at least provide an idea of what to do if nothing else for those who are searching for this.
Have a great day.
Since its launch on Oct. 21, there have been nearly 80,000 downloads internationally and just over 56,000 in Canada from people seeking out the NFB’s documentaries and animation.
Download the NFB iPhone App (English Version)
Download the NFB iPhone App (French Version)
Just made a small change to the NFB Video Plugin for WordPress, the width/height weren’t setting correctly when you updated from an older version that used different variables.
Now the default is set to 516-337, and it should also set it to that height if your fields are empty for width/height. It’s just to avoid the player being a tiny little mush ball of uselessness cause the width wasn’t defined.
There was mention that the plugin makes it impossible to add/crop images in the uploading process, I’m not sure how that’s happening just yet, if anyone is having this issue can you tell me where in the process you see the fail? I’ll continue investigating in the meantime.
So in the last couple of weeks we’ve been implementing agile practices at work (We’d done a bit, but only recently the boss decided we should all be doing it) and I really enjoy it. I’m one of those people who are actually between two teams. There’s the one team that uses the Scrum and one that uses the Kanban.
I’ll have to go into what the differences are in another post, mainly because it’ll take a long post to explain all that relatively sanely. I’m just too tired to do it right now.
So anyways, I went out and bought a bunch of post-its, got out my white board and set up my Kanban for my big project at home. Since I’m a 1 person team, my board is simple.
- Backlog (as much as my board can hold of these)
- Todo (max 4)
- Integration (max 2)
- Programming (max 3)
- Validation (max 2)
- Done
I have a list of things that I should be getting done in each category in order for it to get moved to the next column and I can’t pull any forward until things get done. One thing our instructor told us to do also was to put ‘blocked’ and ‘ready’ notes on things so we know what’s coming up in the backlog so when a spot frees up in the todo list we can go ahead and put it in and also if we’re blocked on something and it depends on something else.
It’s pretty cool, but like I said it’ll take another post to talk about it, this is just a random personal brain fart to say I’m doing it, cause it’s fun.
Have a great day!