there is a message board system out there called DeluxeBB (deluxebb.com) and its coded sort of like xmb message boards. well anyway im the tech staff there and I was asigned a job to do fast. heres the job:
I was to make a news ticker code for the index. all the admins could edit what it sayes and turn it on and off in the admin panel.
heres the prob. I coded everything, and made the ticker codes. I added the SQL querys. here they are:
Quote:
`tickercontents` mediumtext NOT NULL default '',
`ticker` tinyint(1) default '0',
|
and added them to a table called "settings". ok, now I added a little on and off button to the admin panel. here it is:
Quote:
<tr bgcolor="<?php echo $tdbgcolor ?>">
<td width="29%"><span class="misctext"><?php echo $lang_tickeroption; ?></span></td>
<td width="71%">
<select name="$newsticker">
<option value="1" <?php if($settings['ticker'] == 1) { echo 'selected="selected"'; } ?>><?php echo $lang_on; ?></option>
<option value="0" <?php if($settings['ticker'] == 0) { echo 'selected="selected"'; } ?>><?php echo $lang_off; ?></option>
</select></td>
</tr>
|
and then I made a code on on index.php:
Quote:
$ticker = '';
if ($SETTINGS['ticker'] == 'on') {
$contents = '';
$news = explode("\n", str_replace(array("\r\n", "\r"), array("\n"), $SETTINGS['tickercontents']));
for($i=0;$i<count($news);$i++) {
if (strlen(trim($news[$i])) == 0) {
continue;
}
$news[$i] = postify($news[$i], 'no', 'no', 'yes', 'no', 'yes', 'yes', false, 'yes', 'no');
$news[$i] = str_replace('\"', '"', addslashes($news[$i]));
$contents .= "\tcontents[$i]='$news[$i]';\n";
}
include($templatefolder.'/index_ticker.php');
}
|
ok...now I test it. heres where the problem happens. I go to the admin panel and turn it to on.......I go to index.php and nothing happens. I go back to the admin panel and the on and off option has been turned back off!
I need help quick. ive got to get this done before the next version in december. I cant ask my boss...so..
can someone send me a PM and try to help me out? I dont know what the problem could be! thanks
