Welcome, Guest. Please Login or Register.
June 16, 2024, 04:50:28 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  RPG Mod vs. Updates « previous next »
Pages: [1] Reply Ignore Print
Author Topic: RPG Mod vs. Updates  (Read 1460 times)
irbrian
Sr. Member
****
Posts: 489


I create. Therefore I am.

brian@inverse-reality.com WWW
RPG Mod vs. Updates
« on: January 03, 2002, 10:24:03 PM »
Reply with quote

(Check out http://www.yabb.info/community/index.php?board=141;action=display;threadid=2648;start=30 for more info about the RPG Mod.)

I have been unclear on how to incorporate mod settings controls into the Admin Panel. With the changes and updates and so forth being made to YaBB SE, I am not even positive it can or should be done at this point... but can I get some suggestions on a) how to do this in the first place and b) how I can get started on this while avoiding potential conflicts?
Logged

Imparting great wisdom daily to those who will mistake my words as such.
irbrian
Sr. Member
****
Posts: 489


I create. Therefore I am.

brian@inverse-reality.com WWW
Re:RPG Mod vs. Updates
« Reply #1 on: January 03, 2002, 10:25:55 PM »
Reply with quote

Oh, and I'd really appreciate suggestions for developing the Mod effeciently. :)

Suggestions for *features* for the mod should be posted in the thread under Mod Ideas... thanks everyone.
Logged

Imparting great wisdom daily to those who will mistake my words as such.
Godai
Mod God :P
Sr. Member
****
Posts: 473


YaBB SE!!!!

ICQ - 70621553godai78@hotmail.com WWW
Re:RPG Mod vs. Updates
« Reply #2 on: January 03, 2002, 10:46:00 PM »
Reply with quote

adding features setting in modsettings.php file is not a problem i think :)
Logged

Emanuele 'Godai' Sparvoli
YaBB Italian Team
100% YaBB Lover
Joseph Fung
Global Moderator
YaBB God
*****
Posts: 4512


Keep smiling: it makes others nervous.

WWW
Re:RPG Mod vs. Updates
« Reply #3 on: January 04, 2002, 01:35:11 PM »
Reply with quote

It's fairly easy to do.


Scenario 1: Adding a field controlled by a text box
let's say you added a field called enableMyFeature to the settings table

1) in the ModSettings function create a variable like $enableMyFeatureChecked which is '' when enableMyFeature == 0 and is ' checked' when enableMyFeature == 1;
2) name the field enableMyFeatureChecked
3) add it to the output (so the input field would look like <input name='enableMyFeatureChecked' type=checkbox$enableMyFeatureChecked> - the $enableMyFeatureChecked will set the box to checked or not checked depending on the value of enableMyFeature)
4) in ModSettings2 function, ad an index to the $onoffArray in the format 'enableMyFeatureChecked' => 'enableMyFeature' which means the incoming variable called enableMyFeatureChecked will control the entry enableMyFeature in the settings table.

The function will take care of setting the variable to 1 or 0 in the table.

Scenario 2 - a customizable value.
Let's say you created field called numberOfRealms in the settings table
1) In the ModSettings function create a field - and name it the same thing i.e. <input name='numberOfRealms' type=text value='$modSettings[numberOfRealms]'>
3) add the name of the field/variable to the $textVars array.  The function will take care of the rest.
Logged

Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  RPG Mod vs. Updates « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.014 seconds with 20 queries.