Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 xThreads Display Item Format Not Parsing {VALUE|htmlspecialchars} for filmgenre Field
terzier Offline
Member
***
Posts: 93
Joined: Feb 2012
Post: #1
xThreads Display Item Format Not Parsing {VALUE|htmlspecialchars} for filmgenre Field
hello Zingaburga community

I’m having trouble with the XThreads Display Item Format for my filmgenre field. My goal is to display each genre value (e.g., "Drama, Romance, Supernatural, Paranoid") as separate HTML tags with individual CSS styling, like this:  

PHP Code:
<span class="genre-tag">Drama</span>
<span class="genre-tag">Romance</span>
<span class="genre-tag">Supernatural</span>
<span class="genre-tag">Paranoid</span>


here’s my setup:

  • key : input :{$tfinput['filmgenre']}. output : {$GLOBALS['threadfields']['filmgenre']}
  • filmgenre is a text input field in xThreads, with a value like "Drama, Romance, Supernatural, Paranoid".
  • In xThreads settings:  
    Display Item Format: <span class="genre-tag">{VALUE|htmlspecialchars}</span>  
    Display Format: <span class="genre-list">{VALUE}</span>  
    Blank Value: <span class="genre-list"><span class="genre-tag">No genre available</span></span>
  • css

    Code:
    .genre-list { display: inline; }
    .genre-tag { display: inline-block; color: #ff69b4; font-size: 12px; margin-right: 5px; }


However, the output in the thread is not parsed correctly. Instead of the expected HTML, I get:  

PHP Code:
{VALUE|htmlspecialchars}, {VALUE|htmlspecialchars}, {VALUE|htmlspecialchars}, {VALUE|htmlspecialchars}


It seems the {VALUE|htmlspecialchars} syntax isn’t being processed by XThreads. I’m using MyBB 1.8.x (please let me know if you need the exact version or XThreads version).  

How can I achieve the desired output where each genre is wrapped in its own <span class="genre-tag"> with proper styling? Is there a better way to split and style each genre value in xThreads?  

thank you for your help!  

demo: Indolokal


Un-Official MyBB from Indonesia| Facebook Page|Twitter
GARUDA DIDADA KU
04-04-2025 09:28 PM
Visit this user's website Find all posts by this user Quote this message in a reply
terzier Offline
Member
***
Posts: 93
Joined: Feb 2012
Post: #2
RE: xThreads Display Item Format Not Parsing {VALUE|htmlspecialchars} for filmgenre Field
solved! Jap

Display Item Format
Like the "Display Format" field, but this one will be applied to every single value for this field as opposed to being applied to the concatenated list of values.

PHP Code:
<div class="info-value"><span class="genre-tag">{VALUE}</span></div>


still need to rearrange the css style because the layout is not what I want.
   

I want it to look like this
   


Un-Official MyBB from Indonesia| Facebook Page|Twitter
GARUDA DIDADA KU
(This post was last modified: 04-06-2025 07:47 PM by terzier.)
04-06-2025 07:47 PM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: