Missing field(s) in Cat-eLog species view...

A historical forum for issues reported in the suggestions and bugs forum that have been subsequently fixed or resolved.
Post Reply
User avatar
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...

Post by MatsP »

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
User avatar
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:

Post by Jools »

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
User avatar
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.

Post by MatsP »

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...:

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 ... ";
}
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
User avatar
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.

Post by MatsP »

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 dsitribution, but if I look at the data in the database, it's there...

--
Mats
User avatar
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:

Post by Jools »

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...
It's fixed, here's the kind of code we're using....

Code: Select all

if ($species_row["min_ph"] > 0 || $species_row["min_temp"] > 0 || $species_row["water"] != "" || $species_row["distribution"] != "")
... basically, you only get a header if any one of the fields that belong to that group have a value.

Jools
Post Reply

Return to “All Resolved Issues”