Previous Thread
Next Thread
Print Thread
Hop To
Thread OP not matching IP Address #262413 02/26/2019 1:34 PM
Joined: Mar 2015
Posts: 90
M4TT Offline OP
Journeyman
OP Offline
Journeyman
Joined: Mar 2015
Posts: 90
Hi,

Lately, I've noticed that some posters are appearing as the OP, but are from completely different IP Addresses.

I've also posted on a thread and it showed that I was the OP, but wasn't the original poster...

https://tinyurl.com/yxsln7zx

Matt


[Linked Image from imagizer.imageshack.com]
[Linked Image from aliendisc.net]
[Linked Image from aliendisc.net]
Re: Thread OP not matching IP Address [Re: M4TT] #262414 02/26/2019 2:05 PM
Joined: Mar 2015
Posts: 90
M4TT Offline OP
Journeyman
OP Offline
Journeyman
Joined: Mar 2015
Posts: 90
I logged out and it makes me appear as the OP. Could it have something to do with an unregistered post?


[Linked Image from imagizer.imageshack.com]
[Linked Image from aliendisc.net]
[Linked Image from aliendisc.net]
Re: Thread OP not matching IP Address [Re: M4TT] #262415 02/26/2019 3:17 PM
Joined: Dec 2003
Posts: 5,994
Ruben Offline
Offline
Joined: Dec 2003
Posts: 5,994
Looks like you may have found a bug.
I just tried reply to last post and reply to topic as a guest.
They both show as op.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Thread OP not matching IP Address [Re: M4TT] #262416 02/26/2019 4:39 PM
Joined: Apr 2004
Posts: 1,539
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,539
OP generation is not based upon IP addresses. It is based upon the topic creator of the current thread. If you've merged threads together from multiple accounts, then there will be multiple OPs, as those accounts had each been the OP of their own thread before you merged them together.


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: Thread OP not matching IP Address [Re: isaac] #262417 02/26/2019 4:58 PM
Joined: Mar 2015
Posts: 90
M4TT Offline OP
Journeyman
OP Offline
Journeyman
Joined: Mar 2015
Posts: 90
Originally Posted by isaac
[...]If you've merged threads together from multiple accounts, then there will be multiple OPs, as those accounts had each been the OP of their own thread before you merged them together.


Hmm, hadn't merged any threads... Could this be because I installed a testing Ubb.threads forum using the same database under a different prefix?


[Linked Image from imagizer.imageshack.com]
[Linked Image from aliendisc.net]
[Linked Image from aliendisc.net]
Re: Thread OP not matching IP Address [Re: M4TT] #262418 02/26/2019 5:26 PM
Joined: Apr 2004
Posts: 1,539
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,539
Each new topic gets a single line within the ubbt_TOPICS table.

FROM THE SCRIPT:
$opid = $topic_info['USER_ID'];

$topic_info['USER_ID'] is the USER_ID stored in the ubbt_TOPICS table for that TOPIC.

FROM THE TEMPLATE:
{if $postrow[post].userid eq $opid}OP{/if}
$postrow[post].userid is the USER_ID of that single post from the ubbt_POSTS table.


Conclusion, if the USER_ID of that single post matches the USER_ID of the TOPIC, then "OP" is displayed.

Feel free to open up both the script (scripts/showflat.inc.php @ ~ line 205) and the template (templates/default/post_side.tpl @ ~ line 101, and ~ line 127) and read it yourself.


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: Thread OP not matching IP Address [Re: M4TT] #262419 02/26/2019 5:45 PM
Joined: Jun 2006
Posts: 15,848
Gizmo Online Tapedshut
UBB.threads Developer
Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 15,848
Anon users shouldn't have OP indicators, as every uid of a guest user would be uid #1.

You can edit the code from:
Code
{if $postrow[post].userid eq $opid}OP{/if}


To:
Code
{if $postrow[post].userid eq $opid && $postrow[post].userid neq '1'}OP{/if}


