Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: CSS-html with sNews  (Read 9391 times)

adamos

  • Newbie
  • *
  • Karma: 0
  • Posts: 43
CSS-html with sNews
« on: December 06, 2007, 06:04:03 AM »

Hey guys.. This is my first day playing around with sNews. I am totally new to the CMS scene. I have a very simple question. I am working on this website. http://adamos.us/test/    is any way that i can make it like that on sNews? and then add some products etc but i need to use CSS design with html etc. I tried to look for some tutorials but nothing helped.

I appreciate any help

Adam
Logged

Joost

  • Guest
Re: CSS-html with sNews
« Reply #1 on: December 06, 2007, 06:51:11 AM »

Welcome adamos,

Read the tutorial Template Tags to learn how to port your design to sNews.

Success.
Logged

adamos

  • Newbie
  • *
  • Karma: 0
  • Posts: 43
Re: CSS-html with sNews
« Reply #2 on: December 06, 2007, 02:14:44 PM »

Thanks Joost. Ok, it seems straight forward. the very first instruction: "The first step is to take a copy of the file and rename it (if not already done) to index.php" So i guess i will take the index.html and rename it to index.php? and then put the php functions in the <head> section? If this is correct then i can jump into doing the website.

Thanks again for your help.


Adam
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: CSS-html with sNews
« Reply #3 on: December 06, 2007, 03:31:27 PM »

Thanks Joost. Ok, it seems straight forward. the very first instruction: "The first step is to take a copy of the file and rename it (if not already done) to index.php" So i guess i will take the index.html and rename it to index.php? and then put the php functions in the <head> section? If this is correct then i can jump into doing the website.
Thanks again for your help.
Adam
You got it. But don't stop with the stuff in the <head>... you will also need to replace all of the static content elements in the file with the sNews function-name strings that dynamically generate the same content. Such as... whatever displays the horizontal pages menu in the static script will be replaced by the function-name string that brings in the pages menu - <?php pages(); ?>... and so on... all the way down to having the login link in the footer.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

adamos

  • Newbie
  • *
  • Karma: 0
  • Posts: 43
Re: CSS-html with sNews
« Reply #4 on: December 06, 2007, 06:01:17 PM »

can you please clarify this? I didnt get it


Thanks for your help,

Adam
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: CSS-html with sNews
« Reply #5 on: December 06, 2007, 11:34:07 PM »

@ Adam... have a look through the many pages from the HELP link in the top-right corner of this page... in particular have a look at this important page about Template Tags.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

jared351

  • Sr. Member
  • ****
  • Karma: 4
  • Posts: 276
Re: CSS-html with sNews
« Reply #6 on: December 06, 2007, 11:45:54 PM »

For instance, this is the default template index.php that comes with the 1.6 package..This will basically give you the idea of how template tags are used..
Also a BIG welcome to the community!  ;)

