sNews Forum

Previous sNews versions => sNews 1.4 BETA => sNews 1.4 BETA => Topic started by: George Antoniadis on February 08, 2006, 12:21:46 am

Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: George Antoniadis on February 08, 2006, 12:21:46 am
sNews 1.4 Release Candidate 1

snews 1.4 is mostly ready...
moste bugs have been squashed, some new features have been added and every more have been scheduled for next version!
this is a release candidate. this means that if there are no bugs found in a small timeframe it will be considered stable and released.

This version has been checked and we couldn't find any major bugs etc. but you are MORE than welcome to try! ^_^
That's what this is for...

What's new:
Timezones
You can choose your timezone to match your time with the server's time. There is no need to know what timezone your server is in... If you live in Barbados for example you just enter America/Barbados and everything is done for you.
http://snews.noodles.gr/timezones.html

Language files:
Translators now can just put all the translated variables in a file and then when a user wants to change the language of his/her site can just download the file , place it in the same folder as snews.php and change a variable.
If some variables were not translated the default english ones will be used.

Javascript:
Some basic javascript has been added for helping users make clear SEF urls and also be warned when trying to delete something. (article, comment, category, image).
If a user doesn't like/want javascript s/he can disable it changing one variable.

SEF titles:
When the user tries to post an article or create a category, and s/he writes an wrong SEF url that might cause problems s/he gets warned and the SEF is cleaned.
Also if the user has enabled Javascript has the option to create the sef when adding the article or category.

Login/logout link:
The user has the option to include instead of a login link so when s/he is logged in it will display logout and when s/he is not logged in will display login.
(login/logout will be taken from the language variables)

Comment Word Filter:
You have the option to include a word list file, and enable the word filter.
This way when a user enters any word found in the file the word will be replaced with something you choose.

Don't lose stuff any more: (not much anyway! ;)
If you forget to type a title sef url or something when writing a big article, you don't lose it... you see an error and you keep on typing! ^_^
1
.htaccess fixed:
There should not be any problems with directories/subdomains etc any more...

Security:
Some security issues have been fixed, also users can no longer use XSS scripts to mess with your comments. all javascript will be cleaned from comments and also all cookie/mouse related stuff...

Download:
You can download sNews 1.4 RC1 from here (http://snews.noodles.gr/snews_14_rc1.rar)!
*Again, this is NOT a stable version... (at least we are not 100% sure it is)... Try to crash it, kill it, make it a mess... ;)

MySQL:
Code: [Select]
CREATE TABLE articles (
  id INT PRIMARY KEY AUTO_INCREMENT,
  title VARCHAR(100) DEFAULT NULL,
  seftitle VARCHAR(100) DEFAULT NULL,
  text LONGTEXT,
  textlimit INT(5) NOT NULL DEFAULT '0',
  date DATETIME DEFAULT NULL,
  category INT(8) NOT NULL DEFAULT '0',
  position CHAR(3),
  displaytitle CHAR(3) NOT NULL DEFAULT 'YES',
  displayinfo CHAR(3) NOT NULL DEFAULT 'YES',
  commentable VARCHAR(5) NOT NULL,
  image varchar(30) DEFAULT NULL,
  published INT(3) NOT NULL DEFAULT '1'

);


CREATE TABLE categories (
  id int(8) PRIMARY KEY AUTO_INCREMENT,
  name varchar(40) NOT NULL,
  seftitle VARCHAR(100) DEFAULT NULL,
  description varchar(100) NOT NULL,
  published varchar(4) NOT NULL DEFAULT 'YES'
);


CREATE TABLE comments (
  id INT(11) PRIMARY KEY AUTO_INCREMENT,
  articleid INT(11) DEFAULT '0',
  name varchar(50) DEFAULT '',
  comment TEXT,
  time DATETIME DEFAULT NULL
);
*Thnx sam for reminding me! ^_^

Stuff that will be fixed/added/removed until the stable version:
Some more comments on the code, spelling/grammar check of the default language. Documentation on how to upgrade from 1.3 or 1.4 beta.

How to:
How to make a translation:
Get this file:
http://snews.noodles.gr/snews_english.txt
edit all variables, and then save it as snews_**your language**.php
(all low case please)...
that's it!

Please:
Please DO not post feautre requests, is-this-going-to-be-added, or any non BUG related thingie! ^_^
Let's keep this as clean as possible for the next 24 or so hours when if all goes ok 1.4 will be publicly released! :)

Everyone please try if this works on your servers and stuff and tell us if there are any problems!
If you don't want to try it out you will be able to help in a couple of hours. I'll make 2-3 working copies with different options so you can try them out...

thanx! ;)
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Sam on February 08, 2006, 02:32:51 am
Hi,
What about the SQL Tables?
Should I use this?!:

Code: [Select]
CREATE TABLE articles (
  id INT PRIMARY KEY AUTO_INCREMENT,
  title VARCHAR(100) DEFAULT NULL,
  seftitle VARCHAR(100) DEFAULT NULL,
  text LONGTEXT,
  textlimit INT(5) NOT NULL DEFAULT '0',
  date DATETIME DEFAULT NULL,
  category INT(8) NOT NULL DEFAULT '0',
  position CHAR(3),
  displaytitle CHAR(3) NOT NULL DEFAULT 'YES',
  displayinfo CHAR(3) NOT NULL DEFAULT 'YES',
  commentable VARCHAR(5) NOT NULL,
  image varchar(30) DEFAULT NULL,
  published INT(3) NOT NULL DEFAULT '1'

);


CREATE TABLE categories (
  id int(8) PRIMARY KEY AUTO_INCREMENT,
  name varchar(40) NOT NULL,
  seftitle VARCHAR(100) DEFAULT NULL,
  description varchar(100) NOT NULL,
  published varchar(4) NOT NULL DEFAULT 'YES'
);


CREATE TABLE comments (
  id INT(11) PRIMARY KEY AUTO_INCREMENT,
  articleid INT(11) DEFAULT '0',
  name varchar(50) DEFAULT '',
  comment TEXT,
  time DATETIME DEFAULT NULL
);  
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Jason Kingery on February 08, 2006, 03:03:08 am
im probabbly doing something wrong. But all the links go to a directory. instead of index.php?blah

http://2gng.net
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: George Antoniadis on February 08, 2006, 03:18:41 am
@Sam:
I posted the mysql tnx! ;)

@DENiAL:
This is one of the big changes of 1.4 ... SEF Urls (Search engine firendly)...
You will need an apache server with mod_rewrite...
We still haven't found a way to do this on MS IIS...

Please open a new thread about this so we can help you out since this is just for debuggin...! ^_^
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Jason Kingery on February 08, 2006, 03:26:18 am
Quote from: analyzerx
@Sam:
I posted the mysql tnx! ;)

@DENiAL:
This is one of the big changes of 1.4 ... SEF Urls (Search engine firendly)...
You will need an apache server with mod_rewrite...
We still haven't found a way to do this on MS IIS...

Please open a new thread about this so we can help you out since this is just for debuggin...! ^_^

Yeah I figured that out. But you posted before I could edit my post. Thanks though!
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: bramsyuur on February 08, 2006, 06:35:38 pm
I've created my translation for sNews 1.4RC1 (I've been posting into translations)
And I've put my file into the same directory as sNees and named as: snews_catalan.php but seems not working...
Any suggestions?
Thanks!
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Mario on February 08, 2006, 06:43:42 pm
Quote from: bramsyuur
I've created my translation for sNews 1.4RC1 (I've been posting into translations)
And I've put my file into the same directory as sNees and named as: snews_catalan.php but seems not working...
Any suggestions?
Thanks!

Maybe double translations? There are still some language variables left into the snews.php file: see language variable header and admin language variable header in snews.php.
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: bramsyuur on February 08, 2006, 07:01:18 pm
Solved!!
I've an error inserting the correct name into
Code: [Select]
$s['language'] = " ";I've previosly entered the name of the translated file ex: snews_catalan.php and I've modified by
Code: [Select]
$s['language'] = "catalan";I'm sorry guys!  ;D
Now It's working correct! ;)
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Rehuel Lobato de Mesquita on February 08, 2006, 07:57:14 pm
 :'( Missing the picture resize posibility.

Oh well, I'll have to add it to my snews myself then... :(
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Jochum Meester on February 08, 2006, 09:27:56 pm
Just checked the snews.php file and found a minor glitch:

$l['error_article_title_exists'] = "The article title allready exists. etc etc etc
should be already

I'm a loser for pointing that out :P

Edit: Oh and another thing: in my comments ( http://www.iseeyou-designs.com/projects/snewstest/ used same mySQL table as I did for 1.4beta, dont know if that could cause problems? mysql operations are the same ) promishing gets filtered, probably because there's 'shi+' in the bad_words.txt file.
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: George Antoniadis on February 09, 2006, 07:29:10 am
I suck at spelling! :P

using an 1.4 beta mysql should NOT create problems... ^_^
did anyone found any bugs?
who ever did actually tried it out please say how it worked out... tnx! :)
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: albert on February 09, 2006, 08:20:56 am
Hi all

if you are testing in a directory other than the ROOT you will need to add this:

In your .htaccess file

Code: [Select]
#  Albert say's
#  Uncomment following line RewriteBase # if your webserver's URL
#  is not directly related to physival file paths.
#  Update Your Directory (just / for root) only.

# RewriteBase /test  



this will help a lot

Albert


Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Tjobbe on February 09, 2006, 11:10:40 am
Quote from: albert
Hi all

if you are testing in a directory other than the ROOT you will need to add this:

Code: [Select]
#  Albert say's
#  Uncomment following line if your webserver's URL
#  is not directly related to physival file paths.
#  Update Your Directory (just / for root)

# RewriteBase /test



this will help a lot

Albert

On which page / line / file do we need to add this??
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Luka on February 09, 2006, 11:17:20 am
Quote from: Tjobbe
Hi all

if you are testing in a directory other than the ROOT you will need to add this:

Code: [Select]
#  Albert say's
#  Uncomment following line if your webserver's URL
#  is not directly related to physival file paths.
#  Update Your Directory (just / for root)

# RewriteBase /test
this will help a lot

Albert

On which page / line / file do we need to add this??
In your .htaccess file
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Tjobbe on February 09, 2006, 12:45:47 pm
Thanks Luka  ;)

It looks and feels great, not encountered any problems at all just yet, its fantastic!
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Luka on February 09, 2006, 03:49:12 pm
Hmm, Javascript for SEF causes the page to fails validation...
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Tom Gebauer on February 09, 2006, 10:10:50 pm
After a few hours of editing, my "bad_words.txt" file is now 150 megabytes.
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: George Antoniadis on February 09, 2006, 10:12:09 pm
Quote from: Luka
Hmm, Javascript for SEF causes the page to fails validation...

Shit how did I miss that?
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Luka on February 09, 2006, 10:23:32 pm
Quote from: Tommy-G
After a few hours of editing, my "bad_words.txt" file is now 150 megabytes.

OMG how did you managed that?  ;D
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Luka on February 09, 2006, 10:24:04 pm
Quote from: analyzerx
Hmm, Javascript for SEF causes the page to fails validation...

