ChatGPT knows about Xenforo

lucien_lies

Member
Today I was using the OpenAi tool called ChatGPT and I passed it this snippet that I am using in my forum


PHP:
<xf:if is="$user.Profile.about && $user.message_count|number > 10 && $profilePosts is not empty">
                <div class="member-about">
                    {{ bb_code($user.Profile.about, 'user:about', $user) }}
                </div>
     <xf:else />
    <div class="member-about-empty">Spanish text xd</div>
     </xf:if>

ChatGPT interpretation:

This is another conditional statement using the if tag in the XF templating language. The condition checks if the user has a value in their "about" field in their profile, if they have more than 10 messages, and if the $profilePosts variable is not empty. If all of these conditions are true, the member-about div will be displayed with the user's about field content inside, converted to BB code. If any of these conditions are false, the member-about-empty div will be displayed with the specified message.


The same with this code from my Resource:

HTML:
<xf:if is=" (({$post.User.user_group_id}==3) OR in_array(3, {$post.User.secondary_group_ids}))">admin_highlight
</xf:if>

This is a conditional statement in the XF templating language that checks whether the user belongs to a user group with an ID of 3 or if 3 is in the array of secondary group IDs for the user. If either of these conditions is true, the admin_highlight text will be displayed. It is likely that this code is used to highlight posts made by users who are members of the specified user group, such as admins or moderators.
 

lucien_lies

Member
And Keeps going:

HTML:
UPDATE xf_user AS user SET message_count =
COALESCE(
 (
        SELECT COUNT(*)
        FROM xf_post AS post
        INNER JOIN xf_thread AS thread ON thread.thread_id = post.thread_id
        INNER JOIN xf_forum AS forum ON forum.node_id = thread.node_id
        WHERE post.user_id = user.user_id AND post.message_state = 'visible'
        AND thread.discussion_state = 'visible' AND forum.count_messages = 1
        GROUP BY post.user_id
), 0 );

This is an UPDATE statement in SQL (Structured Query Language). It updates the message_count field in the xf_user table for all rows (indicated by AS user), setting the value to the number of visible posts made by each user in forums that count messages. If a user does not have any visible posts in forums that count messages, their message_count will be set to 0.
 

eva2000

Well-known member
Indeed though it's only trained on up to 2021 data.

20221211_033854.png
 

Danny88

Active member
Ohh now i understand why recently there are a lot of spam to my contact form selling AI-like software for creating contents and articles.
 

Mendalla

Well-known member
At the same time, ChatGPT errs often enough that Stackoverflow has banned answers sourced using it and Google is holding back on their similar AI out of concern it could hurt their reputation in search (or so Sundar Pichai apparently said in an all-hands). So it's good and quite convincing, but not without problems.

Ohh now i understand why recently there are a lot of spam to my contact form selling AI-like software for creating contents and articles.
Yeah, all of a sudden AI is the new cool. Again. I'm sure that this will pass once something terrible happens because of someone relying on an half-arsed answer from ChatGPT or a similar tool.
 

Wildcat Media

Well-known member
I'm thinking in the future, I should set up a forum where all the members are instances of ChatGPT. I'll let it sit for a year, then come back to see what has happened in my absence, and if any of the ChatGPT moderators have banned members, or each other. 🤣
 

nodle

Well-known member
I'm thinking in the future, I should set up a forum where all the members are instances of ChatGPT. I'll let it sit for a year, then come back to see what has happened in my absence, and if any of the ChatGPT moderators have banned members, or each other. 🤣
Or better yet, let them interact with one another and see how long until they end up arguing with each other. Turn the AI on the AI.
 
Top