Previous Thread
Next Thread
Print Thread
Hop To
Joined: Mar 2015
Posts: 96
Likes: 1
Journeyman
Journeyman
Joined: Mar 2015
Posts: 96
Likes: 1
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]
Joined: Mar 2015
Posts: 96
Likes: 1
Journeyman
Journeyman
Joined: Mar 2015
Posts: 96
Likes: 1
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]
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Mar 2015
Posts: 96
Likes: 1
Journeyman
Journeyman
Joined: Mar 2015
Posts: 96
Likes: 1
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]
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
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.
Do you need Forum Install or Upgrade Services?
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!
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Mar 2015
Posts: 96
Likes: 1
Journeyman
Journeyman
Joined: Mar 2015
Posts: 96
Likes: 1
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]
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
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.
Do you need Forum Install or Upgrade Services?
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!
Joined: Mar 2015
Posts: 96
Likes: 1
Journeyman
Journeyman
Joined: Mar 2015
Posts: 96
Likes: 1
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]
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
1 members (Havenofsobriety), 522 guests, and 99 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)