Shit how did I miss that?
It just needs to load when editing or creating article...
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Jochum Meester on February 10, 2006, 01:42:37 am
Quote from: JM
in my comments ( http://www.iseeyou-designs.com/projects/snewstest/  promishing gets filtered, probably because there's 'shi+' in the bad_words.txt file.

what does that + (plus) mean? Every word that starts with shi gets censored? And could I use **** instead of XXXX or will that mess up the code?
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: George Antoniadis on February 10, 2006, 03:07:33 am
the + is just intead of T! :P

you can use ANYTHING instead of XXXX... you can even put something like:
****

^_^
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: albert on February 10, 2006, 05:07:03 am
Hi Luka

try this:

Code: [Select]
// If javascript is on echos javascript functions under <br />function javascript_headers() {<br /><span style="white-space: pre;"> </span>if_javascript_on('<br /><script type="text/javascript"><br />//<![CDATA[<br />function makesef() {<br />text_from = document.getElementById('article_title');<br />text_to = document.getElementById('article_sef');<br />str = text_from.value;<br />ex = /$|,|@|#|~|`|%|*|^|.|&|(|)|+|=|[|]|[|}|{|;|:|'|"|<|>|?|||\\|!|$|//g;<br />str = str.replace(ex, "");<br />ex = /^s+|s+$/g;<br />str = str.replace(ex, "");<br />ex = /s+/g;<br />str = str.replace(ex, "_");<br />str = str.toLowerCase();<br /><span style="white-space: pre;"> </span><br />text_to.value = str;<br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>};<br />//]]><br /></script>');<br />};<br /></code><br /><strong>valid code:</strong><br /><div class="codeheader">Code: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">[Select]</a></div><code class="bbc_code">//********<br />// LOGIN <br />//********<br />function login() {<br /><span style="white-space: pre;"> </span>if ($_SESSION['Logged_In'] != "True") {<br />    <span style="white-space: pre;"> </span>echo "<h2>Login</h2>";<br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>echo "<form method='post' action='" .s('website'). "'><br />    <span style="white-space: pre;"> </span><p><br />". l(username) .":</p><p><input type='textbox' class='text' name='Username' /></p><br />    <span style="white-space: pre;"> </span><p>". l(password) .":</p><p><input type='password' class='text' name='Password' /></p><br />    <span style="white-space: pre;"> </span><p><input type='hidden' name='Submitted' value='True' /></p><br />    <span style="white-space: pre;"> </span><p><input type='Submit' name='Submit' class='" .s('button'). "' value='". l(login) ."' /></p><br />    <span style="white-space: pre;"> </span></form>";<br /><span style="white-space: pre;"> </span>} else {<br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>echo "<h2>" .l('logged_in'). "</h2>";<br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>echo "<p><a href='". s('website') ."logout/'>". l('logout') ."</a></p>";<br />}}<br /></code><br /><br />this may work for you :)<br /><br /><strong>Plus:</strong><br /><br />and actions in sNews1.4rc I noticed '&' so I CHANGED all mine too <strong>&</strong><br />just incase.<br /><br />Where is the contact link and archives link in the RC???<br /><div class="codeheader">Code: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">[Select]</a></div><code class="bbc_code">?action=archives<br />?action=contact<br />-------------------------------<br /><span style="white-space: pre;"> </span>echo "<li><a href='". s('website'). "?action=archives' title='". l('archives') ."'>". l('archives') ."</a></li>";<br /><span style="white-space: pre;"> </span>echo "<li><a href='". s('website'). "?action=contact' title='". l('contact') ."'>". l('contact') ."</a></li>";<br /><br /></code><br />The index.php for people that do not no the code will need to have direct links to there site.<br />ie the style sheet is just etc here is my index.php<br /><div class="codeheader">Code: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">[Select]</a></div><code class="bbc_code"><? session_start();<br />include ("snews.php"); ?><br /><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><br /><html xmlns="http://www.w3.org/1999/xhtml"><br /><head><br /><span style="white-space: pre;"> </span><meta http-equiv="Content-Type" content="text/html; charset=<? echo s('charset'); ?>" /><br /><span style="white-space: pre;"> </span><meta http-equiv="Content-Language" content="English" /><br /><span style="white-space: pre;"> </span><meta name="Author" content="Solucija.com" /><br /><span style="white-space: pre;"> </span><meta name="Robots" content="index,follow" /><br /><span style="white-space: pre;"> </span><meta name="Description" content="sNews 14rc| Single file CSS and XHTML valid CMS" /><br /><span style="white-space: pre;"> </span><meta name="Keywords" content="snews, simple, cms, css, xhtml, valid" /><br /><span style="white-space: pre;"> </span><? title(); ?><br /><span style="white-space: pre;"> </span><link rel="stylesheet" type="text/css" href="<? echo s('website'); ?>images/style.css" /><br /><span style="white-space: pre;"> </span><link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<? echo s('website'); ?>rss/" /><br /></head><br /><body><br /><span style="white-space: pre;"> </span><div class="content"><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><div class="header"><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><div class="hmenu"><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><? categories(); ?><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span></div><br /><h1><a href="<? echo s('website'); ?>" title="<? echo s('website_title'); ?>"><? echo s('website_title'); ?></a></h1><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span></div><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><div class="left"><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><div class="menu"><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><? menu_items(); ?><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span></div><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><div class="menu"><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><? searchform(); ?><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span></div><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><div class="left_article"><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><? left(); ?><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span></div><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><h2>New articles:</h2><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><? new_articles(3); ?><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><br /><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><h2>Past articles:</h2><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><? past_articles(4,3); ?><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span></div><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><div class="center"><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><? center(14); ?><span style="white-space: pre;"> </span><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span></div><br /><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><div class="footer"><br />  <span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><div class="right"><br /><p>Powered by <a href="http://snews.solucija.com" title="Single file CSS and XHTML valid CMS">sNews</a></p><span style="white-space: pre;"> </span><br /><p>© Copyright 2006 <br /><a href="<? echo s('website'); ?>" title="<? echo s('website_title'); ?>"><? echo s('website_title'); ?></a>, <br />All rights reserved <br /><img src='<? echo s('website'); ?>images/arrow.gif' alt='' /> <? login_link(); ?></p><br />    <span style="white-space: pre;"> </span><span style="white-space: pre;"> </span></div><br /><p><a href="<? echo s('website'); ?>rss/">RSS Feed</a></p><br /><p><a href="http://jigsaw.w3.org/css-validator/check/referer" title="Validate CSS">CSS</a> and <br /><a href="http://validator.w3.org/check/referer" title="Validate XHTML">XHTML</a></p><br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span></div><br /><span style="white-space: pre;"> </span></div><br /></body><br /></html><br /></code><br />any way goog job luka and analyzerx and a big thank you..<br /><br />Albert<br /><br /><div class="quoteheader"><div class="topslice_quote">Quote from: Luka</div></div><blockquote class="bbc_standard_quote">Hmm, Javascript for SEF causes the page to fails validation...<br /></blockquote><div class="quotefooter"><div class="botslice_quote"></div></div> </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>Patric Ahlqvist</strong> on <strong>February 10, 2006, 01:13:39 pm</strong> </dt> <dd class="postbody"> Can't download. Get that the files are currupted...:(<br /><br />EDIT-> I mean I CAN download it, but when trying to open it...the files are corrupted - Will try at home later aswell. </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>Jochum Meester</strong> on <strong>February 10, 2006, 06:02:18 pm</strong> </dt> <dd class="postbody"> <div class="quoteheader"><div class="topslice_quote">Quote from: analyzerx</div></div><blockquote class="bbc_standard_quote">the + is just intead of T! :P</blockquote><div class="quotefooter"><div class="botslice_quote"></div></div><br />lol yeah i thought it would be that, some kind of 733t talk or whatever hehe...<br />but in my case it's censoring shi (so without the +) too, i'll just remove shi+ from bad_words.txt </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>Patric Ahlqvist</strong> on <strong>February 10, 2006, 07:33:41 pm</strong> </dt> <dd class="postbody"> Aaaaaaaaaaand now it worked...My 'puter must be "intercoursed up" at work ;)... Or it's the freakin' wall of fire that haunts me everytime I wanna have some fun :)<br /><br />I run the /patric_6 on RC1 now... It seems great, will go at it some during the weekend to see if it complies to my liking ;) </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>bryn</strong> on <strong>February 10, 2006, 08:53:31 pm</strong> </dt> <dd class="postbody"> ok..had minimal time to play today but noticed/suggest a few things:<br /><br /><strong>1)</strong> If you enter a title that includes an apostrophe [read..that's for instance] and then use the Javascript SEF function..it doesn't add the apostrophe and just writes dont..seems it is stripping that out..can't test other language specific types..does it do it for those also?<br /><br /><strong>2)</strong> In the default download..In New Articles and Past Articles..could we substitute the paragraph tags with a list instead..or have the option to without having to edit snews.php?<br /><br /><strong>3)</strong> Can we add a default alt text to the images just in case users forget to do this?<br /><br /><strong>4)</strong> I made a category 'test' and also a new folder under my snews folder called 'test'..posted an article to the test category, and it appears under New Articles just fine, click on it it takes me correctly to the article, but, if I click on the 'test' category..it takes me instead to the index.html file I have placed in the 'test' folder..not the correct article..so<br /><br />Am I correct in thinking that the problem we had with the .htaccess file and duplicate folder/category names hasn't been fixed yet? or is my setup defunked and I need a fresh install? can anyone replicate this please? localhost against server?<br /><br />that's it for now but will continue to play and test this weekend..<em><strong>good job though 'a' and Luka</strong></em>..is looking good so far..thanks ;D </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>bryn</strong> on <strong>February 10, 2006, 09:09:14 pm</strong> </dt> <dd class="postbody"> ok..you might hate me for this but here's another useless suggestion..maybe?<br /><br />Scenario:<br /><br />I want to add a link to my menu, but I want it to point not to an article or category, but an external folder or page..I could of course hard code the link in my template, but I want it to appear in a certain place within the menu itself..not above or below it.<br /><br />If I had the option to 'order' my menu links, not just ASC or DESC, but 'any' order I like..that would be a godsend if I had a lot of links to display..I click an arrow for instance in Admin, my link goes up or down a line..etc.<br /><br />I know this is a bit advanced from what we have..and a feature of some other cms's, but just a thought in case you coder guys or other users here might think it dooable and useful ;D </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>Jochum Meester</strong> on <strong>February 10, 2006, 10:55:22 pm</strong> </dt> <dd class="postbody"> <div class="quoteheader"><div class="topslice_quote">Quote from: bryn</div></div><blockquote class="bbc_standard_quote"><strong>4)</strong> I made a category 'test' and also a new folder under my snews folder called 'test'..posted an article to the test category, and it appears under New Articles just fine, click on it it takes me correctly to the article, but, if I click on the 'test' category..it takes me instead to the index.html file I have placed in the 'test' folder..not the correct article..so<br /><br />Am I correct in thinking that the problem we had with the .htaccess file and duplicate folder/category names hasn't been fixed yet? or is my setup defunked and I need a fresh install? can anyone replicate this please? localhost against server?</blockquote><div class="quotefooter"><div class="botslice_quote"></div></div><br />had something similar this week </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>Andreas</strong> on <strong>February 10, 2006, 11:23:50 pm</strong> </dt> <dd class="postbody"> Ok, time for some heavy testing! Have the details and errors already mentioned here been fixed in the rc1 download version? </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>George Antoniadis</strong> on <strong>February 11, 2006, 08:02:39 am</strong> </dt> <dd class="postbody"> thanx bryn and JM... ^_^<br /><br />bryn about the apostrofe thing... apostrofes are not very well accepted url characters...<br />many apache versions and/or configurations get messy with characters like that...<br />so it's best practice to remove them from SEF urls...<br /><br />if you are worried about search engines not understanding them,, don't...<br />in most dont and don't is the same... (don`t also...) and stuff like that...<br /><br />about the rest you guys said I'll check them today and get back to you! ^_^ </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>bryn</strong> on <strong>February 11, 2006, 09:38:36 am</strong> </dt> <dd class="postbody"> that's true 'a'..I mentioned it merely in case there was a solution, and as a reference in case anybody else came across the same thing..I agree with you totally from an SEO point of view, but the question arises as to whether it is grammatically correct..it does also strip out the question mark if my title were a question for example ;)<br /><br />no biggie though..<br /><br />I personally don't need the javascript SEF function as I would prefer to manually edit both titles anyway to add more/different keywords..but an option to turn this off altogether would be handier I think ;D </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>albert</strong> on <strong>February 11, 2006, 09:54:49 am</strong> </dt> <dd class="postbody"> Hi Bryn<br /><br />I had the same thing wth adding a new cat, I dd not thnk it was a bug !!<br /><br />I thght you had to add txt to that cat 1st page then add pages after that. "silly me!!!"<br /><br />Albert<br /><br /> </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>bryn</strong> on <strong>February 11, 2006, 10:01:51 am</strong> </dt> <dd class="postbody"> Hi Albert..sorry I was modifying my post above..yes it does the same for new Cats too..it's not really a problem as it displays on the page correctly ;D </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>bryn</strong> on <strong>February 11, 2006, 10:50:08 am</strong> </dt> <dd class="postbody"> another possible bug..<br /><br />Go to archives page => select article => hit back button => should return to archives and not the home page? </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>Jochum Meester</strong> on <strong>February 11, 2006, 11:14:29 am</strong> </dt> <dd class="postbody"> Perhaps it could be changed into javascript:history.goback(-1)  ??<br />(is that the correct script to go back? i'm not the js expert here hehe) </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>bryn</strong> on <strong>February 11, 2006, 11:27:01 am</strong> </dt> <dd class="postbody"> it could use the javascript history yes..but I wonder if there is a way to do this better with the php code? :) </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>Patric Ahlqvist</strong> on <strong>February 11, 2006, 11:51:22 am</strong> </dt> <dd class="postbody"> <strong>JM</strong> - it should be "javascript:history.go (-1)". Not "goback" the back thingy you take care of by the - character...<br /><br /><strong>Brynnie</strong> - Don't steal all my bugreporting's ;)<br /><br />P </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>George Antoniadis</strong> on <strong>February 11, 2006, 12:32:40 pm</strong> </dt> <dd class="postbody"> about the history no javascript history suxxx big time...<br />back thingie cannot the done another other way because it doesn't go just back... back would be the posting/editing form...<br /><br />it could be a session variable with referrer history but really no reason for it... </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>bryn</strong> on <strong>February 11, 2006, 02:07:25 pm</strong> </dt> <dd class="postbody"> sorry being a bit dumb this morning 'a'..[trying to do ten things at once as usual]..so are you saying that this can't be done, and every time you want to view an article from the archives..you have to return to the home page first..if so thats not good  :-<br /><br />might have to consider hardcoding a link next to it then maybe?<br /><br />@ Patric: sorry mate..great minds think alike as they say ;D </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>Patric Ahlqvist</strong> on <strong>February 11, 2006, 07:40:42 pm</strong> </dt> <dd class="postbody"> @bryn ;)...just kidding.<br /><br />@everybody - RSS feed. Ok So I must be dumb...Hear me out. The rss.xml should be generated when pressing the link for the first time, eh ? So why don' it at my page ? I haven't changed anything vital in the snews.php...just some minor img tags and p tags nothing else...The rss limit is as it was. havn't touched anything else, but I can't get the damn thing to work...And you prolly will tell me that your's do, right ? ;)...RSS = Radical Suck Sucking, as far as I'm concerned right now...I will chew the RSS feature up and spit it out my arse....*somewhat irritated*<br /><br />Ok, so I'm a bit more calm now...Could someone please help me, I'll post my RSS feed function here aswell as the links to it and the header tags:<br /><br /><div class="codeheader">Code: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">[Select]</a></div><code class="bbc_code">Headertag: <br /><link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss/" /><br /><br />Footer link:<br /><a href="http://p-ahlqvist.com/sNews/patric_6/rss.xml">RSS Feed</a><br /><br />sNews.php RSS settings:<br />$s['rss_limit'] = "5"; // Limit RSS feed to a number of articles<br />$s['rss_date_format'] = "l dS of F Y h:i:s A"; // RSS date format (DATE_RFC822)<br /><br />sNews.php //RSS feed:<br />// RSS FEED<br />function rss() {<br /><span style="white-space: pre;"> </span>$limit = s('rss_limit');<br /><span style="white-space: pre;"> </span>$query = "SELECT * FROM articles WHERE position = 1 ORDER BY date DESC LIMIT 0, $limit"; <br /><span style="white-space: pre;"> </span>$result = mysql_query($query);<br /><span style="white-space: pre;"> </span>$filename = "rss.xml";<br /><span style="white-space: pre;"> </span>$header = "<?xml version="1.0" ?>";<br /><span style="white-space: pre;"> </span>$header .= "<rss version="2.0">";<br /><span style="white-space: pre;"> </span>$header .= "<channel>";<br /><span style="white-space: pre;"> </span>$header .= "<title>" .s('website_title'). "";
$header .= "" .s('website_title'). "";
$header .= "" .s('website'). "";
$header .= "Copyright " .s('website_title'). "";
$footer = "";
$footer .= "";
$fh = fopen($filename, "w+");
fwrite($fh, $header);
while ($r = mysql_fetch_assoc($result)){
$date = date(s('rss_date_format'), strtotime($r['date']));
    $pattern="'<[/!]*?[^<>]*?>'si";
    $replace="";
    $description = preg_replace($pattern, $replace, stripslashes($r['text']));
    $item  ="";
    $item .= "". $r['title'] ."";
    $item .= "". $description ."";
    $item .= "". $date ."";
    $item .= "". s(website) . find_cat_sef($r['category']). "/" .$r['seftitle']. "/";
    $item .= "
";
    fwrite($fh, $item);
  }
fwrite($fh, $footer);
fclose($fh);
echo "";
}




