Archive for the ‘Development’ Category

concrete5: Invalid file extension error

If you face with an error stating "Invalid file extension" when you try to upload some file to your concrete5 website, don’t worry. You can fix it by yourself.
I got such error when tried to upload a .zip archive. So here is a solution:
1. Open /concrete/config/base.php
2. Find the following line:
define(’UPLOAD_FILE_EXTENSIONS_ALLOWED’, ‘*.flv;*.jpg;*.gif;*.jpeg;*.docx;*.xla;*.png;*.swf;*.doc; *.txt;*.xls;*.csv;*.pdf;*.tiff;*.rtf;*.m4a;*.mov;*.wmv;*.mpeg; *.mpg;*.wav;*.avi;*.mp4;*.mp3;*.qt;*.ppt’);
3. Append your [...]

Comments (6)

creating a theme in concrete5

I was really impressed by concrete5. It provides so many ways for its customization. It took me not so much time to convert one of my templates into concrete5 theme. The process is really simple for anyone having basic experience in web development. So the basic steps are:
1. Create a new folder in themes directory.
2. [...]

Comments (8)

if php expert editor slows down

If your PHP Expert Editor software (author: Ankord Development group) gets very slow, most probably the issue is caused by the fact that there are too many cursor positions remembered in the configuration file of php expert editor.
Php expert editor saves current cursor position for every file you open in php expert editor. All the [...]

Leave a Comment

concrete5 - cms of the future?

Some time ago I found concrete 5 among the featured products on SF. I was quiet interested in trying that software.
Starting with you. The archive of the latest version is just 3MB (usually heavy cms software takes much more space).
The software is released under friendly MIT license and that is good for developers I believe.
System [...]

Comments (3)

replace substring in mysql fields

Any webmaster face with a problem when he or she needs to change something due to updated details, for example, SKU#, phone number, or anything else that has been renamed and the change should be done in appropriate mysql table fields. Of course, you can open phpmyadmin and edit records one by one, but why [...]

Leave a Comment

how to make 301 redirect

Assuming you want to forward old traffic from old domain olddomain.com to new domain newdomain.com, use the following .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymLinks
RewriteBase /
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com$ [NC]
RewriteRule (.*) https://www.newdomain.com/$1 [R=301]
RewriteCond %{HTTPS} !on
RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com$ [NC]
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
</IfModule>

Leave a Comment

mod_rewrite not working

I will be updating this post with issues about mod_rewrite and its resolution ways.
1. I’ve faced with the problem when I worked with denwer (dklab solution, author: Dmitry Koterov), the following .htaccess was not working and returned 404 error:

RewriteEngine On
Options +FollowSymLinks
RewriteBase /
RewriteRule ^something/(.*)$ script.php [L]

How It was resolved:
I opened apache httpd.conf file and removed MultiViews [...]

Leave a Comment

css vertical-align

Recently I faced with a problem trying to figure out how to make div content vertically aligned to bottom. I failed. The issue is that vertical-align doesn’t work for block elements. Workaround solution is to put the div content inside table and apply vertical-align to td:
<div class="class"><table><tr><td>content</td></tr></table></div>
.class table {
height: 100%;
}
.class table tr td {
vertical-align: top;
}

Leave a Comment

how to remove padding in IE

Inexperienced XHTML integrator might get stuck with an IE problem when there is space appeared without any reasons. For example, it can happen if you create a small div block with little height:
<div style=”height: 2px;background-color: green;”>
It will not be 2px in IE. It will be more. Try this solution:
<div style=”height: 2px;font-size:2px;line-height:1px;background-color: green;”>

Leave a Comment

How to learn php

Tips for php beginner
I learned php basics in 2 weeks. More than 2 years passed since that time and I’m still learning php. So my first tip is «Don’t try to learn everything in php. You don’t need it to be sucessful php programmer.» Here is a short plan on how to start learning php:
Day [...]

Leave a Comment