Website Settings/Configs

mudreamworld

Active Member
Joined
Apr 24, 2015
Messages
180
Reaction score
90
Hello,

i am working on new MuOnline website. it will be with PDO drivers (dblib,odbc,sqlsvr) , works with any Php versions 5.2.9 and latest php 7.


What is the best choise to make website configs/settings

Options:

1. xml files (like most of the cms uses)
2. config.php or something.php
3. file names like configs.cache, rankings.WEB etc
4. Anything else

What will be faster and better performance also secure.

Thanks in advance for answers.
 
И на мен ми е интересно кой биха били най-добрите варианти за разработка.
 
Според мен, не е нужен нов уеб, а да се съберат всички най-полезни интересни модули в един, като може да се ползва за гръбнак. Всъщност почти всеки с хубав CMS става и може да се допълни и подобри само.

Освен това повечето уебове и модули, като цяло куцат откъм конфиг варианти, което е лошо, а ако ще се прави безплатно за крайният потребител трябва да се предвидят повечето възможни сървър конфигурации и да се добвят в конфига

Това ще даде по-голяма гъвкавост и възможност да се използва от много потребители без да се налага да търсят някои девелопер да им добавя някоя друга опция на даден модул

Все пак добрият програмист трябва така да си свърши работата, че на потребителя да не му се налага да програмира, даже да мисли, а само да натисне един бутон

Разбира се и прекалено много опции не е добре, трябва реално да се обмисли в процеса

А специално конфига според мен трябва да е xml и да си се котролира с панел, а не ръчно в един голям конфиг файл

Това е което мисля аз

Ако проекта не се прекъсне, както повечето ще помагам с каквото мога
========================================================

I do not think that someone needs new website out there. Actually they are plenty of good webs with already build in CMS systems. So I do believe it is much better if one of those can be taken and used for it.

Most of those websites struggle from having advanced modules and configuration which makes them useless for long term or serious project. You always need to find someone to develop additional module or option.

You know the main target of the good programmer is to make sure the end user will need only to click on the option and not to start programming. So the most common options and modules must be provided in advance

Especially for the config I do believe it's better to be CMS oriented with xml

I'm ready to help as much as I can if the project is serious and will be finished and shared for free in 100%, and not like the rest rubbish ideas done in 50% and shared with excuses of no time or etc.
 
  • Like
Reactions: LockMU
i am %100 sure it's needed, becouse there is not a cms such as coded with ajax. everyday alot people asking me what website engine i am using.
i just open topic to get Discussion about making config to websites, not your personal ideas/opinions.
Btw do not try to make compare my php skills, i did whatever you see in my web. all %100 my work.
Why do you not start to release your own web?
Whatever i will release parth of the website fully coded by me, i do not need anyone code for me, i can handle it, i just ask some suggestions to wich will be better choise. i can do with both of tham. probly you compare me as another person but you are wrong. Stop agains me and take a look what you done. i am really get bored of your trash comments.


Complated Parts

PDO drivers = %100;
Register = %100
Functions for easy coding = %60 (get array variables for accounts, characters,guild and more )
 
Last edited:
i am %100 sure it's needed, becouse there is not a cms such as coded with ajax
Maybe there is a reason? In fact ajax can really affect your SEO.
As a question for you : why you want to make a CMS website when only you will administrate it? Is it worth to spend the time by writing all the CMS functions rather than just write the content in the proper file, config in config.php (will you really need a config when you write it with with the idea that only you will administrate it)? Why you need that flexibility that I am 99% sure that you wont use it at all (for example 'keep stats after reset / give bonus points') ?
 
Yes, I see you are against me but I will continue to get you bored with my comments, because I'll not stop writing them. Off course my ideas are stupid and pointless for you, let's see what you gonna do. I do not pretend for anything, but you pretend.

Do you start next sentence in turkish without a capital letter, if so.... go to school, or I can help you with some writing skills if needs :D
 
Maybe there is a reason? In fact ajax can really affect your SEO.
As a question for you : why you want to make a CMS website when only you will administrate it? Is it worth to spend the time by writing all the CMS functions rather than just write the content in the proper file, config in config.php (will you really need a config when you write it with with the idea that only you will administrate it)? Why you need that flexibility that I am 99% sure that you wont use it at all (for example 'keep stats after reset / give bonus points') ?


