You can set the display_content parameter to show the full post content.
Shortcode used:
[nlposts title_only=false display_content=true]
Result:
PHP strtolower & strtoupper UTF-8
- If you are coding for non english environments these two functions will help you easily transform unicode strings to lowercase or uppercase. Here is the problem:
1
Here is the solution:
1
That's it, your strings should be correctly converted to UTF-8 now.
- If you are coding for non english environments these two functions will help you easily transform unicode strings to lowercase or uppercase. Here is the problem:
jQuery tricks for dummies
jQuery is a JavaScript library that simplifies interaction with HTML documents, I'll be adding interesting tricks here so save this article to your bookmarks and come to check it once a while.
Haven't you found sometimes you just need to do certain things in a HTML document but you can't do it manually because it will need a crazy amount of work?
Here's when jQuery comes handy, imagine for example you need to add a CSS class to some images by their file extension, not to all images but the ones you have wrapped inside a specific area, how could you possibly do that?, here's your answer:
Adding classes to images by extension:
First imagine we have our super HTML code, something like this:
1
And we want to add my-awesome-class to each .jpg image displayed inside the new-doodles div, we can do it like this:
1
Here you can see the example running: Adding classes to images by extension in jQuery
Another useful trick is for quantity fields, imagine you want to increment or decrement a field every time someone clicks on a button (shopping carts tells you something?), here's how you can do so:
Quantity Fields in jQuery
First our super HTML as usual:
1
Now the JavaScript to make it work:
1
You can see it running here: Buttons Plus & Minus in jQuery
Text links to Hyperlinks in jQuery
Well, let's say you have a function to pull a list of articles from a RSS feed, suddenly you realize people include links into their articles but when you display the pulled information, you see them as plain text. This function allows you to transform those links in plain text into real hyperlinks:
1
Now the jQuery function to transform those plain text links into real hyperlinks:
1
Check out the example running here: jQuery Text links to Hyperlinks
That's all for now, you can read about jQuery Selectors from their official website and stay tuned for more tricks ;). Post your questions below, follow me on Twitter @laelitetw & suscribe to L'Elite Facebook page.
Tracking Visitors, Why? Why Not?
- You may think my opinion is somewhat biased by the fact I hold a professional master's degree in e-Commerce, but I'm also an open source developer. In recent years of the Internet, tracking tools have incredibly evolved, allowing you as a website owner to get to know your visitors pretty well.
Some people is concerned by the fact we - as website owners - have access to such information, creating campaigns and warning unaware users that their browsing behaviors are being analyzed by the sites they usually visit. Of course words are used as a tool in both sides, to attack or defend each point of view.
So, what can you do as a website owner to assure your visitors you won't put their privacy at risk when visiting your website? It is not an easy task, after all, confidence is about having trust in people. If you backstab your visitors sending them spam, selling their personal information, misguiding them for personal gain, then don't expect them to trust you or your website.
Tracking for the right cause
Tracking visitors is an important part of basic web strategy, the Internet doesn't know frontiers, it means for us - website owners - our website may be visited by our neighbors but also by people living on the other side of the world. For us as web visitors, it means we have access to websites created by people who may speak a different language, with different cultural backgrounds, etc.
So, tracking is important if we as website owners want to provide a better experience for visitors depending on their origin, and as web users if we want to obtain information relevant to our sociocultural context.
Here are some ideas about what information gathered through traffic monitoring should be use for:
- Optimize our website to visitors' platforms
- Provide localized versions for foreign visitors if they represent an important part of our traffic
- Publishing information at the right time
- Advertising only to relevant visitors
What should not be used for:
- Cross-site tracking (cyber-stalking)
- Individual profiling for exploitation
- Misguiding using psychological techniques
- Information gathering for selling to 3rd parties
Count me, don't stalk me
As an Internet user and e-Commerce professional I'm in favor of good tracking techniques, I understand why it is important for websites to gather such information about us, so why is people concerned about this topic? Because of abusers, those nasty webmasters trying to get money tricking and betraying their visitors, stealing people's information for their own profit.
New government regulations are trying to minimize the impact forcing websites to inform their visitors they are being tracked and allowing them to opt-out of it if that's what they want, but is this a definitive solution? I don't think so, there are a lot of techniques to track visitors in "stealth mode" and bad people will do bad things (does log in to opt-out sounds you familiar?).
So if you are a website owner please don't be evil, gather just the information you need to improve the services you offer, don't sell your visitors' information, don't stalk them, don't misguide them and don't betray their trust, remember, the Internet is open to everybody, smart people will uncover your nasty techniques and expose you, as a consequence you'll lose more than you'll win.
Finally if you're a web user, please allow the sites you trust to track your visits, they need this information to provide you with a better experience when visiting their websites, if you think they are abusing, in any way, maybe overusing advertisement, send them a message and let them know. Make your voice be heard.
- You may think my opinion is somewhat biased by the fact I hold a professional master's degree in e-Commerce, but I'm also an open source developer. In recent years of the Internet, tracking tools have incredibly evolved, allowing you as a website owner to get to know your visitors pretty well.
Widget for Bootstrap Hero Units
- Hello people!
Show me an example before I read the entire post or I'll leave...
It's been a while since my last post, sorry I've been really busy, well I'm still really busy but I wanted to share something with all of you. Maybe you have already heard about the Twitter Bootstrap, it's basically a group of interface components written in HTML, CSS and JavaScript aimed to help you reduce the time you spend designing and placing visual elements, allowing you more time to focus on new functionalities.
After I finished migrating my sites to their new home I decided to create some custom themes for my WordPress sites. There exist some theme frameworks you can use which include Twitter Bootstrap, Roots Theme and WordPress Bootstrap are two of the most known framework themes to get you going with Twitter Bootstrap without struggling with technical mumbo jumbo.
But, they are too "user friendly" for me so I decided to create my own theme and using only what I needed from Twitter Bootstrap, I wanted more control something none of those frameworks could provide in my case. One of Bootstrap components is called Hero Unit which is a component for calling extra attention to featured content. I wanted to use this Hero Unit in different pages on my website, but WordPress uses templates to display information, how could I add custom static content to a dynamic template then?
I thought it'd be a good idea to have a sort of code I could place in a template so I could pull specific information for the content being displayed, then wrap it using proper HTML tags so the content would be styled using Twitter Bootstrap rules. Too much hackery and workarounds, nasty stuff that would render the theme unmaintainable. Plugins? I couldn't find nor wanted one for such a simple task, so I decided to create a multi-instance widget inside my theme, something that could be activated when using my theme and disappear if the theme was not in use.
Now, I'm going to show you how to create one for your own theme, of course you can add more options if you need to, it's up to you, feel free to adapt the code to your needs. Below some screenshots of the results:
Good enough, don't you think? Here is where the technical mumbo jumbo comes in :(, but I promise to make it easier so you don't lose your hair while trying to accomplish the same thing I did. Go to the next page
First of all, let's take a look at the Hero Unit HTML syntax:
1
As you can see, it's pretty basic, we just need the Headline, Tagline, the Link and its Title. So we need four form fields to gather this information. Remember WordPress themes use dynamic templates, for that reason we need to tell WordPress when it should display one widget or the other depending on its content.
I wanted to add a Hero Unit to each page, with its own content and in different languages, the problem is I just have one template, all the content is loaded dynamically inside this template, so how could I tell if I was looking at the home page or the contact page? That's right!, I needed one more field so I could tell my widget where it should display one specific instance.
We are ready to bash some code!, remember we will need five form fields:
- Heading
- Tagline
- Link
- Lint Title
- Page title
Hero Widget Class
First, we are going to create the Hero Widget extending the WordPress Widget class, for the sake of good order let's create a folder called classes inside our theme directory:
- My theme
- classes
Inside that new folder called classes, create a new file called hero-widget.php inside this file we will put all the code needed to make the whole thing work.
Let's add the class wrapper, remember all the code below must be written inside the file called hero-widget.php:
1
It wasn't that hard, wasn't it? :), for readability's sake I'll split each function in different blocks, but remember all the functions below are going to replace the .... (dots) between the curly brackets.
Let's set some default values, actually it's just in case we would want to set content by default to save some time in the future, it's a good practice though.
1
As you can see, there we've got our 5 variables, now let's create our constructor to give this widget a name and ID.
1
We just registered the widget so WordPress recognizes it as a valid widget, if you're not familiar with internationalization, you should know the __( ) is used to make strings ready to be translated using gettext. The first part is the content and the second 'myThemeTextdomain' is the text domain.
Now let's create the front-end display, this function is called widget, it takes 2 parameters, both arrays, the first are the widget arguments and the second the values stored in the database.
1
Now let's create the update function, this one will save our data into the database:
1
Please, remember always, always, always to sanitize the data before sending it to the database, it will save you a lot of headaches ;). Finally let's create the form: Go to the final page
1
Great!, our widget is ready, now we need to make our theme aware it exists. Let's go...
If we want to use our Hero widget we have to inform our theme there's a widget inside itself, this is what WordPress calls register functions. If you create functions but don't register them, they will not be accesible from your theme.
To do this just open or create it if it doesn't exist, a file called functions.phpand place it inside your theme's main folder:
- My Theme
- classes
- functions.php
Then add the code below:
1
And that's it!, save and go to your Dashboard > Appearance > Widgets to check your new fancy Hero Unit Widget working ;).
Download the files
If you have questions or want to say something post a comment below!
- Hello people!
LinkedIn & The 6.2 Million Password Hashes Stolen
Maybe you have already read about the russian guy who hacked LinkedIn and stole almost 6.2 million (6.143.150) password hashes, if you are a LinkedIn user and haven't changed your password yet what are you waiting for?
In a post written by Vicente Silveira Director at LinkedIn in their official blog, they confirm the hashes stolen correspond to LinkedIn accounts and they continue to investigate the causes. They have taken some actions already, the users which passwords were compromised won't be able to log in until they reset their passwords. These users will receive an email from LinkedIn explaining how they can do so. It's important to remember the email sent by LinkedIn will not contain any links (maybe to avoid fake emails being sent by crackers to steal account names along with non-hashed passwords).
Another action taken by LinkedIn is improving the security of their passwords, the stolen ones were hashed using the SHA-1 cryptographic hash algorithm, even though the file does not include any references to the users' accounts associated to them - which makes it harder for crackers to break into their accounts - it's only matter of time to find it out (using brute force attacks).
So LinkedIn is now using the hash + salt technique (the same used by WordPress) which is for sure a better way to keep password a little bit safer.
Some of the hashes stolen contain five zeros (00000) at the beginning of the string which some users believe are cracked hashes, between the passwords already found are: "linkedin", "password", "secret". Some people believe using strong passwords makes them unbreakable but one of the concerned users had a 20 characters length password.
The hashes can be cracked using dictionary, brute force and rainbow attacks, if we take into account the speed and power of computers today only 2000 combinations are needed to break a SHA-1 hashed 5 characters length password.
It doesn't matter if you strong passwords, if the systems where they are stored are weak they will be stolen. Here I will show you my way to hash password in PHP, I call this the double-key hashing technique, it uses a combination of SSH RSA signature + Random Hash generation + SHA-256 cryptographic algorithm.
1.- First I create a SSH RSA private signature which I will use as the main key:
1
2.- Then change it's name and save it into the main folder of your application, set the permissions so only the system administrator can access this file. Finally I access it from my application:
1
3.- Now I generate a random salt for each user password:
1
4.- Now I have everything I need so I put those elements together with the password:
1
5.- That's it, now you have a stronger password double hashed, you just need to store the data and from now on you'll have to double-hash the password sent by the user and match it against the password hashed retrieved from the database.
The advantage of using this method is that even if two users register the same password they won't have the same hash, so in case someone steals the hashes like what happened to LinkedIn, it won't be possible to determine which passwords are the same ;).
And you, are you already using strong hashing methods to protect your users?
Create a beautiful Twitter background in The GIMP
- As you may have already noticed, a lot of people with Twitter accounts personalize the background image for their profile page. Twitter of course allows you to pick one of their predefined background images or use a color picker to set a colored (boring) background.
Some companies pay designers to create their own branded background, you could pay a good designer between 40$ - 200$ for a background image or you could do it yourself. There are a lot of how-to and tutorials to create these background images, but usually one of the things you need in order to follow those instructions is to install Adobe Photoshop.
Good news for you, there's a FREE and open source application called The GIMP that is a perfect and cheaper alternative to Adobe Photoshop, here I'll show you how you can create a cool background image for your Twitter profile. Of course if you don't have it yet, go download and install The GIMP: http://www.gimp.org/ (pssst Windows users click here: http://www.gimp.org/windows/) and keep reading.
1.- Twitter's Template Size
Twitter uses an adaptative template, they've set 1024px width by 768px height as their minimal screen resolution, this is important to remember when creating a background image. If you don't mind your branding gets hidden when viewing your profile in low resolution screens then you can ignore this. Otherwise you must know the space between the left margin and the content is really small when using 1024px by 768px, you may use a 80px width wrapper for your branding.
I'm using my own screen resolution (1280px by 800px) which is a common used one these days, so we will have 250px from the left margin available for our branding. With this in mind, let's go to the step 2.
2.- Create the Image
Open The GIMP and create a new image (menu File > New...) 2560px width by 1600 height (see image 1)
Now we are going to add some guides, these are very important when working with fixed templates but shamefully a lot of people ignore them when working with this kind of applications. Go to the menu Image > Guides > New Guide... (see image 2), create two horizontal guides for the first one set 40 and the second one 70, finally create a vertical one set to 235 (see images 3,4,5) the resulting image should look like in image 6.
Another thing I like to do every time I work with images is naming the layers, this is specially useful when we need to modify specific elements inside our image. To change the name of a layer just double-click on the layer's image and add a new one (see image 7):
Add a new transparent layer called Header to do this click the white page icon on the left bottom corner of the layers sidebar (see image 8):
Now pick the rectangle select tool (press R) and create a selection from the top left corner to the top right corner, from the top border to the 70px horizontal guide (see image 9):
I'm going to show you in the following steps how I created the background image for my Twitter profile. I used the color picker from the left sidebar and selected a dark red hexadecimal code: #c02942 to fill the space with the color select the Bucket Fill tool and clicked inside the selected area, then I used the Navaho pattern to create a colorful border for this header.
Then I added my logos and picked the text tool (press T) to add some text, each time a new layer was created (see image 10):
Remember keeping the content you want to remain visible on the left of the vertical guide (see image 11):
Once you've added all the elements you want for your image (remember do not use external images in excess or your image will be too heavy, Twitter limits to 800kb) save your image, you could use JPG but you'll lose quality without gaining too much compression, I use PNG to keep a good quality with a good compression level.
The GIMP allows you to save images in different formats, first let's save the image in the source format so you can make changes later, go to the menu File > Save and from the All Images list pick GIMP XCF Image (*.xcf) or just add .xcf to the name of the image (see image 12):
Now let's save as a PNG image so we can upload it to Twitter, go to the menu File > Save As... and just pick the PNG image or add .png to the name of the image (see image 13):
Finally go to the Design settings page on Twitter (click here https://twitter.com/settings/design), upload your PNG image and save the changes. I invit you to check my Twitter profile @laelitetw so you can see the final background image and follow me ;). That's it, if you have questions please use the comment form.
- As you may have already noticed, a lot of people with Twitter accounts personalize the background image for their profile page. Twitter of course allows you to pick one of their predefined background images or use a color picker to set a colored (boring) background.
Make your CV shine with LibreOffice
- Aren't you tired of those boring résumé, all looking the same, black and white written in "Times New Roman" not so interesting to look at? Because I'll tell you one thing, you can be the awesomest person in your field with a huge list of achievements and lots of qualifications but if your CV doesn't visually stand out is pretty sure you will be waiting a long time for them to call.
It is normal to think there's no much to do with a text editor like Microsoft Word® or LibreOffice Writer, besides using some clipart's images or changing the font color. Well, I have good news for you, here I'll show you how to make your résumé look sexier and stand out from the rest using LibreOffice Writer.
First a quick introduction to LibreOffice if you don't use it yet, why is it so cool? Because it's FREE, open source and it works on Windows, GNU/Linux and Mac so your documents keep the same visual style through all platforms. LibreOffice is a productivity suit that gives you all the applications you need to produce and process data: Writer allows you to create textual documents, Calc is the spreadsheets application, Impress for presentations and there are others like Draw, Math and Base, feel free to explore their website and download this wonderful pack of applications.
Now let's make our résumé shine with LibreOffice Writer:
1.- Page Properties
First we're going to delete the barriers that keep us caged inside the box ;), what I mean is to set the margins to zero so we can use all the available space to add visual elements that will make our CV look way better; to do this go to the menu Format > Page... and click the Page tab if it's not selected by default (see image 1):
Then select the paper format and put zero for all margins (see image 2):
Once you've done this LibreOffice will prompt you a message asking if you're sure you want to apply the settings even if the margins are out of print range, click Yes (see image 3):
2.- Adding visual appeal
Now we are ready to add some images in order to make our document look better, if you don't feel creative enough I suggest you to check Colourlovers' Patterns I'm sure you will find something suitable for you. I'm going to use a pattern called Navaho, to insert an image go to the menu Insert > Picture > From File... (see image 4):
I'll use this image as a top and bottom border, you just have to adapt the image to the width of your document. Remember this is the part where you have to exploit your artistic skills ;) (see image 5):
I'm just going to copy the same image to use it in the bottom of the document (see image 6):
3.- Adding borders
If we want to keep our text inside the print area we will use a little trick, let's add some "invisible" borders to cage our content inside the box, go to the menu Format > Page... and click the Borders tab, click the option Set All Four Borders under the Line arrangement section and select White as the line color, under the Spacing to contents put the space in centimeters you want the text to be from the borders, I used 2 centimeters (see image 7):
Once you've done this, your content will be "caged" inside the print area (see image 8):
4.- Adding content and more visual elements
It's time to add some content, I added the black block, first name, last name, degree, then I used the rectangle shape from the Drawing toolbar (menu View > Toolbars > Drawing) to make everything more visually appealing (see images 9, 10, 11):
Now I'm going to use the shadow option to make the titles different from the rest of the text, highlight the text you want to change the style then right-click and select Character... (see image 12):
Click on the Font Effects tab then check the Shadow option (see image 13):
Finally, once you've finished adding all the content and tweaking the visual style you just need to save the file, if you're used to work on Word® then you know their default format is .doc, in LibreOffice the default format for Writer is .odt, the problem is: if the person you're going to send your résumé don't have LibreOffice installed, she won't be able to open it, so I'll show you how to save in .odt and export the file as a PDF (.pdf) so everyone can see your beautiful CV ;).
To save your document just go to the menu File > Save, the application will show you a window where you can select where to store the file and put a name, you could also change the file format (you can save as .doc if you want, but it won't look the same) (see image 14):
And let's finish exporting our résumé as a PDF file so everyone can open it without any problems, just go to the menu File > Export as PDF... or just hit the PDF icon on the applications toolbar, the system then will show you a window where you can select the destination folder and the name (see image 15):
Congratulations, you've created a résumé that will stand out from the rest! If you want to see my results, feel free to download the LibreOffice Writer and the PDF files linked below:
Don't forget to comment and share this article.. If you have questions, don't hesitate to post them using the comment form below :)...
- Aren't you tired of those boring résumé, all looking the same, black and white written in "Times New Roman" not so interesting to look at? Because I'll tell you one thing, you can be the awesomest person in your field with a huge list of achievements and lots of qualifications but if your CV doesn't visually stand out is pretty sure you will be waiting a long time for them to call.
WordPress Developers watch out for Phishing
If you're contributing to the WordPress community you've maybe realized that even if it's a great place to share your knowledge and learn from others, it's also a place where script kiddies and posers try to steal accounts in order to gain access to the repository.
This is a serious issue because it can affect a lot of users indirectly, imagine for a moment that someone got access to your repository, make some changes and all the users who have downloaded your plugin receive an update notification, after the update they can't access anymore to their blogs and all their user data has been stolen. Now you get it right?
So, what could you possibly do to stop these thieves?, I will give you some hints but first I'll show you how a phishing message looks like:
From: WordPress.org <wordpress.plugins.mail@gmail.com>
Subject: [WordPress.org Plugins] Urgent: Your Plugin Has Been Removed
Message:
Dear WordPress Plugin Developer,
Unfortunately, a plugin you are hosting has been temporarily removed from the WordPress repository. We are going to manually review your plugin because it has been reported for violating our Terms of Service. If your plugin does not get approved then it will be permanently removed from the WordPress repository.
You can check if your plugin has been approved or rejected at
http://wordpress.org/extend/plugin/my-plugins-status/
Look that the email address is not an official one, all official WordPress email addresses use the @wordpress.org or @wordpress.com domain. Then, they mask the link to the fake website pretending to be an official WordPress address but this link takes you to this address http://wordpresss.horizon-host.com/bb-login.php which looks like the real one:
You just need to put your user and password and you're done, they got your login information. If it happens you got caught by this attack, you have to change your password immediately! using this link (this is the real one) http://wordpress.org/support/ once you're logged in go to your profile and change your password.
Now some things you can do:
- Report the email address for phishing attempt: in this case it's a gmail address so what I did was using the Gmail option Report Phishing, you can also check this page http://support.google.com/mail/bin/request.py?&contact_type=abuse
- Find out who's behind the attack and report them: I used whois to find out who was behind the main domain; I found out that the horizon-host was registered through Godaddy Inc, then I used their form for Reporting Abuses and I explained them why I was reporting the domain and sent also a copy of the phishing message.
- CHANGE YOUR PASSWORD: I know I already said so but seriously it's mandatory.
- Spread the word: read [WordPress.org Plugins] Urgent: Your Plugin Has Been Removed [PHISHING] and [sticky] [closed] WARNING: PHISHING ATTEMPT
Stay alert!
8 Tips to become a Genius
Have you ever met a genius?
Those people who seem to know about everything, usually surprising you and in some cases making you feel depressed because they do things that you think are impossible for you to accomplish.
Sometimes these people induce you to think they were naturally born that way, but what would you think if I tell you that you can become a genius just like them?. It's not a secret, most of the people chose the easiest path before putting themselves on the hard road to success. Nevertheless, the path to achieving mental flexibility is never easy.
Here you'll find some ideas that are going to help you face a variety of life's challenges.. ok you're not going to become Dr. House but these tips will put you well on your way to becoming a smarter person.
1.- Cultivate a reading habit
A lot has been written about this topic (14 Ways to Cultivate a Lifetime Reading Habit), some researches have been done in this field, "The Psychology of Reading for Pleasure: Needs and Gratifications" by PhD. Victor Nell or the study "The Benefits of Reading for Pleasure" conducted by Mark Taylor of Nuffield College at Oxford which concludes that reading for pleasure can lead to better opportunities in the future.
2.- Explore beyond the surface
Today thanks to the Internet we have access to an incredible amount of websites which provide the capability to search any type of information, this is a great time saver. Nonetheless, before using those search engines you should take some minutes to think what are you going to look for and what do you want to find. A lot of people get frustrated because they can't find what they're looking for, and most of the time it's because they're doing the wrong search. Google Advanced Search and Yahoo Advanced Search are your friends.
3.- Make mistakes and learn from them
People are afraid to fail, but if we don't fail then we can't learn. Making mistakes and suffering the consequences doesn't feel good but this is the best way to learn. Forget your fear of failing, don't pretend to know everything and please try to solve the problems by yourself before asking someone for help. If you get stucked then try to do some deep searches (see tip n° 2), finally if you couldn't find the answer then ask someone for help.
4.- Don't become a parasite
One of the negative side effects of asking for help too often is you that you end becoming a parasite for the people that help you. Because of their great knowledge you see them as an easy way to overcome the obstacles.
For your own good, please don't do that, as a solution you can ask intelligent questions that point you in the right direction. Don't ask for answers but instead ask for tips to help you overcome the issue at hand, doing this will help you sharpen your brain and you'll avoid becoming annoying to the people that help you. If they start ignoring you, congratulations! you're already a parasite.
5.- Don't believe everything you read but don't distrust all
There's a lot of information out there, this is a double-edged sword; a lot of people like to mislead others, publishing fake information with the sole purpose of getting something from you (money, personal data, etc). Run validation tests to all the information, look for the same data on two or three trusted sites, read positive and negative comments and then try to draw your own conclusions.
6.- Take the risk of proposing and trying out new things
When you're the new comer at the university or a company, you meet many people that have been there since the beginning. For that reason they're used to do everything the same way they have for years and this is ok. The problem is, applications evolve over time and maybe now it's possible to do things in a different or easier way, unfortunately for you they will try to make you fear if you think taking a different approach to do the same. Don't let them transform you into a robot, avoid becoming a sheep that follows everything blindly without questioning the things you do.
Think out of the box, try new and better ways of doing the same tasks; if you find it's possible to do things faster and better, document everything, take pictures or screenshots and keep track of all you've done. But, please don't go screaming excited about your findings and more important don't try to force anybody to start doing things the way you did, doing this will make them hate you and suddenly they will start ignoring you. Defend your findings without being rude or smart-aleck.
7.- Respect others' knowledge without neglecting your own
Different paths lead to same location, it's the same when talking about knowledge. Sometimes it's possible to get the same results using different approaches, it doesn't mean you're right and others are wrong, you're just using a different approach. Respect others' ideas but don't allow them to disrespect yours (without being a bully).
8.- Personal development is a daily task
I've met a lot of people that think culture is like clothes that can be put into the closet when they come home. I disagree with this point of view, knowledge is everywhere you just need to open your eyes and look around. Learn something everyday about everything you can, it's true you won't be an expert but your brain will sharpen and your productivity will increase. It's not a coincidence that you really are what you know.
Now it's your turn, do you have a tip to help others become smarter?
Network Latest Posts - WordPress 3 Plugin
Update: The latest information about Network Latest Posts is available at this address: http://en.8elite.com/network-latest-posts/
One of the things that came out when migrating from a single WordPress installation to a WordPress Network multi-site was the importance to display the latests posts from all the blogs inside my network in the main site. My first thought was "ok, maybe someone had the same issue and wrote a plugin", if my idea wasn't totally wrong, I couldn't find anything suitable for my needs.
There were a lot of plugins but none of them actually gave me the freedom I needed, then I found the WPMU Recent Posts Widget written by Angelo but it was conceived as a Widget and I was looking for something else, so what I did was to take his code and improve it to make it suitable to my needs. So, Network Latest Posts was born.
The idea behind this plugin is simple, find and display the latests posts from all the sites inside my network. Allowing me to use it as a Widget or as Shortcode to put it in a page or an empty post, easy right?
Here are the main functions:
- Display the number of posts by time frame chosen by the user (30 days by default)
- Display titles only or titles and excerpts
- Insert html tags to wrap the content output
- Use shortcodes to display the posts wherever you want
- Display the latest posts for individual blogs using the blog's ID (since version 1.1)
- Display the thumbnail (featured image) for each post (since version 1.1)
- Display by post's type (post, page, etc) (since version 1.2)
- Ignore Blogs' IDs (since version 1.2)
- Filter by Categories (since version 2.0)
- Filter by Tags (since version 2.0)
- Paginate results (since version 2.0)
- 100% CSS friendly
- Generates excerpts from the posts' content (since version 2.0.4)
- Display the full metadata: Author, Date & Time (since version 2.0.4)
How to Install:
- Upload the network-latest-posts folder to the /wp-content/plugins/ directory
- Activate the plugin for your network through the Plugins menu inside the Network Admin
- If you want to use it as a Widget, you can add the Network Latest Posts widget under Appearance->Widgets
- If you want to use the Shortcode, go to a page or post then write [nlposts] (that's it, seriously!)
Other Options:
If you want to adapt the output to your needs, you can pass some extra parameters to the shortcode, here you have the list:
1
- title = the section's title null by default
- number = number of posts to display by blog (10 by default)
- days = time frame to choose recent posts from (in days) (0 by default)
- titleonly = if false it will display the title and the excerpt for each post (true by default)
- wrapo = html opening tag to wrap the output (for styling purposes) (null by default)
- wrapc = html closing tag to wrap the output (for styling purposes) (null by default)
- blogid = the id of the blog for which you want to display the latest posts null by default (since version 1.1)
- thumbnail = allows you to display the thumbnail (featured image) for each post, it can be true or false (false by default) (since version 1.1)
- cpt = allows you to display a custom post type (post, page, etc) (since version 1.2)
- ignore_blog = allows you to ignore one or various blogs using their ID numbers (since version 1.2)
- cat = this parameter allows you to display posts by one or more categories (separated by commas) (null by default) (since version 2.0)
- tag = this parameter allows you to display posts by one or more tags (separated by commas) (null by default) (since version 2.0)
- paginate = this parameter allows you to paginate the results, it will use the number parameter as the number of results to display by page (false by default) (since version 2.0)
- excerpt_length = this parameter allows you to set the length of the excerpt string in number of characters, use 200 to display 200 characters, if the string is longer than that it'll add ...more linked to the entry (null by default) (since version 2.0.3)
- display_root = this parameter allows you to display the articles published in the main blog (network root) true to display (false by default) (since version 2.0.3)
- auto_excerpt = will generate an excerpt for each article listed from the content of the post, possible values true or false (false by default) (since version 2.0.4)
- full_meta = display the author's display name, the date and time when the post was published, possible values true or false (false by default) (since version 2.0.4)
Styles:
You can adapt the output to your site's theme, here you have the list of CSS classes used by this plugin:
- .network-latest-posts = Content wrapper (div tag)
- .blog-X = This class is in the same level of .network-latest-posts, the X is the ID of the blog where the post was found
- .network-latest-posts-sectitle = Class used if a title for the shortcode has been set
- .network-posts-title = Class for the post's title (H1 tag)
- .network-posts-source = Where the post comes from (span tag)
- .network-posts-excerpt = The post's excerpt (p tag)
- .network-posts-pagination = The page links (div tag) (links are a ul list)
Since the version 2.0 this plugin has it's own CSS file so you can tweak the visual style from there, it's found inside the plugin's folder.
Download:
Download from the WordPress Plugin Directory! : Network Latest Posts v2.0.4 from WordPress Plugin Directory
Demo:
You can see this plugin working in my main network site www.8elite.com, I display there the latest posts from all the blogs inside my network.
If you want to see some examples of use, please refer to this links Network Latest Posts Examples and Network Latest Posts Pagination
Updates:
Hello, I just wanted to say I've been really busy and the two new features weren't so easy to implement at first but I finally made it, I always test new features in my own network before releasing them but if you see something wrong please let me know as soon as you can so I can correct the mistakes, I'm a human after all :). Don't forget to rate this plugin in the WordPress repository so others can download it without fear to break their sites. I hope you find the new features useful enough, cheers.
Configuración de Digitel 3G+ y Red de Datos en Android 4.2.1 Jelly Bean
- Si tienes un teléfono con sistema operativo Android y has decidido utilizar Digitel como tu proveedor de servicios de telefonía y datos, seguramente te has encontrado con un escenario similar al siguiente:
- Tienes señal completa, puedes llamar y recibir llamadas
- Servicios como Gtalk, WhatsApp y ChatOn funcionan sin problemas
- Al abrir el navegador web, compruebas que no tienes conexión a Internet (indica un error de conexión al proxy)
Si este es tu caso, no te preocupes, las antenas 3G no explotaron, no se cayó el enlace, no están actualizando servidores y tampoco es que tu teléfono no sea compatible con líneas Digitel. Esto se debe a un error de configuración que establece la SIM de Digitel al momento de configurar el terminal.
Para solucionarlo sigue los pasos a continuación (Android 4.2.1 Jelly Bean):
- Ingresa al panel de configuración y luego a la sección "Redes inalámbricas y redes"
- A continuación, selecciona "Redes móviles" y elige "Nombres de puntos de acceso"
- Ahora marca la opción "Digitel (gprsweb.digitel.ve)" y verifica que las opciones correspondan a las mostradas más adelante
- Nombre: Digitel
- APN: gprsweb.digitel.ve
- Proxy: No definido (si ves una dirección IP del tipo 200.x.x.x, bórrala)
- Puerto: No definido
- Nombre de usuario: No definido
- Contraseña: No definido
- Servidor: No definido
- MMCS: No definido
- Proxy de MMS: No definido
- Puerto MMS: No definido
- MCC: 734
- MNC: 02
- Tipo de autenticación: No definido
- Tipo de APN: default,supl
- Protocolo APN: IPv4/IPv6
- Activar/Desactivar el APN: APN activado (opción no habilitada)
- Portador: Sin especificar / eHRPD (yo utilizo este sin problemas). LTE (4G en el futuro ;) y si tu teléfono lo soporta)
- Una vez realizados todos los ajustes, no olvides antes de salir debes guardar los cambios, esto es muy importante, de lo contrario perderás todo y el problema persistirá. Para guardar los cambios debes presionar el botón "Menú" y elegir "Guardar".
Eso es todo, ahora simplemente regresa a la pantalla de inicio y espera unos segundos a que la red se actualice y el teléfono reconozca los cambios realizados. Si todo marcha como se espera, podrás navegar a velocidades increíblemente altas (no, no estoy exagerando).
- Si tienes un teléfono con sistema operativo Android y has decidido utilizar Digitel como tu proveedor de servicios de telefonía y datos, seguramente te has encontrado con un escenario similar al siguiente:
Xperia Z: El nuevo androide inteligente de Sony
Sony ha anunciado hoy su primer teléfono inteligente de cuatro núcleos durante una conferencia de prensa celebrada en la sede del CES (siglas en inglés para el Festival Internacional de Electrónica de Consumo) que se lleva a cabo en Las Vegas, Nevada, su nombre: Xperia Z.
La compañía espera que este nuevo Android se convierta en un rival de peso para los ya exitosos Samsung Galaxy S3 y el Apple iPhone 5. El Xperia Z cuenta con una pantalla de 5 pulgadas full HD Reality Display 1080p de alta definición, que brinda una resolución de 1920 x 1080 píxeles y una densidad de 443 píxeles por pulgada (el iPhone 5 brinda 326 píxeles por pulgada) lo que da como resultado una imagen altamente realista.
Esta pantalla cuenta con la tecnología Mobile BRAVIA® Engine 2 que optimiza automáticamente las imágenes para que luzcan más brillantes y nítidas, así como un mejor manejo del color y contraste.
Otra de las novedades que presenta este teléfono son su cámara fotográfica de 13.1 megapíxeles (y cámara frontal de 2.2 megapíxeles), y la revolucionaria tecnología Exmor RS™ con HDR (siglas en inglés de alto rango dinámico) que permite capturar fotos y videos nítidos y con colores naturales en cualquier tipo de luz. Esto brinda al Xperia Z gran ventaja a la hora de filmar o tomar fotografías a contraluz.
Sony ha decidido incluir mejoras no solo a nivel interno, también se han preocupado por hacer este nuevo androide un guerrero resistente al agua (pruebas indican que resiste 30 minutos sumergido bajo el agua) y al polvo, que son dos de los enemigos mortales de cualquier dispositivo electrónico.
El Xperia Z está hecho de poliamida reforzada con fibra de vidrio que es una aleación utilizada en la construcción de partes para vehículos, tanto su parte anterior como posterior están hechas de vidrio templado con recubrimiento antifragmento.
Otra de las novedades que incluye es la conectividad NFC que permite visualizar todo el contenido del teléfono en el televisor, basta con desplazar el contenido (música, videos, imágenes) desde el dispositivo al televisor para que comience a reproducirse.
En cuanto a conectividad presenta WiFi, NFC (One-touch Sony), DLNA, Bluetooth, 2G, 3G, LTE (4G). Procesador Quad-Core Qualcomm® Snapdragon™ S4 Pro de 1.5Ghz y 2GB de RAM, memoria de almacenamiento de 16GB expandible a 32GB por micro SD. Su procesador gráfico Adreno 320 permite jugar juegos 3D. Y por último su tecnología HD Voice que elimina el ruido de fondo permite escuchar los sonidos mucho más claros y fuertes. Este teléfono incluirá Android 4.1 Jelly Bean.
Aún no se ha publicado fecha oficial de lanzamiento y precio, sin embargo se espera que esté disponible a nivel mundial durante el primer cuarto del 2013, el Xperia Z se ofrecerá en tres colores: blanco, negro y púrpura.
Crea tu Propio Repositorio de Extensiones Pagas para WordPress
- WordPress es sin duda una de las plataformas para la publicación de artículos más extendidas en el mundo entero, es relativamente facil configurar y comenzar a utilizar la plataforma en pocos pasos.
Sin embargo cuando se refiere a temas avanzados, WordPress aún tiene un buen camino por recorrer. Conseguir realizar cuestiones avanzadas en WordPress no es tan sencillo como esperaríamos, la documentación es escasa, está muy dispersa y las pocas personas que manejan correctamente esta información no la comparten o lo hacen de una forma bastante compleja de entender.
Pasada la introducción, te invito a descubrir lo que los profesionales de WordPress no cuentan, el secreto de la API de actualización de extensiones WordPress y la llave para crear tu propio directorio en casa.
¿Por qué crear tu propio directorio de extensiones?
Antes de comenzar es importante preguntarse ¿por qué?, por qué querríamos rompernos la cabeza creando nuestro propio directorio de extensiones si WordPress ya posee uno y es el que usan millones de usuarios en todo el mundo. Pues la respuesta es simple, el directorio de extensiones de WordPress es un repositorio para extensiones gratuitas, debes enviar tu extensión y esperar que sea aprobada para poder subirla al directorio y que el resto del mundo pueda descargarla.
¿Qué ocurre si quiero vender mi extensión? bueno tienes algunas opciones, la pones a disposición en tu propia tienda en línea y permitir a tus clientes descargarla, sin embargo cuando publiques actualizaciones tendrás que notificar manualmente a tus clientes que una nueva versión fue publicada y estos van a proceder a descargar la extensión e instalarla manualmente. Puedes usar algún portal como CodeCanyon para venderla, sin embargo es el mismo procedimiento a menos que poseas conocimientos avanzados para adaptar tu extensión y usar su propia API.
Esto es engorroso, cuando actualizas tu extensión en el directorio WordPress los usuarios que la han instalado son notificados que existe una nueva versión disponible y proceden a actualizarla. Para poder ofrecer a tus clientes esta opción debes poseer tu propio directorio y de esta forma una vez actualizada tu extensión, serán notificados y podrán descargar la nueva versión sin tener que acceder a tu sitio, descargar o instalar nada manualmente.
Requisitos previos
- Tu extensión para WordPress
- Base de datos donde vas a almacenar / extraer información
- Servidor web público (la API no acepta consultas en modo local)
- AdoDB5 (para la clase de la base de datos o puedes crear la tuya de la forma que desees)
- Paciencia :)
Lógica de Actualización de la Extensión
Antes de comenzar a escribir código como obsesos necesitamos aclarar dónde estamos, qué queremos y hacia donde vamos con todo este asunto. Me basaré en el principio de que tu extensión necesita una licencia para poder ser actualizado, cómo generarás las licencias escapa del alcance de esta guía, cómo la venderás también. Aquí te voy a explicar cómo permitir que tus usuarios sean notificados de nuevas versiones si sus licencias lo permiten o de lo contrario inviten al usuario a adquirir una licencia para beneficiarse de las bondades de una versión paga. Según esta idea, el modelo entonces sería el siguiente:
- El cliente compra tu extensión.
- Una vez instalada, la extensión informa al usuario que debe activar su copia usando la licencia que recibió al realizar el pago.
- Una vez el usuario ha ingresado la licencia, la extensión verifica que es válida, de lo contrario sigue notificando que debe activar su copia.
- Cuando se realice alguna actualización el usuario será notificado a través de la interfaz de actualización de extensiones de WordPress.
Función: Actualización de la Extensión
Es aconsejable que tu extensión incluya en alguna parte el número de versión, esto es necesario ya que requeriremos este número para comparar la extensión instalada con la disponible en nuestro directorio. Yo personalmente utilizo una variable global que puedo ir cambiando fácilmente cuando realizo actualizaciones, por ejemplo:
1
Antes de crear la clase para usar la API de actualizaciones vamos a agregar una función para realizar consultas a nuestra API en busca de actualizaciones, dentro del fichero de tu extensión agrega una función de actualización así:
1
Si observas el código anterior, se hace referencia a api_actualizacion() que es la clase que construiremos para consultar la base de datos, también necesitamos licencia_miExtension que es un campo que colocaremos en la página de opciones. Ahora crearemos la función que verifica la licencia de usuario:
1
Opciones de la Extensión
A continuación vamos a escribir una sencilla página de opciones para permitir a los usuarios registrar su código de licencia. Esto lo puedes hacer en un fichero extra si lo deseas, de esta forma evitarás agregar demasiada información al fichero principal de tu extensión:
1
Clase de la API de Actualización
La API de actualización de WordPress es una de las joyas más preciadas y más difíciles de encontrar, más aún entender cómo funciona y cómo adaptarla a nuestras necesidades. Existen varios formatos publicados con más o menos funciones, sin embargo se encuentran en inglés y no explican muy bien su funcionamiento.
Esta clase puede contener lo que desees, tantas funciones como creas conveniente para nutrir tu extensión, sin embargo debes tener presente que hay unas funciones mínimas que tienen que estar presentes:
- Constructor de inicialización de la clase
- Función para verificar actualizaciones
- Función para verificar información de la extensión
Yo incluyo algunas funciones adicionales para soportar el uso de licencias, a continuación la clase:
1
Transient es una API de WordPress que ofrece una manera simple y estándar de almacenar datos temporalmente en caché, asignándoles un nombre personalizado y un período de tiempo durante el cual será accesible, una vez el período ha transcurrido la información habrá expirado y el objeto es eliminado.
Durante la consulta de actualización WordPress guarda la respuesta del servidor durante un tiempo definido, de esta forma evita realizar consultas excesivas al servidor central donde residen las extensiones.
Ahora vamos a crear el fichero que recibirá las consultas hechas por nuestra API de actualización, este fichero se ubicará en la ruta principal donde se encuentre tu API accesible a través de http://api.tudominio.com o cualquier otra dirección que hayas asignado.
Script de Consulta de la API
Retomando el capítulo anterior, este es el fichero principal que recibe las consultas generadas por la API de actualización. Debe encontrarse en tu servidor web y ser accesible a través de la dirección URL proporcionada en la función buscar_actualizaciones() para este ejemplo he usado http://api.miservidor.com/.
1
Ahora solo resta la parte final, crear la clase de la base de datos que responderá a todas las consultas hechas anteriormente.
Clase de la Base de Datos
Este es un modelo de la clase para consultar a la base de datos, puedes usarlo o puedes crear el tuyo, en realidad la parte más intrincada del proceso ha sido la API de actualización de WordPress. Cómo consultes a la base de datos es cosa tuya, sin embargo aquí está, esta clase hace uso de la librería AdoDB5 que puedes descargar desde http://adodb5.sourceforge.net:
1
Eso es todo, ahora debes poner todo en su lugar y comenzar a realizar las pruebas. No cabe duda que es un trabajo algo complicado, sin embargo analizando correctamente la información aquí presentada lograrás hacer que funcione, de esta forma funciona la API para una de mis extensiones de pago llamada Single Latest Posts.
No dudes en dejar tus comentarios o preguntas en la sección inferior, y te invito a que compartas este artículo ya que es una información difícil de conseguir ;).
- WordPress es sin duda una de las plataformas para la publicación de artículos más extendidas en el mundo entero, es relativamente facil configurar y comenzar a utilizar la plataforma en pocos pasos.
PHP strtolower & strtoupper UTF-8
- Si estás programando sistemas para idiomas como el español o ruso que contienen caracteres especiales o con acentos, seguro habrás notado un problema al usar las funciones strtolower y strtoupper de PHP y es que estas no convierten correctamente caracteres en unicode. Este es el problema:
1
Aquí la solución:
1
Y eso es todo, ahora tus cadenas deberían convertirse correctamente manteniendo los caracteres en UTF-8.
- Si estás programando sistemas para idiomas como el español o ruso que contienen caracteres especiales o con acentos, seguro habrás notado un problema al usar las funciones strtolower y strtoupper de PHP y es que estas no convierten correctamente caracteres en unicode. Este es el problema:
Trucos en jQuery para Principiantes
jQuery es una librería JavaScript que facilita la interacción con documentos HTML, en este artículo estaré añadiendo trucos interesantes así que te recomiendo guardar el enlace en tus favoritos y revisarlo de vez en cuando.
Seguramente alguna vez trabajando con documentos HTML te has topado con la necesidad de manipular muchos elementos y hacer el trabajo a mano representaría una tarea titánica.
Aquí es cuando jQuery se vuelve realmente útil, gracias al poder de los selectores. Imagina por un momento que necesitas añadir una clase CSS a todas las imágenes de determinada extensión que se encuentren dentro de un elemento en particular, ¿Cómo podrías conseguir tal cosa sin hacerlo a mano?, aquí la respuesta:
Añadiendo clases CSS a imágenes por extensión
Primero imagina que tienes un código HTML similar a este:
1
Y que quieres añadir la clase my-awesome-class a cada imagen .jpg mostrada dentro de los div con clases new-doodles, lo podemos hacer así:
1
Aquí puedes ver el ejemplo ejecutándose: Añadiendo clases CSS a imágenes por su extensión
Otro truco bastante útil son los campos de cantidad, imagina que quieres incrementar o decrementar el valor de un campo de formulario al hacer clic en un botón (¿los carritos de compra te dicen algo?), aquí te muestro como hacerlos:
Campos de Cantidad con jQuery
Primero el HTML como acostumbro:
1
Como puedes ver hay un campo de cantidad y los campos para aumentar y disminuir el valor, a continuación el código JavaScript para hacerlo funcionar:
1
Aquí puedes ver el ejemplo ejecutándose: Botones más y menos en jQuery
Enlaces en Texto plano a Hiperenlaces con jQuery
Uno de los casos más recurrentes es obtener contenido de una fuente externa a través de un alimentador RSS o una base de datos, el resultado es que generalmente los enlaces se presentan en texto plano, por ende es imposible hacer clic en ellos. Con esta función es sencillo convertir cada enlace textual en un verdadero hiperenlace:
1
Ahora la función jQuery que nos permitirá conseguir todas las direcciones web en el texto y transformarlas en verdaderos enlaces:
1
Puedes ver el ejemplo funcionando aquí: Enlaces en Texto plano a Hiperenlaces en jQuery
Eso es todo por ahora, recuerda que este artículo se irá actualizando con nuevos trucos, puedes leer sobre los selectores en la página oficial de jQuery (Selectors). Publica tus preguntas usando el formulario al final, sígueme en Twitter @laelitetw y suscríbete a L'Elite en Facebook para estar al tanto de nuevas publicaciones.
Seguimiento de Visitas, ¿Por qué?, ¿Por qué no?
- Tal vez puedas pensar que mi opinión está sesgada por el hecho que poseo un master en comercio electrónico, pero también soy programador de código abierto. Las herramientas de análisis de tráfico web han evolucionado de manera considerable en los últimos años, permitiéndote como dueño de un sitio web llegar a conocer a tus visitantes bastante bien.
Algunas personas se preocupan por el hecho de que - como dueños de sitios web - tengamos acceso a dicha información, creando en consecuencia campañas de advertencia para poner sobre aviso a los internautas despreocupados, informándoles que sus hábitos de navegación están siendo rastreados y analizados por los sitios que visitan frecuentemente. Por supuesto, las palabras son una herramienta poderosa que se usa en ambos lados para atacar o defender sus puntos de vista.
Entonces, ¿qué puedes hacer tú? como dueño de un sitio web para asegurar a tus visitantes que no pondrás en riesgo su privacidad al visitar tu sitio. Algo es seguro, esto no es tarea fácil, después de todo, la confianza se trata de creer en las personas. Si traicionas y apuñalas por la espalda a tus visitantes enviándoles mensajes no solicitados, vendiendo su información personal, engañándolos para obtener beneficios, entonces no esperes que confíen en ti o en tu sitio.
Analizando por una buena causa
Analizar el trafico web es una parte importante de toda estrategia web, Internet no conoce fronteras, esto significa para nosotros - como dueños de sitios web - que nuestro sitio puede ser visitado tanto por el vecino como por una persona que se encuentra al otro lado del mundo. Y como usuarios de Internet significa que tenemos acceso a sitios creados por personas que tal vez hablen un idioma distinto, que tengan un trasfondo cultural diferente, etc.
Esto nos permite como dueños de sitios web, proveer a los visitantes una mejor experiencia dependiendo de su procedencia, y como usuarios web de recibir información relevante a nuestro contexto sociocultural.
A continuación listo algunas ideas para las cuales debería usarse la información obtenida del rastreo de visitas:
- Optimizar nuestro sitio para las plataformas de los visitantes
- Proveer versiones localizadas para visitantes extranjeros en caso de representar una parte importante del trafico total
- Publicar información en el momento oportuno
- Mostrar anuncios publicitarios sólo al público relevante
Y para lo que no debería ser usada esta información:
- Rastreo a través de diferentes sitios (ciber-acoso)
- Perfilar individuos para explotarlos
- Engañar a los visitantes usando técnicas psicológicas
- Recolección de información para vender a terceras partes
Cuéntame, no me acoses
Como usuario web y profesional del comercio electrónico estoy a favor del uso de buenas técnicas de análisis y seguimiento, comprendo por qué son importantes para los sitios web recolectar este tipo de información sobre nosotros. Entonces ¿por qué las personas se preocupan? Por culpa de los abusadores, esas personas malintencionadas que solo tratan de generar ingresos engañando y traicionando a sus visitantes, robando información personal para su propio beneficio.
Nuevas regulaciones gubernamentales en ciertos países intentan minimizar el impacto forzando a los creadores de sitios a informar a sus visitantes que sus visitas están siendo rastreadas y permitirles impedir el seguimiento de así desearlo. ¿Es esta una solución definitiva? Yo no lo creo, hay muchas técnicas de rastreo de visitas en "modo invisible" y la gente mala hará cosas malas (conectarse para cancelar la suscripción ¿te suena familiar?).
Si eres dueño de un sitio, por favor no seas malvado, recolecta sólo la información que necesites para mejorar los servicios que ofreces en tu web, no vendas la información de tus visitantes, no los acoses, no los engañes y no traiciones su confianza, recuerda, Internet es un espacio abierto a todo el mundo, personas inteligentes descubrirán las jugadas sucias que utilices y las expondrán al público, al final perderás más de lo que pudieras haber ganado.
Finalmente, si eres usuario de Internet, por favor permite a los sitios en los que confías que analicen tu visita, ellos necesitan esta información para proveerte un mejor servicio ajustado a tus necesidades, si piensas que están abusando o de alguna manera exagerando en el uso de publicidad, envíales un mensaje y hazles saber. Haz que tu voz sea escuchada.
- Tal vez puedas pensar que mi opinión está sesgada por el hecho que poseo un master en comercio electrónico, pero también soy programador de código abierto. Las herramientas de análisis de tráfico web han evolucionado de manera considerable en los últimos años, permitiéndote como dueño de un sitio web llegar a conocer a tus visitantes bastante bien.
Widget para el Bootstrap Hero Unit
Muéstrame un ejemplo antes de leer el artículo o me voy!
Ok puedes verlo en funcionamiento aquí :D
Tal vez hayas leído o escuchado hablar de Twitter Bootstrap, es en esencia un grupo de librerías y elementos para interfaces web escritos en HTML, CSS y JavaScript cuya finalidad es ayudar a los desarrolladores web a disminuir el tiempo que pasan diseñando la interfaz e invertir más tiempo añadiendo funcionalidades.
Luego de migrar mis sitios a su nuevo ciber-hogar decidí crear los temas para mis sitios hechos con WordPress. Existen varias alternativas para utilizar Twitter Bootstrap con temas para WordPress, los temas base más conocidos son Roots Theme y WordPress Bootstrap, si bien son bastante buenos y son un buen comienzo si no conoces o no tienes tiempo para explorar los aspectos técnicos de Twitter Bootstrap, para mí en particular son demasiado amigables y no me dan la libertad que necesito.
Por ello decidí crear mis temas desde cero y tomar de Twitter Bootstrap solo lo que realmente voy a utilizar. Uno de los componentes de Bootstrap se llama Hero Unit, este componente es un bloque de contenido destacado que normalmente se utiliza para dirigir la atención hacia una información específica o incitar a una determinada acción. Mi intención era utilizar este componente en distintas páginas de mis sitios, sin embargo WordPress utiliza plantillas para mostrar el contenido, entonces ¿cómo podría mostrar contenido estático dentro de páginas dinámicas?
Pensé que sería buena idea disponer de algún tipo de código que pudiera incluir dentro de una plantilla y que extrajese información específica para mostrar, luego organizar dicha información utilizando las etiquetas HTML del componente Hero Unit para que tomara el estilo definido por la librería. Muchos trucos y laberintos, código feo que a la larga se convertiría en un dolor de cabeza imposible de mantener. ¿Extensiones? No pude encontrar y tampoco quería una para esta tarea tan sencilla, por lo que decidí crear un widget multi-instancias dentro de mi tema, algo que se activara sólo cuando el tema estaba siendo utilizado y cuando no, simplemente no quedara registro de su existencia.
Ahora te enseñaré cómo puedes crear uno para tu propio tema, por supuesto puedes añadir más opciones si las necesitas, eso queda de tu parte, siéntete libre de adaptar el código a lo que necesites. A continuación verás unas capturas de pantalla de los resultados:
Nada mal ¿no crees? Ahora viene la parte técnica :(, prometo que te lo pondré bastante fácil para que no pierdas el cabello mientras tratas de conseguir el mismo resultado. Ir a la siguiente página
Primero que nada, veamos cómo es la sintaxis HTML del Hero Unit:
1
Como puedes ver es bastante sencilla, solo necesitamos un encabezado, un eslogan y un enlace con su título. Traduciendo eso a elementos de formulario pues necesitamos tres campos para recopilar esta información. Recuerda que WordPress utiliza plantillas dinámicas, por esta razón tenemos que decirle cuándo debería mostrar un widget o el otro dependiendo de su contenido. Mi intención era mostrar un Hero Unit en cada página de mi sitio, cada uno con su propio contenido y en distintos idiomas, el problema es que tengo una sola plantilla dinámica y todo el contenido se carga dinámicamente dentro de ella. Entonces, ¿cómo podría saber si me encuentro en la página principal o la de contacto? Ya lo sabes ¿no?, necesito un campo adicional con el cual pudiera informar a mi widget en qué lugar debe aparecer. Ya tenemos todo lo necesario para comenzar a escribir código, recapitulando, necesitamos cinco campos en el formulario:
- Encabezado
- Eslogan
- Enlace
- Título del Enlace
- Página
Clase Hero Widget
Primero vamos a crear una clase Hero Widget que extienda la clase WordPress Widget, por el amor al orden y las buenas prácticas crearemos un directorio llamado clases dentro del directorio del tema:
- Mi Tema
- clases
Dentro de este nuevo directorio llamado clases, crearemos un nuevo fichero llamado hero-widget.php y dentro de este escribiremos todo el código que hará funcionar esta cosa ;).
Ahora agreguemos el contenedor de la clase, recuerda, todo el código a continuación debe ser escrito dentro del fichero llamado hero-widget.php:
1
¿No fue tan difícil cierto? :), por cuestiones de legibilidad dividiré cada función de dicha clase en bloques separados, pero recuerda, todas las funciones que verás a continuación se encontrarán dentro de las llaves y reemplazarán los puntos (....) que se encuentran en el código anterior.
Vamos a establecer algunos valores por defecto, esto es solo en caso de que alguna vez en el futuro queramos incluir la misma información en todos los widgets para ahorrar tiempo, aunado a ello siempre es buena práctica de programación definir estas variables aunque no se usen (uno nunca sabe cuándo pueda llegar a necesitarlas):
1
Como puedes apreciarlo allí tenemos las cinco variables, ahora vamos a crear el constructor para darle al widget un nombre y un identificador:
1
Acabamos de registrar el widget para que WordPress lo reconozca como un componente válido, si no estás familiarizado con la internacionalización de contenido, es bueno que sepas que __() se utiliza para marcar las cadenas de texto que serán traducidas usando gettext. La primera parte es el contenido y la segunda 'miTextDomain' es el dominio del texto.
A continuación vamos a crear la función que mostrará el contenido al público, esta se llamará widget y toma dos parámetros, ambos arreglos, el primero son los argumentos del widget y el segundo los valores almacenados en la base de datos:
1
Luego vamos a crear la función para actualizar, esta se usará para limpiar la información que se almacenará en la base de datos:
1
Por favor recuerda siempre, siempre, siempre limpiar los datos antes de almacenarlos en la base de datos, te ahorrará muchos dolores de cabeza ;). Finalmente, vamos a crear el formulario: Ir a la última página
1
¡Genial!, nuestro widget está listo, ahora vamos a informarle a nuestro tema de su existencia. Es importante que entiendas que aunque nuestro widget existe, si no indicamos al tema que hay un widget disponible para ser usado no tendremos acceso a el, esto es lo que WordPress llama registrar funciones.
Para registrar tu Hero Widget basta con editar o crear (si no existe) un fichero llamado functions.phpque se encuentra en el directorio principal del tema activo:
- Mi Tema
- clases
- functions.php
Enseguida, agrega el código mostrado a continuación:
1
¡Eso es todo!, guarda y ve a la sección Escritorio > Apariencia > Widgets para ver tu nuevo y super increíble Hero Widget funcionando ;).
Descargar archivo
Si tienes preguntas o quieres decir algo, ¡escribe tu comentario al final!
LinkedIn y el Robo de Contraseñas Cifradas
Si tienes una cuenta en LinkedIn es mejor que te apresures a cambiar tu contraseña ya que puede encontrarse en la lista de contraseñas cifradas que un internauta ruso asegura en un foro haber obtenido de forma ilegal. El sitio The Verge ha publicado la noticia, además han consultado con Mikko Hypponen quien trabaja como Jefe de la Oficina de Investigación en F-Secure empresa dedicada a la seguridad informática, quien piensa que la lista es real y que pudo haber sido obtenida explotando alguna vulnerabilidad de la interfaz web del sitio, sin embargo por el momento es imposible determinar el origen real de dicha lista.
LinkedIn es una red social para profesionales que cuenta con más de 150 millones de participantes, en el pasado se ha visto afectada por problemas de spam (correos y mensajes no solicitados), sus usuarios e incluso personas que no se encuentran inscritas en el sitio se han quejado de mensajes abusivos con fines comerciales generados por personas inscritas en la red.
La lista contiene cerca de 6 millones 200 mil (6.143.150) de contraseñas cifradas en SHA-1 que es un algoritmo de cifrado que se creía resistente a todos los ataques hace algunos años. Uno de aspectos que llama la atención del fichero que contiene los registros es que algunos comienzan con una cadena de cinco ceros (00000) lo que algunos internautas se han atrevido a asegurar que se trata trazas cuyas contraseñas han sido descubiertas, entre dichas contraseñas se encuentran "linkedin", "password", "secret" en las cuales sus respectivas trazas comienzan con cinco ceros.
Cabe destacar que no todas las trazas de contraseñas han sido robadas y para aclarar a quienes aún puedan tener confusión, el archivo contiene solo contraseñas cifradas utilizando el algoritmo SHA-1, no contiene nombres de usuario o cualquier otro dato que pueda identificar a los usuarios afectados. Sin embargo, es sabido que en el mundo de los crackers y hackers de gorra negra los archivos de trazas son bastante útiles puesto que se pueden analizar usando ataques de diccionario y comparar con listas de trazas descifradas.
Muchos desarrolladores web utilizan algoritmos de cifrado si se quiere débiles, creyendo así que están agregando una capa de seguridad a sus aplicaciones, sin embargo esto no es así. Uno de los algoritmos de cifrado que aún sigue siendo utilizado por desarrolladores web es el MD5 no obstante este algoritmo no es para nada seguro y está comprobada su debilidad ante ataques de fuerza bruta.
¿Entonces, cómo proteger las contraseñas?
Sin duda alguna este es un tema bastante difícil de tratar, distintas empresas y desarrolladores han utilizado técnicas de cifrado combinadas para tratar de minimizar el impacto que pueda tener un evento como el que acaba de ocurrir a LinkedIn. A mí particularmente me agrada el cifrado combinado con doble llave similar al empleado por WordPress para cifrar las contraseñas de los usuarios.
¿Me podrías mostrar cómo se hace?
Yo utilizo algunas particularidades en mis funciones de cifrado de contraseñas, a continuación te mostraré mi forma de hacerlas más seguras:
1.- Primero creo un certificado que será mi llave de cifrado, similar al empleado para firmar certificados digitales en los servidores web, para ello uso SSH RSA:
1
El fichero con la llave privada generado (llamado por defecto id_rsa) me servirá de base para cifrar las contraseñas.
2.- Luego a este fichero le asigno un nombre, lo guardo en la raíz de mi aplicación y le restrinjo los permisos de acceso de manera que solo el administrador tenga acceso a el. Posteriormente accedo a él desde mi aplicación:
1
3.- Después creo una traza aleatoria para añadir a cada contraseña creada por el usuario o por el propio sistema:
1
4.- Una vez tengo los elementos necesarios, los uno a la contraseña del usuario:
1
5.- Y finalmente cada vez que un usuario vaya a iniciar sesión cifro la contraseña independientemente y luego verifico que la traza resultante sea igual a la traza generada la primera vez.
Este método tiene la ventaja de que dos contraseñas iguales no obtendrán como resultado la misma traza, por ende aunque se descubra la palabra oculta tras una de las trazas no aplicará para todas las contraseñas iguales a la descubierta.
¿Ya estás usando técnicas avanzadas para asegurar las contraseñas de tus usuarios? No olvides comentar y compartir, Gracias!
IPv6 Expandiendo la Red
Tal vez hayas escuchado o leído al respecto, el 6 de Junio de 2012 es el día del Lanzamiento Mundial de IPv6 (World IPv6 Launch), esto es más una cuestión de publicidad que de verdadera novedad. El desarrollo de IPv6 se ha llevado a cabo desde hace varios años (más o menos desde 1998) sin embargo aún no se encuentra muy expandida su adopción.
Esto se debe principalmente a problemas de organización más que de tecnología, el protocolo existe, se encuentra documentado y sólo se necesita el deseo de utilizarlo junto con algunos conocimientos de redes para implementarlo. El problema principal se halla en la cantidad de personas que deben ponerse de acuerdo para aplicarlo. Y es allí donde reside el bloqueo principal para la adopción de IPv6 en la actualidad.
El día 6 de Junio pretende ser un hito donde los mayores actores de Internet se organizan y deciden implementar de una vez por todas el protocolo en sus redes y permitir el acceso a sus servicios a través del mismo.
¿Qué es IPv6?
IPv6 es el nuevo Protocolo de Internet que expande la capacidad de conectar dispositivos a la red a un número virtualmente infinito (340 trillones de trillones de trillones de direcciones), si se le compara con IPv4 la cantidad es increíblemente gigante puesto que IPv4 tiene una capacidad de 4 billones de direcciones y es por esta razón que ya están prácticamente agotadas todas las direcciones que el protocolo puede soportar. En el mundo hay más dispositivos que direcciones disponibles para asignarles.
¿Cómo me beneficiará?
Debido a que IPv4 fue un protocolo nacido de pruebas en un laboratorio, en un principio su creación omitió muchos aspectos que hoy en día se han vuelto necesarios, por ejemplo los flujos de vídeo y audio son los más afectados por carencias elementales en la concepción de este protocolo.
IPv6 viene a cubrir esta necesidad proveyendo un mejor tratamiento de los paquetes de red (los datos que viajan entre tu computador y los demás) haciendo que se produzcan menos saltos y rebotes de conexión, lo que en consecuencia genera un flujo más estable que nosotros percibimos como nitidez y rapidez del vídeo y el sonido.
Los humanos sencillos y corrientes nos veremos beneficiados en la medida que los proveedores de servicios de vídeo y audio utilicen este nuevo protocolo puesto que percibiremos menos retardo en la comunicación y podemos sentir de forma más concreta la comunicación en tiempo real y la buena calidad multimedia. Además, nuestros teléfonos inteligentes, computadores y demás aparatos electrónicos tendrán su propia dirección lo cual se reflejará en una ganancia de velocidad de comunicación de datos.
¿Qué debo hacer para usar IPv6?
En teoría no debes hacer nada, tu proveedor de servicios de Internet es el que se debe hacer cargo de brindar acceso a la conectividad en IPv6, sin embargo no en todos los países los proveedores se han puesto manos a la obra y por ende puede que aún falte algo de tiempo para que dispongas de acceso a través de este protocolo.
Puedes escribir a tu proveedor de servicios y solicitar el tiempo de espera, de esta forma verán que estás interesado y comenzarán a actualizar sus plataformas. Francia ha sido uno de los primeros países en adoptar el protocolo IPv6, por ello los clientes de las operadoras francesas podemos utilizar IPv6 desde este instante.
¿Qué cambia al pasar a IPv6?
Básicamente nada, IPv4 no desaparecerá, además todos los dispositivos soportarán ambos protocolos por lo que podrás seguir utilizando aplicaciones y servicios que sólo soporten IPv4 así como aquellos que sólo soporten IPv6. Tal vez la única diferencia que puedas notar será la diferencia de velocidad (lo cual es bastante improbable). Uno de los cambios más significativos es que al pasar a IPv6 podrás disfrutar de servicios creados específicamente para este protocolo y como ya lo he mencionado antes, puesto que el flujo de vídeo y sonido están en los primeros lugares de la lista, seguramente tendrás una experiencia más agradable a la hora de hacer vídeo-llamadas o encuentros en línea a través de cámara web.
¿Me gusta esto, cómo puedo ayudar?
La implementación de IPv6 como comenté al principio se ha retardado por la falta de organización, si quieres que comience a adoptarse en tu país, ciudad, comunidad, comparte la información, invita a tus amigos a consultar este y otros artículos al respecto. La publicidad hará que este protocolo salga de los laboratorios de unos cuantos ingenieros y se ponga a disposición de todo el mundo. La vida de Internet y la conexión de nuestros dispositivos electrónicos depende de ello.
Más información:
¿Y tú, ya estás usando IPv6?
Localización de Contenido el Santo Grial de Internet
En el mundo en que vivimos es de suma importancia hablar al menos dos idiomas, si se quiere hacer crecer nuestra empresa, que nuestros servicios y productos lleguen a nuevos mercados es imperativo hacerlo en más de un idioma. No solo para los negocios, para los estudios pasa igual, si queremos aprender más debemos ser capaces de poder interpretar información disponible en otros idiomas.
Internet ha mostrado a personas y empresas que conviven dentro de la red la importancia de poder comunicarse en algún idioma extranjero dominante (sí me refiero al inglés), si bien el español se encuentra entre los idiomas más importantes del mundo, el inglés sigue siendo el primero y para nosotros los hispanohablantes es necesario poder comprenderlo, hablarlo y escribirlo.
Muchos se preguntan por qué servicios tan famosos como Facebook, Twitter, Flickr, Google llegan a nuestros mercados y destruyen completamente el ecosistema local, invaden cada espacio y personas que jamás usaron nuestros servicios se convierten en fanáticos de sus servicios. La respuesta es, por la localización, algo que el hispanohablante (personas y empresas) no han terminado de entender es que la traducción NO es suficiente, no basta tomar nuestros documentos, introducirlos dentro de un traductor automático y colocar todo el texto resultante en nuestro sitio web.
Si no entendemos la importancia de la localización del contenido, estaremos destruyendo cualquier posibilidad de captar la atención del público al que queremos llegar.
Peor aún, usar los famosos traductores automáticos disponibles para los sitios web que traducen todo el contenido con un simple clic, obviamente para el ojo no entrenado el resultado debe estar bien, para el que no entiende muy bien el idioma extranjero todo "le suena" correcto, lamentablemente NO lo es. El resultado no tiene sentido y lo peor es que la imagen de nuestra empresa o la nuestra se ve afectada negativamente por ello.
La localización de contenido consiste no simplemente en traducir el contenido del idioma original al idioma deseado, sino también entender al público objetivo para el que se está traduciendo, se debe adaptar la forma, el estilo, los colores y el tono en que se expresan las palabras, todo este conjunto es lo que define la localización. Entender esto es esencial, de lo contrario estaremos destruyendo cualquier posibilidad de captar la atención del público que queremos.
Otro problema frecuente es el de los dialectos y las expresiones muy particulares. Esto lo veo a menudo, los hispanohablantes que realizan traducción de contenido del inglés al español tienden a usar expresiones locales que por lo general otros nativos del idioma no comprenden por tener procedencias distintas. Este error se ha de evitar, el español originado a partir del castellano es la base de todos los hispanohablantes, es lo que aprendemos como pilar de nuestro idioma, este español se denomina neutro y significa que cualquier hablante del idioma puede entenderlo sin importar de qué país provenga.
Se podría pensar que las empresas grandes que he nombrado al principio son perfectas en este sentido, sin embargo no lo son, al contrario algunas de ellas incluso obligan a crear palabras nuevas para poder referirse a sus servicios o funciones lo cual si bien es consecuencia directa de la globalización, lo es también una muestra de la incapacidad de dichas empresas a adaptarse a los mercados extranjeros. Twitter es uno de los casos más notables de esta incapacidad, su uso del Tweet (palabra en inglés que describe el sonido que hace un ave pequeña) es imposible de traducir sin perder la relación con el nombre de la empresa, como consecuencia han forzado el uso de Twit como sustituto en español y se ven palabras tan en mi opinión absurdas como "Retwittear".
Soy colaborador en el proyecto de traducción de Twitter y cada día me desencanta más el proceso en el que el equipo de internacionalización de Twitter para la comunidad hispanohablante lleva a cabo su trabajo. Las personas que trabajan para la empresa pareciera que desconocen cosas realmente esenciales en los procesos de traducción, incluso con las actualizaciones que se han llevado a cabo recientemente es inconcebible que los errores se extiendan hasta en aparentes controles de calidad. Hay una nueva funcionalidad en el sitio de traducción llamada "Translation Feedback" y aparentemente se presentan algunas frases por traducir y una lista de opciones posibles, la idea es elegir la traducción correcta, ahora, la finalidad de esto no sé si sea verificar el nivel de traducción del colaborador o que por el contrario ellos lo usen para comprobar si las frases que usan actualmente son correctas; sin embargo el resultado es bastante incomprensible.
En mi caso se me presentaron tres preguntas, las dos primeras fueron fáciles de responder porque las opciones no mostraban ambigüedad, sin embargo la tercera tenía dos posibles respuestas correctas y he elegido la más adecuada en cuanto a contexto y tomando en cuenta el uso neutral de la lengua, para mi sorpresa la respuesta fue incorrecta y la opción "correcta" usada por la aplicación era la versión menos neutral escogida por uno de los miembros del equipo de Twitter.
Además de todo ello, muchos colaboradores se quejan de la falta de contexto de las frases para traducir, pero al parecer a ninguno de los miembros del equipo parece interesarle esta clase de solicitudes y esto desde mi punto de vista es un factor que puede disminuir en gran medida el interés de las personas que invierten de forma gratuita su tiempo para hacer que esta aplicación sea más fácil de adoptar por los hispanohablantes.
Si piensas localizar tu sitio usando colaboradores, toma en cuenta sus necesidades ya que si no lo haces obtendrás traducciones de pésima calidad y personas descontentas de la forma en que fomentas tus relaciones con la comunidad.
Este tema es bastante complejo y es importante crear un debate concienzudo donde se puedan encontrar soluciones creativas a uno de los grandes problemas de la red actual, en resumen:
- Para realizar una traducción de calidad es imperativo contar con un contexto,
- Es mejor localizar y no traducir,
- Estudia el público objetivo detenidamente para realizar una localización exitosa,
- No utilices traductores automáticos, si no estás dispuesto a hacerlo bien, no lo hagas,
- Si pides colaboración para traducir tus productos y/o servicios, sigue de cerca los problemas que expresan tus colaboradores y trabaja con ellos para encontrarles solución,
- Solicita a personas nativas del idioma al que has realizado la localización que den su opinión sobre la calidad de la misma,
- Finalmente, si quieres crecer debes localizar!
Me interesa mucho tu opinión al respecto, recuerda dejar tu comentario y compartir este artículo con tus conocidos :).
Test
- Nothing to say, just displaying content below:
PHP strtolower & strtoupper UTF-8
- If you are coding for non english environments these two functions will help you easily transform unicode strings to lowercase or uppercase. Here is the problem:
echo strtolower('CANCIÓN'); // result: canci��n
echo strtoupper('canción'); // result: CANCIóN
Here is the solution:
/*
* Convert to utf8 lowercase strings
*
* @get string of characters
* @return replaced string
*
* Usage: ...more
- If you are coding for non english environments these two functions will help you easily transform unicode strings to lowercase or uppercase. Here is the problem:
jQuery tricks for dummies
- jQuery Logo
jQuery is a JavaScript library that simplifies interaction with HTML documents, I'll be adding interesting tricks here so save this article to your bookmarks and come to check it once a while.
Haven't you found sometimes you just need to do certain things in a HTML document but you can't do it manually because ...more
- jQuery Logo
Tracking Visitors, Why? Why Not?
- You may think my opinion is somewhat biased by the fact I hold a professional master's degree in e-Commerce, but I'm also an open source developer. In recent years of the Internet, tracking tools have incredibly evolved, allowing you as a website owner to get to know your visitors pretty well.
World map Web Traffic
Some ...more
- You may think my opinion is somewhat biased by the fact I hold a professional master's degree in e-Commerce, but I'm also an open source developer. In recent years of the Internet, tracking tools have incredibly evolved, allowing you as a website owner to get to know your visitors pretty well.
Widget for Bootstrap Hero Units
- Hello people!
Show me an example before I read the entire post or I'll leave...
:) Ok, check it out!
It's been a while since my last post, sorry I've been really busy, well I'm still really busy but I wanted to share something with all of you. Maybe you have already heard about the Twitter Bootstrap, ...more
- Hello people!
LinkedIn & The 6.2 Million Password Hashes Stolen
- LinkedIn Logo
Maybe you have already read about the russian guy who hacked LinkedIn and stole almost 6.2 million (6.143.150) password hashes, if you are a LinkedIn user and haven't changed your password yet what are you waiting for?
In a post written by Vicente Silveira Director at LinkedIn in their official blog, they confirm the ...more
- LinkedIn Logo
Create a beautiful Twitter background in The GIMP
- As you may have already noticed, a lot of people with Twitter accounts personalize the background image for their profile page. Twitter of course allows you to pick one of their predefined background images or use a color picker to set a colored (boring) background.
Some companies pay designers to create their own branded background, you ...more
- As you may have already noticed, a lot of people with Twitter accounts personalize the background image for their profile page. Twitter of course allows you to pick one of their predefined background images or use a color picker to set a colored (boring) background.
Make your CV shine with LibreOffice
- Aren't you tired of those boring résumé, all looking the same, black and white written in "Times New Roman" not so interesting to look at? Because I'll tell you one thing, you can be the awesomest person in your field with a huge list of achievements and lots of qualifications but if your CV doesn't ...more
WordPress Developers watch out for Phishing
If you're contributing to the WordPress community you've maybe realized that even if it's a great place to share your knowledge and learn from others, it's also a place where script kiddies and posers try to steal accounts in order to gain access to the repository.
This is a serious issue because it can affect a ...more
8 Tips to become a Genius
Have you ever met a genius?
Those people who seem to know about everything, usually surprising you and in some cases making you feel depressed because they do things that you think are impossible for you to accomplish.
Sometimes these people induce you to think they were naturally born that way, but what would you think if ...more
Network Latest Posts - WordPress 3 Plugin
- WordPress
Looking for a version for single WordPress installations? Check Single Latest Posts and unleash the power of your WordPress website
Update: The latest information about Network Latest Posts is available at this address: http://en.8elite.com/network-latest-posts/
One of the things that came out when migrating from a single WordPress installation to a WordPress Network multi-site was the importance ...more
- WordPress
Configuración de Digitel 3G+ y Red de Datos en Android 4.2.1 Jelly Bean
- Si tienes un teléfono con sistema operativo Android y has decidido utilizar Digitel como tu proveedor de servicios de telefonía y datos, seguramente te has encontrado con un escenario similar al siguiente:
Tienes señal completa, puedes llamar y recibir llamadas
Servicios como Gtalk, WhatsApp y ChatOn funcionan sin problemas
Al abrir el navegador web, compruebas que no tienes ...more
- Si tienes un teléfono con sistema operativo Android y has decidido utilizar Digitel como tu proveedor de servicios de telefonía y datos, seguramente te has encontrado con un escenario similar al siguiente:
Xperia Z: El nuevo androide inteligente de Sony
- Pantalla inteligente BRAVIA®
Sony ha anunciado hoy su primer teléfono inteligente de cuatro núcleos durante una conferencia de prensa celebrada en la sede del CES (siglas en inglés para el Festival Internacional de Electrónica de Consumo) que se lleva a cabo en Las Vegas, Nevada, su nombre: Xperia Z.
Pantalla de Alta Definición 1080p
La compañía ...more
- Pantalla inteligente BRAVIA®
Crea tu Propio Repositorio de Extensiones Pagas para WordPress
- WordPress es sin duda una de las plataformas para la publicación de artículos más extendidas en el mundo entero, es relativamente facil configurar y comenzar a utilizar la plataforma en pocos pasos.
Sin embargo cuando se refiere a temas avanzados, WordPress aún tiene un buen camino por recorrer. Conseguir realizar cuestiones avanzadas en WordPress no es ...more
- WordPress es sin duda una de las plataformas para la publicación de artículos más extendidas en el mundo entero, es relativamente facil configurar y comenzar a utilizar la plataforma en pocos pasos.
PHP strtolower & strtoupper UTF-8
- Si estás programando sistemas para idiomas como el español o ruso que contienen caracteres especiales o con acentos, seguro habrás notado un problema al usar las funciones strtolower y strtoupper de PHP y es que estas no convierten correctamente caracteres en unicode. Este es el problema:
echo strtolower('CANCIÓN'); // resultado: canci��n
echo strtoupper('canción'); // resultado: CANCIóN
Aquí la solución:
/*
...more
- Si estás programando sistemas para idiomas como el español o ruso que contienen caracteres especiales o con acentos, seguro habrás notado un problema al usar las funciones strtolower y strtoupper de PHP y es que estas no convierten correctamente caracteres en unicode. Este es el problema:
Trucos en jQuery para Principiantes
- Logo de jQuery
jQuery es una librería JavaScript que facilita la interacción con documentos HTML, en este artículo estaré añadiendo trucos interesantes así que te recomiendo guardar el enlace en tus favoritos y revisarlo de vez en cuando.
Seguramente alguna vez trabajando con documentos HTML te has topado con la necesidad de manipular muchos elementos y ...more
- Logo de jQuery
Seguimiento de Visitas, ¿Por qué?, ¿Por qué no?
- Tal vez puedas pensar que mi opinión está sesgada por el hecho que poseo un master en comercio electrónico, pero también soy programador de código abierto. Las herramientas de análisis de tráfico web han evolucionado de manera considerable en los últimos años, permitiéndote como dueño de un sitio web llegar a conocer a tus visitantes ...more
Widget para el Bootstrap Hero Unit
- Muéstrame un ejemplo antes de leer el artículo o me voy!
Ok puedes verlo en funcionamiento aquí :D
Tal vez hayas leído o escuchado hablar de Twitter Bootstrap, es en esencia un grupo de librerías y elementos para interfaces web escritos en HTML, CSS y JavaScript cuya finalidad es ayudar a los desarrolladores web a disminuir el ...more
- Muéstrame un ejemplo antes de leer el artículo o me voy!
LinkedIn y el Robo de Contraseñas Cifradas
Si tienes una cuenta en LinkedIn es mejor que te apresures a cambiar tu contraseña ya que puede encontrarse en la lista de contraseñas cifradas que un internauta ruso asegura en un foro haber obtenido de forma ilegal. El sitio The Verge ha publicado la noticia, además han consultado con Mikko Hypponen quien trabaja como Jefe ...more
IPv6 Expandiendo la Red
Tal vez hayas escuchado o leído al respecto, el 6 de Junio de 2012 es el día del Lanzamiento Mundial de IPv6 (World IPv6 Launch), esto es más una cuestión de publicidad que de verdadera novedad. El desarrollo de IPv6 se ha llevado a cabo desde hace varios años (más o menos desde 1998) sin ...more
Localización de Contenido el Santo Grial de Internet
En el mundo en que vivimos es de suma importancia hablar al menos dos idiomas, si se quiere hacer crecer nuestra empresa, que nuestros servicios y productos lleguen a nuevos mercados es imperativo hacerlo en más de un idioma. No solo para los negocios, para los estudios pasa igual, si queremos aprender más debemos ser ...more
Test
- Nothing to say, just displaying content below: ...more
Testing Excerpt Strips
- I'm a block of text, if this is shown instead of some weird square brackets it means NLPosts is correctly stripping away shortcodes and tags ...more
Testing Post without Thumbnail
- Hi, this is a testing post without ...more
Testing Post with Thumbnail
- Hi, this is a post with ...more
Network Latest Posts - Extension pour WordPress 3
- WordPress
Cherchez-vous l'extension pour WordPress single? Achetez Single Latest Posts et libérez la puissance de votre site WordPress
La troisième version de WordPress a été pensée pour simplifier autant que possible la création des réseaux, si vous vous rappelez bien, avant cette version il existait WordPress et WordPress MU, maintenant peu importe si vous utilisez WordPress ...more
- WordPress
- Nothing to say, just displaying content below:
Testing Excerpt Strips
- I'm a block of text, if this is shown instead of some weird square brackets it means NLPosts is correctly stripping away shortcodes and tags :).
PHP strtolower & strtoupper UTF-8
jQuery tricks for dummies
Tracking Visitors, Why? Why Not?
Widget for Bootstrap Hero Units
LinkedIn & The 6.2 Million Password Hashes Stolen
Create a beautiful Twitter background in The GIMP
Make your CV shine with LibreOffice
WordPress Developers watch out for Phishing
8 Tips to become a Genius
Network Latest Posts - WordPress 3 Plugin
Configuración de Digitel 3G+ y Red de Datos en Android 4.2.1 Jelly Bean
Xperia Z: El nuevo androide inteligente de Sony
Crea tu Propio Repositorio de Extensiones Pagas para WordPress
PHP strtolower & strtoupper UTF-8
Trucos en jQuery para Principiantes
Seguimiento de Visitas, ¿Por qué?, ¿Por qué no?
Widget para el Bootstrap Hero Unit
LinkedIn y el Robo de Contraseñas Cifradas
IPv6 Expandiendo la Red
Localización de Contenido el Santo Grial de Internet
Test
Testing Excerpt Strips
Testing Post without Thumbnail
Testing Post with Thumbnail
Network Latest Posts - Extension pour WordPress 3

Testing Post without Thumbnail
- Hi, this is a testing post without thumbnail.
Testing Post with Thumbnail
- Hi, this is a post with thumbnail
Network Latest Posts - Extension pour WordPress 3
La troisième version de WordPress a été pensée pour simplifier autant que possible la création des réseaux, si vous vous rappelez bien, avant cette version il existait WordPress et WordPress MU, maintenant peu importe si vous utilisez WordPress pour un seul blog ou pour un réseau l'installation reste toujours la même et il suffit d'ajouter quelques lignes dans le fichier de configuration pour transformer votre blog en réseau.
Pour la nouvelle version de 8ª Elite j'ai transformé mon blog en réseau, alors j'ai eu besoin d'afficher sur la page d'accueil du blog principal les articles les plus récentes publiés dans tous les sites appartenant au réseau. Après avoir cherché pendant long temps, j'ai seulement trouvé l'extension WPMU Recent Posts Widget, cependant celle-ci ne me plaisait pas complètement parce qu'elle avait été créée pour être utilisée comme widget et j'ai voulu afficher les articles d'une façon différente.
Donc, j'ai pris le code d'Angelo (le créateur de WPMU Recen Posts Widget) et l'ai modifié pour l'utiliser en tant que widget, shortcode ou comme une fonction indépendante dans un template et voilà Network Latest Posts est né.
Voici les fonctionnalités principales:
- Afficher le nombre d'articles souhaité pour la période de temps choisi par l'utilisateur (30 jours par défaut)
- Afficher seulement les titres ou les titres avec les extraits
- Utiliser des balises HTML pour encadrer les résultats
- Utiliser les Shortcodes pour afficher les articles où vous le souhaitez
- Afficher les articles les plus récentes par blog en utilisant son numéro ID (dès la version 1.1)
- Afficher les thumbnails (image à la une) pour chaque article (dès la version 1.1)
- Afficher le contenu par type d'article (post, page, etc) (dès la version 1.2)
- Ignorer le contenu d'un ou plusieurs blogs en utilisant leur numéros ID (dès la version 1.2)
- Filtrer le contenu par une ou plusieurs catégories (dès la version 2.0)
- Filtrer le contenu par un ou plusieurs tags (dès la version 2.0)
- Pagination des résultats (dès la version 2.0)
- Compatibilité avec les feuilles de style
- Obtention automatique des extraits depuis le contenu des articles (dès la version 2.0.4)
- Affichage des metadonnées complètes: Auteur, Date et Heure (dès la version 2.0.4)
Installation
- Placer le dossier network-latest-posts dans /wp-content/plugins
- Activer l'extension pour le réseau à travers le menu Extensions dans l'Admin du réseau
- Pour l'utiliser en tant que Widget, aller dans le menu Apparence->Widgets et glissez Network Latest Posts vers l'une des colonnes latérales
- Pour utiliser le Shortcode, il suffit d'ajouter [nlposts] dans une page ou article et voilà c'est tout!
Plus de Paramètres
Voici les paramètres qui vous permettront d'adapter les résultats à vos besoins:
1
- title = le titre de la section où seront affichés les articles
- number = le nombre d'articles que vous souhaitez afficher (10 par défaut)
- days = la période de temps pour les articles (nombre de jours) (0 par défaut)
- titleonly = utilisez true pour n'afficher que les titres, false pour afficher les titres et les extraits (true par défaut)
- wrapo = balise html d'ouverture (utile pour les feuilles de style) (div par défaut pour le shortcode et li pour le widget)
- wrapc = balise html de fermeture (utile pour les feuilles de style) (/div par défaut pour le shortcode et /li pour le widget)
- blogid = l'ID du blog dont vous souhaitez afficher les articles les plus récentes (null, c'est-à-dire, tous par défaut) (dès la version 1.1)
- thumbnail = permet d'afficher les thumbnails (image à la une) pour chaque article, utilisez true pour les afficher (false par défaut) (dès la version 1.1)
- cpt = permet d'afficher le contenu par type d'article (post, page, etc) (dès la version 1.2)
- ignore_blog = permet d'ignorer les articles d'un ou plusieurs blogs en utilisant les ID (dès la version 1.2)
- cat = permet d'afficher les articles par catégories (séparer les catégories par des virgules) (dès la version 2.0)
- cat = permet d'afficher les articles par tags (séparer les tags par des virgules) (dès la version 2.0)
- paginate = permet d'afficher les résultats par page, si active l'option number est pris comme le nombre de résultats qui sera affiché par page (dès la version 2.0)
- excerpt_length = permet de limiter la longueur de l'extrait au nombre de caractères defini dans cette variable, par exemple: 200 pour afficher 200 caractères, si l'extrait est plus long la phrase ...lire le reste sera ajoutée de façon automatique à la fin du texte (null par défaut) (dès la version 2.0.3)
- display_root = permet d'afficher les articles publiés sur le site principale (la racine du réseau WordPress) les deux valeurs possibles sont: true ou false (false par défaut) (dès la version 2.0.3)
- auto_excerpt = permet d'obtenir les extraits depuis le contenu des articles de façon automatique les deux valeurs possibles sont: true ou false (false par défault) (dès la version 2.0.4)
- full_meta = permet d'afficher les metadonnées complètes: auteur, date et heure de publication, les deux valeurs possibles sont: true ou false (dès la version 2.0.4)
Styles
Vous pouvez utiliser les feuilles de style pour personnaliser l'apparence des articles affichées sur votre site, voici la liste des classes inclues dans cette extension:
- .network-latest-posts = (balise div) Tout le contenu se trouve dans cette classe (c'est la classe principale)
- .blog-X = Celle-ci se trouve à côté de la première (.network-latest-posts), X est le ID du blog où l'article a été trouvée
- .network-latest-posts-sectitle = Cette classe est utilisée seulement si le shortcode a été employé
- .network-posts-title = (balise H1) Classe pour le titre de l'article
- .network-posts-source = (balise span) La localisation de l'article
- .network-posts-excerpt = (balise p) L'extrait de l'article
- .network-posts-pagination = (balise div) Les liens des pages de résultats
À partir de la version 2.0 cette extension inclue un fichier CSS pour la manipulation des styles, donc il n'y a plus besoin de modifier les styles de votre thème.
Téléchargement
Cette extension se trouve dans le repertoire des extensions de WordPress: Network Latest Posts v2.0.4
Démo
Le blog principal de mon réseau 8elite.com utilise cette extension pour afficher les articles les plus récentes. Pour plus d'exemples d'utilisation, je vous invite visiter Network Latest Posts Examples et Network Latest Posts Pagination.
Mise à Jour:
Salut!, je sais que certains d'entre vous attendez cette mise à jour mais j'étais vraiment occupé. Il n'était pas facile mais j'ai réussi à ajouter les deux nouvelles fonctionnalitées. Si vous trouvez quelque chose à améliorer ou un erreur, je vous remercie de m'informer le plus rapidement possible.























































