Daniel Hauca http://rubensargsyan.com Personal Website Thu, 28 Apr 2011 19:36:31 +0000 en hourly 1 http://wordpress.org/?v=3.1 Change input type from text to password for IE http://rubensargsyan.com/change-input-type-from-text-to-password-for-ie/ http://rubensargsyan.com/change-input-type-from-text-to-password-for-ie/#comments Thu, 28 Apr 2011 18:08:22 +0000 Daniel Hauca http://rubensargsyan.com/?p=615 Changing the type of input after page loaded is not supported in IE and here is an example how to do it using the other way:

<html>
 
<head>
  <title>Change input type from text to password for IE</title>
</head>
 
<body>
 
    <div id="password_field">
        <input type="text" id="password" name="password" value="Password" onclick="change_pass_field_type_topass()" />
    </div>
 
    <script type="text/javascript">
    function change_pass_field_type_topass(){
        if(document.getElementById("password").value=="Password"){
            var pass_new_field = document.createElement("input");
 
            pass_new_field.name = "password";
            pass_new_field.id = "password";
 
            pass_new_field.type = "password";
            pass_new_field.value = "";
 
            pass_new_field.onblur = function(){
                change_pass_field_type_totext();
            }
 
            document.getElementById("password_field").removeChild(document.getElementById("password"));
 
            document.getElementById("password_field").appendChild(pass_new_field);
 
            document.getElementById("password").focus();
        }
    }
 
    function change_pass_field_type_totext(){
        if(document.getElementById("password").value==""){
            var pass_new_field = document.createElement("input");
 
            pass_new_field.name = "password";
            pass_new_field.id = "password";
 
            pass_new_field.type = "text";
            pass_new_field.value = "Password";
 
            pass_new_field.onclick = function(){
                change_pass_field_type_topass();
            }
 
            document.getElementById("password_field").removeChild(document.getElementById("password"));
 
            document.getElementById("password_field").appendChild(pass_new_field);
        }
    }
    </script>
 
</body>
 
</html>
]]>
http://rubensargsyan.com/change-input-type-from-text-to-password-for-ie/feed/ 0
Special proposal from blorner.com http://rubensargsyan.com/special-proposal-from-blorner-com/ http://rubensargsyan.com/special-proposal-from-blorner-com/#comments Mon, 11 Apr 2011 17:43:58 +0000 Daniel Hauca http://rubensargsyan.com/?p=611 blorner.com proposes a new opportunity to promote its bloggers! Every 1st day of each month a special bonus will be held among blorner.com bloggers. There will be selected 3 random bloggers and their primary blogs will be posted on this website for a month period. And that is not all: their blorners’ thumbnails will be placed on the first page of blorner.com which will be linked to their blorners.

]]>
http://rubensargsyan.com/special-proposal-from-blorner-com/feed/ 1
WordPress plugin “Share Buttons Simple Use” new 1.2 version http://rubensargsyan.com/wordpress-plugin-share-buttons-simple-use-new-1-2-version/ http://rubensargsyan.com/wordpress-plugin-share-buttons-simple-use-new-1-2-version/#comments Mon, 04 Apr 2011 20:16:40 +0000 Daniel Hauca http://rubensargsyan.com/?p=608 The new version of WordPress plugin “Share Buttons Simple Use” 1.2 is created. The following updates have been done in this version:

1. Now you can choose the share buttons you want to be shown.
2. Add [share_buttons_simple_use] in any place of post(s) or page(s) where yo want the share buttons to be displayed.

Plugin Homepage

]]>
http://rubensargsyan.com/wordpress-plugin-share-buttons-simple-use-new-1-2-version/feed/ 0
WordPress plugin “Outbound Link Manager” new 1.11 version http://rubensargsyan.com/wordpress-plugin-outbound-link-manager-new-1-11-version/ http://rubensargsyan.com/wordpress-plugin-outbound-link-manager-new-1-11-version/#comments Tue, 29 Mar 2011 18:07:48 +0000 Daniel Hauca http://rubensargsyan.com/?p=605 The new version of WordPress plugin “Outbound Link Manager” 1.11 is created. The following updates have been done in this version:

1. Some bulk editing bugs were fixed.
2. The Outbound Link Manager now also scans pages.

