collapse

Author Topic: How to create MODS and some Links!  (Read 1016 times)

0 Members and 1 Guest are viewing this topic.

Offline SoLoGHoST

  • SMF MOD Expert!
  • Connoisseur
  • *
  • Posts: 2375
  • OS:
  • Windows Vista/Server 2008Windows Vista/Server 2008
  • Browser:
  • Firefox 3.0.14Firefox 3.0.14
    • View Profile
How to create MODS and some Links!
« on: October 30, 2009, 12:38:36 PM »
Ok, here are a few links that have come in handy for me when making mods.  These should get you started :thumbsup:
PHP Related Links
Function References
W3Schools - PHP Tutorials/References
SMF - Parham's PHP Lessons and Examples

SMF LINKs
Modification Approval Guidelines
Theme Approval Guidelines
SMF Coding Guidelines
Function Database
SMF 2.0 Database Functions
Package SDK
Adding Permissions in SMF
Code Related Guidelines
SMF Topic on SMF Coding Guidelines
Layout Related Guidelines
Mod(ification) Writing Basics

SQL Database Links
MySQL Documentation
W3Schools - SQL Reference

Ok, these are some of the links I use.  Feel free to use these as well.  Ofcourse, there are so many more that should be listed.  If I have the time, I'll try to keep updating this post with more links also.  And if you need any specific help, let me know specifically what it is and I'll try and help you.

Cheers :thumbsup:
« Last Edit: November 02, 2009, 07:11:15 PM by SoLoGHoST »

Offline Shortie

  • Administrator
  • Authority
  • *
  • Posts: 5710
  • The Ultimate Boss
  • OS:
  • Windows 7/Server 2008 R2Windows 7/Server 2008 R2
  • Browser:
  • Firefox 3.5.3Firefox 3.5.3
    • View Profile
    • Graphics Mayhem
Re: PHP and SMF Links
« Reply #1 on: October 30, 2009, 12:48:30 PM »
Hi All

I have made this a Sticky so all can add any useful information

Shortie

Thank You, "Guest" For Reading My Post.


Offline SoLoGHoST

  • SMF MOD Expert!
  • Connoisseur
  • *
  • Posts: 2375
  • OS:
  • Windows Vista/Server 2008Windows Vista/Server 2008
  • Browser:
  • Firefox 3.0.14Firefox 3.0.14
    • View Profile
Re: PHP and SMF Links
« Reply #2 on: October 30, 2009, 02:53:15 PM »
Cool, great idea Shortie.  I am currently working on a default package .zip file that will be full of comments on how to create packages to be installed for mods.

Offline live627

  • Accomplished
  • *
  • Posts: 408
  • I haz teh mouz
  • OS:
  • Windows 7/Server 2008 R2Windows 7/Server 2008 R2
  • Browser:
  • Firefox 3.5.4Firefox 3.5.4
    • View Profile
    • The CMS Loft
Re: PHP and SMF Links
« Reply #3 on: October 30, 2009, 02:56:58 PM »
That will help all aspiring mod devs! :D
Former Dream Portal Lead Developer

Offline spoogs

  • Qualified
  • *
  • Posts: 823
  • OS:
  • Windows Vista/Server 2008Windows Vista/Server 2008
  • Browser:
  • Chrome 3.0.195.27Chrome 3.0.195.27
    • View Profile
Re: PHP and SMF Links
« Reply #4 on: October 30, 2009, 03:52:29 PM »
Thanks Solo appreciate it  :thumbsup:

Offline SoLoGHoST

  • SMF MOD Expert!
  • Connoisseur
  • *
  • Posts: 2375
  • OS:
  • Windows Vista/Server 2008Windows Vista/Server 2008
  • Browser:
  • Firefox 3.0.14Firefox 3.0.14
    • View Profile
How to Create an SMF Package for MODS!
« Reply #5 on: October 30, 2009, 04:43:38 PM »
Ok, here is a file that will explain on how to package up your mods => * SMFPackage.zip.

PLEASE DO NOT ATTEMPT to INSTALL the PACKAGE, as it's not meant to be a fully functional package, and will GIVE ERRORS EVERYWHERE!  Sorry, for the CAPS, getting a little carried away here.

The files that should be of interest to you are:  package-info.xml and file.xml

These files are what you will need to use to build a package.  I have included the other DUMMY FILES, just for the sake of adding them in.  The package-info.xml file contains the following tags , , and which you will need to understand.  Open package-info.xml and review all of the comments I have made.  Same thing applies to file.xml, which should contain all of the edits that are needed to get done to existing SMF files, if your mod happens to make edits to it.  Which will always happen atleast 1 - 5 edits, even if you are creating your own PHP Source and Template files, you will, atleast need to tell SMF how and where to look for these files.  So edits to SMF files are mandatory, unless you are packaging up Smileys, and/or Avatar packs that you created.

Note:  I haven't included the database install and uninstall files with this package although they are noted within the package-info.xml file.  This is because I will cover this area at another time.  However, if you follow the link to the database functions I provided above, you should be able to figure this one out on your own.  But I will definitely cover this area in a post within this topic later on.

Note:  Once you have completed all files for a Package, (The package-info.xml, file.xml containing all of the edits that get done to SMF, and all other files you are adding), it will be ready to be zipped up and uploaded and installed via your SMF Packages Admin Area.  Also, note, while package-info.xml MUST be named this, file.xml can be named anything.  Just so long as it is defined within package-info.xml with the correct name of the file.

Cheers and create a MOD or 2 that does something very small so you get the hang of it.  Any Questions on what I've attached or anything else, please ask away and I will do my best to answer them.

EDIT:

Please note, using
Code: [Select]
within an tag, places all code that you put within the CDATA[] between the tags at the end of the file, but just before the ?> if it has a ?>.  So this will also work for CSS files without a ?>, since it looks for a ?> first, if not found, just places it at the end of the file.

So, for adding $txt[] strings to Modifications.english.php file, you should use so it will be sure to add it to the end, just before ?>.  Also, some guidelines for what to search for within SMF Files when building your file.xml edits.
PACKAGING YOUR MODS - CODING GUIDELINES:

  • Always try to search for commented strings, such as // this is an smf comment within the php files.  This is the best way to make sure your tag will add it to either before, after, and/or replace.  There are never any duplicate commented strings within the same SMF .php files.  They go to great lengths making sure each comment is unique just for mods.  And they NEVER change comments, even with updates.  They may add a few, but never ever change the comments they already had.

  • Remember if the search position="before" it will add the code in between the tags after it finds the code to search for.  and vice versa for position="after" (will add the code before).

  • Try not to search for too many empty spaces, as this could cause problems if a previous mod was installed that may have changed the amount of tabs/spaces within that particular search.  For Example: 

  • Try not to use replace all of the time.  I have seen mods that use replace in every single edit, and this is poor coding IMO, especially when they are just replacing a comment with the same comment...lol, use before or after for this instead.

  • DO NOT, UNDER ANY CIRCUMSTANCES, change SMF's default comments.  If you feel the need to comment something, add a comment for your code on either, the next line, or just above it, but NEVER change SMF's comments as this is what other mods search for when installing their code, more or less.  So this helps to make your mod, mod-friendly to other mods and reduces any errors that may occur when other mods are installed, besides yours.
* SMFPackage.zip (12.7 kB - downloaded 33 times.)
* wrongRight.png (49.88 kB, 968x342 - viewed 61 times.)
« Last Edit: October 31, 2009, 06:29:01 PM by SoLoGHoST »

Offline SoLoGHoST

  • SMF MOD Expert!
  • Connoisseur
  • *
  • Posts: 2375
  • OS:
  • Windows Vista/Server 2008Windows Vista/Server 2008
  • Browser:
  • Firefox 3.0.14Firefox 3.0.14
    • View Profile
