Jump to content

Mini Profile


Tyrone
 Share

Recommended Posts

Hi everyone,

 

I am a bit of a coding noob and therefore have a stupid question... How would I go about creating a mini profile similar to the ones commonly found on Jcink websites? 

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

This depends mostly on what exactly you want to do with it in terms of layout, as to what exactly to do and how difficult it will be to do it, but you would need to edit forum.template.php in the template_topic() function. The post starts at foreach($page->messages as $msg), but this part here:

                  <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->group->icon ? '<div>'.$msg->poster->group->icon.'</div>' : ''),'
                        <div class="flex flexwrap" style="display: none">
                              <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>

is the poster info. If you don't actually know what you're doing, expect to break your site a good number of times before you get the result you want. Remember not to change too many things at once so if it does break you know how to unbreak it.

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

Thanks for the advice 🙂 

 

I am mostly thinking I’d like to set it so Played by (OOC) Account appears beneath their avatar and ideally, but most likely out of my range, a hover effect of other details such as age, post count, member group appears when you hover over their avatar. 

Link to comment
Share on other sites

Unfortunately, Vesta does not automatically load player information into the array on posts. It should in Salerno. (Mostly, I forgot.)

You can make it do it in Athens but it'll require some back-end modifications.

 

Hover effects are definitely possible, it's mostly HTML and CSS.

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

Thanks for the clarification. 

 

Quick follow up question is there a setting to use a placeholder image as a default for anyone without a chosen avatar? Or would doing that require alterations to the php files as well? 

Link to comment
Share on other sites

It should be doing this by default in most places. You can do it in the templates in places where it doesn't.

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.