• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Answered Thread Create Phrase {title} - Change the Trigger for Auto Creating Associated Discussion Thread

Status
Not open for further replies.

Mouth

Member
CAS Premium
EMS Early Adopter
RMS Premium
SC Premium
UBS Premium
Sportsbook
Ref: Implemented - Change the Trigger for Auto Creating Associated Discussion Thread when Saving as Draft or Scheduled

Note: This is a change that I am making in ALL of my addons that have Save as Draft and Scheduled Publishing.

I don't see a CAS release thread for this, so wonder if it has made it to current 2.2.35 CAS release?

I ask because today I had a CAS Ad go into the Approval Queue, and it's auto discussion thread is in a [deleted] state until the Ad is approved from the Approval Queue. All good to this point.

Before approving the Ad from within the Approval Queue, I edited it first to change it's title (from "For Sale Bargain[...]" to "Kawasaki Z900R"). Then came back to the Approval Queue and approved it. The Ad and it's Auto Discussion thread title were automatically changed/updated prior to publishing/approving from the Approval Queue. Still all good to this point.

When the auto discussion thread was created, it's first post content via the xa_cas_ad_thread_create phrase - specifically it's use of the {title} placeholder, still used the original title and not the edited/current title when it was approved/published from the Approval Queue.

Screenshot 2024-03-12 at 20.00.39.png
... Ad title, after edit when within the Approval Queue and approval/published from the Approval Queue


Screenshot 2024-03-12 at 20.00.58.png
... Auto Discussion Thread 1st Post with the hyperlinked {title} from the Phrase having used the original/pre-edited title when still in the Approval Queue.


xa_cas_ad_thread_create phrase text ...
Code:
What do you think of [url={ad_link}][plain]{title}[/plain][/url]? Please discuss below.
[...]


If the related/source code change for the triggering of the auto discussion thread hasn't yet made it into CAS, then likely that's all thats needed to correct the phrase's title usage? Or perhaps this should be a bug thread because the phrase's {title} usage is still an issue even after the related/source code change?

Edit/Added: {ad_link} in the phrase is also impacted, using the pre-edited title for the URL generation in the post content. URL still works because of XF core functionality of using/redirecting to the item ID instead of the full URL. But, {ad_link} within the phrase should probably also use the title when published.
 
Last edited:
I don't see a CAS release thread for this, so wonder if it has made it to current 2.2.35 CAS release?
If I haven't posted an implemented thread, its a 99.9% chance that I'd not had time to implement it yet (or I might have implemented it in CAS 2.3).

I'll check this weekend :)
 
When the auto discussion thread was created, it's first post content via the xa_cas_ad_thread_create phrase - specifically it's use of the {title} placeholder, still used the original title and not the edited/current title when it was approved/published from the Approval Queue.
When an associated Thread is created, Post #1 is also created and the Message (which is raw text) is generated by compiling a phrase in PHP to generate raw text and then adding that raw text to the message field of Post #1.

Once Post #1 is created, the only way to change it would be to EDIT the post and change the text via the Rich Text Editor.

Post #1 is NOT a Phrase, so editing the ad title is NOT going to change RAW TEXT in the message field of Post #1 of the associated thread.

I think you might be thinking that Post #1 IS a Phrase and not a real post, but that is not the case. Post #1 is a real post and the text that is added during the create process is Generated by a Phrase, rendered in PHP and converted to Raw Text, which is added to the message field (which stores the raw text ).
 
I think you might be thinking that Post #1 IS a Phrase and not a real post, but that is not the case. Post #1 is a real post and the text that is added during the create process is Generated by a Phrase, rendered in PHP and converted to Raw Text, which is added to the message field (which stores the raw text ).
Thanks, no I understand the difference between the phrase and post, and the phrases process in creating the post.

With the change in trigger code that was implemented in SC, I assume that does not address and resolve the process steps example that that I gave in my #1 post? That is, that the auto created associated discussion thread is still created prior to an item going to the XF approval queue and thus any editing of the item whilst it is in the approval queue and prior to it being approved/published will not be reflected in the associated discussion thread content?

If my assumption is correct, I can add a suggestion topic for the associated discussion thread being created only after the item has been approved/published from the approval queue, similarly to the thread only being created after the item has been published when previously in Draft or Scheduled.
 
With the change in trigger code that was implemented in SC
CAS does not have "Save as Draft" and "Scheduled Publishing" (nor does Link Directory nor Sportsbook). Only AMS, UBS, Showcase, RMS and IMS have multiple save types (Publish now, Save as Draft and Scheduled Publishing) and the new trigger code only applies when choosing Save as Draft or Scheduled Publishing, which comes into play when the Publisher Service is called.

Even with AMS, UBS, Showcase, RMS and IMS, if the content owner is in a user group the new content is sent to the approval queue, that is a POST CREATE process, so both the Content and its Associated Thread would be sent to the approval queue (since the content is in moderated state, so is any content associated with it).

Anyway... what you want is NOT possible (creating a piece of content when approving a piece of content in the XF Approval Queue).
 
Status
Not open for further replies.
Back
Top