Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: How to make mods...  (Read 6176 times)

Patrik

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 89
    • http://pawe.se/
How to make mods...
« on: February 25, 2006, 04:21:09 pm »

I think i missed how the modthing will work in the future. Will it be some kind of modulething for sNews or should we go with just include files? I want to know so i can start making some mods that will hold in the future.. :)
Logged
Visit me: http://pawe.se/

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • “I'm a self-made man and worships my creator.”
    • p-ahlqvist.com
How to make mods...
« Reply #1 on: February 25, 2006, 04:23:46 pm »

I'm thinking "modulething"...But can't say for sure. I'm pretty sure the flatfile version is meant to handle modulethingies, and thought accordingly that this was the case for the MySQL version aswell...What do you say, Guru's ?
Logged
"It's only dead fish that goes with the flow... "
Updated

Patrik

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 89
    • http://pawe.se/
How to make mods...
« Reply #2 on: February 25, 2006, 04:36:41 pm »

Okey, a "modulething" sounds nice. The question is just how to make it as simple and clean as posible...maby just a file with modules that you include in the snews.php and in module.php you put some functions that will be called if the "page" has that module in the database. I don't know how handy that is but i made a littlemodulething for me that way once...but thats more for just small things.. :)

I say as i should. What plans do you gurus have? :)
Logged
Visit me: http://pawe.se/

Vitor M. Costa

  • Newbie
  • *
  • Karma: 0
  • Posts: 40
    • http://designcriativo.com/
How to make mods...
« Reply #3 on: February 25, 2006, 05:47:34 pm »

Yes, this is something that as buging me some time now, i think that Luka as a clear idea on how this will work, modules and addons.

So please, Luka care to share with us how? so that we could develop some good's for sNews :)
Logged

Luka

  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 36
  • Posts: 1717
    • http://www.snewscms.com
How to make mods...
« Reply #4 on: February 25, 2006, 06:32:54 pm »

Mod is something you paste directly into the code of snews.php.
Addon is external php or inc file.

I'll explain how addon should work. Offcourse this is how I see it and I'm not married to it if someone has a better solution, go ahead.

You make an external file called archive.php.
Inside that file you make code to pull out data from the database and display all articles and sort them by month.
You see, this is an example of Archive addon. Now, how to use it? Create an article and write something like 'This is my Archive' and write: [include]archive.php[/include], you could also specify a directory, it works. Set the article to be unpublished and there you go. You can place a link to that article wherever you want on your site.


Another example:
Make a file called latest_comments.php
Inside of that file, make a simple code to pullout latest comments by date and display them with a link to article and page they belong to. You can now make a left or right article and display this addon to show latest comments on your site.

Any other questions?
Logged

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • “I'm a self-made man and worships my creator.”
    • p-ahlqvist.com
How to make mods...
« Reply #5 on: February 25, 2006, 06:40:58 pm »

Hehe...about a....gazillion other questions...Gotta minute ;) Joke aside, I'm so php-dumb that I need to get back to you if I want to do something specific...If that's alright with you. My head will explode if I'm to get more in there, hehe...And that would indeed be a shame...My head exploding I mean. If anything should be exploding it should be religious leaders around the world bringing war and despair to mankind...But I won't get that either, or a million money at my account...so why wish, yhehell'o ngahummmph

*ouch sat on armsupport on chair...hurt ass*

Ok, I'm good ;) Don't mind me...
Logged
"It's only dead fish that goes with the flow... "
Updated

Luka

  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 36
  • Posts: 1717
    • http://www.snewscms.com
How to make mods...
« Reply #6 on: February 25, 2006, 06:49:42 pm »

Patric tell me, what kind a addon would you like to make?

Also, I forgot another thing.

Addon can have it's own installation and a separate table in the database. That way you'll be able to install a addon like shop or something else.

And let me answer your next question in advance!

How wil the addons be administrated?
When you include a addon in your article and log in, in the central column there will appear administrative operations. Simple as that.

There are really a lot of possibilities with this.

Logged

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • “I'm a self-made man and worships my creator.”
    • p-ahlqvist.com
How to make mods...
« Reply #7 on: February 25, 2006, 06:54:50 pm »

Ok, PM'ed you, and Abe bout this...But I guess I can go public with my not knowing anything ;)...Here goes:

The idea is to have a 4 columned layout as  this one. You notice that the " center(); " function is kind of narrow, and when clicking a link or comments it opens up in the same narrow column, right ? Now I have a vision, hehe... I would like for the link that's being clicked to open all over the width of the site (except for the navigation that is to be left alone). Meaning, clicking a link would remove "about sNews" and "What is sNews" and spread all the way to the right. (or possibly by the use of more CSS, move those two benieth the spreading center function)...

You with me ??
Logged
"It's only dead fish that goes with the flow... "
Updated

bryn

  • Hero Member
  • *****
  • Karma: 2
  • Posts: 934
    • http://www.cssugly.com
How to make mods...
« Reply #8 on: February 25, 2006, 08:38:02 pm »

I am..and I understand what you want and can picture how this could be done..but I need to be able to do this with categories as well as article id..that's where I'm personally stuck right now  :(

It's probably real easy for the php gurus ;) but I'm spending a lot of time tinkering trying to get there..I'll keep trying mate..I hate giving in ;D
Logged
Over 1,000 posts of joy, sNews is not only brilliant, but fun too! thanks guys :D

Jochum Meester

  • Sr. Member
  • ****
  • Karma: 1
  • Posts: 309
    • JochumMeester.com
How to make mods...
« Reply #9 on: February 25, 2006, 09:43:55 pm »

If you just had this:
||  ___left___  |  _________center________  ||

then that would be the basis layout. You could then make an article in center where you would have two extra DIVs with float:right; and width:**px;
Is this an option? I hope you'll get my idea hehe...
Logged

Vitor M. Costa

  • Newbie
  • *
  • Karma: 0
  • Posts: 40
    • http://designcriativo.com/
How to make mods...
« Reply #10 on: February 26, 2006, 01:08:40 am »

Hum, i don't think that the administrative operations of the addons should appear in the central column, my two cents here is that we should separete  the  like published articles from the administrative operations of sNews and then give an id to the element, like admin-menu, and position that element where we want maybe on top like position: absolute; top: 0px; this way the sistem should grow in is administrative operations like catalog, gallery etc...  ;)
Logged

tjtnsnake

  • Guest
How to make mods...
« Reply #11 on: April 04, 2007, 10:25:36 pm »

Hey guys im new and im trying to figure out if there is a good program that i can use to make mods for my online game, does anybody know of any good ones, i dont want to do nothing really serious just like calculate how long it will take me to get to a certain location or other things to locations, its an WW2 Airplane game, any ideas?
Logged

piXelatedEmpire

  • MIA
  • ULTIMATE member
  • ******
  • Karma: 37
  • Posts: 1401
  • currently MIA
How to make mods...
« Reply #12 on: April 05, 2007, 02:59:45 am »

and this has what to do with sNews?  :/
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
How to make mods...
« Reply #13 on: April 05, 2007, 03:29:44 am »

Nothing. That's why it's welcome in the "Website Talk" section. Snake'll just have to wait till a fellow gamer comes along with like-minded ideas. :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU