Category Archives: design
Hi,
recently i was needed to add some like and tweet button to a site. i supposed will be a 5 minuted task, but i discovered something really weird, that for some reason, the button not only was screwing up the load of the adsense ads, but also, sometimes the ads appeared inside the iframe of the buttons. looking for a solution on the web, i found something for the facebook like button and i applied something seamless for the twitter button.
Facebook Like Button
the steps to solve this are the following:
1)go to this page and create an application: https://developers.facebook.com/setup/
2) paste this code where you want the like button and edit with the correct paths and the appID you generated before
<!-- like button -->
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like layout="button_count" width="100"></fb:like>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'XXXXXXXXXXXX', // ID generated for WEBSITE provided above.
xfbml : true, // parse XFBML
channelUrl : 'http://www.YOUR_SITE_NAME.com/facebook/channel.html' // new file custom channel
});
};
(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
<!-- like button -->
3)create the channel.html file on the path of your server and paste this only line:
<script src="http://connect.facebook.net/en_US/all.js"></script>
and that’s it, now you have a like button and will not screw up your adsense ads
Tweet Button
for the tweet button, the solution is more simple, i basically pasted the code inside a file and called it from a iframe. is not the most cleanest way, i know, but is the only thing i figured out to solve it.
i hope this help you in some way
Regards,
Shadow.
Related Post
Hi,
i just saw this on my twitter TL and i think it worth a mini-post. All those who develop some application that require user authentication, deal with the password problem. is not only a problem to store passwords (BTW, i wrote another post about it recently) but also the problem is the user, trying to encourage him to use stronger ones, using uppercase, lowercase letters, number and symbols is not easy. usually most of the app’s have a bar that measure the strength of the password. is nice and useful, but most of the users just don’t pay attention to it. in this cases is where naked password take action and i will not say anything else, just go to the site and try it, is a twist in usability to say it in some way
Regards,
Shadow.
Related Post
Hi,
today i have a reflexive post for all of you
those who know me, can say that my design skills are in a level of a developer. i’m not a designer, i do not pretend to be one really, i like coding more than doing anything else but when you are not only a developer, but also in charge of make improvements or decide about a product in their general aspect (functionality, aspect, usability etc..) you need to have basic/advanced knowledge about the design process. when you try to develop a product, you are talking about a whole thing that involves all this things, not only the code. the people who will use will not care about how you code it (except if the product is a code itself that will be used by devs or a product that can be extended by the client). is something seamless when you see a game developer talk about a incredible piece of code or algorithm that make something awesome, but still the game is shit
i have learned based in experience how to “look” at a product. is something that can be taught and studied but is really useful just doing it. the process is simple, but hard to take it in action. is simply ask you several questions and look in a objective at the product.
Did this really meet the purpose of the product?
Is easy for the user to use and accomplish what is trying to do with it?
The secondary functions are not bothering the use of the product?
I like it when i see it?
How i feel when i see it?
How i feel using it?
Can be more simple?
there are several process to answer this questions. first of all, you, the person on charge of the product need to be objectively answer this questions. after this, you need to put someone that never used it and target the audience that will use it and observe how they react. just in silence, do not give them any help, just observe and see the user reactions. is a iteration process and hard to do, but is the only way to make it. also, there are some gold rules that you should follow to make it in less iteration possible.
Simple is better
my boss always say that you need to make it idiot proof, and he is right. you need to simplify the process of do something in less steps as possible first, even if it require to delete some secondary feature. after that, you need to make it visually easy and obvious to fin the steps necessaries to make the action. again, is a iteration process that could take several revisions to optimize it accordingly.
The call-to-action elements are essential
call-to-action is something used always on the sales sites and marketing stuff, but is something that can be applied to almost anything. if you intent that the user to buy a product, you need to push that user that is already interested to make the deal with you. in case of sales, this is used explaining the features of the product, showing demos, etc.. but if you look in detail, the most important part is that the user have always a button close to buy the product, and the process to buy it is easy, fast and obvious. the page make the user experience less painful as possible, to avoid the regret feelings or the buying feeling. you should apply this for anything that have contact with the user. the experience need to bring joy and make it easy, put the action itself easy to find and use (of course with moderation in the qty, you don’t want to flood the user either), this will push the user to make the action, together with all the other elements.
The emotions are importants
The humans are emotional things, we do things drive by the emotions. we want to be better, so for that reason we study, we want to be stronger, for that reason we train our body etc.. be sure that the functionality, design and usability can transmit the correct emotions to your user. if you want the user enjoy the app, transmit joy, reward him, be sure that is not too frustrated (i think the frustration is always there on the human self) to leave or stop using your app. the use of your app should be not painful in any aspect. this can be achieved choosing a good selection of colors (light colors transmit peace etc..) and a flowing usability, where the user is guided to the options and not forced or need to think too much to do something that wants.
Support the users
This is maybe more on a advanced phase of the product, but design a easy and friendly support is also essential. there is no worse thing that a angry user for bad support, or even one that can’t even find it. sometimes the user get lost, for bad design or sometimes for no reason, they should be able to contact you fast, easy and you need to answer them fast too.
Flexible code is the best
When you develop a product, the code need to be flexible, is possible that in terms of usability or aspect, you need to change radically the aspect, positions and process that your product does, and it can be really painful if you don’t plan accordingly. the MVC pattern is a good option here, even you can morph to something that will suit you better in some aspects, but try to maintain the base of it separating the process from the views. by the way, the same questions i say earlier, should be applied to the code design, always remember, simple is better.
and here we finish folks, this is something that cost me to express in words, i have tried to be plain and straight as possible on my explanations, i hope you get what i mean and help you in your tasks
Regards,
Shadow.
Related Post
Hi,
i’m still with the images stuff
now i needed to integrate a crop image script using js. so i started to look for a premade solution. you can find several of them here, here and here. i was looking for a mootools based solution and i found 4. for my surprise,one didn’t exist anymore, one of them didn’t worked with mootools 1.2, the others was too complicated and not flexible and none offer what i really needed, that was able to offer “mirrors” as preview of the crop in 2 different sizes. in my adventure, i tried to fix the first one (MooCrop) porting it to 1.2 but i leave it why it would take me too much work, then i tried to modify cwCrop but the code structure seems to be less flexible, and finally i decided to go with uvumiCrop, as it already have a mirror function and just need to be converted into a multi-div function.
so for those who want the mirror feature in the uvumiCrop script, here are the functions and code you need to replace:
Add this to the class var declaration
previewImageArray:new Array(),
On some place around line 102, paste this
this.previewImageArray = new Array();
replace with this from lines 285 to 354
if(this.options.preview){
if(isArray(this.options.preview)){
var previewImgObjArray=new Array();
this.options.preview.each(function (item,index){
var initWidth= $(item).getStyle('width');
var initHeight= $(item).getStyle('height');
//we put the preview in a wrapper div with a fixed height, because preview height and width may change.
var previewWrapperObj = new Element('div',{
styles:{
height:initHeight
}
}).wraps($(item));
//Setting the preview container
$(item).setStyles({
display:'block',
position:'relative',
width:initWidth,
height:initHeight,
overflow:'hidden',
margin:'auto',
fontSize:0,
lineHeight:0,
opacity:1,
visibility: 'visible'
});
//cloning the original image for the preview
var previewImageObJ = this.target.clone();
previewImageObJ.set('id','imgObj_'+index);
previewImageObJ.removeProperties('width','height').setStyle('position','absolute').inject($(item));
previewImgObjArray.push(new Array('imgObj_'+index,item,initWidth,initHeight));
}.bind(this));
this.previewImageArray=previewImgObjArray;
}else{
if($(this.options.preview)){
this.preview = $(this.options.preview);
//we put the preview in a wrapper div with a fixed height, because preview height and width may change.
this.previewWrapper = new Element('div',{
styles:{
height:this.previewSize.y+2*this.preview.getStyle('border-width').toInt()+this.preview.getStyle('margin-top').toInt()+this.preview.getStyle('margin-bottom').toInt()
}
}).wraps(this.preview);
}else{
var previewWrapper = new Element('div',{
'class':'preview'
}).inject(this.toolBox,'top');
this.preview = new Element('div').inject(previewWrapper)
}
//Setting the preview container
this.preview.setStyles({
display:'block',
position:'relative',
width:this.previewSize.x,
height:this.previewSize.y,
overflow:'hidden',
margin:'auto',
fontSize:0,
lineHeight:0,
opacity:0
});
//cloning the original image for the preview
this.previewImage = this.target.clone();
this.previewImage.removeProperties('width','height').setStyle('position','absolute').inject(this.preview);
// this.addEvent('onPreview',this.updatePreview.bind(this));
}
this.addEvent('onPreview',this.updatePreview.bind(this));
}
replace updatePreview function with this code below:
//Function to update the preview
updatePreview: function(top,left,width,height){
if(this.previewImageArray.length>0){
this.previewImageArray.each(function (item,index){
if(height*item[2].toInt()/width<item[3]){
$(item[1]).setStyles({
width:item[2],
height:(item[3].toInt()*height/width).toInt()
});
$(item[0]).setStyles({
width:(this.target_coord.width*item[2].toInt()*this.scaleRatio/width).toInt(),
height:'auto',
top:-(top*item[2].toInt()/width).toInt(),
left:-(left*item[2].toInt()/width).toInt()
});
}else{
$(item[1]).setStyles({
height:item[3],
width:item[3]
});
$(item[0]).setStyles({
height:(this.target_coord.height*item[3].toInt()*this.scaleRatio/height).toInt(),
width:'auto',
top:-(top*item[3].toInt()/height).toInt(),
left:-(left*item[3].toInt()/height).toInt()
});
}
}.bind(this));
}else{
if(height*this.previewSize.x/width<this.previewSize.y){
this.preview.setStyles({
width:this.previewSize.x,
height:(this.previewSize.x*height/width).toInt()
});
this.previewImage.setStyles({
width:(this.target_coord.width*this.previewSize.x*this.scaleRatio/width).toInt(),
height:'auto',
top:-(top*this.previewSize.x/width).toInt(),
left:-(left*this.previewSize.x/width).toInt()
});
}else{
this.preview.setStyles({
height:this.previewSize.y,
width:(this.previewSize.y*width/height).toInt()
});
this.previewImage.setStyles({
height:(this.target_coord.height*this.previewSize.y*this.scaleRatio/height).toInt(),
width:'auto',
top:-(top*this.previewSize.y/height).toInt(),
left:-(left*this.previewSize.y/height).toInt()
});
}
}
},
and the isArray() function used at the beginning of the code:
function isArray(obj) {
return obj.constructor == Array;
}
so, now in the initialization of the uvumiCrop object, you set the preview property as a array ( new Array(‘id1′,’id2′) ) with the id’s of the divs that will be used as mirrors. is important that you set the width and height of each div before you create the uvumiCrop object. this code will maintain the original behavior of the original script, you can still have the floating mirror and the unique mirror.
is also important to mention that i changed the code so the container don’t get the width and height deformed and work as a container hiding the rest of the image. is done like this so the user can know really how it will look after the crop process.
i have sent this post to the developer, so maybe he include it on the next release
i hope you find this useful and save you some time
Regards,
Shadow.
Related Post
Hi,
today i was playing with inkscape, and i created some shiny balls to share with my readers
are not a big deal, but could be useful for some project that you maybe have. the good thing about this shiny balls, is that you can just change the color of the ball itself (not of the white half transparent ellipses) , and you will have balls of any color
the file is on SVG format and the license of this is free for any purpose, commercial or not.
you can download it from here.
i hope you enjoy it.
Regards,
Shadow.
Related Post
Hi,
recently building a app i was need to suggest data to the user when trying to fill a input. so i look for a js script for this. i usually use mootools for my development in js, so looking for a plugin i found this: Meio.Autocomplete plugin for mootools
is a really nice plugin, between their features, support the inbuilt ajax calls using the Request.JSON method from the mootools framework. also support to set up filter for the returned data, the set of field parameter to look for the input by the user, the minimum of characters that the user need to enter to start looking for it, delay between the ajax call and the search in the data and many other properties. you can also customize the look and feel of how the options are displayed.
from their web page you can download the source code and the compressed version for production environments. also there you can see plenty of documentation explaining each property of the plugin and several examples to see and try online.
i hope it help you in some way
Regards,
Shadow.
Related Post
Hi,
today i wanted to share some basic CSS tricks
Dont resize textarea on chrome and safari
the textarea can be resized on chrome and safari, and even that seems to be a nice feature, when you have a limited and strict layout, this could screw up the things. to avoid this, just add this css code to your stylesheet:
textarea{
resize: none;
}
Scrollbars for DOM
sometimes you need to show content in a small space, not enough maybe for the content, so it come useful some scroll bars, for that, add the overflow property:
overflow: scroll;
Static background like twitter
you always wanted a background like the twitter accounts have right? is easy as like this:
backgroun-attachement: fixed;
Text lowercase, uppercase or capital
if you have a stream of data and is not well formatted, you can user this properties to do it :
text-transform: uppercase // MY TEXT
text-transform: lowercase // my text
text-transform: capitalize //My Text
Input button or submit with a custom image
maybe you have designed a image button, and want to apply it to a input submit or button, for that, you can use this code:
background: transparent url(image.png) 0 0 no-repeat; //your background image
border: none; //setting border to none
overflow: hidden; // all the excess of data or text is hide
text-indent: -3000px; //moving the text inside the button outside the field of view
i hope this help you in some way
Regards,
Shadow.
Random Posts
Hi,
yesterday, i got the invitation from rockmeit to test their new browser, so, here i bring you a review from my experience with it.
What is RockMeIt?
RockMeIt is a browser, based on chrome, focused in the social networks. different from the normal browser, their interface has been changed integrating services as facebook and twitter, to get/set update to those social networks. the purpose of this browser is to make the share of content more easy for the user.
Installation
RockMeIt comes in a small installer of 500kb (windows version, there is also a mac version available), that after you open it, start downloading the browser itself and install it.
after the normal installation process you get a facebook login form. this is why rockmeit depends from a facebook app to make work their addons, so you need to login into your account and allow the access of the app to your personal data. after that, the browser start normally and you are ready to use it.
Related Post
Hi,
i’m trying to put some effort maintaining the blog, and today looking at it, i didn’t like it how it was, so i looked for some free template and i tweaked it a little to my taste and this is the result
i added the tweet button so is more easy to share the content and categories so is more easy to navigate the blog.
i hope you like it and any feedback about it is welcome
Related Post
Hi,
the people who know me, see that my talent for the art is less than the normal, even than i tried to learn, my skills in drawing or modeling are very bad (i could improve if i have the time but is impossible right now).
some months ago seeing the tigsource.com blog, i discover this free program called Sculptris, a high poly model program created by Tomas Pettersson. basically make the same as zbrush, of course with a lot less of features but at the same time with a very easy to use UI. you can download/see the trailer or screenshots from here.
is not a big app where you can rely all your 3D work but is a nice tool for people like me that don’t know almost anything of the 3D world and want to draw some concept or idea from his head.
give it a try and let me know what do you think !
Regards,
Shadow.








