Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 19th, 2004, 5:25 AM   #1
TecBrain
Hobbyist Programmer
 
Join Date: Sep 2004
Location: Cyprus
Posts: 147
Rep Power: 4 TecBrain is on a distinguished road
On my forum I have added a quick reply list box:

I am trying to change the back color of that list box

When I removed the class='post'

from this line


$quick_reply_form .= "<textarea name='input' rows='10' cols='50' wrap='virtual' class='post'></textarea><br />

The list box appeared to be white....

how can I make the bg = #363b42

this is the original code:

// Quick Reply Mod
//
if ( ((!$is_auth['auth_reply']) or ($forum_topic_data['forum_status'] == FORUM_LOCKED) or ($forum_topic_data['topic_status'] == TOPIC_LOCKED)) and ($userdata['user_level'] != ADMIN) )
{
	$quick_reply_form = "";
}
else
{
	if ( $can_watch_topic && $is_watching_topic )
	{
 $notify = 1;
	}
	else
	{
 $notify = $userdata['user_notify'];
	}
	$bbcode_uid = $postrow[$total_posts - 1]['bbcode_uid'];
	$last_poster = $postrow[$total_posts - 1]['username'];
	$last_msg = $postrow[$total_posts - 1]['post_text'];
	$last_msg = str_replace(":1:$bbcode_uid", "", $last_msg);
	$last_msg = str_replace(":u:$bbcode_uid", "", $last_msg);
	$last_msg = str_replace(":o:$bbcode_uid", "", $last_msg);
	$last_msg = str_replace(":$bbcode_uid", "", $last_msg);
	$last_msg = str_replace("'", "'", $last_msg);
	$last_msg = "[QUOTE=\"$last_poster\"]" . $last_msg . "[/QUOTE]";
	$quick_reply_form = "
	<script language='JavaScript' type='text/javascript'>
 function checkForm() {
 	formErrors = false;
 	document.post.message.value = '';
 	if (document.post.input.value.length < 2) {
  formErrors = '" . $lang['Empty_message'] . "';
 	}
 	if (formErrors) {
  alert(formErrors);
  return false;
 	} else {
  if (document.post.quick_quote.checked) {
  	document.post.message.value = document.post.last_msg.value;
  }
  document.post.message.value += document.post.input.value;
  return true;
 	}
 }
	</script>
	<form action='".append_sid("posting.$phpEx")."' method='post' name='post' onsubmit='return checkForm(this)'>
	<span class='genmed'><b>".$lang["Quick_Reply"]."</b><br />";

	if (!$userdata['session_logged_in'])
	{
 $quick_reply_form .= $lang['Username'] . "<input class='post' type='text' name='username' size='25' maxlength='25' value='' /><br />";
	}

	$quick_reply_form .= "<textarea name='input' rows='10' cols='50' wrap='virtual' class='post'></textarea><br />
	<input type='checkbox' name='quick_quote' />".$lang["Quick_quote"]."<br />
	<input type='checkbox' name='attach_sig' checked='checked' />".$lang["Attach_signature1"]."<br />
	<input type='hidden' name='mode' value='reply' />
	<input type='hidden' name='sid' value='" . $userdata['session_id'] . "' />
	<input type='hidden' name='t' value='" . $topic_id . "' />
	<input type='hidden' name='message' value='' />
	<input type='hidden' name='notify' value=" . $notify . " />
	<input type='hidden' name='last_msg' value='" . $last_msg . "' />
	<input type='submit' name='preview' class='liteoption' value='".$lang['Preview']."' />
	<input type='submit' name='post' class='mainoption' value='".$lang["Submit"]."' />
	</form></span>";
}

$template->assign_vars(array(
	'QUICK_REPLY_FORM' => $quick_reply_form)
);
//
// END Quick Reply Mod
//

Thanks.
__________________
Personal Portfolio
TecBrain Support Forum
Linux VS Windows ... Dont Even Think of it ..
Distribution: Slackware
if (OS==Linux) return success
There are 10 kinds of people, those who can read binary numbers and those who can't.
TecBrain is offline   Reply With Quote
Old Sep 19th, 2004, 6:38 AM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
The post class specifies the background colour. Track it down (it'll be in the <head>, either in a seperate style sheet linked to using <style> tags, or within some <style> tags in the actual HTML file), steal the parts you need, put them into a different class (say, quickreply), and reference it using class = "quickreply". You should be able to figure out how to do this just by looking at the code, if you don't know how already. Nonetheless, if you get stuck, feel free to post back.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Sep 20th, 2004, 9:47 AM   #3
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
You could do it in your CSS. If you have one. Or even if you just want to make a new class in the header of your html code for the page like this:

textarea.quickreply {
    background-color: #FFFFFF
    }

Anyways, you can make more tan one class for the textarea if you need. Now in your code, instead of the class="post", put class="quickreply" in. Then your background should be white, which it was set to in our CSS above. Just change out the #FFFFFF for any color that you want. I have a few good books on this subject in electronic format if you wants. Good luck.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Sep 21st, 2004, 2:22 AM   #4
Berto
Programming Guru
 
Join Date: Aug 2004
Posts: 1,022
Rep Power: 6 Berto is on a distinguished road
Send a message via AIM to Berto Send a message via MSN to Berto
generally you will be using a HTML/CSS template for forums depending on the forum i no PHPBB you can edit the templates in teh admin area.
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT'S relativity."

- Albert Einstein
Berto is offline   Reply With Quote
Old Sep 21st, 2004, 2:28 PM   #5
TecBrain
Hobbyist Programmer
 
Join Date: Sep 2004
Location: Cyprus
Posts: 147
Rep Power: 4 TecBrain is on a distinguished road
Thanks guys for your support, it works perfectly now.
__________________
Personal Portfolio
TecBrain Support Forum
Linux VS Windows ... Dont Even Think of it ..
Distribution: Slackware
if (OS==Linux) return success
There are 10 kinds of people, those who can read binary numbers and those who can't.
TecBrain is offline   Reply With Quote
Old Sep 23rd, 2004, 9:14 AM   #6
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
glad we could help.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:02 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC