Jump to content
MakeWebGames

Clan Swap


Recommended Posts

Hello everyone (who is interested)

I submitted my first module to the NWE marketplace and hopefully its good enough for Mr. Alain to approve it ;)

Basically what it does is allows for a moderator or above to easily swap from clan to clan to check on other clans if need be.

Well I thought I could write a little more about it but I pretty much summed it up in the opening line of this paragraph lol but if you do have any questions, comments, or concerns ill do my best to answer them

Link to comment
Share on other sites

Mmm tabs are somewhat of a beast you never heard about right? ;)

Is it on purpose only moderator can use it?

You missed a table footer.

Finally why check 2 times in the content.php if you are moderator? Why not add it at the beginning of the code? like if(!IsModerator()) return;

I would still accept the code without tabs (even if it's really ugly), but you should answer for the moderator and fix the table footer.

Link to comment
Share on other sites

Its used for moderator and above ie mod and superuser so that not just anyone can sit there and swap back and forth between clans. At least when I was testing it out as a super user it would let me execute the script.

As for the table footer I could have sworn I had it in there cause I remember thinking

now watch this is going to bring the footer up and smash it in my table
I must have accidentally deleted it moving stuff around :p

And finally the single check: that would have been too easy thats why haha but later ill update it and even make an attempt to tab the code for others readability even though I like mine un-tabbed haha.

Link to comment
Share on other sites

So I updated the script and here is what I fixed:

  • Tabbed the code for readability
  • Added missing table footer
  • Removed multiple moderation checks
  • And fixed the query that makes the whole thing work *oops* :p

But everything should be up to par.

Now let me elaborate on this cause reading my original post it maybe a little confusing.

Like I said above this is for moderators and above in the game by default if you want only the Super User(s) you will have to change the first 2 or 3 lines or so in the "in_clans.php and the clans_menu.php.

This is not really a clans module but a module to help moderate clans or "spy" on them if you will from a game owner/game moderator point of view. It automatically puts the moderator that is executing the script as a clan master so he/she has roam of the clan in question, I would advise that you only allow trusted individuals access to this if you want help moderating the clans.

So I hope this sheds a bit more light on the module itself

Any questions/comments/concerns are welcome

Link to comment
Share on other sites

Tabs are really really odd... Maybe I shall explain what they should mean ;)

After the result as you set a timeout, a good return would not hurt, anyhow nothing major.

Anyhow I accepted the module. Now you need to edit it from the marketplace, set a price (or leave it to 0 for free) and publish it. Congratz!

Link to comment
Share on other sites

Tabs are really really odd... Maybe I shall explain what they should mean ;)

After the result as you set a timeout, a good return would not hurt, anyhow nothing major.

Anyhow I accepted the module. Now you need to edit it from the marketplace, set a price (or leave it to 0 for free) and publish it. Congratz!

Lol im not too keen on tabbing code but thanks for the congrats.

This may sound like a noob question but where would I go to manage the module?

Im not planning on making it a paid module but in the future when I make something worth it I would like to know cause I dont see anywhere to go in the marketplace or in my account.

Link to comment
Share on other sites

Not sure how big this mod is, but I presume it isnt very big. In which case i can try and understand why you dont see the importance of tabbing.

but I can assure you, once you write huge amounts of code, tabing and commenting can be very useful. It also makes your code clean, and in the future if you want to learn a lnaguage like python where white spacing is essential, you wont have trouble adjusting.

other than that, congrats on getting it accepted! :)

Link to comment
Share on other sites

Tabs allows to quickly have a look of where your brackets are. This gives a visual clues of the logical block and therefore helps to read the code. That's the goal of the tabs, nothing else. Now any serious editor will do the tabs for you. Just from that I can tell you that you don't use a good PHP editor ;) Again a good PHP editor speed up your coding, helps you in a lot of different ways.

For the management of your module, in the module marketplace, "http://www.nw-engine.com/index.php?c=modules" you have a couple of buttons on the top, one of which should be the modules not on sales. Click on it, it should show your module, then click on the module title, and edit your module.

Link to comment
Share on other sites

  • 2 weeks later...
Why not use a good editor / IDE which does the formatting while writing your code? And maybe even point you errors, or auto-complete functions / variables while typing? And yes there is multiple free options for that.

My favorite integrated development environment (IDE); Netbeans

Link to comment
Share on other sites

Note: Sublime Text 2/3 isn't an IDE, it's a text editor.. but a damn good one at that.

Eclipse is the way to go for me, but w.r.t. syntax formatters - don't.

I spend quite an amount of time setting up my syntax formatter, but rarely use it. The occasions I do use it is when I receive someone else's code and go "Your syntax sucks, so I'll use mine".

Pisses people off when you send them their re****tored code back, even more aggressively so when it's pushed through a version control channel(try your diff tool now, biatch).

With my own code that I write, and when refactoring old legacy code I reformat by hand, always. There's no tool that can do a better job than human labour.

But the real question that still needs to be answered is... What the hell is this thread about anyway? And why did I just hijack it? :confused:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...