There are some tutorials how to make ajax website seo friendly and crawlable your contents.
Why i need to do it? it's my hoby :)

@r00tme

i am going to ignore your comments till you grow up.Do whatever you want, your comments shows how person you are...
 
Mmm... I'm just wondering what is so interesting in your website to the others, so they are asking you about it. You think that you are special but actually you use 100% of very known ajax effects and constructions from Enemy Mu Web and others

You said it's 100% your own development but it's not! Here is the prove of what I'm talking about
Or you will say that it's your original code, which has been stolen by these "stupid" Russian guys ...

I will agree if you say : "Well, I have used an ideas and some codes from other webs and did an upgrades", but I can't agree with : "I have developed this web from scratch, by myself and it's 100% my own project"!


Video:
https://www.youtube.com/watch?v=v61-GMzjrOE&feature=youtu.be


Download link:
Download - Inbox Files
Mines was just an idea (nod)

Actually currently i am working on to adapt my custom website engine with PDO (works with any php version), i am using some of the codes of yours scripts, when i am done with it, i will. Thanks :)

And please, do not use my scripts. They do not support php 5.6+, aren't object oriented and missing javascript/ajax. Just do it yourself. Kidding of course (rofl)
 
Last edited:
works with any Php versions 5.2.9 and latest php 7.

You know that PHP7 is not backward compatible, right? :)

Regarding the configurations - XML files with a single class (example class) responsible for loading only the needed configurations. And since you will be using AJAX, make a service which returns the configurations in JSON format, so you can read them with JavaScript (remember to filter the sensitive data! DB passwords, usernames, IP-s, stuff).

@pafa7a Гугъл от няколко години насам приеха AJAX сайтовете, просто всяка страница трябва да има своя hash (#!/home/register, #!/home/login и т.н.)
 
  • Like
Reactions: dota-sdso
Regarding the configurations - XML files with a single class (example class) responsible for loading only the needed configurations. And since you will be using AJAX, make a service which returns the configurations in JSON format, so you can read them with JavaScript (remember to filter the sensitive data! DB passwords, usernames, IP-s, stuff).

@pafa7a Гугъл от няколко години насам приеха AJAX сайтовете, просто всяка страница трябва да има своя hash (#!/home/register, #!/home/login и т.н.)

@ RaFa
Thanks for the answer, i will keep db configs in php files i was asking for module settings in xml files.

i made a function like that for xml files.

PHP:
function xml_jason($config) {
	return json_decode(json_encode($config), true);
}

function load_configs($config_file) {
	global $module_config;
	
		$xml = simplexml_load_file('path_to_xml'.$config_file.'.xml');
		$module_config = array();
		if($xml) {
			$file = xml_jason($xml->children());
			$module_config = $file;
		}
	
}

@ r00tme
as usual you are totally wrong. i do not use any parth of module/script from enemy muweb.enemy web is outdated.if you like to be parth of this project you can help me to make design, only the thing that i cant handle even with paint too :)
i said it will be new web and will do it from 0, not talking about my current website. but ofc i will get some ideas and scripts ready to use from other websites as usual to make easy coding/reconfiguring or understanding.
 
Last edited:
i made a function like that for xml files.

PHP:
function xml_jason($config) {
    return json_decode(json_encode($config), true);
}

function load_configs($config_file) {
    global $module_config;
    
        $xml = simplexml_load_file('path_to_xml'.$config_file.'.xml');
        $module_config = array();
        if($xml) {
            $file = xml_jason($xml->children());
            $module_config = $file;
        }
    
}

Think of a way to load the XML file just once, even if you want to use it across multiple pages. Currently if you execute load_configs('common') in 3 times, you will load the file 3 times. Which is completely wrong. See how I've handled that in the example class I gave you. :)
 
  • Like
Reactions: mudreamworld
Think of a way to load the XML file just once, even if you want to use it across multiple pages. Currently if you execute load_configs('common') in 3 times, you will load the file 3 times. Which is completely wrong. See how I've handled that in the example class I gave you. :)

it will be seperated config for each module. i am wondering your suggestions :)
Thanks