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: layout question  (Read 5350 times)

rainb0w

  • Newbie
  • *
  • Karma: 0
  • Posts: 10
layout question
« on: March 26, 2008, 09:43:56 am »

Hey guys, first of al let me compliment you with this nice version beceause I've installed it today and I alrddy love it :)

However I got a question for you guys. Is it posible to strip the left part (Categories), the upp part (title of the page, menu and sitepages) and the footer of the page so that only the real news content stays ahaid? I want to intigrate this part in my site layout but I don't need all the other things that are around the news like I said before. Ive searched in the settings page for posible hits to change this but I didn't found any.

And just for the bonus, is it posible to have the Categories section and the RSS section in other frames so I can imput that into my own site design in my own menu section.


So I got my own site desgin with SNews integrated.

Thanks for your time guys I rlly appriciate this :)
Logged

Joost

  • Guest
Re: layout question
« Reply #1 on: March 26, 2008, 10:15:00 am »

Here you find more information

In short:
sNews templates work with tags like  <?php categories(); ?> for category menu. So it is very flexible to integrate in an existing design.

By the way: Welcome to sNews , rainb0w.  ;)

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
Re: layout question
« Reply #2 on: March 26, 2008, 11:45:23 am »

Yupp, welcome and as Joost says. Go read on that page, and you'll find that if you just prepare your index file (which must me made a PHP file) with the upper call for snews, you could in fact just use the <?php center(); ?> in order to show news only...
Logged
"It's only dead fish that goes with the flow... "
Updated

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
Re: layout question
« Reply #3 on: March 26, 2008, 02:43:47 pm »

Of course ;) I sort of included that in "prepare the index file". but you're right. that could be jibberish to a new user.
Logged
"It's only dead fish that goes with the flow... "
Updated

rainb0w

  • Newbie
  • *
  • Karma: 0
  • Posts: 10
Re: layout question
« Reply #4 on: March 26, 2008, 04:39:07 pm »

well thanks for the quick replys rlly nice :) however I have loads of error messages when trying to use the include php script.

This are my error messages. I've replaced the real url for just a URL tagg beceause I'm still working on the site and I want to give the real url free if it's finished :);)
Code: [Select]
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /customers/URL.com/URL.com/httpd.www/Design1/index.php:3) in /customers/URL.com/URL.com/httpd.www/design1/index.php on line 3

Warning: include() [function.include]: URL file-access is disabled in the server configuration in /customers/URL.com/URL.com/httpd.www/design1/index.php on line 3

