LPH
Well-known member
This is how I'm pulling thread prefixes externally from XenForo to show in a widget.
This is the line I'm concerned about:
This allows
I could change it to
However, is there a better way?
Sometimes I see something like this
Thank you for the advice.
Code:
if ( $prefixTitle != '' ) {
echo "<div class='threadListItem'><span class='{$prefixesCSS}'>{$prefixTitle}</span> ";
}
This is the line I'm concerned about:
Code:
if ( $prefixTitle != '' )
This allows
thread_prefix.0
to show up instead of an actual title.I could change it to
Code:
if ( $prefixTitle != '' || $prefixTitle != 'thread_prefix.0' )
However, is there a better way?
Sometimes I see something like this
Code:
if ( !$prefixTitle ) {
//
}
Thank you for the advice.