Page Index Toggle Pages: [1] 2 3 4 Send TopicPrint
Very Hot Topic (More than 25 Replies) Compliance Rules for Y2 mods (Read 6208 times)
Spikecity
God Member
*****
Offline


Beer anyone ?

Posts: 2630
Location: New York
Joined: Apr 16th, 2002
Gender: Male
Compliance Rules for Y2 mods
Jan 11th, 2005 at 1:05pm
Print Post  
Dear Mod Writers,

With Y2 we have entered a new generation of YaBB code, with it's own specific rules which are different from mods written for SP1.x.

Rules that define a compliant mod for Y2:

1. separate lng file (no additions allowed to any of the standard lng files)
2. new user variables are added to the <userid>.vars file using the UpdateUsers subroutine. (no new separate user files allowed)
3. new board variables are added to the .info file using the UpdateBoard subroutine. (no additional files per board/cat allowed).
4. Do no use crypt() anymore but instead use the built-in MD5 encryption.
5. do not write new user/board/cat subroutines as all of them are available in System.pl for general use of updating, adding, deleting or changing the appropriate data.

Upon loading a user all variables in .vars are available as ${$uid.$<username>}{'<variable>'} where names between <> refer to the user and the value you need.

Please make as much use of the new user/board/cat infrastructure as possible as this is what makes Y2 blazing fast.
Every new file you introduce/open/close will decrease performance dramatically.

Enjoy,

Ron
  

Nothing to add here Smiley
Back to top
 
IP Logged
 
Tea-Master
Forum Administrator
*****
Offline



Posts: 1945
Location: north germany
Joined: Oct 21st, 2001
Gender: Male
Re: Compliance Rules for Y2 mods
Reply #1 - Jan 11th, 2005 at 3:57pm
Print Post  
6. There is a special section for the settings of mod's in the admin-center which should be used. Do not add settings to other pages!
  
Back to top
WWW  
IP Logged
 
ironwing
God Member
*****
Offline


I love YaBB 1 Gold!

Posts: 2330
Location: Sonoran Desert
Joined: Nov 20th, 2001
Re: Compliance Rules for Y2 mods
Reply #2 - Jan 11th, 2005 at 7:44pm
Print Post  
Some mods can have alot of info stored about each member.  Will moving that info to the .vars files create a significant performance hit if that info has to be loaded to memory every time a user does anything as opposed to only when needed?  For example the TravelMap mod will store a hash of up to a couple hundred items for each user that chooses to create maps for themselves.  As written,  this info is stored in a separate user file and will only be read when someone views a user's map.  If that hash is written to  user.vars files instead it will be read every time the user does anything or anyother user accesses a page with info about a  user who happens to have a map.

Dan
  

Please include your forum address in all requests for assistance.  It greatly speeds things along.
Back to top
WWW  
IP Logged
 
Kong
God Member
*****
Offline


Is it just me or is my
back hairy???

Posts: 858
Joined: Aug 2nd, 2002
Gender: Male
Re: Compliance Rules for Y2 mods
Reply #3 - Jan 12th, 2005 at 9:43pm
Print Post  
I just want to clarify....

When creating a mod for YaBB2, for any settings the mod requires to be set a new secion within "Intalled Mod Settings" specifically for that mod.  Not any other place in Admin center.

Right?
  


Back to top
 
IP Logged
 
JannoL
Full Member
***
Offline


I love YaBB 1G - SP1.31!

Posts: 165
Location: Home
Joined: Jul 27th, 2002
Gender: Male
Re: Compliance Rules for Y2 mods
Reply #4 - Jan 13th, 2005 at 3:49am
Print Post  
ironwing wrote on Jan 11th, 2005 at 7:44pm:
Some mods can have alot of info stored about each member.  Will moving that info to the .vars files create a significant performance hit if that info has to be loaded to memory every time a user does anything as opposed to only when needed?  For example the TravelMap mod will store a hash of up to a couple hundred items for each user that chooses to create maps for themselves.  As written,  this info is stored in a separate user file and will only be read when someone views a user's map.  If that hash is written to  user.vars files instead it will be read every time the user does anything or anyother user accesses a page with info about a  user who happens to have a map.

Dan


Maybe that mod could be rewritten to not store that amount, i don't know how that mod is written but I think it's best to try to follow the rules and guidelines or we might end up with all kind of strange stuff, as I am learning I also have discovered a lot of "bad" coding for yabb 1 mods and also my own but I'll try to learn.
  

Code Destructionator
Back to top
WWW  
IP Logged
 
Spikecity
God Member
*****
Offline


Beer anyone ?

Posts: 2630
Location: New York
Joined: Apr 16th, 2002
Gender: Male
Re: Compliance Rules for Y2 mods
Reply #5 - Jan 13th, 2005 at 10:58am
Print Post  
ironwing wrote on Jan 11th, 2005 at 7:44pm:
Some mods can have alot of info stored about each member.  Will moving that info to the .vars files create a significant performance hit if that info has to be loaded to memory every time a user does anything as opposed to only when needed?  For example the TravelMap mod will store a hash of up to a couple hundred items for each user that chooses to create maps for themselves.  As written,  this info is stored in a separate user file and will only be read when someone views a user's map.  If that hash is written to  user.vars files instead it will be read every time the user does anything or anyother user accesses a page with info about a  user who happens to have a map.

Dan

Dan,

We have had this discussion between the devs often and it turns out that no matter what you do with a user you need to load the info anyway and loading one file up into a hash seems more effective then to load multiple files into multiple hashes.
It's the open/close actions that seem to induce the biggest load on the server.
  

Nothing to add here Smiley
Back to top
 
IP Logged
 
Spikecity
God Member
*****
Offline


Beer anyone ?

Posts: 2630
Location: New York
Joined: Apr 16th, 2002
Gender: Male
Re: Compliance Rules for Y2 mods
Reply #6 - Jan 13th, 2005 at 10:58am
Print Post  
Kong wrote on Jan 12th, 2005 at 9:43pm:
I just want to clarify....

When creating a mod for YaBB2, for any settings the mod requires to be set a new secion within "Intalled Mod Settings" specifically for that mod.  Not any other place in Admin center.

Right?


Yes Sir !
  

Nothing to add here Smiley
Back to top
 
IP Logged
 
LoonyPandora
God Member
*****
Offline


Daft Cow?

Posts: 1705
Location: London
Joined: Jun 27th, 2002
Gender: Male
Re: Compliance Rules for Y2 mods
Reply #7 - Jan 13th, 2005 at 8:46pm
Print Post  
Quote:
Yes Sir !


Not quite I'm afraid Wink - It's changed in the latest weekly build, previous to that you were correct though - there is a new header called "BoardMod Mods" - and each mod should have it's own settings section under that header. Installed mod settings no longer exists, as it could get a bit confusing, since everything that is in there is a default feature, and not an installed mod. Smiley
  