Re: How to create MODS and some Links!
« Reply #6 on: October 31, 2009, 06:22:21 PM »
Here's another link that actually explains the file.xml file a bit more with what tags are allowed and the attributes for each tag as well as the possible values for these attributes:  Modification.xml Defined

Offline SoLoGHoST

  • SMF MOD Expert!
  • Connoisseur
  • *
  • Posts: 2375
  • OS:
  • Windows Vista/Server 2008Windows Vista/Server 2008
  • Browser:
  • Firefox 3.0.15Firefox 3.0.15
    • View Profile
Re: How to create MODS and some Links!
« Reply #7 on: November 01, 2009, 07:31:42 PM »
Here's another link that goes over many many built in functions and arrays within SMF.  This topic is specifically geared towards MOD Authors => Important Customization Information
« Last Edit: November 01, 2009, 11:03:22 PM by SoLoGHoST »

Offline Arantor

  • Apprentice
  • *
  • Posts: 11
  • OS:
  • Windows XPWindows XP
  • Browser:
  • Chrome 4.0.223.16Chrome 4.0.223.16
    • View Profile
Re: How to create MODS and some Links!
« Reply #8 on: November 08, 2009, 09:46:50 AM »
The best guide I have seen is other mods; that's how I started learning.

Offline SoLoGHoST

  • SMF MOD Expert!
  • Connoisseur
  • *
  • Posts: 2375
  • OS:
  • Windows Vista/Server 2008Windows Vista/Server 2008
  • Browser:
  • Firefox 3.0.15Firefox 3.0.15
    • View Profile
Re: How to create MODS and some Links!
« Reply #9 on: November 08, 2009, 10:45:09 AM »
Cheers Arantor, feel free to throw in anymore links, etc. that you'd like :thumbsup:

Offline Arantor

  • Apprentice
  • *
  • Posts: 11
  • OS:
  • Windows XPWindows XP
  • Browser:
  • Chrome 4.0.223.16Chrome 4.0.223.16
    • View Profile
Re: How to create MODS and some Links!
« Reply #10 on: November 08, 2009, 02:17:17 PM »
You already got most of the best links :)

Offline live627

  • Accomplished
  • *
  • Posts: 408
  • I haz teh mouz
  • OS:
  • Windows 7/Server 2008 R2Windows 7/Server 2008 R2
  • Browser:
  • Firefox 3.5.5Firefox 3.5.5
    • View Profile
    • The CMS Loft
Re: How to create MODS and some Links!
« Reply #11 on: November 08, 2009, 09:09:57 PM »
The best guide I have seen is other mods; that's how I started learning.

Same here for my SMF 1.1.5 mod that wont be distributed
Former Dream Portal Lead Developer

 


* Search



* Latest Activity.

A GM Wallpaper by NerdBoy
[Yesterday at 07:31:24 AM]


Next Topic Page 1.2 by NerdBoy
[December 15, 2010, 06:28:37 PM]


Windows 8 Wallpaper Concepts by NerdBoy
[December 14, 2010, 09:31:08 PM]


Who can make me a custom mod? by VintageJetBoats
[December 13, 2010, 10:35:47 AM]


December 2010 Uptop Logo Contest by NerdBoy
[December 12, 2010, 07:01:48 PM]


Icon request by NerdBoy
[December 10, 2010, 06:39:27 PM]


Ultimate Weather by NerdBoy
[December 10, 2010, 12:22:41 PM]


General Wallpapers by NerdBoy
[December 10, 2010, 12:17:18 PM]


Logo request by NerdBoy
[December 09, 2010, 08:26:51 AM]


Nerdboy's Birthday by NerdBoy
[December 07, 2010, 06:02:44 AM]


Happy Birthday Shortie by MJCSD
[December 05, 2010, 08:48:02 PM]