AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Closed] Add a tracking code to the "Add topic" button

6 Posts
2 Users
0 Reactions
5,004 Views
Posts: 8
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@lesly)
Active Member
Joined: 8 years ago
[#6977]

Hey guys, so I try to add a tracking code into the post topic button to know when a user actually post something trough Active Campaign. Into wpforo/wpf-themes/classic/index.php I found the add topic button that is at the top right of the forums pages, but I'm looking for the one that is at the very end of the topic box editor that open when you click it. Cannot find it.


5 Replies
Posts: 8
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@lesly)
Active Member
Joined: 8 years ago

So I look into all the .php in the /classic/ and cannot find where is the "add topic" button so I can add my tracking code on it ><.

Is it any way that can be achieved?

Screen Shot

Sofy
Posts: 5777
 Sofy
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sofy)
Support Team
Joined: 8 years ago

Hi @lesly,

You need to use the function topic_form($forumid) function in wp-content/plugins/wpforo/wpf-includes/class-template.php  file.  

However, we don't recommend to change the function, all changes will be lost during the upgrade process.

You can use the hooks for this purpose: 

e.g.

add_action('wpforo_editor_topic_submit_after', 'YOUR_CUSTOM_FUNCTION_NAME');

Posts: 8
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@lesly)
Active Member
Joined: 8 years ago

Hey Sofy, sweet, thanks for the answer. I guess I cannot just put /wpf-includes/class-template.php in my child theme and make the change directly in the code without using the hook?


Sofy
Posts: 5777
 Sofy
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sofy)
Support Team
Joined: 8 years ago

Hi @lesly,

Yes, you're right, you cannot put the /wpf-includes/class-template.php file in your child theme. You need to use hooks for this purpose. 


Page 1 / 2
Share: