Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [ADDON] Custom Modules (sNews 1.4 - 1.5)  (Read 5748 times)

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
[ADDON] Custom Modules (sNews 1.4 - 1.5)
« on: August 18, 2006, 08:59:05 pm »

This project began in one direction and, with new 'seeds' from Mika (our current sweat-shop development teamleader), took a different turn that ended up surprisingly useful and successful. The evolution of this project is detailed in this post at http://www.solucija.com/forum/viewtopic.php?id=1475.
Project Update: SEPTEMBER 17, 2006:
This Add-on runs with 1.5 and 1.4!

The Custom Modules add-on has been refined. A clearer, step-by-step tutorial for installing and customizing the add-on is now posted at http://www.snews.ca/addons/custom-modules/. A modules.zip file, containing the demo modules folder used in the tutorial, is also available for download from within the tutorial. I hope you find it useful.
----------------------------------------------------------------------------------------------------


What is the Custom Module all about? Let's say you have a large number of basic HTML and/or plain text files that seldom need updating, and you want to add them to 4 or 5 (or more) modules that run independently of the sNews engine. You also want them to display within the existing index.php template file... and you want the pages to have Search Engine Friendly URLs. This combination mod and addon does the trick. Check it out - keep in mind that it is a first-run and will be subject to additional improvement as time permits.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
[ADDON] Custom Modules (sNews 1.4 - 1.5)
« Reply #1 on: August 18, 2006, 10:42:10 pm »

sweet stuff key!
oh, I tried leaving a comment on the demo site and up came this message onSubmit:
Quote from: snews.ca
Fatal error: Call to undefined function: audit() in /home/hombre/public_html/module-demo/snews.php on line 924
You may want to look into that.
Oh, oh, and check the source code while you're at it. It has 1 error (an unrecognized tag) and a number of minor warnings. Just thought i'd mention it.
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
[ADDON] Custom Modules (sNews 1.4 - 1.5)
« Reply #2 on: August 18, 2006, 10:56:05 pm »

Quote from: agentsmith
sweet stuff key!
oh, I tried leaving a comment on the demo site and up came this message onSubmit:
Quote from: snews.ca
Fatal error: Call to undefined function: audit() in /home/hombre/public_html/module-demo/snews.php on line 924
You may want to look into that.
Oh, oh, and check the source code while you're at it. It has 1 error (an unrecognized tag) and a number of minor warnings. Just thought i'd mention it.
Thanks agent... fixed that Fatal Error... had switched a string off in another install and didn't realize it when I dup'ed snews.php for this install. I'll check the other "oh-ohs" out soon... Must admit it was a bit of a rush job with no attention paid to compliance issues (hehe).
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

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
[ADDON] Custom Modules (sNews 1.4 - 1.5)
« Reply #3 on: August 19, 2006, 12:15:41 pm »

You're a hero, Key. This should become useful, as for myself. Have thoguhts of adding a section to my site consiting of more static material, and it needs to be paginated...This would do it, right ?

Patric.
Logged
"It's only dead fish that goes with the flow... "
Updated

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
[ADDON] Custom Modules (sNews 1.4 - 1.5)
« Reply #4 on: August 19, 2006, 04:24:41 pm »

Quote from: Patric
You're a hero, Key. This should become useful, as for myself. Have thoguhts of adding a section to my site consiting of more static material, and it needs to be paginated...This would do it, right ?
In its current form - absolutely. If you have several modules, they can all go in a modules folder in the site's root. Each module folder has an engine (php) file that serves the pages using the php "switch-case" script. And the pages, in the same module folder, are either .txt or .html files. So a file-path to the module's page 1 would look like this - snews/modules/module1/page-1 .
P.S. - no hero - just a fellow user chasing down another solucija!
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

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
[ADDON] Custom Modules (sNews 1.4 - 1.5)
« Reply #5 on: August 19, 2006, 05:44:00 pm »

Son of a gun, that's great, Key... Now keep this current version somewhere, hehe.... Or code in an option to have it this way ;)... I will want it somwtime soon, I hope :)

Patric.
Logged
"It's only dead fish that goes with the flow... "
Updated

bryn

  • Hero Member
  • *****
  • Karma: 2
  • Posts: 934
    • http://www.cssugly.com
[ADDON] Custom Modules (sNews 1.4 - 1.5)
« Reply #6 on: August 20, 2006, 12:02:23 am »

excellent work again keyrocks..you de man :D
Logged
Over 1,000 posts of joy, sNews is not only brilliant, but fun too! thanks guys :D

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
[ADDON] Custom Modules (sNews 1.4 - 1.5)
« Reply #7 on: August 20, 2006, 03:43:26 am »

Thanks Patric and bryn... I did not do it alone... this is really a Mik-key creation. :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

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
[ADDON] Custom Modules (sNews 1.4 - 1.5)
« Reply #8 on: August 20, 2006, 11:44:22 am »

Mikkey ?? That's Mika, right ? Darn, he's everywhere these days :)
Logged
"It's only dead fish that goes with the flow... "
Updated

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
[ADDON] Custom Modules (sNews 1.4 - 1.5)
« Reply #9 on: August 20, 2006, 06:17:27 pm »

:D
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: 6020
  • Semantically Challenged
    • snews.ca
[ADDON] Custom Modules (sNews 1.4 - 1.5)
« Reply #10 on: August 26, 2006, 08:00:26 pm »

To anyone interested in this Custom Modules add-on, please refer to the the update in the first post in this topic string.
Project Update: SEPTEMBER 17, 2006: This Add-on runs with 1.5 and 1.4!
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Armen

  • Sr. Member
  • ****
  • Karma: 41
  • Posts: 338
    • http://www.funnydays.ru
[ADDON] Custom Modules (sNews 1.4 - 1.5)
« Reply #11 on: October 16, 2006, 07:55:48 am »

Great job keyrocks! Thanks for the awesome tutorial.

But there's a little thing I noticed... The search.

If you try to search from the module-integrated page nothing happens.

Could you check that?
Logged
Now ogres, oh, they're much worse. They'll make a suit from your freshly peeled skin. They'll shave your liver, squeeze the jelly from your eyes... Actually, it's quite good on toast.

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
[ADDON] Custom Modules (sNews 1.4 - 1.5)
« Reply #12 on: October 16, 2006, 07:21:47 pm »

Quote from: SerpantiN
Great job keyrocks! Thanks for the awesome tutorial.
But there's a little thing I noticed... The search. If you try to search from the module-integrated page nothing happens.
Could you check that?
Thanks for your kind words! The search only works with pages that are created in the CMS... which stores their titles in the dbase articles table. Being static in nature, the module page titles are not stored in the dbase table, so the sNews search function - being limited only to titles in the articles table - cannot find them.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU