Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Karmasterrr on May 31, 2022, 11:50:43 AM

Title: How to change javascript file with mod ?
Post by: Karmasterrr on May 31, 2022, 11:50:43 AM
Can you guys explain what is the best method to modify javascript file inside Themes directory with mod ?

PS: I want to write mod for this: https://www.simplemachines.org/community/index.php?topic=582391.msg4126225#msg4126225
Title: Re: How to change javascript file with mod ?
Post by: Kindred on May 31, 2022, 12:59:58 PM
you would change the js file(s) in the same way that you change php files in the package manager.
Title: Re: How to change javascript file with mod ?
Post by: Antechinus on May 31, 2022, 04:37:02 PM
Quote from: Karmaster on May 31, 2022, 11:50:43 AMCan you guys explain what is the best method to modify javascript file inside Themes directory with mod ?

PS: I want to write mod for this: https://www.simplemachines.org/community/index.php?topic=582391.msg4126225#msg4126225
As Kindred says, it is the same as modifying any other file (PHP, CSS, etc).

But, that code of yours is buggy, and throws masses of errors if there are existing attachments and someone goes to edit the post. It needs to be fixed before it is ready for a mod. :)
Title: Re: How to change javascript file with mod ?
Post by: Doug Heffernan on May 31, 2022, 05:12:47 PM
Quote from: Karmaster on May 31, 2022, 11:50:43 AMCan you guys explain what is the best method to modify javascript file inside Themes directory with mod ?

PS: I want to write mod for this: https://www.simplemachines.org/community/index.php?topic=582391.msg4126225#msg4126225

Have a look at these links. They contain very useful info. Hope it helps.

https://wiki.simplemachines.org/smf/Coding_Guidelines

https://wiki.simplemachines.org/smf/Category:Package_SDK