Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: Snews in existing template  (Read 4233 times)

Petros Dimitriadis

  • Newbie
  • *
  • Karma: 0
  • Posts: 13
    • http://www.petrosdimitriadis.com
Snews in existing template
« on: December 09, 2006, 04:45:56 pm »

Hi, i will try and be as specific i can to give you an understanding of what i want to achieve.
Here is my sitemap:
What i want to achieve is my client to be able to manage the "jobs" and the "news_events" pages so that he can update them by himself.

What i have done so far is to install snews into "login". Is it possible to manage with snews the contents inside "jobs" and "news_events". If not what is the best way to do it?

So far i cant do it. Are the "pages" that snews creates physical? I mean do they exist in the server? if so am i able to style for example "jobs/default.php" in a different way from "news_events/default.php"?

Thank you.
Logged
Petros Dimitriadis
Web Designer
www.petrosdimitriadis.com

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Snews in existing template
« Reply #1 on: December 09, 2006, 05:14:32 pm »

Quote from: petrangr
Are the "pages" that snews creates physical? I mean do they exist in the server? if so am i able to style for example "jobs/default.php" in a different way from "news_events/default.php"?
Thank you.
No. None of the "Pages" sNews creates are "physical". Here is what happens.
Creation: When you create ANY category, article, page or extra content in a textarea from the Admin Panel... and click the EDIT or SAVE (or whatever) button... the data you have entered (and a link to it) gets posted (saved) into the tables within your database.
Viewing: When you view an article, page or extra content, you get it by clicking a link. The link was generated and inserted by functions (within snews.php) that sent a query to the database... found the link(s) and displayed them. The same happens for the article, page or extra content... the center function in snews.php queries the database.... finds the data and creates/displays it wherever it is told to display it in the template (index.php).
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Petros Dimitriadis

  • Newbie
  • *
  • Karma: 0
  • Posts: 13
    • http://www.petrosdimitriadis.com
Snews in existing template
« Reply #2 on: December 10, 2006, 10:30:29 am »

Thank you keyrocks.
Can someone tell if it possible what i want to do?
Logged
Petros Dimitriadis
Web Designer
www.petrosdimitriadis.com

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
Snews in existing template
« Reply #3 on: December 10, 2006, 10:43:41 am »

Everything you see in the main area of your site (except "contact", "archive" and "sitemap") can be updated by end user. These are hardcoded pages autogenerated by the engine itself.

Here's my suggestion:
- use "pages" option while creating cables_plugs, components, distributors, home_audio... and other corporate contents that doesn't change very often (that type of contents is still editable)
- use "article" option while creating news events because that type of contents is time dependable, i.e. it behaves like standard news publishing system which displays your contents ordered by date of creation
- regarding jobs section, you could define it as "page" type if it's used only to display opening positions
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

Petros Dimitriadis

  • Newbie
  • *
  • Karma: 0
  • Posts: 13
    • http://www.petrosdimitriadis.com
Snews in existing template
« Reply #4 on: December 10, 2006, 10:56:11 am »

Quote from: Mika
Here's my suggestion:
- use "pages" option while creating cables_plugs, components, distributors, home_audio... and other corporate contents that doesn't change very often (that type of contents is still editable)
Mika those pages exist as the website is live for a long time www.metroaudiosystems. If i understand  you suggest to redo those pages through snews. I would prefer not to do that.

Quote from: Mika
- use "article" option while creating news events because that type of contents is time dependable, i.e. it behaves like standard news publishing system which displays your contents ordered by date of creation
- regarding jobs section, you could define it as "page" type if it's used only to display opening positions
Do i have to install snews in the root folder to do that? Isn't snews creates the pages within the snews.php?
My clients wants also to manage the jobs section so this page should include "articles"
Logged
Petros Dimitriadis
Web Designer
www.petrosdimitriadis.com

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
Snews in existing template
« Reply #5 on: December 10, 2006, 11:03:39 am »

"pages" are also manageable by end user (your client), just like "articles", so you shouldn't expect any problems there. On the other hand, if existing corporate contents is hardcoded and you need to include it into snews, try using [include] feature - create a new page with the same name, and just include existing one into it.

