Custom Fields in Post Display?

Started by ThistleProse at Jul 24, 2021 at 10:40 am
165 Views
6 Posts


ThistleProse

Client

33Years Young
5 Posts

Hello!

I've been playing with the layout to make it how I like it, but I can't figure out how to add custom fields to the post template. Could I get a pointer, please?

Here is what I have so far; what I'd like to do is add little tidbits after her name, like the things from her biography. I figure it has something to do with the 'fie_codehere' but I'm not sure how to set it up.

Many thanks :D




Arceus

codemancer

Admin

31Years Young
135 Posts

Just because you lost me as a friend, doesn't mean you gained me as an enemy. I'm bigger than that. I still want to see you eat, just not at my table.


$msg->poster->fields['fie_fieldname']


Honey you can't dilute a war crime.

Check out my writing blog! All of my fanfiction and eventually my original stories are published here.
I also have a YouTube channel, where I post Sims videos.



ThistleProse

Client

33Years Young
5 Posts

That's what i thought, but I must be doing something wrong 'cause every time I try I break the site lol




Arceus

codemancer

Admin

31Years Young
135 Posts

Just because you lost me as a friend, doesn't mean you gained me as an enemy. I'm bigger than that. I still want to see you eat, just not at my table.


What's the code look like?


Honey you can't dilute a war crime.

Check out my writing blog! All of my fanfiction and eventually my original stories are published here.
I also have a YouTube channel, where I post Sims videos.



ThistleProse

Client

33Years Young
5 Posts

This is where I've been playing, but I've tried just dropping in the code you posted earlier, and also I've tried formatting it to match the other code.

I have absolutely Zero idea what I'm doing. I usually just hack away until my copying works, but I can't seem to figure out what it's supposed to look like.

<div class="centertext flex05 nomobile">
                        <!-- <h2 class="margin0">',$msg->poster->link,'</h2> --> 
                        <!-- ',($msg->poster->title ? '<div>'.$msg->poster->title.'</div>' : ''),' -->
                        ',($msg->poster->avatar ? '<div class="margin5">'.$msg->poster->avatar.'</div>' : ''),'       
                         ',($msg->poster->title ? '<div>'.$msg->poster->title.'</div>' : ''),'
 ',($msg->poster->title ? '<div>'.$msg->poster->title.'</div>' : ''),'
                        ',($msg->poster->group->icon ? '<div>'.$msg->poster->group->icon.'</div>' : ''),'
                        ',($msg->poster->id ? '<div class="success_box">'.$msg->poster->reputation.'</div>' : ''),'
                        <div class="flex flexwrap">
                              <div class="flex45">
                                    ',($msg->poster->age ? '<span class="lgfont"'.(!empty($msg->poster->group->color) ? ' style="color: '.$msg->poster->group->color.';"' : '').'>'.$msg->poster->age.'</span>'.$text->forums->age : ''),'
                              </div>
                              
                              <div class="flex45">';
                                    if(!empty($msg->poster->content))
                                    {
                                          echo '
                                          <span class="lgfont"',(!empty($msg->poster->group->color) ? ' style="color: '.$msg->poster->group->color.';"' : ''),'>
                                                ',$msg->poster->content,'
                                          </span>';
                                          if($msg->poster->content == 1)
                                                echo $text->label->post;
                                          else
                                                echo $text->label->posts;
                                    }
                              echo '
                              </div>
                        </div>
                        ',($msg->poster->quote ? '<div class="margin5">'.$msg->poster->quote.'</div>' : ''),'
                      
                  </div>
                  
                  <div class="flex45">
                        <div class="flex nomobile">
                              <div class="flex45"><h2 class="margin0">',$msg->poster->link,'</h2>              
                                                           

                              </div>
                             
                        </div>
                        <hr>



ThistleProse

Client

33Years Young
5 Posts

hahaha never mind. I got it. I tried editing it in Dreamweaver instead of in the file on-site and that worked better for me lol.

 

Bitch and the answer will present itself!