
Yo! There should have been some boring post about how I spent the last four weeks and my bad karma, but ... Suddenly I remembered that winter-een-mas come!
Happy winter-een-mass, everyone! All right, now I’m going to celebrate it. There are so many dragons still in Skyrim.
P.S. You haven’t heard about winter-een-mas? What a pity. Then you definitely should see this comics.
Okay. I have enough of this. I was in the perfect mood. I opened my blog to write something interesting and what did I see? 12 spam comments in every topic! English section suffer the most, it’s spammed constantly. It’s pleasant to find out that my almost empty and unpopular blog visit so many spam-bots, but it’s hardly a pleasure to delete all that crap.
Obviously, simple CAPTCHA doesn’t handle it’s job. So, now Mollom goes hunting. I was choosing between Spam and Mollom module for a while, but have decided to try Mollom despite the fact it uses a third-party service. It definitely should solve all problems.
Why does everybody so rush playing Skyrim at once? Mass effect, Fallout 3, Dragon age - all this dishes are of type that best served cold. In a year all patches will be released, all delicious story-driven dlc's will come out and you can play it without fear of having missed something interesting.
I still regret that I violated that rule, when I started playing Fallout New Vegas shortly after its release. And then, bang, a couple of new dlc come with new perks, new maximum level limit , unique guns, etc. But the game has already been played to the holes, I didn't want to create a new character and play from the beginning, but playing a completely pumped terminator would be also boring.
About 4 years ago I found out about Blender. It's open source 3d graphics editor written in Python. I was very skeptical with it at that time. I've tried it out but horrible interface scared me away at once. Also Python productivity was in doubt for me. So I decided that only linux geek would use Blender as they just don't have any alternatives.
But recenlty I stump upon Sintel short movie on youtube. It's made by Blender Foundation to demonstrate new Blender 2.5 abilities. This was a very far-sighted on their part. I admit I was surprised. I was surprised enough to look for a few blender tutorials on YouTube and than install Blender myself.
Now Blender is more than worthy even against monsters, such as 3d Max. He has now tasty interface and delicious features. It's just 30Mb but it has poly-by-poly and subdiv tools, NURBS, sculpting modelling(!), texture painting(!), particle physics, physics of solids, cloth, fluid dynamics and nice set of animation tools.
I'm still doubt of Python performance, but I'm going to try at least model something with Blender using a tutorial.
There is no particular secrets. This is just a reminder for myself.
So, you need to change 3 lines in your php.ini to increase maximum upload file size.
upload_max_filesize controls maximum upload file size indeed.
But you also must change post_max_size which controls POST data maximum size. File transfer uses POST, you know.
max_execution_time controls maximum execution time of php-script on server. If file would upload longer than maximum script execution time, than upload will be interrupted.
You can apply all changes with global php.ini. But your hoster never give you access to global php.ini (until you have dedicated server or VDS). Usually you have crappy upload limit of 2MB, severe system administer and absolutely no access to global php.ini. But there are other solutions.
Your hosting may allow to use custom php.ini located in your web-site home directory. You can check it out with php_info(). Look for Configuration file (php.ini) path. If it's allowed than create php.ini at your web-site folder and add necessary lines there.
Another solution is to add necessary lines into .htaccess. There is a way to do:
<IfModule mod_php5.c> ... php_value upload_max_filesize 200M php_value post_max_size 200M php_value max_execution_time = 3600 ... </IfModule>
Or you can use ini_set() function of php itself. For example with Drupal you can edit /sites/default/settings.php and add:
I’ve been testing drupal seven on virtual box with Ubuntu and noticed this message in Status report.
Since I'm working on tube-like site I've thought that upload progress bar would be great addition. Actually I like upload progress bar from jquery(it use flash) much more, but why not try it as it's already build in. First googled link on PECL uploadprogress suggest to download uploadprogress sources, manually compile it with phpize and copy to php extensions directory. That's not my way.
Better do this instead.
We need php5-dev package or system will notice we don't have phpize later, so:
$ sudo apt-get install php5-dev
Next, we need pear(if it's not yet installed already).
$ sudo apt-get install php-pear
Now for uploadprogress:
$ sudo pecl install uploadprogress
If you have not Ubuntu but Centos instead, than you should use native package manager instead. As for Centos its's yum, instead of apt-get.
We still must add "extension=uploadprogress.so" into php.ini manually. Usually it's located somewhere at /etc/php5/. You can type "locate php.ini" to find it. With Ubuntu or Debian you can create uploadprogress.ini at /etc/php5/apache2/conf.d and write there "extension=uploadprogress.so". Php will use it then .
Do not forget to restart apache of course.
$ apachectl restart
The most voxing thing is that progress bar doesn't work anyway! Now file field options have new radio button Bar with progress meter in addition to standart Throbber at Progress indicator sub-menu, but as you create new material standart throbber is still shown.
Last post in this "blog" was written whole 512 days ago. I even had to write a simple php-script to calculate it precisely.
Sadly, I have had so many plans with this blog. Nevertheless, today is nice, good round figure (from the programmer's point of view) to reanimate the blog.
Fivestar is a popular drupal module for node ratings setup. Unfortunately, it’s unable to rate node by several parameters, multiple axis. It can be still used to create reviews, and you can setup several ratings in a review. But you will need whole pack of modules: fivestar, cck, node comments, node limit or something like that. Last dev-version 6.x-1.x-dev from 28 january fix this disappointing imperfection. But it’s in completely mess! It’s simply ignore settings you set.
So, I’ve found this topic and caught this snippet:
<?php $nid = arg(1); $output = ''; 'quality' => t('Quality'), 'color' => t('Color'), 'vote' => t('Overall'), ); foreach ($tags as $tag => $title) { $votes = fivestar_get_votes('node', $nid, $tag); ); 'stars' => 5, 'allow_clear' => TRUE, 'style' => 'average', 'text' => 'dual', 'content_type' => 'node', 'content_id' => $nid, 'tag' => $tag, 'autosubmit' => TRUE, 'title' => $title, 'feedback_enable' => TRUE, 'labels_enable' => TRUE, ); $output .= drupal_get_form('fivestar_custom_widget', $values, $settings); } print $output; ?>
Also fivestar module is supposed to be patched to use the snippet. But it’s look like last stable module version 6.x-1.19 already have all necessary modifications, so everything working as is.
Khe-khe. There is still a problem. Now I have multiple ratings, but I can not setup different widgets(one rating with red stars and another one with blue, for example)!
It makes me laugh. 200 000 modules and there is NO normal file manager!