Regarding snews installation folder position inside your directory structure, install it anywhere, but modify its position via db settings (snews.php) AND .htaccess as well
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

Petros Dimitriadis

  • Newbie
  • *
  • Karma: 0
  • Posts: 13
    • http://www.petrosdimitriadis.com
Snews in existing template
« Reply #6 on: December 10, 2006, 04:39:36 pm »

Sorry but i cant make it work, now http://www.metroaudiosystems.gr/login cannot create articles form one moment to another.

 :(  :(  :(
Logged
Petros Dimitriadis
Web Designer
www.petrosdimitriadis.com

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Snews in existing template
« Reply #7 on: December 10, 2006, 05:55:32 pm »

I logged into your site and created a category - First Category. In doing this, I noticed that your site was not automatically creating the Search Engine Friendly title in the second field (for some reason) so I manually created that as first-category... in that field.

Next, I created a new article titled Article Test in First Category. In doing this, I noticed that your site WAS auto-creating the Search Engine Friendly title in the second field, as it should. I pasted in some text.

After pasting the text in the textarea, I then expanded the Customize panel below it and selected the First Category category from the drop-down. I then scrolled down and clicked the Submit button.

The new article is now displaying OK in your site... on both the Home page and in the First Category page. At this point, I would have expected the article to display ONLY in the First Category category page... but again, it display in both the Home and the category page.

Question: What version of sNews 1.5 are you using?
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Petros Dimitriadis

  • Newbie
  • *
  • Karma: 0
  • Posts: 13
    • http://www.petrosdimitriadis.com
Snews in existing template
« Reply #8 on: December 10, 2006, 06:04:08 pm »

I am using sNews15RC3.Is it possible to have a diffrent page style for home let say for managing articles and different from a category page?
Logged
Petros Dimitriadis
Web Designer
www.petrosdimitriadis.com

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Snews in existing template
« Reply #9 on: December 10, 2006, 06:18:28 pm »

I am not sure about that as I have not experimented with that yet. To have different template styles apply, you would need to have a different css file... say style2.css. But, because we only use ONE template for the whole sNews site... and that template is (essentially) the index.php file... and since we can only have ONE index.php file in the same site root... and all functions in snews.php are called into the index.php file... to do this would mean you would have to overcome the simplicity of sNews. I think you would have to re-structure it quite a bit... and that does not seem practical to me.

On the other hand, this is not to say that it cannot be done - it probably can. It would involve having a method of switching stylesheets when a category is chosen and displayed, so that the category would display according to the styles within the new stylesheet that goes with it. And, the new stylesheet would have to use all the same style-names and tags as the main style.css... with the different styling within them, so they would apply to all of the style-names and tags used within the index.php file.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Petros Dimitriadis

  • Newbie
  • *
  • Karma: 0
  • Posts: 13
    • http://www.petrosdimitriadis.com
Snews in existing template
« Reply #10 on: December 10, 2006, 06:22:17 pm »

I really dont know what to do next.

How would i call a page from snews from outside the root?

Thanks anyway for your help. I will leave it for 2morrow for a clearer view as i am struggling with it for more than 8 hours.
Logged
Petros Dimitriadis
Web Designer
www.petrosdimitriadis.com

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Snews in existing template
« Reply #11 on: December 10, 2006, 06:31:57 pm »

We can create static content in separate .htm, .html or .txt files and put them in a folder in the site root called includes (or whatever else you want to call it. In this case, these files do not need all the script that a normal html file would have... before and after the actual content... because all that is already being generated for us by the sNews engine. These files would just have the actual content... the paragraphs and any thing else within the page that we have styles for within the stylesheet... and these pages COULD be getting their styling from a DIFFERENT (other) stylesheet.

Then - we create a new article page (in whatever category we want) and all we do is put a path to the file with the content withininclude tags. So, if we have created a content page in the includes folder called nicenotes.txt, we would insert this into the textarea for the new article page...
Quote
[include]nicenotes.txt[/include]
... and the contents of the nicenotes.txt file would display as the new article content just as if we actually pasted all of the contents into the textarea.

The nice part about doing it this way is that your article page still gets a Search Engine Friendly URL in the browser bar.

By the way... I would install and work with the most recent stable version - 1.5.30 since it is now pretty much bug-free. :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU