Code Duplication    Length = 4-4 lines in 3 locations

entry.php 3 locations

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