Code Duplication    Length = 4-4 lines in 3 locations

entry.php 3 locations

@@ 146-149 (lines=4) @@
143
                        default:
144
                            $replace_term = '<span><b><a style="cursor:help;border-bottom: 1px dotted #000;color: #2F5376;" href="'.$staticURL.'" >'.$term.'</a></b></span>';
145
                            break;
146
                        case 3: //tooltip
147
                            $tooltipdef = $myts->htmlSpecialChars(xoops_substr(strip_tags($definition), 0, 150));
148
                            $replace_term = '<a class="parser" href="'.$staticURL.'" onMouseover="ddrivetip(\''.$tooltipdef.'\', 300)"; onMouseout=\'hideddrivetip()\'>'.$term.'</a>';
149
                            break;
150
                        case 4://simple popup
151
                            $replace_term = '<a style="cursor:help;border-bottom: 1px dotted #000;color: #2F5376;" href="#" onClick=\'popup("popup.php?entryID='.$entryID.'","details", 420, 350); return false\'>'.$term.'</a>';
152
                            break;
@@ 153-156 (lines=4) @@
150
                        case 4://simple popup
151
                            $replace_term = '<a style="cursor:help;border-bottom: 1px dotted #000;color: #2F5376;" href="#" onClick=\'popup("popup.php?entryID='.$entryID.'","details", 420, 350); return false\'>'.$term.'</a>';
152
                            break;
153
                        case 5:// balloon tooltip
154
                            $tooltipdef = $myts->htmlSpecialChars(xoops_substr(strip_tags($definition),0,150));
155
                            $replace_term = '<a class="parser" href="'.$staticURL.'" onMouseover="showToolTip(event,\''.$tooltipdef.'\');return false"; onMouseout=\'hideToolTip()\'>'.$term.'</a>';
156
                            break;
157
                        case 6:// shadow tooltip
158
                            $tooltipdef = $myts->htmlSpecialChars(xoops_substr(strip_tags($definition),0,150));
159
                            $replace_term = '<a class="parser" href="'.$staticURL.'" onmouseout="hideTooltip()" onmouseover="showTooltip(event,\''.$tooltipdef.'\')"; >'.$term.'</a>';
@@ 157-160 (lines=4) @@
154
                            $tooltipdef = $myts->htmlSpecialChars(xoops_substr(strip_tags($definition),0,150));
155
                            $replace_term = '<a class="parser" href="'.$staticURL.'" onMouseover="showToolTip(event,\''.$tooltipdef.'\');return false"; onMouseout=\'hideToolTip()\'>'.$term.'</a>';
156
                            break;
157
                        case 6:// shadow tooltip
158
                            $tooltipdef = $myts->htmlSpecialChars(xoops_substr(strip_tags($definition),0,150));
159
                            $replace_term = '<a class="parser" href="'.$staticURL.'" onmouseout="hideTooltip()" onmouseover="showTooltip(event,\''.$tooltipdef.'\')"; >'.$term.'</a>';
160
                            break;
161
                    }
162
                    $parts[$key] = preg_replace($search_term, $replace_term, $parts[$key]);
163
                }