Posts

Showing posts from September, 2011

[DirectAdmin] Setting up Cronjob for Joomla jNewsletter

Method 1: URL access method

curl http://<domain.com>/index.php?option=com_jnews&act=cronwget -O - http://<domain.com>/index.php?option=com_jnews&act=cron >/dev/null 2>&1lynx -dump http://<domain.com>/index.php?option=com_jnews&act=cron >/dev/null 2>&1

If you use 'wget' is better to add the '-O -' option for don't get writed the downloaded file to the disk, only to 'stdout' and if your file is in one protected dir you can add the options '--http-user=USERNAME --http-password=PASS', see bellow:

wget -O - --http-user=USERNAME --http-password=PASS http://<domain.com>/index.php?option=com_jnews&act=cron >/dev/null 2>&1
wget, lynx or curl doesn't work?

If you having trouble getting lynx or wget to work. This may be the case if "localhost" is not permitted. Then wget, lynx or curl won't work on the local machine. Read more here http://drupal.org/node/65307.

Alternatively, …

[Joomla] Check If user logged in

Just realize there this $my variable that conveniently lets you access the user id of a (logged in) user on the site.

if ($my->id) { // Do something here }
Not something fantastic. I just realize this. :p

DirectAdmin Reset Folder Recursively

(This is just a not for myself.)

Parameters to append to links to reset folders recursively.
http://www.example.com:2222/CMD_FILE_MANAGER/domains/example.com/public_html/folder?action=resetowner&method=recursive

[jQuery] Mouseover Fade for all Children Element

Heres a very simple script for those who looking for jQuery script that
Applies mouseover / mouseout fade,For all elements in a container. Note: Just need replace the parent-class-to-apply-effect with the class of the parent container that you want to apply to.


jQuery(document).ready(function() { jQuery.each(jQuery('.parent-class-to-apply-effect').children(), function() { jQuery(this).mouseover(function() { jQuery(this).fadeTo('slow', 0.8); }).mouseout(function() { jQuery(this).fadeTo("slow", 1.0); }); }); });
:)