Missing field(s) in Cat-eLog species view...
- MatsP
- Posts: 21038
- Joined: 06 Oct 2004, 13:58
- My articles: 4
- My images: 28
- My cats species list: 117 (i:33, k:0)
- My aquaria list: 10 (i:8)
- My BLogs: 4 (i:0, p:164)
- Spotted: 187
- Location 1: North of Cambridge
- Location 2: England.
Missing field(s) in Cat-eLog species view...
I don't know how many fields are missing, but definitely the "distribution" is missing. [But only on certain fishes - perhaps only those that don't have temp/pH?]
Example:
Example showing distribution:
--
Mats
Example:
Example showing distribution:
--
Mats
- Jools
- Expert
- Posts: 16274
- Joined: 30 Dec 2002, 15:25
- My articles: 198
- My images: 941
- My catfish: 237
- My cats species list: 87 (i:13, k:1)
- My aquaria list: 21 (i:13)
- My BLogs: 7 (i:10, p:167)
- My Wishlist: 23
- Spotted: 450
- Location 1: Middle Earth,
- Location 2: Scotland
- Interests: All things aquatic, Sci-Fi, photography and travel. Oh, and beer.
- Contact:
Fixed.
I tidied up the page so that it doesn't output subsection title bars if no information exists for any field in that group. Just got it a little wrong...
Jools
I tidied up the page so that it doesn't output subsection title bars if no information exists for any field in that group. Just got it a little wrong...
Jools
Owner, AquaticRepublic.com, PlanetCatfish.com & ZebraPleco.com. Please consider donating towards this site's running costs.
- MatsP
- Posts: 21038
- Joined: 06 Oct 2004, 13:58
- My articles: 4
- My images: 28
- My cats species list: 117 (i:33, k:0)
- My aquaria list: 10 (i:8)
- My BLogs: 4 (i:0, p:164)
- Spotted: 187
- Location 1: North of Cambridge
- Location 2: England.
That's the kind of thing I thought it was...
A thought: Since you probably do an if for each of the lines in each section, could you do something like this...:
That way you don't need to have a long set of checks to see if you need the header, only to check the same thing again when you get to outputting each field... Just a thought of course...
--
Mats
A thought: Since you probably do an if for each of the lines in each section, could you do something like this...:
Code: Select all
... Some section of Cat-eLog page ...
$html = "";
if ($row["something"] != "")
$html .= "..." . $row["something"] . "...";
if ($row["otherthing"] != "")
$html .= "..." . $row["otherthing"] . "...";
...
if ($html != "") {
echo "... Section header ... ";
echo $html;
echo "... Section footer ... ";
}
--
Mats
- MatsP
- Posts: 21038
- Joined: 06 Oct 2004, 13:58
- My articles: 4
- My images: 28
- My cats species list: 117 (i:33, k:0)
- My aquaria list: 10 (i:8)
- My BLogs: 4 (i:0, p:164)
- Spotted: 187
- Location 1: North of Cambridge
- Location 2: England.
- Jools
- Expert
- Posts: 16274
- Joined: 30 Dec 2002, 15:25
- My articles: 198
- My images: 941
- My catfish: 237
- My cats species list: 87 (i:13, k:1)
- My aquaria list: 21 (i:13)
- My BLogs: 7 (i:10, p:167)
- My Wishlist: 23
- Spotted: 450
- Location 1: Middle Earth,
- Location 2: Scotland
- Interests: All things aquatic, Sci-Fi, photography and travel. Oh, and beer.
- Contact:
It's fixed, here's the kind of code we're using....MatsP wrote:Jools, are you sure that you updated the Cat-eLog species page correctly? Because it seems like it's still not working... I just looked at Megalonem platanum, and it's not showing it's distribution, but if I look at the data in the database, it's there...
Code: Select all
if ($species_row["min_ph"] > 0 || $species_row["min_temp"] > 0 || $species_row["water"] != "" || $species_row["distribution"] != "")
Jools
Owner, AquaticRepublic.com, PlanetCatfish.com & ZebraPleco.com. Please consider donating towards this site's running costs.