Plugin Homepage

]]>
http://rubensargsyan.com/wordpress-plugin-outbound-link-manager-new-1-11-version/feed/ 0
blorner.com http://rubensargsyan.com/blorner-com/ http://rubensargsyan.com/blorner-com/#comments Sun, 20 Mar 2011 14:57:11 +0000 Daniel Hauca http://rubensargsyan.com/?p=592 http://blorner.com is the website where you can create your corner in the blogs world!

Creating your corner in the blorner.com, you open a gateway for people to find your blog by your name, as well as to find you by your own blog URL.

blorner.com gives you a chance to share your blorner (blog corner), therefore your blorner can share you and your blog(s).

My blorner

My blorner

 

One of your blorner.com features is the following: your blorner viewers may be aware of your blog’s latest published posts, as those posts titles will be displayed in your blorner and they will be updated automatically from time to time by connecting to your blog RSS and checking for a new published post.

]]>
http://rubensargsyan.com/blorner-com/feed/ 1
WordPress plugin wp-chunk shorten URLs within posts and pages http://rubensargsyan.com/wordpress-plugin-wp-chunk-shorten-urls-within-posts-and-pages/ http://rubensargsyan.com/wordpress-plugin-wp-chunk-shorten-urls-within-posts-and-pages/#comments Fri, 25 Feb 2011 19:40:21 +0000 Daniel Hauca http://rubensargsyan.com/?p=584 wp-chunk is a WordPress plugin to gracefully shorten URLs within submitted comments. It does not affect urls within posts and pages, just comments. But if you want that it affects within posts and pages open the file wp-chunk.php from the plugin directory and add this lines just after the line 72 (add_filter(‘comment_text’, ‘make_chunky’);):

add_filter(‘the_excerpt’, ‘make_chunky’);
add_filter(‘the_content’, ‘make_chunky’);

]]>
http://rubensargsyan.com/wordpress-plugin-wp-chunk-shorten-urls-within-posts-and-pages/feed/ 0
Generate YouTube video browser-based uploading form by PHP http://rubensargsyan.com/generate-youtube-video-browser-based-uploading-form-by-php/ http://rubensargsyan.com/generate-youtube-video-browser-based-uploading-form-by-php/#comments Wed, 02 Feb 2011 18:09:28 +0000 Daniel Hauca http://rubensargsyan.com/?p=575 Here is an example how to generate YouTube video browser-based uploading form by PHP:

<?php
$youtube_email = "example@youtube.com"; // Change this to your youtube sign in email.
$youtube_password = "password"; // Change this to your youtube sign in password.
 
$postdata = "Email=".$youtube_email."&Passwd=".$youtube_password."&service=youtube&source=Example";
$curl = curl_init("https://www.google.com/youtube/accounts/ClientLogin");
curl_setopt($curl, CURLOPT_HEADER, "Content-Type:application/x-www-form-urlencoded");
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1);
$response = curl_exec($curl);
curl_close($curl);
 
list($auth, $youtubeuser) = explode("\n", $response);
list($authlabel, $authvalue) = array_map("trim", explode("=", $auth));
list($youtubeuserlabel, $youtubeuservalue) = array_map("trim", explode("=", $youtubeuser));
 
$youtube_video_title = "Example"; // This is the uploading video title.
$youtube_video_description = "Example"; // This is the uploading video description.
$youtube_video_category = "News"; // This is the uploading video category.
$youtube_video_keywords = "example, video"; // This is the uploading video keywords.
 
$data = '<?xml version="1.0"?>
            <entry xmlns="http://www.w3.org/2005/Atom"
              xmlns:media="http://search.yahoo.com/mrss/"
              xmlns:yt="http://gdata.youtube.com/schemas/2007">
              <media:group>
                <media:title type="plain">'.$youtube_video_title.'</media:title>
                <media:description type="plain">'.$youtube_video_description.'</media:description>
                <media:category
                  scheme="http://gdata.youtube.com/schemas/2007/categories.cat">'.$youtube_video_category.'</media:category>
                <media:keywords>'.$youtube_video_keywords.'</media:keywords>
              </media:group>
            </entry>';
 