Page : http://p-ahlqvist.com/sNews/patric_6/

Phu' leeeeeeeeeeeeeeease ;)
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Jochum Meester on February 11, 2006, 08:38:43 pm
Doesn't work for me either, only thing I haven't tried is chmodding the root map to 777 (which sounds not right to me btw) but I've just added my own empty rss.xml file.
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Patric Ahlqvist on February 11, 2006, 08:42:18 pm
Yea, I've added an empty one aswell...didn't work, I get redirected to my 404 page. I have also deleted the rss.xml in order for sNews to "make" a new one...I have copied from another folder and changed the URL's and stuff, but I can not get it to work...

AAAAAAAANAL? D'you'rs work ;)
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Patric Ahlqvist on February 11, 2006, 08:55:00 pm
Oh, I might add that I haven't found anything else (other than stated by me and others) so far in my spanking of the script ;)...

Seems almost...knock on wood...done soon :)

Having a cupla beers tonight, Luka ? You're well worth it, pal. Have one for me and say hello to the croatian ladies for me, will you, hehe...Raurrrgh, wink, wink ;)
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: bryn on February 11, 2006, 09:13:11 pm
just to let you guys know..I'm also having problems..it worked at first, I changed a few small things but nothing that should have affected the rss..deleted the xml and had it create a new one..installed a new one myself..etc etc.

