Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add classes to IP addresses #5890

Open
wants to merge 1 commit into
base: 5.5
Choose a base branch
from

Conversation

SoftCreatR
Copy link
Contributor

Working with IP addresses or user agents can be challenging due to the difficulty in efficiently locating them. This pull request addresses this issue by introducing specific classes to the fields where these elements appear, making them readily accessible. For instance, you can now easily manipulate or retrieve these values using JavaScript, streamlining the process and enhancing performance.

Additionally, there are scenarios, such as in the WBB/WSF (postIpAddress template), where applying this change could be beneficial or even necessary. However, for obvious reasons, those suggestions fall outside the scope of what I can propose in this context. :)

This change is relatively minor and carries no risk of causing side effects. Therefore, it should be safe to merge.

Working with IP addresses or user agents can be challenging due to the difficulty in efficiently locating them. This pull request addresses this issue by introducing specific classes to the fields where these elements appear, making them readily accessible. For instance, you can now easily manipulate or retrieve these values using JavaScript, streamlining the process and enhancing performance.

Additionally, there are scenarios, such as in the WBB/WSF (postIpAddress template), where applying this change could be beneficial or even necessary. However, for obvious reasons, those suggestions fall outside the scope of what I can propose in this context. :)
@@ -226,7 +226,7 @@
{if $user->getCurrentLocation()}<li>{@$user->getCurrentLocation()}</li>{/if}
{/if}
{if $__wcf->session->getPermission('admin.user.canViewIpAddress') && $user->registrationIpAddress}
<li>{lang}wcf.user.registrationIpAddress{/lang}: <span class="userRegistrationIpAddress">{@$user->getRegistrationIpAddress()|ipSearch}</span></li>
<li class="ipAddress">{lang}wcf.user.registrationIpAddress{/lang}: <span class="userRegistrationIpAddress">{@$user->getRegistrationIpAddress()|ipSearch}</span></li>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've overseen that there is already a span with an appropriate class. However, adding a class to the surrounding element doesn't hurt :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant