Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to rotate your favicon.ico and logo in IPB hourly
#1

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` $TARGETFILE




 

for 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` $TARGETFILE




 

both files above need to executable

 

do

 



Code:
chmod +x changelogo.sh




 

etc...

 

cheers

anyweb

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)