Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Converting Old Mods To Work With 1.3.x (Read 7240 times)
Curtiss Grymala
God Member
*****
Offline


YaBB?... Y Not?

Posts: 1314
Joined: Apr 12th, 2004
Gender: Male
Converting Old Mods To Work With 1.3.x
Nov 20th, 2004 at 1:11am
Print Post  
I just thought I would post this little bit of advice, as so many people seem to have trouble getting old 1.1 mods to work with their 1.3 boards.  Here is an extremely quick and dirty tutorial explaining how to get around the most common issue when trying to use SP1.1 mods on SP1.3.x boards:

If you open up the 1.1 mod in YAME (Yet Another Mod Editor), you want to find the steps inclduded in the "Edit File" section for YaBB.pl.  It will look like the image attached to the bottom of the post.

You will then most likely see a "Search For" field that looks something like this:
Code
Select All
	elsif ($action eq 'myaction') { require "$sourcedir/MyFile.pl"; &MyAction; } 



Then, below that, there will be either a "Replace By", "Add Before" or "Add After" field that will include additional information that looks very similar.  One example from the AddSmilies mod is this "Add After":
Code
Select All
	elsif ($action eq 'smilies') { require "$sourcedir/Smilies.pl"; &SmiliePanel; }
	elsif ($action eq 'smilies2') { require "$sourcedir/Smilies.pl"; &AddSmilies; }
	elsif ($action eq 'smilieindex') { require "$sourcedir/Smilies.pl"; &SmilieIndex; } 



You will eventually want to delete this step altogether, but leave it the way it is for now.

Now, you want to add a new "Edit File" step.  Click on Add Action -> Edit File.  Then, type "Sources/SubList.pl" in the "File To Edit" textbox.
Next, you will need to add an action identical to the one from YaBB.pl.  If the original step referenced in this tutorial is a "Search and Replace", then you will need to add a "Search and Replace" step to the SubList.pl action.  If it was "Search and Add Before", then you select that, etc.

Now, you will want to change the "Search For" field from your YaBB.pl step to match the new format used in YaBB 1.3.x.  If you were to take our original example:
Code
Select All
	elsif ($action eq 'myaction') { require "$sourcedir/MyFile.pl"; &MyAction; } 


You would change it to look like:
Code
Select All
'myaction',"MyFile.pl&MyAction", 



Notice that I got rid of the "elsif ($action eq" and started the line off with the name of my action, with a comma after it.  Then, I got rid of the "') { require "$sourcedir/" and went straight to the name of the file that contains my action (which will actually be the file that contains the sub-routine your action refers to).  Then, instead of having a double-quote, followed by a semi-colon and a space, we simply add the ampersand directly after the name of my file, and then the name of my sub-routine.  Then, end it with another double-quote and a comma.

You will then want to edit the "Add Before", "Add After" or "Replace by" field to fit in the same format.

Finally, after you have your new action set up for editing your SubList.pl file, you want to delete the step that edited your YaBB.pl file.

This will solve probably at least 75% of the issues that people have when trying to convert old SP1.1 mods to work with SP1.3.
  

EditYabb1.jpg ( 8 KB | Downloads )
EditYabb1.jpg

Currently using Y2.3 With no mods (though that will hopefully change, soon).

Click Here To See A List Of All The Mods I've Written
Back to top
WWW  
IP Logged
 
oldgoat
Full Member
***
Offline


!

Posts: 102
Location: York
Joined: Aug 3rd, 2004
Gender: Male
Re: Converting Old Mods To Work With 1.3.x
Reply #1 - Nov 20th, 2004 at 3:50pm
Print Post  
The only bit I'm curious about is the work involved in creating a new action in YAME to correct a 'search for' error.

The way I've always done this is to search in my master copy of the appropriate source file for the script., copy that back into the mod file and save the mod, which then works.
Just saves having to built a new action.
  

formerly known as s_m_b
Back to top
 
IP Logged
 
Curtiss Grymala
God Member
*****
Offline


YaBB?... Y Not?

Posts: 1314
Joined: Apr 12th, 2004
Gender: Male
Re: Converting Old Mods To Work With 1.3.x
Reply #2 - Nov 21st, 2004 at 1:55am
Print Post  
Yes, that works when you have that type of install error, but since SP1.1 and SP1.3 stored their sub-routine lists in different files, you have to create a new action to edit SubList.pl instead of simply modifying the action that edited YaBB.pl.  Especially if there are other steps in the mod that modify YaBB.pl for some reason.

Actually - your method is the method that I use when I run into small snags, etc from mod conflicts.
  

Currently using Y2.3 With no mods (though that will hopefully change, soon).

Click Here To See A List Of All The Mods I've Written
Back to top
WWW  
IP Logged
 
oldgoat
Full Member
***
Offline


!

Posts: 102
Location: York
Joined: Aug 3rd, 2004
Gender: Male
Re: Converting Old Mods To Work With 1.3.x
Reply #3 - Nov 21st, 2004 at 12:37pm
Print Post  
sorry - hadn't noticed that bit about the older versions of yabb - I've only dealt with 1.3 and upwards, so have yet to find a mod from an earlier version that either is of any beneft, or is and hasn't been updated.
  

formerly known as s_m_b
Back to top
 
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Converting Old Mods To Work With 1.3.x
Reply #4 - Nov 23rd, 2004 at 3:40pm
Print Post  
Just moving this useful advise to the tutorials board Wink
  

The Administrator.
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint