Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 1732

phpBB Custom Coding • Re: viewtopc-body.html - IF user is viewing own post

$
0
0
Hello,

By using Twig same as on POST_AUTHOR_FULL and CURRENT_USERNAME_FULL?

Code:

{% if S_REGISTERED_USER and S_DISPLAY_PM and (postrow.POST_AUTHOR_FULL is same as(CURRENT_USERNAME_FULL)) %}<dd class="profile-pm-inbox"><a href="{{ U_PRIVATEMSGS }}"><span>{{ lang('PRIVATE_MESSAGES') }}</span>{% if PRIVATE_MESSAGE_COUNT %} <strong class="badge">{{ PRIVATE_MESSAGE_COUNT }}</strong>{% endif %}</a></dd>{% elseif not S_IS_BOT and postrow.contact %}<dd class="profile-contact">{# ... #}</dd>{% endif %}
You'll then need to adjust the style using the .profile-pm-inbox:has(.badge) selector to, among other things, overwrite the overflow/hidden on dd and fine-tune the alignment and colour of the badge.
:?: :? Does it matter where the code is inserted into viewtopic_body.html? And what does the last sentence mean? If it's clear to the others reading this, can you help out with a How-to for accomplishing IF user is viewing own post?

We're very interested in making this change to our forum, but wow! It's like the whole other part of this conversation about how this topic was solved got deleted.

Statistics: Posted by SQLnovice — Tue Dec 17, 2024 4:56 pm



Viewing all articles
Browse latest Browse all 1732

Trending Articles