Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

NidoMS's Template*

may web.very maple.pls.
Loyal Member
Joined
Aug 12, 2009
Messages
1,810
Reaction score
606
QjEVA - NidoMS's Template* - RaGEZONE Forums
AunoraDEV represent NidoMS's template, now, many of you might say "How the hell you got your hands on this?", well I had this template in my old harddrive so I decided to revive it, I didn't want to revive this template, the main reason of me coding this is to test some new stuff in php5.4 and test my class files and knowledge on them. Now another thing you may say is "Who the hell gave you permission to release this?!", Well this template design was actually Nexon's when evan came out, and nidoMS's web developer(cluesless on who) decided to rip it and use it as their own. Now I have nothing against NidoMS, they were my favorite server to play on, just thought I might revive the scattered piece of memory I have of them to RageZone.


ScreenShot:
A bit out of contrast and blurry, google's webshot extension isn't the best, heh..
Odq8y - NidoMS's Template* - RaGEZONE Forums

Download: (Pass: aunoradev)

Credits:
  • iAkira [AunoraDEV]
Thanks if you like
[MapleSyrup] | [MapleCoin] | [MapleTale]
 

Attachments

You must be registered for see attachments list
Last edited:
may web.very maple.pls.
Loyal Member
Joined
Aug 12, 2009
Messages
1,810
Reaction score
606
Link is up, hope you enjoy the little piece of NidoMS I had with meh lol. Of course I'm going to need some suggestion and comments on the class files since that's why I released this in the first place.
 
Elite Diviner
Joined
Jun 4, 2011
Messages
493
Reaction score
123
another site was using this already :c
 
may web.very maple.pls.
Loyal Member
Joined
Aug 12, 2009
Messages
1,810
Reaction score
606
another site was using this already :c
oh well lol, I just needed suggestion for my coding, that's the whole purpose of the release
 
Newbie Spellweaver
Joined
Mar 5, 2011
Messages
92
Reaction score
28
This guy deserves a medal for that scratching out.
 
Newbie Spellweaver
Joined
Sep 26, 2011
Messages
27
Reaction score
1
I think your overlooking the purpose of oop. With the way you set it up, there is no reason to use a class. By looking at your code it feels like you cared more about the process rather than the product. Its best to ask questions like "is this the best way", "does this work" and "does this do what it needs to do".

Examine how you went about displaying your navigation html.

PHP:
// for some reason the text is stored in hex
$info = array('646f6e617465', '72616e6b696e67', '646f776e6c6f616473', '636f6d6d756e697479', '7265676973747279', '6c6f67696e');
// for some reason the values are not simply sent to setNavigation()
// the data wouldn't need to be used later anyways, why store it in memory?
$core->setInfo('navigation', $info)->setNavigation();
PHP:
function setInfo($type, array $info) {
    $this->_data[$type] = $info;
    return $this;
}
PHP:
public function setNavigation() {
    // does not loop for array length, why use an array?
    for ($i = 0; $i <= 5; $i++){
		// hex2bin for no reason
		// nothing is done about the link always being "#"
        $this->_navigation.="<td><a href='#'><div class='nav ".hex2bin($this->_data['navigation'][$i])."'></div></a></td>";
    }
    return $this;
}

What is the reason to do such a simple task in such a way when a simple script does the same thing?

PHP:
$nav = array(array('item1', 'item1.html'), array('item2', 'item2.html'), array('item3', 'item3.html'), array('item4', 'item4.html'));
PHP:
<?php for($i = 0; $i < count($nav); $i++) { ?>
	<td><a href="<?=$nav[$i][1]?>"><?=$nav[$i][0]?></a></td>
<?php } ?>
 
may web.very maple.pls.
Loyal Member
Joined
Aug 12, 2009
Messages
1,810
Reaction score
606

Well, for once, lets start off from the beginning:
the main reason of me coding this is to test some new stuff in php5.4 and test my class files and knowledge on them
The purpose of the coding I did was to test newly functions, I know, this isn't a public product with the hex and stuff so I'm working on rev2 on improving some stuff that SaintIan told me.

As for the setInfo & navigation, I stored it to use it for paging name in rev2, and SaintIan reminded me about magic functions and some methods I forgot and learned, so I'll remove this function and use __get & __set instead and improve it as well.

Also on your little snippet of yours:
PHP:
$nav = ['item1', 'item2', 'item3', 'item4'];
$data = '';
for($i = 0; $i < count($nav); $i++) {
     $data.= "<td><a href='{$nav[$i]}.html'>{$nav[$i]}</td>";
} 
echo $data;
 
