Shpookdefied
02-06-2003, 03:43 AM
I am customizing Mist's Random Banner hack for use in Firefly's Fast Reply. I'm trying to get the textarea background to come up as random BG's, but it doesnt seem to be working. This is what I have in showthread.php:
//Define Variables //
$qrback[1]="qrback1.jpg";
$qrback[2]="qrback2.jpg";
$qrback[3]="qrback3.jpg";
$qrback[4]="qrback4.jpg";
$numbgs = count($qrback);
// Generate randomness
$num = rand(1,$numbgs);
//output background
$qrback = "{imagesfolders}/qrback$num";
And this is in the showthread_replybox template:
<textarea name="message" rows="9" cols="$textareacols" wrap="virtual" tabindex="1" style="background-image: url('$qrback');
background-repeat: no-repeat; background-attachment: fixed"></textarea>
I have also tried this in showthread.php:
//output background
$qrback = "<textarea name="message" rows="9" cols="$textareacols" wrap="virtual" tabindex="1"
style="background-image: url('qrback$num); background-repeat: no-repeat; background-attachment: fixed"></textarea>";
And this in showthread_replybox:
<td>$qrback><br><smallfont><a href="javascript:checklength(document.vbform);">[check message length]</a></smallfont></td>
I'm not very good with PHP, so I have no clue why it's not working. Can anyone help?
And btw, I am not and will not take credit for this if/when I get it to work. Mist can release it as his own if he wishes.
//Define Variables //
$qrback[1]="qrback1.jpg";
$qrback[2]="qrback2.jpg";
$qrback[3]="qrback3.jpg";
$qrback[4]="qrback4.jpg";
$numbgs = count($qrback);
// Generate randomness
$num = rand(1,$numbgs);
//output background
$qrback = "{imagesfolders}/qrback$num";
And this is in the showthread_replybox template:
<textarea name="message" rows="9" cols="$textareacols" wrap="virtual" tabindex="1" style="background-image: url('$qrback');
background-repeat: no-repeat; background-attachment: fixed"></textarea>
I have also tried this in showthread.php:
//output background
$qrback = "<textarea name="message" rows="9" cols="$textareacols" wrap="virtual" tabindex="1"
style="background-image: url('qrback$num); background-repeat: no-repeat; background-attachment: fixed"></textarea>";
And this in showthread_replybox:
<td>$qrback><br><smallfont><a href="javascript:checklength(document.vbform);">[check message length]</a></smallfont></td>
I'm not very good with PHP, so I have no clue why it's not working. Can anyone help?
And btw, I am not and will not take credit for this if/when I get it to work. Mist can release it as his own if he wishes.