hardcoding the rss/ link didnt do the trick, and the only way I got anything to show was to add the full path to rss.xml..but it's quirky..I gave up for a while to concentrate on other things

me think that maybe it's to do with the .htaccess file somewheres..no other problems other than those I've already reported ;D
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Patric Ahlqvist on February 11, 2006, 09:35:33 pm
Hehe...just noticed what I wrote ealier:
Quote
I will chew the RSS feature up and spit it out my arse....*

I think that was funny :)...That last word should be pronounced in Irish, if you wonder :)

I'm much calmer now, as I know that upon the return of the PHP-guru's of this forum this will be solved. The crack in the arse (;)) here is that I can't fix it myself. That bothers me...Being dependent on other's for everything codewise is like a booger (that green stuff from the nose) slipping into one's mouth without having anything to say about it, hehe...

Ok, always complaining about having to much coffe to drink as an excuse for my ramblings, I now accelerate into blaiming beer...This is not me, but the beer talking ;)..

Patric.
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: bryn on February 11, 2006, 10:05:08 pm
 ;D sure sounds like your having a good night there Patric..I'm stuck on tea and chocolate..driving tomorrow so no booze for this bad boy

have a good time mate ;)
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Patric Ahlqvist on February 11, 2006, 10:18:10 pm
You too, brynnie ;)... Tea and chocolate ? Mhmm, kind of mysterious blend don't you say ? I have a tendency to mix beer and tequila tonight....





Nope, that's a big fat "no-truth" ;) I've just had a cupla lager's while designing a tad...Have a safe drive, bryn and a fun one aswell.

Over and out - P
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Patric Ahlqvist on February 12, 2006, 12:23:37 pm
Ok...First post of today guys...feeling goooooooooood ;).

I have the RSS feature before my eye's yet again. I went over to solucija.com and checked that RSS feed in my "Owl", that don't work either. Is solucija running RC ? I think we have to do something 'bout this darn RSS feed thingy.

Ok, I say "we", but what can I do, but sitting here looking sweet ;)... Nada, nothing, njetski, ingenting. I'm kind of relying on you guy's...Sorry, I can't help :(
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Mario on February 12, 2006, 03:25:27 pm
Quote from: Patric
@bryn ;)...just kidding.

@everybody - RSS feed. Ok So I must be dumb...Hear me out. The rss.xml should be generated when pressing the link for the first time, eh ?

I went to your site yesterday and clicked the rss link on the bottom of your page and I got an 404 error. I saw that the link points to rss.xml ... after that I went to the rss/ dir on your site - after which the rss.xml was generated by the script and the 404 error on rss.xml disappearred. Hope this helps.
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: bryn on February 12, 2006, 04:03:41 pm
this is very frustrating  ???

Patric could you try changing your rss link to index.php?action=rss please? just to see what happens?
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Patric Ahlqvist on February 12, 2006, 04:36:22 pm
yupp, Mario...I've now got an XML...But it does only contain:
Code: [Select]




P-ahlqvist.com
P-ahlqvist.com
http://p-ahlqvist.com/sNews/patric_6/
Copyright P-ahlqvist.com


Nothing else, and never has done. I tried out someother RSS code from the mods section on an earlier version and made it work. But that don'r work with RC since it's SEF's and all that...

@Gareth. Did it, and noooope, no difference at all, the same actually.
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: bryn on February 12, 2006, 04:58:29 pm
ok I have my rss working now..but not sure why it does..it just does ;D

I changed to this line in my .htaccess file

Code: [Select]
RewriteRule ^rss/$ index.php?action=rss [L,QSA]

had this link in my index.php file

Code: [Select]
rss/

hit the link..refreshed my Firefox browser [CTRL+F5]..and zap there it was!

but this is a localhost test so not actually tested this live yet..try it and give me feedback please guys ok?
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Patric Ahlqvist on February 12, 2006, 05:02:58 pm
Ok even I have reach some higher grounds here, hehe...not knowing a thing what I'm doing but hey...something is done and it shows...I do, howener miss links in the RSS reader...

My global settings code:
Code: [Select]
$s['RSS_description'] = "The p-ahlqvist.com news feed"; // RSS: Brief description for RSS feed
$s['RSS_language'] = "en-us"; // RSS: Language of RSS Feed
$s['RSS_char_encoding'] = "ISO-8859-15"; // RSS Character encoding for feed (default ISO-8859-15)
$s['RSS_ttl'] = "480"; // RSS: Time-To-Live (recommended refresh interval for readers, minutes)
$s['RSS_date_format'] = "r"; // Date and time format for RSS (PHP syntax, eg. "Y-m-d H:i:s")
$s['RSS_no_of_items'] = "10"; // Number of articles in RSS feed
$s['rss_limit'] = "5"; // Limit RSS feed to a number of articles
//$s['rss_date_format'] = "l dS of F Y h:i:s A"; // RSS date format (DATE_RFC822)

And the RSS function:

