Welcome, Guest. Please Login or Register.
April 30, 2025, 05:37:03 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  |  Saving Settings ? (Solved, Thx Jeff and Omar) « previous next »
Pages: [1] 2 Reply Ignore Print
Author Topic: Saving Settings ? (Solved, Thx Jeff and Omar)  (Read 768 times)
Dataforce
Full Member
***
Posts: 171


Data-Host.co.uk

Saving Settings ? (Solved, Thx Jeff and Omar)
« on: March 02, 2002, 07:27:04 PM »
Reply with quote

I know I'm ment to save settings into the MySQL table, but, i dont know how to, so I cant...

I need to make my mod actually save the changes i make into settings.php.

At the moment, it takes the number out of settings.php, displays it, I change it, and it doesn't update settings.php, can some1 plz tell me how to do it?
« Last Edit: March 05, 2002, 09:34:55 PM by Cynda » Logged
Jeff Lewis
Global Moderator
YaBB God
*****
Posts: 10149


I'm a llama!

WWW
Re:Saving Settings ?
« Reply #1 on: March 03, 2002, 05:26:50 AM »
Reply with quote

Cynda, make it save to the settings table...
Logged

Dataforce
Full Member
***
Posts: 171


Data-Host.co.uk

Re:Saving Settings ?
« Reply #2 on: March 03, 2002, 01:59:35 PM »
Reply with quote

QuoteI know I'm ment to save settings into the MySQL table, but, i dont know how to, so I cant...

I did say I dont know how to......

Also, I would need a PHP script which added it for me, so I can distribute it as a mod, some1 plz herlp me, not just tell me what to do...
Logged
Jeff Lewis
Global Moderator
YaBB God
*****
Posts: 10149


I'm a llama!

WWW
Re:Saving Settings ?
« Reply #3 on: March 03, 2002, 02:03:12 PM »
Reply with quote

Look at how we're already saving settings to the table, it's quite easy.

Also, if you release a mod that alters Settings.php we can't endorse it at all as it will change things for everyone...
Logged

Dataforce
Full Member
***
Posts: 171


Data-Host.co.uk

Re:Saving Settings ?
« Reply #4 on: March 03, 2002, 02:20:34 PM »
Reply with quote

I am a PHP/MYSQL novice!!!!!!!

I dont know a thing about making them use each other!
Plz tell me...
Logged
Dataforce
Full Member
***
Posts: 171


Data-Host.co.uk

Re:Saving Settings ?
« Reply #5 on: March 03, 2002, 08:48:45 PM »
Reply with quote

I am a novice at PHP/MYSQL as I have said many times on this forum, So telling me to put My mod settings in a mysql table, tells me nothing, If you Would plz explain how to make YaBB SE retrive and save the info, I would be very happy, and i could finally finish my mod.

Please Help.
Logged
Dataforce
Full Member
***
Posts: 171


Data-Host.co.uk

Re:Saving Settings ?
« Reply #6 on: March 04, 2002, 04:39:29 PM »
Reply with quote

Will Bump till I get an answer (I saw u online last night Jeff)

*Bump*
Logged
Jeff Lewis
Global Moderator
YaBB God
*****
Posts: 10149


I'm a llama!

WWW
Re:Saving Settings ?
« Reply #7 on: March 04, 2002, 04:45:17 PM »
Reply with quote

I'm online now too, doesn't mean I'm going to tell you how to do it :)

Look at the existing code that is there.  in ModSettings.php there are two places where we update the settings table.  One is for simple checkboxes, the other is for other methods for turning settings on and off.

I prefer you learn how it's done as opposed to being told, will make you a better coder as you will actually learn something in the process.

If you start and get a little stumped, I don't mind helping at all  ;D
Logged

Dataforce
Full Member
***
Posts: 171


Data-Host.co.uk

Re:Saving Settings ?
« Reply #8 on: March 04, 2002, 04:54:22 PM »
Reply with quote

QuoteOne is for simple checkboxes, the other is for other methods for turning settings on and off.

I dont have a checkbox, or a on off switch, I have a text box field.

Could you just give me a clue to what it is? then I will do the rest my self.
Logged
Jeff Lewis
Global Moderator
YaBB God
*****
Posts: 10149


I'm a llama!

WWW
Re:Saving Settings ?
« Reply #9 on: March 04, 2002, 05:17:40 PM »
Reply with quote

Then that is the second update...
Logged

Dataforce
Full Member
***
Posts: 171


Data-Host.co.uk

Re:Saving Settings ?
« Reply #10 on: March 04, 2002, 05:19:06 PM »
Reply with quote

* Cynda growls loudly grrrrrrrrrrrrrrrrrrrrrrrrrrrrr

* Cynda storms off to rip modsettings.php apart :)
Logged
Jeff Lewis
Global Moderator
YaBB God
*****
Posts: 10149


I'm a llama!

WWW
Re:Saving Settings ?
« Reply #11 on: March 04, 2002, 05:22:08 PM »
Reply with quote

It's very easy :)  You'll need t update the array called $textVars on or around line 366.... you should also set default values much like the other if ($HTTP_POST_VARS statements...

See?  Wasn't that easy? :)
Logged

Dataforce
Full Member
***
Posts: 171


Data-Host.co.uk

Re:Saving Settings ?
« Reply #12 on: March 04, 2002, 06:30:30 PM »
Reply with quote

Ty jeff, but I'd just figured it out, lol, Thx anyway :)
Logged
Jeff Lewis
Global Moderator
YaBB God
*****
Posts: 10149


I'm a llama!

WWW
Re:Saving Settings ?
« Reply #13 on: March 04, 2002, 07:22:23 PM »
Reply with quote

Mmm hmm...

Now see why I said it was so easy? ;)
Logged

Omar Bazavilvazo
YaBB SE Developer
YaBB God
*****
Posts: 2153


I never said I would stay to the end...

WWW
Is over??
« Reply #14 on: March 04, 2002, 09:15:59 PM »
Reply with quote

Hey!
I was enjoying the fight.
Is already over? *sigh*

Well, cool that Cynda figured out how to use setting table :)
Logged

Greetings from México!
http://omarbazavilvazo.com
Mi foro Español-Japonés
http://hablajapones.org
http://hablajapones.org/index.php/japones/tutoriales/b16.php

NO me manden IM para soporte o dudas
...Leo los foros como todos...
Pages: [1] 2 Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Saving Settings ? (Solved, Thx Jeff and Omar) « 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.029 seconds with 16 queries.