![]() |
|
how to rotate your favicon.ico and logo in IPB hourly - Printable Version +- Linux-Noob Forums (https://www.linux-noob.com/forums) +-- Forum: Linux Server Administration (https://www.linux-noob.com/forums/forum-8.html) +--- Forum: LAMP (https://www.linux-noob.com/forums/forum-83.html) +--- Thread: how to rotate your favicon.ico and logo in IPB hourly (/thread-2252.html) |
how to rotate your favicon.ico and logo in IPB hourly - anyweb - 2006-01-15 for the favicon.ico use this stick it in /etc/cron.hourly/changeico.sh Code: #!/bin/sh
SOURCEDIR="/usr/local/apache/htdocs/favicon/"
TARGETFILE="/usr/local/apache/htdocs/forums/favicon.ico"
NUM=`ls -1 $SOURCEDIR|wc -l`
cp -f $SOURCEDIR`ls -1 $SOURCEDIR|head -n $[$RANDOM%$NUM+1]|tail -n1` $TARGETFILEfor the IPB logo (which youve changed to your own ! - i use 8 different ones) try this stick it in /etc/cron.hourly/changelogo.sh Code: #!/bin/sh
SOURCEDIR="/usr/local/apache/htdocs/logos/"
TARGETFILE="/usr/local/apache/htdocs/forums/style_images/1/logo4.gif"
NUM=`ls -1 $SOURCEDIR|wc -l`
cp -f $SOURCEDIR`ls -1 $SOURCEDIR|head -n $[$RANDOM%$NUM+1]|tail -n1` $TARGETFILEboth files above need to executable do Code: chmod +x changelogo.shetc... cheers anyweb |