Apple Technical Support
Code
Select All
#!/usr/bin/perl --
($sig ='ddiissjjttuuffss ddaoouu ssffaee uuiijjtt
jj ssvvmmff auu qqffssmm ttmmaoohhjjoohh nnauuddiifftt')
=~y~b-v~a-z~s;
print $sig; 

Back to top
WWWICQ  
IP Logged
 
Spikecity
God Member
*****
Offline


Beer anyone ?

Posts: 2630
Location: New York
Joined: Apr 16th, 2002
Gender: Male
Re: Compliance Rules for Y2 mods
Reply #8 - Jan 14th, 2005 at 9:42am
Print Post  
LoonyPandora wrote on Jan 13th, 2005 at 8:46pm:
Not quite I'm afraid Wink - It's changed in the latest weekly build, previous to that you were correct though - there is a new header called "BoardMod Mods" - and each mod should have it's own settings section under that header. Installed mod settings no longer exists, as it could get a bit confusing, since everything that is in there is a default feature, and not an installed mod. Smiley


As you see developments are fast so I stand corrected Tongue

  

Nothing to add here Smiley
Back to top
 
IP Logged
 
LoonyPandora
God Member
*****
Offline


Daft Cow?

Posts: 1705
Location: London
Joined: Jun 27th, 2002
Gender: Male
Re: Compliance Rules for Y2 mods
Reply #9 - Jan 14th, 2005 at 10:07am
Print Post  
Quote:
As you see developments are fast so I stand corrected  Tongue


Blink and you'll miss it Wink
  

Apple Technical Support
Code
Select All
#!/usr/bin/perl --
($sig ='ddiissjjttuuffss ddaoouu ssffaee uuiijjtt
jj ssvvmmff auu qqffssmm ttmmaoohhjjoohh nnauuddiifftt')
=~y~b-v~a-z~s;
print $sig; 

Back to top
WWWICQ  
IP Logged
 
Kong
God Member
*****
Offline


Is it just me or is my
back hairy???

Posts: 858
Joined: Aug 2nd, 2002
Gender: Male
Re: Compliance Rules for Y2 mods
Reply #10 - Jan 20th, 2005 at 9:23am
Print Post  
I have some questions about when creating mods for YaBB2.

I see the BoardMod Mods section in the menu and under it is No Mods Installed which links to... AdminIndex.pl?action=none

I assume that when setting up a mod it should add it self to that menu in the same fashion... "file|Mod Name||", where file is the .pl will be the file for that mod to set it up.  It saves to a mod specific .txt file in the Variables directory.

Is there anythign else that needs to be done for that?
Do we manually remove the No Mods Installed?
  


Back to top
 
IP Logged
 
LoonyPandora
God Member
*****
Offline


Daft Cow?

Posts: 1705
Location: London
Joined: Jun 27th, 2002
Gender: Male
Re: Compliance Rules for Y2 mods
Reply #11 - Jan 20th, 2005 at 9:37am
Print Post  
The no mods installed thing will be removed/changed - it will only be shown if there are genuinely no mods installed.

Other than that, you are spot on Smiley
  

Apple Technical Support
Code
Select All
#!/usr/bin/perl --
($sig ='ddiissjjttuuffss ddaoouu ssffaee uuiijjtt
jj ssvvmmff auu qqffssmm ttmmaoohhjjoohh nnauuddiifftt')
=~y~b-v~a-z~s;
print $sig; 

Back to top
WWWICQ  
IP Logged
 
Kong
God Member
*****
Offline


Is it just me or is my
back hairy???

Posts: 858
Joined: Aug 2nd, 2002
Gender: Male
Re: Compliance Rules for Y2 mods
Reply #12 - Jan 20th, 2005 at 9:40am
Print Post  
LoonyPandora wrote on Jan 20th, 2005 at 9:37am:
The no mods installed thing will be removed/changed - it will only be shown if there are genuinely no mods installed.

Other than that, you are spot on Smiley

I figured it would be that way but just thought I would check to be sure.

IS there anything that should be added to indicate YES a mod is installed or do you expect it simply to display No Mods Installed if there are no other entries for that section?
  


Back to top
 
IP Logged
 
LoonyPandora
God Member
*****
Offline


Daft Cow?

Posts: 1705
Location: London
Joined: Jun 27th, 2002
Gender: Male
Re: Compliance Rules for Y2 mods
Reply #13 - Jan 20th, 2005 at 11:10am
Print Post  
If there are no entries for that section, it will show no mods installed. There is nothing you have to add to show that a mod is installed, other than the item in the menu itself Smiley
  

Apple Technical Support
Code
Select All
#!/usr/bin/perl --
($sig ='ddiissjjttuuffss ddaoouu ssffaee uuiijjtt
jj ssvvmmff auu qqffssmm ttmmaoohhjjoohh nnauuddiifftt')
=~y~b-v~a-z~s;
print $sig; 

Back to top
WWWICQ  
IP Logged
 
Kong
God Member
*****
Offline


Is it just me or is my
back hairy???

Posts: 858
Joined: Aug 2nd, 2002
Gender: Male
Re: Compliance Rules for Y2 mods
Reply #14 - Jan 24th, 2005 at 8:25am
Print Post  
I just thought of something.

If a mod does not require any settings to be set should the mod still add itself to that list?
And if so, how would they do it without causing an error on clicking the link?
  


Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 3 4
Send TopicPrint