Hi there,
I'm close to finishing the re-design of my website : www.everything.ie but am having a little trouble laying it all out. This is because pretty much all of the content is generated by a classifieds php script which I bought (and know little about how to modify).
First off look here to see the design I want to get close to:
http://www.grahamvard.com/everything.html
In this case all I'm trying to achieve are the search box (top right) and a list of recent forum postings (top left).
The php script generates everything from the navbar down, including the search box. I want to modify the classifieds script so it generates the recent forum links also.
If you look at my test site you will see that I've managed to do this but it looks terrible because there is no style control on the links and they are both on top of each other as opposed to side by side.
Here it is:
http://www.eveythingfree.buildtolearn.net/classifieds/index.php
I want to get it to look something like the example page listed above.
I need to alter the piece of script that controls the search box and (1) Make it include the forum links and (2) layout the two boxes right.
Here's the php code:
================================================== ==========
// generates the search box form
// ================================================== ==========
//
function generate_search_box() {
if ($this->allow_search) {
$output = include('http://www.everything.ie/forum/extern.php?action=new&show=6');
$output = '<div align="center" class="searchbox"><form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
$output .= '<input type="hidden" name="cf_action" value="search">';
$output .= '<input type="text" name="search_query" value="'.$this->format_input($_GET["search_query"]).'"> ';
$output .= '<input type="submit" value="Search">';
if ($this->show_search_options) {
$output .= '<br><input type="radio" name="search_mode" value="any">Any word ';
$output .= '<input type="radio" name="search_mode" value="all">All words ';
$output .= '<input type="radio" name="search_mode" value="exact">Exact phrase ';
}
$output .= '</form></div>';
}
return $output;
}
I added this line in myself
$output = include('http://www.everything.ie/forum/extern.php?action=new&show=6');
It brings in the links from the forums but I have no idea how to attach a .css class to it to control its appearance.
The second line I added (or rather changed) is this:
$output = '<div align="center" class="searchbox"><form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
I just changed the class from a basic text one to "searchbox" which has a box around it a and background colour.
The div align tag used to make the seach box appear in the centre of the screen, but since I've changed it, it just alters where the search box appears inside the bigger grey box its contained in.
Finally, here's the .css code that controls the search box and hopefully the forum links, if you can work out a way to attach it to them.
.searchbox {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #666666;
text-decoration: none;
border: 1px solid #666666;
padding: 25px 0px 0px;
height: 100px;
width: 228px;
background-color: #F9F9F9;
}
.forums {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #666666;
text-decoration: none;
border: 1px solid #666666;
padding: 25px 0px 0px;
height: 100px;
width: 478px;
background-color: #F9F9F9;
}
.forums a {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #333333;
text-decoration: none;
}
.forums a:hover {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #CC0000;
text-decoration: none;
}
.forums a:visited {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #666666;
text-decoration: none;
}
.forums a:visited:hover {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #CC0000;
text-decoration: none;
}
My css is only slightly better than my php so there could be problems there as well. The size of the boxes is just a rough estimate. I will have to tweek them to make them fit exactly like on the design example page.
I think the solution to this will involve just a little changing of the php code I supplied, but I have no idea how to do it.
Sorry for the very long post but I figured I better give as much detail as possible so as to make it clear.
I've been struggling with this part of the design for weeks now, so if anyone could sort it out for me I would really appreciate it.
Thanks for reading this far!
Robert