Code: [Select]
<?php session_start(); include('snews.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php title(); ?>
<meta name="Robots" content="index,follow" />
<meta name="Generator" content="sNews 1.6" />
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss-articles/" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss-pages/" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss-comments/" />
</head>
<body>
<div class="wrap">
<div id="logo">
<h1><?php echo s('website_title'); ?></h1>
</div>

<ul id="menu">
<?php pages(); ?>
</ul>

<div id="subheader">
<div id="breadcrumbs">
<?php breadcrumbs(); ?>
</div>

<div id="search">
<?php searchform(); ?>
</div>
</div>

<div id="left">
<h3>Categories:</h3>
<ul>
<?php categories(); ?>
</ul>

<h3>New Articles:</h3>
<ul>
<?php menu_articles(0,3); ?>
</ul>

<h3>New comments:</h3>
<ul>
<?php new_comments(530); ?>
</ul>

<?php extra(); ?>
</div>

<div id="right">
<?php center(); ?>
</div>

<div id="footer">
<ul id="rss">
<?php rss_links(); ?>
</ul>
<p>Barbecued by <a href="http://snews.solucija.com/" title="Single file CMS">sNews</a> &middot; <?php login_link(); ?></p>
</div>
</div>
</body>
</html>
Logged

adamos

  • Newbie
  • *
  • Karma: 0
  • Posts: 43
Re: CSS-html with sNews
« Reply #7 on: December 07, 2007, 04:22:08 PM »

Thanks for your help guys. I will try to put my css & html code together and see what gonna happen



Adam
Logged

adamos

  • Newbie
  • *
  • Karma: 0
  • Posts: 43
Re: CSS-html with sNews
« Reply #8 on: December 07, 2007, 04:51:59 PM »

I sort of worked it out a little bit. where do i go to set my pages title? i went to snewsMU.php and i found the php function title but i didnt find the variable to set the title. where do i go to find that?


Thanks,


Adam
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: CSS-html with sNews
« Reply #9 on: December 07, 2007, 05:03:23 PM »

I sort of worked it out a little bit. where do i go to set my pages title? i went to snewsMU.php and i found the php function title but i didnt find the variable to set the title. where do i go to find that?
Thanks, Adam
<?php title(); ?> is auto-generated by sNews... we cannot manually change it.
<?php echo s('website_title'); ?> is generated from the entry we can manually change (and save) in the Settings >> Settings Panel's Website Title field. This displays wherever we have it located in the template (index.php).
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

adamos

  • Newbie
  • *
  • Karma: 0
  • Posts: 43
Re: CSS-html with sNews
« Reply #10 on: December 09, 2007, 09:52:21 PM »

ok got it! for the 1st week i am doing good.. this is what i have so far. http://www.adamos.us/snewsMU/

I ve look everywhere to edit the comment form size, i tried all my resources and still doesnt work. its TOO small..

Adam
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: CSS-html with sNews
« Reply #11 on: December 09, 2007, 10:53:40 PM »

ok got it! for the 1st week i am doing good.. this is what i have so far. http://www.adamos.us/snewsMU/
I ve look everywhere to edit the comment form size, i tried all my resources and still doesnt work. its TOO small..
Adam
Glad to see you are making some progress Adam. I just had a look at your Comment Form and it looks fine to me in both IE7 and in Firefox. It is filling the width of the main container as much as it can.  :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

jared351

  • Sr. Member
  • ****
  • Karma: 4
  • Posts: 276
Re: CSS-html with sNews
« Reply #12 on: December 09, 2007, 11:04:01 PM »

I also took a look at your site..It's looking great so far!  ;)
Logged

adamos

  • Newbie
  • *
  • Karma: 0
  • Posts: 43
Re: CSS-html with sNews
« Reply #13 on: December 10, 2007, 12:12:50 AM »

thanks for your comments guys. i figured it out. i had to copy the css properties for comments from sNews style.css to my website's css. so it worked out great!

I progressed a lot for only 1 week in sNews and in cms in general. What i need to do now is to edit the Links and i cant figure it out. I want the homepage to be static content and then add dynamic content for Blog, Downloads and articles. I want to remove Archive and site Map. I tried to search so no one will offend me and i didnt find any information on that. Also, how do i use subpages?


Thanks again,

Adam
Logged

Joost

  • Guest
Re: CSS-html with sNews
« Reply #14 on: December 10, 2007, 12:38:58 AM »

You could try implementing this mod [MOD] ENHANCED Page Order

or You can remove sitemap and archive by doing the following:

In snews.php, function pages() approximately line 374 find:

Code: [Select]
echo '<li><a'.$class.' href="'.db('website').'archive/" title="'.l('archive').'">'.l('archive').'</a></li>';
comment it out by inserting a '#' before 'echo' like this:
Code: [Select]
# echo '<li><a'.$class.' href="'.db('website').'archive/" title="'.l('archive').'">'.l('archive').'</a></li>';
Do the same with line 385 (approximately):

Code: [Select]
echo '<li><a'.$class.' href="'.db('website').'sitemap/" title="'.l('sitemap').'">'.l('sitemap').'</a></li>';
You can set a page (static) instead of articles for the homepage in the adminpanel (settings).

Success teacher ;)

We don't need no education.....
« Last Edit: December 10, 2007, 04:00:00 AM by Joost »
Logged
Pages: [1] 2