How to place drupal blocks anywhere in content.

If you're looking to place a block anywhere inside your content, simply do the following:

go to /admin/build/block

select the block you want to insert into your content to get the proper block references...

e.g. I created a custom views block called "latest_news" which, if you click it's url looks like:
/admin/build/block/configure/views/latest_news-block

so basically, you'll use "views" at the beginning of the function reference and "latest_news-block" at the end:

Drupal 7 method

Menu block

Tags: Drupal blocks

httpd causing high CPU load in CentOS / DirectAdmin

If you did TOP in ssh, and noticed httpd process has a high cpu load, and has been running for a long time (e.g. over 5 minutes) then you might try lowering your MaxRequestsPerChild.


vi /etc/httpd/conf/extra/httpd-mpm.conf

Now change your MaxRequestsPerChild from 1000 to 20...


StartServers 5
MinSpareServers 10
MaxSpareServers 20
ServerLimit 812
MaxClients 812
MaxRequestsPerChild 20


service httpd restart

How to get 3TB HDD to work with NVIDIA nForce motherboards

If you recently tried installing a 3TB Hard Drive on an NVIDIA nForce motherboard you'll notice that only about 1/3 of the drive is recognized by Windows. The fix is quite simple:

1. Download NVIDIA nForce Drivers 15.58 (64bit) , Download NVIDIA nForce Drivers 15.58 (32bit) or later

2. Install the NVIDIA NFORCE 15.58 drivers and reboot your system after the install is done.

3. You're done. Your PC should be able to see the entire 3TB drive (it should be around 2.72TB)

Tags: admin windows HDD

How to fix Traktor not keeping play count or mp3 comment changes

So... Here I was playing sets on my new Traktor S4 on my 2010 iMac, and noticed that Traktor was acting weird--comments were getting erased, ratings were disappearing, play counts weren't being kept. In other words,Traktor's explorer worked on some files and not others.

I tried changing file permissions, reinstalling Traktor, etc... nothing solved the problem... Doing research didn't show me any concrete solutions (e.g. change the play count settings; this didn't work).

Then it occurred to me, I haven't defragmented my Windows PC in over 2 months. And a few weeks before, I had my windows PC sync all my mp3 files to my iMac.

So long story short, the mp3 files were messed up ("garbage at the end of file")...

The solution

Tags: windows traktor native instruments osx

How to uninstall multipletablerates from magento

Multiple Table Rates (aka multipletablerates) was a very popular extension in the magento 1.3 and earlier days... However, after several magento versions this extension basically became completely unstable/buggy (this is normal as it only lists magento 1.1 compatability)... Even so, it still worked on magento 1.3 with a few minor bugs... Then later down the road other extensions came up (mostly paid) that provided similar functionality, plus some, and minus the bugs...

Tags: magento extensions

Magento Catalog Price Rules bugs

Magento's "Catalog Price Rules" was always a buggy experience, ever since magento 1.3... I don't know what's going with the development, but it's still buggy up to 1.4.1 ...

So here are a couple of fixes I found.

Magento 1.4.0.1:

source: http://www.magentocommerce.com/boards/viewthread/194930/#t245120

1. Open up Observer.php in /app/code/core/Mage/CatalogRule/Model/
2. Find the dailyCatalogUpdate() method
3. At the end of the method, before “return $this;”, add:
$this->applyAllRules( $this );
4. (Not sure if this step is necessary) Open up /app/code/core/Mage/CatalogRule/etc/config.xml
5. Find the crontab > jobs > catalogrule_apply_all area
6. Change
<cron_expr>0 1 * * *</cron_expr>

Tags: magento

Disable scroll wheel zoom in Firefox

This is probably an annoyance for all those that use keyboard CTRL commands (like, CTRL-C and CTRL-V) and accidentally keep hitting CTRL + mouse scroll wheel, which zooms in and out, or enlarges and decreases text size in your browser...

Here's how to disable that in firefox...

Firefox:

In your address bar, type in

about:config

search for

mousewheel.withcontrolkey.action

Change the value to "0"

Restart your browser, and you're all set.

Google Chrome

Nothing available at the time of this writing...

Tags: firefox annoyances browser

Magento default sort order

In order to specify the default sort order of the product listing open up your 'catalog.xml' (this is tested in magento 1.4): desc To order products by a specific order, e.g. to order products by the order specified under category listing: set in your admin: yoursite.com/admin/system_config/edit/section/catalog/
Product listing sort by: Best Value
And for those wondering where 'category products' is... it's located here: /admin/admin/catalog_category/ (under "Category Products" tab, when you click on any category)
Tags: magento

How to install PECL uploadprogress w/ PHP 7 support

Original uploadprogress doesn't seem to be developed any longer, and hence doesn't support PHP 7. However, there's a PHP 7 compatible version we can use:

cd /usr/local/src/
git clone https://github.com/Jan-E/uploadprogress.git
cd uploadprogress
phpize
./configure
make
make install

Now add the extension to your php.ini

vi /usr/local/lib/php.ini

Add the following to your extensions section:

extension=uploadprogress.so

Restart apache

service httpd restart

Here are additional steps you may need to take: https://www.drupal.org/node/2718253#comment-11159883

Or if you are using PHP 5.X:

Tags: Drupal linux server media

New Server Checklist for directadmin (2009)

-Add all your ips in directadmin under "IP management"
(and assign 2 ips to admin)
http://xx.xxx.xxx.xxx:2222/CMD_IP_MANAGER

-Register nameserver at registrar
(namecheap.com is my fav; networksolution.com is the worst for this... it's not longer an option you can click on the website, you have to send an email request for this)

-Add nameservers to server:
1. go to user level, and add the new domain you registered (leave default settings, and tweak them after)
2. go back to reseller level, and click "nameserver" and select 2 ips you want to use and click "create" then set the 2 new nameservers for "Set the Nameservers that will be assigned to new users" (it should be added by default)

-Share nameserver ips (so you're able to add other domains to them):

Tags: Server howto linux server