Code: [Select]
function rss()
{
   $db = mysql_connect(s('dbhost'),s('dbuname'),s('dbpass'));
   mysql_select_db(s('dbname')) or die(s('dberror'));
   $query = "SELECT * FROM " .s('prefix'). "articles WHERE position = 1 ORDER BY date DESC LIMIT 0 , " . s(RSS_no_of_items);
   $result = mysql_query($query);
   $filename = "rss.xml";

   $header = "n";
   $header .= "";
   $header .= "";
   $header .= "" . s(website_title) . "";
   $header .= "http://" . s(website) . "/";
   $header .= "" . s(RSS_description) . "";
   $header .= "" . s(RSS_language) . "";
   $header .= "" . s(RSS_ttl) . "";

   $footer = "
";
   $footer .= "
";

   $items  = "";
   while ($r = mysql_fetch_assoc($result))
   {
      $patterns[0] = "/&/";
      $patterns[1] = "/      $patterns[2] = "/>/";

      $replacements[0] = "&";
      $replacements[1] = "<";
      $replacements[2] = ">";

      $description = preg_replace($patterns, $replacements, stripslashes($r['text']));

      $date = date(s('RSS_date_format'), strtotime($r['date']));

      $items .= "";
      $items .= "". $r['title'] ."";
      $items .= "". $date ."";
      $items .= "". $description ."";
 $item .= "". s(website) . find_cat_sef($r['category']). "/" .$r['seftitle']. "/";
      $items .= "
";
      }

   $theFullFeed = $header . $items . $footer;
   $fh = fopen($filename, "w+");
      fwrite($fh, $theFullFeed);
   fclose($fh);

   echo "";
}

Could somebody see what is missing here to make the links to the actual article show up in the RSS reader. that is the only thing I seem to miss...

Patric.
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Patric Ahlqvist on February 12, 2006, 05:11:15 pm
PS. this isn't me by the way...like someone would think that, hehe...This is clcs's code from the mods section, that I have tampered with in some place...Can't hardly remember where ;)...

Just thought I would state that if it wasn't obvious.
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: bryn on February 12, 2006, 06:21:11 pm
Hey Patric I see you got your rss working too..except for the links going nowhere..I wonder did you manage to try my solution above..or anyone else for that matter? ;D
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Patric Ahlqvist on February 12, 2006, 06:50:59 pm
Nope, as I posted I did it another way, but since the links aren't working I'll try yours instead ;)
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Patric Ahlqvist on February 12, 2006, 07:11:54 pm
Ok, tried it your way, garrrr'. Didn't do nothing for me. I get the xml file, but nichts in it...As it has been for some time now. My way atleast gave me som news in that F***ing rss reader...I'm going bananas here ;).
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: bryn on February 12, 2006, 07:39:21 pm
ggggrrrrr..sorry then mate I'm stuck and don't know what the problem is for you..I will be trying an online version later tonight..so I'll see if I can replicate the problem and find some kind of solution  :rolleyes:
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: albert on February 12, 2006, 07:39:45 pm
Hi Patric

link to web site with link please ?

On my site rss feed works ok sNews1.4rc
Note: did you see my stuff on the index.php file for sNews1.4rc ?

have you seen this with rss feed:
Code: [Select]

Support
[include]xxx.php[/include]
Sunday 12th of February 2006 09:52:35 AM


i have also added this: rss feed " .s('rss_order'). "  asc desc
Code: [Select]

$query = "SELECT * FROM articles WHERE position = 1 ORDER BY date " .s('rss_order'). " LIMIT 0, $limit";

contect:
Quote
$l['contact_text_message'] = "Please complete the form below to contact us. We welcome any questions or feedback and are happy to help should you experience any difficulties. We will get back to you as soon as possible.";

Quote
// CONTACT
function contact() {
if ($_POST['contactform'] == "") {?>
   




contact headers need to be added for apachi


Albert
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: bryn on February 12, 2006, 07:44:26 pm
Hi Albert..

if you have a solution for this any chance you could post your code please mate? and reference what you mean by your index.php code?

it'll be really helpful in case anybody else is having this problem also rather than keep posting here..if solved I will move the code into a new thread under code snippets

cheers ;D
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: albert on February 12, 2006, 07:48:40 pm
Hi Bryan

I am drinking  james bond at the moment :) so bare with me....

albert
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: bryn on February 12, 2006, 08:04:09 pm
 ;D ;D ;D Albert

Ok I found your post so I'll post it again here just for Patric'o'Buddy'o'Pal

Code: [Select]
include ("snews.php"); ?>






























New articles:





Past articles:














with all your other suggestions on validating code..we should really get an updated index.php and snews.php file posted to make it easier for people to solve any further problems..I'll see if I can't get it all together tonight..thanks Albert..enjoy ;D
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Jochum Meester on February 12, 2006, 08:13:40 pm
Not sure if there have been some (major) important changes in the code/package, but would it be possible to upload the most recent RC and mention this in the first post of this thread?
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Jochum Meester on February 13, 2006, 01:29:57 am
My RSS solucija:

- manually add a rss.xml file
- chmod it to read+write
- add this (i will copy this into every new snews template i make, i think its handy):
Code: [Select]
'; ?>
'; ?>

Is this called 'hard-coding'? Directly link it to the xml file? Or is that something else?
Also: I think I only need one echo for that but don't know how to break the line in PHP, can I just click enter and type the next line of code? Or do I have to use /n or something like that (read it somewhere)

Now the reason I created those two lines are:
1) Stylesheet: instead of writing the link to the stylesheet yourself you can copy the ('website') bit and it'll look for the variable in snews.php
2) RSS: when that line was still directing to /rss/ Mozilla wasn't able to pick up the RSS feed. After I've changed it into the above code, it does.


PS You might want to know what my footer looks like:
Code: [Select]

Copyright © 2005 ". s('website_title_short') .""; ?>, All rights reserved ". l('rss_feed') .""; ?> Powered by sNews
                                if (isset($_SESSION['Logged_In'])) {
                         echo ''.l('logout').'';
                         } else {
                         echo ''.l('login').'';
                } ?>
               

I've added an extra variable called 'website_title_short', so when you have a long website title you can have a short one in your footer and not the long one.

PS2: still need to get rid of those separator.gifs :)

The above can be seen at
iseeyou-designs.com/2006_01/
edit: something wrong with server, might be reset to older state
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: albert on February 13, 2006, 06:05:29 am
Hi

I have also added to my RC1 this to the comments:

Code: [Select]




(required)




Email (required but not published)











new code being add your email address.

Albert
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Patric Ahlqvist on February 13, 2006, 08:03:57 am
@Abe

The link is http://p-ahlqvist.com/sNews/ and http://p-ahlqvist.com/sNews/patric_6

I've missed out on the things you note here. And I must admit to not entirly understand you post.

Where should all this go ?

No 1
Code: [Select]

Support
[include]xxx.php[/include]
Sunday 12th of February 2006 09:52:35 AM


No 2
Code: [Select]
I have also added this: rss feed " .s('rss_order'). "  asc desc

Code:
$query = "SELECT * FROM articles WHERE position = 1 ORDER BY date " .s('rss_order'). " LIMIT 0, $limit";

No 3
Code: [Select]
conect:
$l['contact_text_message'] = "Please complete the form below to contact us. We welcome any questions or feedback and are happy to help should you experience any difficulties. We will get back to you as soon as possible.";


