Author Topic: Large Texts -> extended settings  (Read 6412 times)

Nightborn

  • Administrator
  • Sr. Member
  • *****
  • Posts: 320
  • Karma: +20/-0
    • View Profile
    • Shinobilegends
Large Texts -> extended settings
« on: September 24, 2008, 03:17:43 pm »
In the current snapshot a new table has been introduced : settings_extended

There are two significant differences to the old settings:
-> setting is now varchar(50)
-> value is now not a varchar(255) but a TEXT value


This is considerable as I can now store system-wide texts for i.e. the verification email (!) so you can customize it not via the translator alone but via setting.

However - a normal setting would be a waste, because it gets loaded EACH PAGE HIT ... and this is not really sensible.

I cannot merge them easily into the normal settings array - and I will move such stuff like the Imprint and related things you do not really need often (and access via the former $settings array).

Note: if you EVER screwed around with the global $settings array ... this is now an object - ;) I made a lib/settings.class.php which is inherited to the used settings AND extended settings... I don't like redundancy.

Currently only the forgottenpasswordmail and the verification mail are included, I'll put the rest in as I come along.

If you have larger text parts that are required not that often and/or in very speciific places and are not really text that gets output()ed... tell me.

I will go for the systemmail() email-me-when-I-have-mail stuff too, and the admin-gets-petitions-by-email.

If I forgot something, tell me.
It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro

Alchemion

  • Guest
Re: Large Texts -> extended settings
« Reply #1 on: November 06, 2008, 09:15:48 am »
When trying to access it from the Game settings, I got this error :

Quote
Fatal error: Call to a member function getSetting() on a non-object in /mounted-storage/home70c/sub007/sc41001-XJFO/nb-core.net/lib/settings.php on line 36

Version installed: 1.2.1

Look forward to test these new extended settings...

Thank you.


Nightborn

  • Administrator
  • Sr. Member
  • *****
  • Posts: 320
  • Karma: +20/-0
    • View Profile
    • Shinobilegends
Re: Large Texts -> extended settings
« Reply #2 on: November 06, 2008, 12:51:26 pm »
Any more information?

I uploaded the latest snapshot, try this one.
It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro

Alchemion

  • Guest
Re: Large Texts -> extended settings
« Reply #3 on: November 06, 2008, 04:22:05 pm »
I have installed the latest version... at least the one on the server at this very moment...

Same fatal error...

What else should i say ?... this just pops up when i click on "Extended Settings"...

It may have to do something with the settings lib file, on line 36... :D

Thanks.

Nightborn

  • Administrator
  • Sr. Member
  • *****
  • Posts: 320
  • Karma: +20/-0
    • View Profile
    • Shinobilegends
Re: Large Texts -> extended settings
« Reply #4 on: November 06, 2008, 05:48:20 pm »
razorsharp analysis, Dr.  Watson  :-X

Well, the only question is: why.

do you have a table "settings_extended" in your database?
if not, then create it...

you have not run the installer, did you? =)

you need to create it manually then.... what comes in there, use lib/all_tables.php
It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro

Alchemion

  • Guest
Re: Large Texts -> extended settings
« Reply #5 on: December 09, 2008, 07:27:09 am »
Hello, NB !

Got some more spare hobby time now...

After the last "extended settings" thing that didn't work out anyway with the last 1.2.1 version and screwed my worked settings and installed modules I gave up for a while...

One bad news: my hoster changed the root server... I have to rename quite some code in the game to work again...

The good news: I may don't have to do handwork, as you released a new 1.2.1 final and a new 1.2.2 beta versions...

I'll do some uploading tonight... and maybe some testing...

Questions:
1. is it ok if I go straight for the 1.2.2 and test it together ?...
2. the captcha is the only difference from the 1.2.1 ?

THANK YOU FOR YOR NEW RELEASES. I HOPE THESE ARE CLEAN AND MAY HELP ME CONTRIBUTE TO A GOOD COMMUNITY GAME...

p.s. for more PM and insights, I remind you my YMsg ID: spiritofword ( just in case, what's yours ?  ::) )
« Last Edit: December 09, 2008, 07:28:56 am by Alchemion »

Nightborn

  • Administrator
  • Sr. Member
  • *****
  • Posts: 320
  • Karma: +20/-0
    • View Profile
    • Shinobilegends
Re: Large Texts -> extended settings
« Reply #6 on: December 09, 2008, 08:29:58 am »
Hello, NB !

Got some more spare hobby time now...

After the last "extended settings" thing that didn't work out anyway with the last 1.2.1 version and screwed my worked settings and installed modules I gave up for a while...
To be blunt: "Huh?"
If something did not work, ok, tell me and I see if there is a bug.
I do not know, however, how that may "screw" your "worked settings" and the "installed modules" ...
You know that a decent admin always makes backups if he tests something on a larger scale than a simple module he knows. So you could have rolled back.
I doubt the core version screwed without help - I installed and updated servers recently, including a large German one, and it worked without a flaw.
So if there IS an issue, I need details.

One bad news: my hoster changed the root server... I have to rename quite some code in the game to work again...
Erm? Did he delete your files?



The good news: I may don't have to do handwork, as you released a new 1.2.1 final and a new 1.2.2 beta versions...

I'll do some uploading tonight... and maybe some testing...

Questions:
1. is it ok if I go straight for the 1.2.2 and test it together ?...
2. the captcha is the only difference from the 1.2.1 ?
1. Stick to 1.2.1 for now, 1.2.2 has currently only a new admin privilege called "banmaster", a guy who can ban. Also the banning has been switched to a new file and is not in the user editor directly anymore
(except for links to it)

I put a blunt warning on 1.2.2 =) it is beta, which means DAILY modifications. And that can mean you get a version that does not work if there is something I work on and am still bugfixing.

2. the captcha is NOT in there currently - I had my hands full with other things, like the ban thingy as on my server I need people who can do longer bans / lift bans and NOT have the full user editor at their hands (privilege hierarchy). A ban can be undone. Deleted/modified user can not so easily.


THANK YOU FOR YOR NEW RELEASES. I HOPE THESE ARE CLEAN AND MAY HELP ME CONTRIBUTE TO A GOOD COMMUNITY GAME...

p.s. for more PM and insights, I remind you my YMsg ID: spiritofword ( just in case, what's yours ?  ::) )

No big deal. They are as clean as I can make them, however beta is beta. "Things may get broke".

Sorry, I don't really use instant messengers anymore.
It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro

Alchemion

  • Guest
Re: Large Texts -> extended settings
« Reply #7 on: December 10, 2008, 08:36:23 am »
Quote
You know that a decent admin always makes backups if he tests something on a larger scale than a simple module he knows. So you could have rolled back.

I remember I have mentioned inhere or in some context that I "did" have a server running... the new actual server is only in testing phase and, yes, I was neglectful enogh to not make back-ups, even for test servers... entirely my mistake... it proves I am not prepared to be a decent admin... I may have to reconsider my priorities if I intend to have a game online and kicking...

:|

Yesterday I got home by 22.pm... woke up today by 6 a.m. to prepare for school... time is an issue for all people... spent my hole yesterday in front of the computer, today the same... I am not really in the mood of sleeping onto the keyboard...

Nightborn

  • Administrator
  • Sr. Member
  • *****
  • Posts: 320
  • Karma: +20/-0
    • View Profile
    • Shinobilegends
Re: Large Texts -> extended settings
« Reply #8 on: December 10, 2008, 11:00:50 am »
Quote
I remember I have mentioned inhere or in some context that I "did" have a server running... the new actual server is only in testing phase and, yes, I was neglectful enogh to not make back-ups, even for test servers... entirely my mistake... it proves I am not prepared to be a decent admin... I may have to reconsider my priorities if I intend to have a game online and kicking...

I did have no backups (except snapshots downloaded to my PC) from the start neither.
Once I had a VPS, I bought a "rollback" function for the last 10 days.
Only a year ago I programmed a backup script that would do the job automatically via FTP.
This year I upgraded (and offered here) the same script.

Backupping your stuff automatically is vital, though after this it is not that hard to run a server.

Quote
Yesterday I got home by 22.pm... woke up today by 6 a.m. to prepare for school... time is an issue for all people... spent my hole yesterday in front of the computer, today the same... I am not really in the mood of sleeping onto the keyboard...

I went to bed at 11pm, woke up at 4 am (SMS) and had a short conversation on the phone. Then my cats stalked me at 6am ... unable to sleep the last half hour.
I work all day (8h) in front of the computer, as my job is being a Software Developer... ;) though I never slept on the keyboard.

Again, if you find bugs or errors, report them. I usually can give advice.
It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro

Alchemion

  • Guest
Re: Large Texts -> extended settings
« Reply #9 on: December 10, 2008, 04:43:45 pm »
I said I got home at 22 p.m... I didn't say when I have gone to sleep...  :P

... and if you repeat this for a couple of days (being laisy on your re-energizing activities...) where do you think this gets you to ?...  :)

The cat is one cat... what about some more "annoying things" ?...  ;D