As I come across bugs I hope to assist in squashing them not just reporting them, to assist this I will use a common format to call attention to the bug as I see it and hopefully offer what I believe is the code fix. This is the first I hope to squash of many to help make this great project as solid as it can be. Most of what I have seen so far as bugs are output of additional or unused div tables or styling elements due to function logic not actually needed output.
Request for code change: Function sp_SectionStart
Change reason abstract: Function outputs some code elements that are not used in some circumstances that can confuse some browser rendering engines IE class=’ ‘ when called intentionally with no class. Cleans human readability in source output.
Functionality change: No change in use format
Added Functionality: Ability to call div with ID without class, Debug addition using section name
File location: /forum/content/sp-common-view-functions.php
Previous code:
Line 129 of function:
# output section starting div
if(!empty($rowId)) $rowId=” id=’$rowId'”;
$out = “<div class=’$tagClass$rowClass’$rowId>n”;
Replace with code:
Line 129 of function:
# output section starting div
if(!empty($rowId)){ $tagId = ” id=’$rowId'”; }else{ if(!empty($tagId)){$tagId = ” id=’$tagId'”;} }
if(!empty($tagClass)){ $tagClass = ” class='” . $tagClass; if(!empty($rowClass)){ $tagClass = $tagClass . $rowClass; } $tagClass .= “‘”; }
$out = “r<div” . $tagId . $tagClass . “>r”;
if($dbug){$out .= “<!– Begin “. $sectionName . ” –>r”;}