Code: [Select]
// CONTACT
function contact() {
if ($_POST['contactform'] == "") {?>
   




Could you please instruct me as if I where a real numbnuts ?

Patric.
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Patric Ahlqvist on February 13, 2006, 09:15:01 am
Hey Mr Wilson, welcome to the forum.

One essential thing that we do need to know before answering your question (possibly wrong) is what version you're using. Have you donwloaded ver 1.3 from the solucija.com or some testversion from this forum ??

Patric.


EDIT --> If RC 1 have you uploaded .htaccess to the same folder as snews is located ? That is a must for the navigatino to work in RC 1.
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Vitor M. Costa on February 13, 2006, 10:36:23 am
Hi!!! you must edit this variable in snews to reflecft the place where you installed the script.

$s['website'] = "http://www.ps3bundles.com/snews/"; // Website url with the trailing slash

I think that you missed that :)

because when you it login, you are redirected to  http://www.ps3bundles.com/login/ and should be http://www.ps3bundles.com/snews/login/
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Vitor M. Costa on February 13, 2006, 01:15:42 pm
Yes! i think you can, see this topic http://solucija.com/forum/index.php?topic=129.0 analyzerx made a mod for this.
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: albert on February 13, 2006, 02:09:51 pm
Hi

is this is a bug still in RC1.4:

http://www.solucija.com/home/css-templates/ = OK

http://www.solucija.com/home/css-templates  = ??

rc1.4 .htaccess
Quote
#  sNews v1.4rc  07-feb-2006
#  Copyright(c) 2005, Solucija - All rights reserved


   php_value session.use_trans_sid 0


RewriteEngine On
RewriteRule ^categories/$ index.php?category=categories [L,QSA]
RewriteRule ^contact/$ index.php?category=contact [L,QSA]
RewriteRule ^images/$ index.php?category=images [L,QSA]
RewriteRule ^login/$ index.php?category=login [L,QSA]
RewriteRule ^logout/$ index.php?category=logout [L,QSA]
RewriteRule ^new/$ index.php?category=new [L,QSA]
RewriteRule ^rss/$ index.php?category=rss [L,QSA]
RewriteRule ^search/$ index.php?category=search [L,QSA]
RewriteRule ^unpublished/$ index.php?category=unpublished [L,QSA]

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*) $1 [L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ index.php?category=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z_]+)/([^/]+)/ index.php?category=$1&title=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z_]+)/([^/]+)/([^/]+)/ index.php?category=$1&title=$2&commentspage=$3 [L]

#  Uncomment following line if your webserver's URL
#  is not directly related to physival file paths.
#  Update Your Directory (just / for root)

Albert

Albert
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Luka on February 13, 2006, 02:16:57 pm
Quote from: albert
Hi

is this is a bug still in RC1.4:

http://www.solucija.com/home/css-templates/ = OK

http://www.solucija.com/home/css-templates  = ??

rc1.4 .htaccess


Yeah, there's still a bug in htaccess, I'll work on that today to see how to fix the '/' dependency.
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: George Antoniadis on February 13, 2006, 04:03:35 pm
I'm rlly sorry I had to go out of town unexpectanly... really sorry! :(
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Luka on February 13, 2006, 04:06:31 pm
Quote from: analyzerx
I'm rlly sorry I had to go out of town unexpectanly... really sorry! :(

Hehe don't be sorry.. there's no rush  ;D
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: albert on February 13, 2006, 04:20:40 pm
Hi

I noticed this with Categories.
You have to have an article on a Categorie ie the 1st page of the Categorie.
But you not get the title page on the headers. Only when you clck the

title of the page is when you get a
title link on the headers.

Code: [Select]
Categorie = webdesgn
link= http://solucija.com/webdesgn/
sNews 1.4rc

made by a second click on the

tag.
Code: [Select]
Categorie = webdesgn
link= http://solucija.com/home/webdesgn/
sNews 1.4rc >> webdesgn

for ceo the top one will be the one that gets listed.

Albert

Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: bryn on February 13, 2006, 07:25:57 pm
Quote from: CWilson
I am very new to this script. I have been knowing about it but never tried it out. Well I am going to try it out now but I have no login page!!

http://ps3bundles.com/snews/

Where am I suppose to get the login page from? It didn't come in the zip folder or anything. I started fresh with the 1.4 RC1, I didn't upgrade or anything. Do I need to install the stable version and then upgrade in order to have the login page or what?

Hi CWilson..welcome to sNews and the forum ;)

To answer some of your questions..

I see you have started afresh with rc1..therefore you will have had the default index.php in the package, as well as some other files..if you have installed sNews correctly according to the instructions and amended your snews.php file to suit your site/test server..then you should be able to load it in your browser..and you will find the link to the login page at the bottom right of the template in the footer..it says login

[Edit] I see you've found it..great!! ;)

assuming you havn't changed these in snews.php..enter 'test', [tab key], 'test', [tab key],enter, and you will see your administration links/options at the top left of the page in a menu like structure.

Secondly, you made a comment about uploading your files via FTP..I don't know which program you use, but most of them will not allow you to 'see' the .htaccess file as you can the other files..if you have a control panel, you can verify/modify its contents using that. It will most likely be there..just not visible to you via FTP.

As stated earlier there is a mod by analyzerx that can handle multiple users..but I havn't personally tested this on rc1 to see if it works..can anybody who has done this throw some light on whether it does or not please?

hope this helps you some..good luck with sNews and again welcome to our little friendly forum ;D
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: bryn on February 13, 2006, 07:30:43 pm
Quote from: albert
Hi

I noticed this with Categories.
You have to have an article on a Categorie ie the 1st page of the Categorie.
But you not get the title page on the headers. Only when you clck the

title of the page is when you get a
title link on the headers.

Code: [Select]
Categorie = webdesgn
link= http://solucija.com/webdesgn/
sNews 1.4rc

made by a second click on the

tag.
Code: [Select]
Categorie = webdesgn
link= http://solucija.com/home/webdesgn/
sNews 1.4rc >> webdesgn

for ceo the top one will be the one that gets listed.

Albert


Albert..have you worked or are working on anything related to your code for page specific content, which could supply further satisfactory SEO features..titles, meta-tags etc. I've thought of having a crack at that myself but other issues have left me with little time so far..any news/thoughts on this? ;D
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Rehuel Lobato de Mesquita on February 14, 2006, 12:17:19 am
I am going to try to "re-hack" the snews code, using the information I found and posted in http://solucija.com/forum/index.php?topic=292.msg3492#msg3492

If this would work, it would rule out all problems with .htaccess
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: bryn on February 14, 2006, 12:23:35 am
Quote from: Stretsh
I am going to try to "re-hack" the snews code, using the information I found and posted in http://solucija.com/forum/index.php?topic=292.msg3492#msg3492

If this would work, it would rule out all problems with .htaccess
that would be an interesting development if you get it working Stretsh..let us know how you get on ok ;D
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: bryn on February 14, 2006, 12:25:57 am
Quote from: macka.2.0
Hi New here and I'm currently running 1.3

Will this release be easy to upgrade to, from 1.3?

And...is it safe to do so?


Thank you!
nice job analyzerx!
and.. bump to this... :)
not sure if an upgrade script will be produced or not macka..but I seem to think it was mentioned somewhere here :) you really need Luka or Analyzerx to answer this.
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Patric Ahlqvist on February 16, 2006, 08:13:26 am
Ok still have a problem I posted about...dunno where though so I'll post it once more here...