Warning: include(http://www.URL.com/snewsMU/snewsMU.php) [function.include]: failed to open stream: no suitable wrapper could be found in /customers/URL.com/URL.com/httpd.www/design1/index.php on line 3

Warning: include() [function.include]: Failed opening 'http://www.URL.com/snewsMU/snewsMU.php' for inclusion (include_path='.:') in /customers/URL.com/URL.com/httpd.www/design1/index.php on line 3

Fatal error: Call to undefined function title() in /customers/URL.com/URL.com/httpd.www/design1/index.php on line 5
I'm not a PHP engeneer so I can only guess what the answer to this problem is but I haven't found it yet :( I don't have server configuration settings for enabeling the function:include option.
Code: [Select]
<!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">
<?php session_start(); include ("http://www.URL.com/snewsMU/snewsMU.php"); ?>
<head>
<?php title(); ?>
I''ve removed the <title="" >string after this part of code.

Guys does anyone of you know what I'm doing wrong? :( please notice: the 2 maps are URL.com/design1/index.php and URL.com/snewsMU/snewsMU.php

cheers.

Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: layout question
« Reply #5 on: March 26, 2008, 05:14:58 pm »

rainb0w -- the session_start string MUST come first in index.php. Like this:
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(); ?>
... etc

Do that and your error messages should disappear. Just make sure there's nothing before <?php session_start ... ?>, no space, no blank line, no characters, nothing.
Logged

rainb0w

  • Newbie
  • *
  • Karma: 0
  • Posts: 10
Re: layout question
« Reply #6 on: March 26, 2008, 05:37:48 pm »

rainb0w -- the session_start string MUST come first in index.php. Like this:
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(); ?>
... etc

Do that and your error messages should disappear. Just make sure there's nothing before <?php session_start ... ?>, no space, no blank line, no characters, nothing.

Yeah I've just tried this but I still got the same error messages :( I've also cut out the whole www.w3.org tags so its now:

Code: [Select]
<?php session_start(); include ("http://www.URL.com/snewsMU/snewsMU.php"); ?>
<head>
<?php title(); ?>
folowed by a large javascript and meta tags...

Thnks for the tryin men I ow you one :)

Logged

rainb0w

  • Newbie
  • *
  • Karma: 0
  • Posts: 10
Re: layout question
« Reply #7 on: March 26, 2008, 07:16:44 pm »

is there a reason why you're using a the full URL for including the snewsMU.php file?

In one of the errors that you've shown it says "/customers/URL.com/URL.com/httpd.www/design1[/color}/index.php"

This suggests that the index.php & snewsMU.php files are in different directories.....is this the case?  Might be your problem here.
yeah thats right but the problem is that snews gots an index.php and my homepage also gots an index.php so they dont fit togheter. The reason I use the fill url is to kill another php error witch was listed on top of the one I gave before. : (
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: layout question
« Reply #8 on: March 26, 2008, 07:28:24 pm »

is there a reason why you're using a the full URL for including the snewsMU.php file?

In one of the errors that you've shown it says "/customers/URL.com/URL.com/httpd.www/design1[/color}/index.php"

This suggests that the index.php & snewsMU.php files are in different directories.....is this the case?  Might be your problem here.
yeah thats right but the problem is that snews gots an index.php and my homepage also gots an index.php so they dont fit togheter. The reason I use the fill url is to kill another php error witch was listed on top of the one I gave before. : (

The "simple" fix would be to try and build your existing index.php content into sNews' index.php, and put the sNews function tags where you want the dynamic bits to appear. You could then scrap your existing index.php and run with the sNews index.php. That's the recommended way of doing things.

I have an alternative solution running on my site where all sections except Blog are hard coded, but all hard coded pages include some sNews bits and pieces. Blog is the actual sNews installation. This alternative solution is a bit complicated to explain with few words though (basically, you have to think like I do... ;)) so it's not for the faint of heart... But if you want to I could try explain how I've done it.

It works very well by the way. Good SEO, lightweight, elegant and all that... ;D
« Last Edit: December 03, 2008, 07:02:34 am by Fred K (agentsmith) »
Logged

rainb0w

  • Newbie
  • *
  • Karma: 0
  • Posts: 10
Re: layout question
« Reply #9 on: March 26, 2008, 09:24:59 pm »

Fred K (agentsmith) you rlly got a beautiful site :| *shocked* nice with the changing banner :)

but back to the case.. I've resolved the errors bij changing the /snews map into /desgin1/snews map so the include function works well now :) however it looks like this eats up my css or something beceause when I use the php code inside my design I indeed see the news post ( lhove :) ) but my coloms are gone and I only see some text and some links centered on the left so that doesnt look very good. When I let the php code out I don't see the post anymore but my design is functional again. However I'm not going to ask you for help for this one beceause I think its far to complicated and you've alrddy done a great job so far bit if somebddy can guess what this could be than that would be welcome to :)

cheers, Rainb0w
« Last Edit: March 26, 2008, 09:28:21 pm by rainb0w »
Logged

Joost

  • Guest
Re: layout question
« Reply #10 on: March 27, 2008, 12:57:51 am »

You probably 'lost' css, because <?php title(); ?> outputs the following html code

<base href="http://localhost/something/" />

This makes the system looking for a css file in a different direction, so you have to change $db['website'] = 'http://localhost/something/' .

Logged

rainb0w

  • Newbie
  • *
  • Karma: 0
  • Posts: 10
Re: layout question
« Reply #11 on: March 27, 2008, 02:42:12 pm »

thanks Joost that was indeed the problem :) well now my design is functional and I see the posts on the main page:)

one little thing :(.. I wanted to create a /database rootmap instead of design1/sNews so I've installed it again and transfaired my design files to my root directory. However now if I try to logon on the snews page I can't login beceause it creates strange linkes like: http://URL.com/database/localhost/database/login/ :|:| I've tried to change the website setting to

 $db['website'] = '';

so I left the localhost/... out but now its like my page before black and wite and all text centered to the left. SNews likes to eat up css?

 
Logged

rainb0w

  • Newbie
  • *
  • Karma: 0
  • Posts: 10
Re: layout question
« Reply #12 on: March 27, 2008, 03:53:43 pm »

well if I change it to http://URL.com/database its again functional and I can acces the snews configuration with the css style and all so that fine.

However this problem exchanges for anaother one beceause now my homepage doesn't have css anymore :\ it seems like a annoying conflict. The way of bakercad results in a nice smooth working snews page but a homepage without css and the option from Joost gives a working csshomepage but the snews page gives wrong links.

Am I the only one with this problem and is it beceause I'm such a noob in php programming or are there more people like me around here? :(

I'm still trying to solve it by logic thinking but seems to fail so far :(
Logged