In:
Code
[gremelin@vnc ~]# grep -r "opid" /home/public_html/forum/
/home/public_html/forum/templates/default/post_gallery.tpl:{if $postrow[post].userid eq $opid}<span class="lmar post-op">OP</span>{/if}
/home/public_html/forum/templates/default/post_top.tpl:{if $postrow[post].userid eq $opid}<span class="post-op">OP</span>{/if}
/home/public_html/forum/templates/default/post_side.tpl:{if $postrow[post].userid eq $opid}<span class="post-op">OP</span>{/if}
/home/public_html/forum/templates/default/post_side.tpl:{if $postrow[post].userid eq $opid}<span class="post-op fr">OP</span>{/if}]


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Need to Upgrade?
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: Thread OP not matching IP Address [Re: M4TT] #262420 02/26/2019 5:45 PM
Joined: Apr 2004
Posts: 1,539
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,539
Gizmo pointed out in IM, that all of your commenters are from users of the Anonymous account.

Within UBB.threads, Anonymous USER ID is always user 1 within the database.

Maybe the code should be updated to include, {if $postrow[post].userid ne '1'}OP{/if}


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: Thread OP not matching IP Address [Re: M4TT] #262421 02/26/2019 6:00 PM
Joined: Apr 2004
Posts: 1,539
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,539
Thanks Giz for the pointer. And thanks M4TT for drawing attention to this.

The OP logic has been updated to prevent posts from anonymous users from being tagged with OP indicators.


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: Thread OP not matching IP Address [Re: M4TT] #262422 02/26/2019 6:20 PM
Joined: Mar 2015
Posts: 90
M4TT Offline OP
Journeyman
OP Offline
Journeyman
Joined: Mar 2015
Posts: 90
Excellent, thanks everyone! By change future unregistered/anonymous posts can utilize the OP feature via IP address?


[Linked Image from imagizer.imageshack.com]
[Linked Image from aliendisc.net]
[Linked Image from aliendisc.net]
Re: Thread OP not matching IP Address [Re: M4TT] #262423 02/26/2019 6:22 PM
Joined: Jun 2006
Posts: 15,848
Gizmo Online Tapedshut
UBB.threads Developer
Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 15,848
No, the feature is unavailable to anonymous users as it utilizes the UserID vs IP Address (as IP addresses are generally non-static).


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Need to Upgrade?
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: Thread OP not matching IP Address [Re: M4TT] #262424 02/26/2019 9:18 PM
Joined: Mar 2015
Posts: 90
M4TT Offline OP
Journeyman
OP Offline
Journeyman
Joined: Mar 2015
Posts: 90
Hey Gizmo,

I replaced the code in each file, it worked! However, the style for OP is missing.


[Linked Image from imagizer.imageshack.com]
[Linked Image from aliendisc.net]
[Linked Image from aliendisc.net]
Re: Thread OP not matching IP Address [Re: M4TT] #262425 02/26/2019 10:58 PM
Joined: Apr 2004
Posts: 1,539
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,539
Originally Posted by M4TT
Hey Gizmo,

I replaced the code in each file, it worked! However, the style for OP is missing.

Not Gizmo, but I'm here now, and can reply for him smile

In the first section of his post, he gave examples of what Smarty code needs to be changed. Not direct replacements for stock code. He was using my simple examples as the base of his demonstration, rather than using actual stock code. This was intentional, as to demonstrate and focus on the root cause of the issue.


Modify the Smarty clauses, and keep the spans within the list as shown in the grep code window Gizmo posted.

IN THESE THREE STOCK TEMPLATE FILES -
templates/default/post_gallery.tpl (1x)
templates/default/post_top.tpl (1x)
templates/default/post_side.tpl (2x)

FIND -
{if $postrow[post].userid eq $opid}

REPLACE WITH -
{if $postrow[post].userid eq $opid && $postrow[post].userid neq '1'}


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com

Forum Search
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Search feature encountering an Error message
by jorb - 11/20/2019 12:06 AM
Followed List v7.7.2 Question
by Ruben - 11/12/2019 12:22 PM
UBB Dev
by JAISP - 11/03/2019 11:01 AM
Exceeded Number of attachments
by rbrtgrmn - 11/02/2019 9:57 PM
Forum New User Registration
by kf6zpl - 10/25/2019 10:45 AM
Who's Online Now
3 registered members (isaac, jorb, Gizmo), 43 guests, and 290 spiders.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20191023)