Thứ Năm, 22 tháng 10, 2015

JQUERY get image full path

Des: get full path image http,domain,subfolder,filename

JQUERY:

var imagefullpath=$('img')[0].src;
alert(imagefullpath);
result: http//domain.com/subfolder/image-name.jpg
-
var imgagepath=$('img').attr('src');
alert(imagepath);
result: subfolder/image-name.jpg

Thứ Hai, 28 tháng 9, 2015

Fixed, absolute position auto center SOLVED

.divfixcenter{
position:fixed;
top:50%;
left:50%;
width: 500px;
transform: translate(-50%, -50%);
-webkit-transform:translate(-50%, -50%);/*safari*/
}

Thứ Ba, 8 tháng 9, 2015

Filezilla FTP Use Proxy solved

Des: ip prevent connect to host. It's hard to find way, i did take 2 day read on internet and try.
Solution: use proxy have other way connect work.

#1. Find proxy server work:
http://incloak.com/proxy-list/
Find SOCKS5 type
Choose the best speed
#2. Cofig Filezilla:
Edit menu-> Setting->Generic Proxy input host + port

Image guide:


Note: Can try other proxy.
State: SOLVED.

Chủ Nhật, 23 tháng 8, 2015

.htaccess directory index

Description: Use .htacccess file index priority index.php, index.html, index.asp...
Solution: .htaccess file
Add code:
DirectoryIndex index.php index.html

Thứ Sáu, 3 tháng 7, 2015

Font fontAwesome - Icons the easiest way

Description: mutli icons use by font. So easy change color + size by CSS.

Thinking: So love this font. Save much time css hover active
Example icons:  home, phone, fax, arrow, users, cubes, tree, leaf
Insert 1 line:  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
Using exmple:
    <i class="fa fla-home"></i>
    <a class="fa fla-phone"></a>   
Icons list:
http://fortawesome.github.io/Font-Awesome/icons/




Guide: http://fortawesome.github.io/Font-Awesome/get-started/

Thứ Ba, 30 tháng 6, 2015

Joomla 3.2.0 passwords issue - SOLVED

Joomla 3.2.0 is a result of terrible coding and total irresponsibility: users registration and password reset are broken and passwords are not recognized. Please note that Joomla 3.2.1+ doesn't have these issues.
We suffered from this a couple of days and finally propose a solution, though you can just install Joomla_3.1.6-Stable-Update_Package.zip and downgrade.
Edit /libraries/joomla/user/helper.php:
1. Change
$encrypted = ($salt) ? md5($plaintext . $salt) : md5($plaintext);
to
$encrypted = ($salt) ? md5($plaintext . $salt) . ':' . $salt : md5($plaintext);
Edit /libraries/joomla/user/user.php:
2. Change
$array['password'] = $crypt . ':' . $salt;
to
$array['password'] = $crypt;
Edit /components/com_users/models/reset.php:
3. Change
$password = $crypted . ':' . $salt;
to
$password = $crypted;
4. Change
if (!($crypt == $testcrypt))
to
if (!($user->activation == $testcrypt))
5. Change
$testcrypt = JUserHelper::getCryptedPassword($data['token'], $salt);
to
$testcrypt = JUserHelper::getCryptedPassword($data['token'], $salt, 'md5-hex');
Edit /plugins/authentication/joomla/joomla.php:
6. Change
if ($crypt == $testcrypt)
to
if ($result->password == $testcrypt)

Reset your password if it still doesn't work after these changes.
Reference link http://alterbrains.com/blog/joomla-3-2-passwords-issue-problem-solution

Chủ Nhật, 28 tháng 6, 2015

Widgetkit 2 Map multi Icon markers

Description: Each map use own icon marker. Must edit code

Solution 3 steps:
#1. New field 'icon' at administrator>map. lable icon, name icon, type media
#2. Edit widget.php:
File: administrator\components\com_widgetkit\plugins\widgets\map\views\widget.php
Line : 18
'icon' =>$item['icon']

#3. Edit map.js:
file: administrator\components\com_widgetkit\plugins\widgets\map\assets\maps.js
file and replace code.
google.maps.Marker({position:new google.maps.LatLng(t.lat,t.lng),map:i,title:t.title,icon: t.icon});

Images instruction: