Warning: preg_replace_callback(): Requires argument 2, '$func['entity_fix']('\2')', to be a valid callback in /nfs/c01/h06/mnt/10927/domains/dragonprime.net/html/Sources/Load.php(225) : runtime-created function on line 3
Configuration?
DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • September 20, 2019, 01:39:54 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Configuration?  (Read 3424 times)
0 Members and 1 Guest are viewing this topic.
Sunday
Codemeister
****
Offline Offline

Posts: 406


So meme'd up.


View Profile
« on: July 04, 2013, 07:17:11 AM »

This may be intentional (?) but there is an issue I noticed when playing around on a clean slate. When I changed some game settings in the core, the game would needlessly post all the unchanged settings to the "game log." This resulted in incessant spamming inside the Gamelog Viewer, stating that settings had been changed, when in actuality there was no change at all. Also, the gamelog() posts a javascript variable (showFormTabIndex) as a setting.. Yet it is not.
« Last Edit: July 04, 2013, 07:42:43 AM by Fred Senare » Logged

Slowly progressing fork with PHP 7 support: https://github.com/stephenKise/Legend-of-the-Green-Dragon
Cheap VPS Hosting (10$ credit!): https://m.do.co/c/acde75b086c5

A new server in the making...
Sunday
Codemeister
****
Offline Offline

Posts: 406


So meme'd up.


View Profile
« Reply #1 on: July 04, 2013, 07:21:22 AM »

Here is the list of settings that save, when they are not changed.

Code:
Setting maxonline to 0
Setting emailpetitions to 0
Setting impressum to
Setting beta to 0
Setting defaultsuperuser to 0
Setting requireemail to 0
Setting requirevalidemail to 0
Setting blockdupeemail to 0
Setting spaceinname to 0
Setting allowoddadminrenames to 0
Setting selfdelete to 0
Setting villagechance to 0
Setting innchance to 0
Setting gravechance to 0
Setting gardenchance to 0
Setting paypalemail to
Setting autofight to 0
Setting autofightfull to 0
Setting officermoderate to 0
Setting specialtybonus to 0
Setting dropmingold to 0
Setting suicide to 0
Setting instantexp to 0
Setting multislummin to 0
Setting allowfeed to 0
Setting allowgoldtransfer to 0
Setting logdnet to 0
Setting gameoffsetseconds to 0
Setting cachetranslations to 0
Setting permacollect to 0
Setting tl_maxallowed to 0
Setting show_notices to 0
Setting notify_on_warn to 0
Setting notify_on_error to 0
Setting notify_address to
Logged

Slowly progressing fork with PHP 7 support: https://github.com/stephenKise/Legend-of-the-Green-Dragon
Cheap VPS Hosting (10$ credit!): https://m.do.co/c/acde75b086c5

A new server in the making...
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1752


View Profile
« Reply #2 on: July 04, 2013, 09:34:59 AM »

Did this happen the first time you saved the game settings, or does it happen every time you save game settings?

When the game is first installed, the settings table is only populated with a handful of settings. Therefore when the data is being saved the first time, it's noticed that not all are in the table. The code then inserts them all. With subsequent saves, only the changed data is saved.

Code:
<?php
// configuration.php
// line: 69

if ( !isset($settings[$key]) || (stripslashes($val) != $settings[$key]) )

Which reads: IF the game setting does not already exist OR the new value does not equal the old value. Passes these 2 checks the data is then saved. Smiley
Logged

Check My Modules for the latest versions.
Sunday
Codemeister
****
Offline Offline

Posts: 406


So meme'd up.


View Profile
« Reply #3 on: July 04, 2013, 02:18:56 PM »

Did this happen the first time you saved the game settings, or does it happen every time you save game settings?

When the game is first installed, the settings table is only populated with a handful of settings. Therefore when the data is being saved the first time, it's noticed that not all are in the table. The code then inserts them all. With subsequent saves, only the changed data is saved.

Code:
<?php
// configuration.php
// line: 69

if ( !isset($settings[$key]) || (stripslashes($val) != $settings[$key]) )

Which reads: IF the game setting does not already exist OR the new value does not equal the old value. Passes these 2 checks the data is then saved. Smiley

This is just a report of the bug. I already have it fixed, I know what it all means. When you do not change those settings at all it will continue to post to the gamelog. Even if the setting does not exist beforehand. Install a clean copy, save one setting several time. It tells the gamelog that you hanged all the settings in post two twice. Good luck fixing the bug. It is a two line edit maximum. More if you want to fix that JavaScript var beig posted to gamelog.
Logged

Slowly progressing fork with PHP 7 support: https://github.com/stephenKise/Legend-of-the-Green-Dragon
Cheap VPS Hosting (10$ credit!): https://m.do.co/c/acde75b086c5

A new server in the making...
Aeolus
Mod God
*****
Offline Offline

Posts: 1934


You're welcome.


View Profile WWW
« Reply #4 on: July 29, 2013, 07:40:11 AM »

This is just a report of the bug. I already have it fixed, I know what it all means. When you do not change those settings at all it will continue to post to the gamelog. Even if the setting does not exist beforehand. Install a clean copy, save one setting several time. It tells the gamelog that you hanged all the settings in post two twice. Good luck fixing the bug. It is a two line edit maximum. More if you want to fix that JavaScript var beig posted to gamelog.

Might be nice if instead of just "reporting" it, you let us know how to fix it. Wink But since you decided not to help out the community:

Open:
lib/settings.php

Find:
Code:
<?php
if (!isset($settings[$settingname]) && $value){

Replace with:
Code:
<?php
// if (!isset($settings[$settingname]) && $value){
if ($settingname == "showFormTabIndex") return true;
if (!isset(
$settings[$settingname])){

Open:
lib/modules.php

Find:
Code:
<?php
function set_module_setting($name,$value,$module=false){

Replace with:
Code:
<?php
function set_module_setting($name,$value,$module=false){
if ($name == "showFormTabIndex") return true;
« Last Edit: August 09, 2013, 10:49:47 AM by The Doctor » Logged

Sunday
Codemeister
****
Offline Offline

Posts: 406


So meme'd up.


View Profile
« Reply #5 on: August 09, 2013, 10:24:35 AM »

This is just a report of the bug. I already have it fixed, I know what it all means. When you do not change those settings at all it will continue to post to the gamelog. Even if the setting does not exist beforehand. Install a clean copy, save one setting several time. It tells the gamelog that you hanged all the settings in post two twice. Good luck fixing the bug. It is a two line edit maximum. More if you want to fix that JavaScript var beig posted to gamelog.

Might be nice if instead of just "reporting" it, you let us know how to fix it. Wink But since you decided not to help out the community:

Open:
lib/settings.php

Find:
Code:
<?php
if (!isset($settings[$settingname]) && $value){

Replace with:
Code:
<?php
// if (!isset($settings[$settingname]) && $value){
if (!isset($settings[$settingname])){

Helping out the community by reporting it so the core team can fix it. Also, what about the javascript variable?
Logged

Slowly progressing fork with PHP 7 support: https://github.com/stephenKise/Legend-of-the-Green-Dragon
Cheap VPS Hosting (10$ credit!): https://m.do.co/c/acde75b086c5

A new server in the making...
Aeolus
Mod God
*****
Offline Offline

Posts: 1934


You're welcome.


View Profile WWW
« Reply #6 on: August 09, 2013, 10:51:05 AM »

Also, what about the javascript variable?

* The Doctor points to his edited post.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
76 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search