[Rejected] Irregular / useless variable "new_class" in forumdisplay.php
Irregular and useless definition of variable "$new_class".

- forumdisplay.php
- search.php
- usercp.php

There are irregular definitions with no CSS style defined for this class ins Standard theme.

# grep "new_class" *.php
forumdisplay.php:	$new_class = ' class="subject_new"';
forumdisplay.php:	$new_class = ' class="subject_old"';
forumdisplay.php:	$new_class = "subject_new";
forumdisplay.php:	$new_class = "subject_old";
search.php:		$new_class = "subject_new";
search.php:		$new_class = 'subject_old';
usercp.php:		$new_class = "subject_new";
usercp.php:		$new_class = "subject_old";
usercp.php:		$new_class = "subject_new";
usercp.php:		$new_class = "subject_old";
usercp.php:		$new_class = "subject_new";
usercp.php:		$new_class = "subject_old";

Variable {$new_class} is used in several templates in different ways:
- forumdisplay_announcements_announcement
- forumdisplay_thread
- search_results_threads_thread
- usercp_latest_subscribed_threads
- usercp_latest_threads_threads
- usercp_subscriptions_thread

Template examples:
<a href="{$announcement['announcementlink']}"{$new_class}>{$announcement['subject']}</a>
<span>{$prefix} {$gotounread}{$thread['threadprefix']}<span class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">...
<td class="{$bgcolor}">{$gotounread}{$thread['displayprefix']}<a href="{$thread['threadlink']}" class="{$new_class}">...

There is no CSS style definition in Standard theme for ".subject_new" and ".subject_old" at all, so its useless or a potential option for styling!?
Either this definition can be dropped from PHP code. Otherwise some code cosmetics can make this variable regular.

New Forum / MyBB 1.8.26 + innovative full-responsive Theme

Messages In This Thread
Irregular / useless variable "new_class" in forumdisplay.php - by [ExiTuS] - 2021-01-06, 01:36 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)