Ihave now RC1 running, and it validates but thiss occurs, I believe it's the javascript thingy that does it:
Quote
Warning Line 16 column 35: character "&" is the first character of a delimiter but occurred as data.
ex = /$|,|@|#|~|`|%|*|^|.|&|(|)|+|=|[|]|[|}|{|;|:|'|"|<|>
This message may appear in several cases:

You tried to include the "<" character in your page: you should escape it as "<"
You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&", which is always safe.
Another possibility is that you forgot to close quotes in a previous tag.

Warning Line 16 column 76: character "<" is the first character of a delimiter but occurred as data.
...&|(|)|+|=|[|]|[|}|{|;|:|'|"|<|>|?|||\|!|$|//g;


This li'l flaw makes the CSS not validate:
Quote
Please, validate your XML document first!
Line 16
Column 37
The entity name must immediately follow the '&' in the entity reference.

Is it just analyzerx who can fix this ??
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: Patric Ahlqvist on February 16, 2006, 09:44:37 am
Yeay, thanks Abe through pawe ;)...

That first snippet, plus the fact that I changed the & to &
made the difference, now it validates both XHTML and CSS. Great, thanks pawe for showing it to me, and Abe for posting it.

Lucky once more ;)
Title: sNews 1.4 RC1 (Release Candidate 1)
Post by: albert on February 16, 2006, 12:26:53 pm
Yah Albert's the man .....

xhtml css just validate me:)

patrc just saw this http://p-ahlqvist.com/sNews/patric_8/
very good where are the side links for it?

sNEWS 1.4 RC seems to be fine on my demo web site so I wll launch this week.

Demo site:
http://www.360webdesign.co.uk/

Just befor the header I would like to add this code for </strong><br /><br />code:<br /><div class="codeheader">Code: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">[Select]</a></div><code class="bbc_code"><?php<br /><br />$title_links = $_SERVER['REQUEST_URI'];<br />$title_links = str_replace('/', ' ', $title_links);<br />$title_links = str_replace('_', ' ', $title_links);<br />$title_links = str_replace('home', '', $title_links);<br />$title_links = str_replace('snews14', '', $title_links);<br /><br />$title_links = str_replace('?action=contact', 'contact', $title_links);<br />$title_links = str_replace('index.php?action=contact', 'contact', $title_links);<br />$title_links = str_replace('?action=archives', 'Site Map', $title_links);<br /><br />echo $title_links;<br /><br />?><br /></code><br /> have to add this as when you click on a cat like <strong>Company</strong> you get no meta title.<br /><br />Need to also look at a sit map for the site as well..<br /><br />Albert<br /><br /><div class="quoteheader"><div class="topslice_quote">Quote from: Patric</div></div><blockquote class="bbc_standard_quote">Yeay, thanks Abe through pawe ;)...<br /><br />That first snippet, plus the fact that I changed the <strong>&</strong> to <strong>&<br /></strong> made the difference, now it validates both XHTML and CSS. Great, thanks pawe for showing it to me, and Abe for posting it.<br /><br />Lucky once more ;)<br /></blockquote><div class="quotefooter"><div class="botslice_quote"></div></div> </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>Patric Ahlqvist</strong> on <strong>February 16, 2006, 01:34:44 pm</strong> </dt> <dd class="postbody"> <div class="quoteheader"><div class="topslice_quote">Quote</div></div><blockquote class="bbc_standard_quote">patrc just saw this http://p-ahlqvist.com/sNews/patric_8/<br />very good where are the side links for it?</blockquote><div class="quotefooter"><div class="botslice_quote"></div></div><br />Sidelinks ?? What do ya mean ?? </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>albert</strong> on <strong>February 16, 2006, 01:40:47 pm</strong> </dt> <dd class="postbody"> Hi Patric<br /><br />we have the top links how about using this <? menu_items(); ?> as well :)<br />for the web site. <br /><br />Albert<br /><br /><div class="quoteheader"><div class="topslice_quote">Quote from: Patric</div></div><blockquote class="bbc_standard_quote"><div class="quoteheader"><div class="topslice_quote">Quote</div></div><blockquote class="bbc_alternate_quote">patrc just saw this http://p-ahlqvist.com/sNews/patric_8/<br />very good where are the side links for it?</blockquote><div class="quotefooter"><div class="botslice_quote"></div></div><br />Sidelinks ?? What do ya mean ??<br /></blockquote><div class="quotefooter"><div class="botslice_quote"></div></div> </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>Patric Ahlqvist</strong> on <strong>February 16, 2006, 01:52:31 pm</strong> </dt> <dd class="postbody"> Yea, ok...I have the two (menu_items and categories) in the hnav now...But I will move the menu_items to the lefthand side later... </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>albert</strong> on <strong>February 16, 2006, 02:02:41 pm</strong> </dt> <dd class="postbody"> Hi Patric<br /><br />have a look here at ths one I am workng on :)<br />Demo site:<br />http://www.360webdesign.co.uk/<br />Albert<br /> </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>Patric Ahlqvist</strong> on <strong>February 16, 2006, 03:04:00 pm</strong> </dt> <dd class="postbody"> Very nice site there, Abe... You've been working on that some time, eh ? I think I saw that template on Green Garden some time ago...I really like the "folded up" images...Althought there is those images, the site is fast...Even on modem I mean...<br /><br />text only is, however....a little black, hehe...<br /><br />Where do you put this:<br /><div class="codeheader">Code: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">[Select]</a></div><code class="bbc_code"><?php<br /><br />$title_links = $_SERVER['REQUEST_URI'];<br />$title_links = str_replace('/', ' ', $title_links);<br />$title_links = str_replace('_', ' ', $title_links);<br />$title_links = str_replace('home', '', $title_links);<br />$title_links = str_replace('snews14', '', $title_links);<br /><br />$title_links = str_replace('?action=contact', 'contact', $title_links);<br />$title_links = str_replace('index.php?action=contact', 'contact', $title_links);<br />$title_links = str_replace('?action=archives', 'Site Map', $title_links);<br /><br />echo $title_links;<br /><br />?></code><br />In indexfile before <title> or what ? </dd> <dt class="postheader"> Title: <strong>sNews 1.4 RC1 (Release Candidate 1)</strong><br /> Post by: <strong>Patric Ahlqvist</strong> on <strong>February 16, 2006, 04:10:08 pm</strong> </dt> <dd class="postbody"> There, Abe...The menu_item's been moved and the categories is up there...Better, like that ? </dd> </dl> <div id="footer" class="smalltext"> <span class="smalltext" style="display: inline; visibility: visible; font-family: Verdana, Arial, sans-serif;"><a href="https://snewscms.com/forum/index.php?action=credits" title="Simple Machines Forum" target="_blank" class="new_win">SMF 2.0.14</a> | <a href="http://www.simplemachines.org/about/smf/license.php" title="License" target="_blank" class="new_win">SMF © 2017</a>, <a href="http://www.simplemachines.org" title="Simple Machines" target="_blank" class="new_win">Simple Machines</a> </span> </div> </body> </html>