Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Is there a Tutorial on making mods...?  (Read 6826 times)

Richard Waters

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 88
    • http://www.richardsmagic.com
Is there a Tutorial on making mods...?
« on: August 22, 2006, 07:48:10 AM »

What I mean is - is there a tutorial that shows you how to take an exisiting script, either one that you have designed urself, or one from a website, and add it into sNews?

I mean, sure, u can put the main function for the item in snews-php, but how can u make that added items admin, appear in sNews admin?

Or better yet, is there a way to have a mod in a different folder, say:

../snews/mods/modname/[item_files_here-php]

And then add a few lines to include that mod without changing any of snews-php?

For example, Id love to add a calendar say.  I dump it into a mod folder, open snews and add an include or two, open index and add the [], change the calendar php file to read the article dates and bold them, make them a link, and ur done?!

Anyone able to point me in the right direction please?!

:D  --  Richard
Logged
Transported to a surreal landscape, a young girl kills the first woman she meets and then teams up with three complete strangers to kill again!
:D -- The Wizard Of Oz

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
Is there a Tutorial on making mods...?
« Reply #1 on: August 22, 2006, 08:37:22 AM »

the "usual" definitions are as follows:
- mods are changes applied directly to the engine code (bug fixes, small improvements, extended features etc...)
- addons are additional, standalone and sNews independent php applications (galleries, guestbooks, wyswyg editors etc..)

sorry to disappoint you, but i don't think there will ever be a tutorial on making modes [ on the other hand, i hope that somebody will prove me wrong ;) ]
since your example is pretty accurate - yes, that's the general modding/adding procedure - the only thing a modder should do is to learn php in order to participate.

you see, after you pass that (php basics) point, you'll notice that there isn't any exact rule on how to attach a piece of code to sNews. the only limitations are your knowledge and your creativity. of course, you're always welcome to post your problem here on forum ;)

.............................
for example, i can walk you through some small modding procedure, but i need to know how much of php do you already know.
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

Richard Waters

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 88
    • http://www.richardsmagic.com
Is there a Tutorial on making mods...?
« Reply #2 on: August 22, 2006, 01:27:27 PM »

Thanks Mika,

I know a little - but probably not near a level u might expect to be able to "teach" me something, maybe I was being a little lazy.

I did look through the snews-php file and have found out how/where the code is that adds the admin menus when ur logged in, thats a start for me, and I can see how and where to put the php code I have in the file too - almost worked out how to display it in the CENTER as well, with a little more work I might be ok.  :D

And, from the definition that you just gave, I apologise, I should have called it an "addon" and not a "mod".  :)

I will learn more php, Im teaching myself, so things are a little slow at the moment - but I do get ur point in bold...   ...when I am a little more experienced, I will see if I can come up with something and make notes of how I do it, and who knows, that may help someone else too.

I will keep studying, keep learning and now I have something to aspire to.

:D -- Thanks for the fast reply.

Rich
Logged
Transported to a surreal landscape, a young girl kills the first woman she meets and then teams up with three complete strangers to kill again!
:D -- The Wizard Of Oz

brauck

  • Hero Member
  • *****
  • Karma: 18
  • Posts: 556
    • http://www.hbw-webdesign.nl/
Is there a Tutorial on making mods...?
« Reply #3 on: August 22, 2006, 11:48:23 PM »

that's the spirit :)
Logged
Confidence is reduced complexity.
brauck.nl for free css templates

Richard Waters

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 88
    • http://www.richardsmagic.com
Is there a Tutorial on making mods...?
« Reply #4 on: August 23, 2006, 12:22:58 AM »

:D

I never ask for anything "..on a silver platter" - I would prefer to work for it, and maybe be pointed in the right direction.  Thats just the type of guy I am.

But Im glad that the people here actually care for this project and would prefer to hold out their hand and help people up, than take the hand of newcomers and let them be pulled down.  Im sure if the rest of the world worked that way, giving everone a hand up, it would be a better place.

So thanks, Im getting there, and I hope to have something here, posted and useful before the end of the year!  :)

Cheers!

:D -- Rich
Logged
Transported to a surreal landscape, a young girl kills the first woman she meets and then teams up with three complete strangers to kill again!
:D -- The Wizard Of Oz

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
Is there a Tutorial on making mods...?
« Reply #5 on: August 23, 2006, 08:22:53 AM »

it's always good to hear other people's thoughts, no matter how small or "unexperienced" they posts may be, don't you think?
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Is there a Tutorial on making mods...?
« Reply #6 on: August 23, 2006, 09:13:54 PM »

Quote from: Richard W
I'm sure if the rest of the world worked that way, giving everyone a hand up, it would be a better place.
Yes, it sure would. :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Luka

  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 36
  • Posts: 1716
    • http://www.snewscms.com
Is there a Tutorial on making mods...?
« Reply #7 on: August 23, 2006, 09:30:56 PM »

Mods are code snippets that are pasted directly into the code and Addons are separate files which can be used with sNews easily.

No predefined folders are neccessary cause it only leaves space for possible mistakes. Instead you can place your addon wherever you like.

Example:

You create a Gallery for sNews and call it gallery.php. Everything user has to do to use the gallery is to include it within some page or even an article. This is the basic idea I had and it has been proven to work. Even more complicated addons like forum or shopping cart can be used except of a few tweaked lines.
Logged

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
Is there a Tutorial on making mods...?
« Reply #8 on: September 14, 2006, 11:12:40 PM »

Quote from: finally proved wrong, mika
sorry to disappoint you, but i don't think there will ever be a tutorial on making modes [ on the other hand, i hope that somebody will prove me wrong ;) ]
take a peek on http://www.ni5ni6.com/snews-mods/ - this my current project and i hope you'll find it useful ;)
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version