$key = "adf15ee97731bca89da876c...a8dc"; // Get your key here: http://code.google.com/apis/youtube/dashboard/.
 
$headers = array("Authorization: GoogleLogin auth=".$authvalue,
                 "GData-Version: 2",
                 "X-GData-Key: key=".$key,
                 "Content-length: ".strlen($data),
                 "Content-Type: application/atom+xml; charset=UTF-8");
 
$curl = curl_init("http://gdata.youtube.com/action/GetUploadToken");
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_REFERER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_HEADER, 0);
 
$response = simplexml_load_string(curl_exec($curl));
curl_close($curl);
?>
<script type="text/javascript">
  function checkForFile() {
    if (document.getElementById('file').value) {
      return true;
    }
    document.getElementById('errMsg').style.display = '';
    return false;
  }
</script>
 
<?php
$nexturl = "http://rubensargsyan.com"; // This parameter specifies the URL to which YouTube will redirect the user's browser when the user uploads his video file.
?>
 
<form action="<?php echo($response->url); ?>?nexturl=<?php echo(urlencode($nexturl)); ?>" method="post" enctype="multipart/form-data" onsubmit="return checkForFile();">
  <input id="file" type="file" name="file"/>
  <div id="errMsg" style="display:none;color:red">
    You need to specify a file.
  </div>
  <input type="hidden" name="token" value="<?php echo($response->token); ?>"/>
  <input type="submit" value="go" />
 
</form>
</php>
]]>
http://rubensargsyan.com/generate-youtube-video-browser-based-uploading-form-by-php/feed/ 0
Scrollable content by JavaScript http://rubensargsyan.com/scrollable-content-by-javascript/ http://rubensargsyan.com/scrollable-content-by-javascript/#comments Tue, 11 Jan 2011 18:54:20 +0000 Daniel Hauca http://rubensargsyan.com/?p=567 This is a scrollable content example created by JavaScript:

<html>
 
<head>
  <title>Scrollable Content</title>
</head>
 
<body>
 
<script type="text/javascript">
function up(){
    if(parseInt(document.getElementById("text").style.marginTop)-5>=parseInt("-"+document.getElementById("text").offsetHeight)+300){
        document.getElementById("text").style.marginTop = (parseInt(document.getElementById("text").style.marginTop)-5)+"px";
    }
}
 
function down(){
    if(parseInt(document.getElementById("text").style.marginTop)+5<=0){
        document.getElementById("text").style.marginTop = (parseInt(document.getElementById("text").style.marginTop)+5)+"px";
    }
}
</script>
 
<div id="scrollable_content" style="width: 300px; height: 300px; overflow: hidden; font-size: 15px; line-height: 15px;">
    <div id="text" style="margin-top: 0px;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br />Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br />Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
</div>
 
<div><img src="up.png" alt="up" style="cursor: pointer" onclick="up();" /> <img src="down.png" alt="down" style="cursor: pointer" onclick="down();" /></div>
 
</body>
 
</html>

Icons

]]>
http://rubensargsyan.com/scrollable-content-by-javascript/feed/ 0
Happy New Year 2011 http://rubensargsyan.com/happy-new-year-2011/ http://rubensargsyan.com/happy-new-year-2011/#comments Fri, 31 Dec 2010 10:55:12 +0000 Daniel Hauca http://rubensargsyan.com/?p=557
Dear visitors of my website.

I wish you and your families a Happy New Year! May your New Year be filled with new hopes & sweet surprises!

Wishing you a beautiful 2011 Year!

]]>
http://rubensargsyan.com/happy-new-year-2011/feed/ 1
WordPress plugin “Greetings” new 1.1 version http://rubensargsyan.com/wordpress-plugin-greetings-new-1-1-version/ http://rubensargsyan.com/wordpress-plugin-greetings-new-1-1-version/#comments Mon, 20 Dec 2010 18:19:37 +0000 Daniel Hauca http://rubensargsyan.com/?p=551 The new version of WordPress plugin “Greetings” 1.1 is created. The following updates have been done in this version:

1. Changed some deprecated functions.
2. Now the avatars of the greetings authors can be shown.

Plugin Homepage

]]>
http://rubensargsyan.com/wordpress-plugin-greetings-new-1-1-version/feed/ 3