Mother effin' clouds
Loyal Member
Joined
Apr 13, 2008
Messages
1,534
Reaction score
448
Well, for once, lets start off from the beginning:

The purpose of the coding I did was to test newly functions, I know, this isn't a public product with the hex and stuff so I'm working on rev2 on improving some stuff that SaintIan told me.

As for the setInfo & navigation, I stored it to use it for paging name in rev2, and SaintIan reminded me about magic functions and some methods I forgot and learned, so I'll remove this function and use __get & __set instead and improve it as well.

Also on your little snippet of yours:
PHP:
$nav = ['item1', 'item2', 'item3', 'item4'];
$data = '';
for($i = 0; $i < count($nav); $i++) {
     $data.= "<td><a href='{$nav[$i]}.html'>{$nav[$i]}</td>";
} 
echo $data;

Just to fine-tune the snippet a little bit more:

PHP:
$nav = ['item1', 'item2', 'item3', 'item4'];
$data = '';
$total_items = count($nav);
for($i = 0; $i < $total_items; $i++) {
     $data.= "<td><a href='{$nav[$i]}.html'>{$nav[$i]}</td>";
} 
echo $data;

It won't make a huge difference but hey... since we are on the topic of micro-optimisation, why not :) It's much quicker to have expression 2 evaluated with a fixed variable rather than a count() function because:

http://php.net/manual/en/control-structures.for.php said:
The first expression (expr1) is evaluated (executed) once unconditionally at the beginning of the loop.

In the beginning of each iteration, expr2 is evaluated. If it evaluates to TRUE, the loop continues and the nested statement(s) are executed. If it evaluates to FALSE, the execution of the loop ends.

At the end of each iteration, expr3 is evaluated (executed).

If you had 10 items in your navigation array, you will be reiterating the count() function 10 times. Pointless I say! Thus, it's more appropriate to use an intermediate variable to store the count.
 
Last edited:
Junior Spellweaver
Joined
Sep 8, 2008
Messages
132
Reaction score
17
bu - NidoMS's Template* - RaGEZONE Forums
plz help how to fix it
 

Attachments

You must be registered for see attachments list
Newbie Spellweaver
Joined
Sep 26, 2011
Messages
27
Reaction score
1
Just to fine-tune the snippet a little bit more:

PHP:
$nav = ['item1', 'item2', 'item3', 'item4'];
$data = '';
$total_items = count($nav);
for($i = 0; $i < $total_items; $i++) {
     $data.= "<td><a href='{$nav[$i]}.html'>{$nav[$i]}</td>";
} 
echo $data;

It won't make a huge difference but hey... since we are on the topic of micro-optimisation, why not :) It's much quicker to have expression 2 evaluated with a fixed variable rather than a count() function because:



If you had 10 items in your navigation array, you will be reiterating the count() function 10 times. Pointless I say! Thus, it's more appropriate to use an intermediate variable to store the count.

Need 2d array cus file name not always link name. After making it a 2d array the next step would be to remove the PHP part and just make it in html because there is no reason to use PHP for this.

@iAkira: The point of testing is to make progress, fastest way being to do it properly. Not trying to be insulting its just that a huge part of oop and programming in general is the design.
 
Can't kilean the zilean
Loyal Member
Joined
Oct 20, 2010
Messages
1,182
Reaction score
515
damn that is a sxc template.
 
may web.very maple.pls.
Loyal Member
Joined
Aug 12, 2009
Messages
1,810
Reaction score
606
damn that is a sxc template.
Lol thanks I guess o_O, although I take no credit for the template.

Need 2d array cus file name not always link name. After making it a 2d array the next step would be to remove the PHP part and just make it in html because there is no reason to use PHP for this.

Well I based it off your snippet code which Saint based off mines, but yeah a second array would indeed be helpful if you had different text and link, although I don't see why removing php from html since in the end you're going to call PHP within the HTML code.
@iAkira: The point of testing is to make progress, fastest way being to do it properly. Not trying to be insulting its just that a huge part of oop and programming in general is the design.
Well, here's how I see this. They're two ways people get to their full potential of their coding, the first way is trying to get to their desired goal to work and function then after they clean & optimize their work. The second way is to work towards their desire & optimize simultaneously and progress their way up to their goal.

I'm always doing the first way but some others do it the second way, and the remaining do it their own custom way.

I know you're not trying to insult me, those are suggestions and comments which I said I wanted in the first place. So don't think of your posts are insulting me, they're actually helping me revolutionize the way I code.
 
Back
Top