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.

Pages: [1] 2 3

Author Topic: IMPROVE SNEWS 1.7 RC2  (Read 14319 times)

kuazo

  • Guest
IMPROVE SNEWS 1.7 RC2
« on: October 10, 2008, 12:07:55 PM »

Hello folks, i really like the RC2 but i have got some good issues here. hope you like something.

[Ay] make it valid

use html tidy firefox addon ( use sgml parser )

1. Logout ( meta refresh content not allowed here )
2. Comment sent ( meta refresh content not allowed here )
3. Ordering Page etc. ( meta refresh content not allowed here )

-> you can't use meta tag outside header
-> better use simple notification or connect it with new var in title function?

4. Your comment was not sent ( ul wrong )
5. New comment waiting for approve in administration ( meta tag before doctype declaration )


[Bi] make it useful

1. put the database host, name and pass into the template or seperate config file !!!
2. i used to have function.php and config.php

function ~ snews.php
config ~ language and system vars, database settings


reason: if you have got serveral projects running with snews. you only want to
update the function files. it is horrible to update snews.php for every new database.

[Ci] make it css

1. i would like to have checkbox class for earch checkbox. so we can style it in
administration - i just realised this in 1.6 - optimized for ie 6, ie 7, mozilla, opera


Quote
.checkbox {
margin-left: -4px;
margin-right: 2px;
vertical-align: middle;}

.checkbox:not([dummy]) {
margin-top: -4px;
margin-left: 0px;
margin-right: 5px;}

@media all and (min-width: 0px) { .checkbox {
margin-top: 0px !important;}}


2. better rename class "date" to "infoline" -> makes more sence to call something what it is :-)

3. use my button css hack ( i renamed searchbutton class to button class, but thats a matter of taste )
this hack kicks ass, i worked many days on it. ( optimized for ie 6, ie 7, mozilla, opera )

Quote
.button, #extra .button {
background-color: #fd8a2c;
padding-top: 4px;
padding-bottom: 2px;
padding-left: 0px;
padding-right: 0px;
color: #b1611f;
text-align: center;
text-transform: uppercase;
border-color: #b1611f;}

.button:not([dummy]), #extra .button:not([dummy]) {
padding-top: 4px;
padding-bottom: 4px;
padding-left: 4px;
padding-right: 5px;}

@media all and (min-width: 0px) { .button, #extra .button {
padding-top: 5px !important;
padding-bottom: 5px !important;
padding-left: 7px !important;
padding-right: 8px !important;}}

[Di] make it similar

1. global email script like a published in mod section
2. use fieldset in sitemap and archive ( is a matter of taste ) - but i realised this in 1.6

[Ee] make it hide

1. I want to be able to hide Contact, Sitemap, Home ( default pages ) from: navigation and sitemap!

reason: i used to make a styled contact page with function inclusion. so i don't need the standard contact
page any more.

[Ee] make it beautiful

1. give this link a try: http://thephppro.com/tools
it makes sence to use a optimizer before releasing a project thats was written by many people.
tried eclipse to do that but i really couln't cope with :-(
« Last Edit: February 10, 2009, 01:03:35 PM by kuazo »
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: IMPROVE SNEWS 1.7 RC2
« Reply #1 on: October 10, 2008, 02:47:38 PM »

Now, this is feed back.

use html tidy firefox addon ( use sgml parser )

1. Logout ( meta refresh content not allowed here )
2. Comment sent ( meta refresh content not allowed here )
3. Ordering Page etc. ( meta refresh content not allowed here )

-> you can't use meta tag outside header
-> better use simple notification or connect it with new var in title function?
I think directing to new title var is appropriate... but not easy.
« Last Edit: October 10, 2008, 04:26:29 PM by philmoz »
Logged
Of all the things I have lost, it is my mind that I miss the most.

kuazo

  • Guest
Re: IMPROVE SNEWS 1.7 RC2
« Reply #2 on: October 10, 2008, 04:33:05 PM »

in editing or creating new articles / pages

1. there is still the invalid problem with html tags in a textfield... <br /> and <p></p> is not allowed.

-> i don't know a solution for that? maby [ br ] and [ p ] ... [ /p ] special tag with javascript?

2. id="edit_article" causes invalid failure

this id is used by div and by a input too... = id should be unique as you know for sure
« Last Edit: October 10, 2008, 04:43:41 PM by kuazo »
Logged

skian

  • Full Member
  • ***
  • Karma: 14
  • Posts: 120
Re: IMPROVE SNEWS 1.7 RC2
« Reply #3 on: October 10, 2008, 08:35:14 PM »

Update : fixed in latest RC2
[g] remove all references to script name (this is what _SITE is for, after all)
eg : replace all strings like
Code: [Select]
'._SITE.'index.php?action='; to
Code: [Select]
'._SITE.'?action=';My template name is NOT index.php...
« Last Edit: October 27, 2008, 01:33:07 PM by skian »
Logged

Rui Mendes

  • Development,Testing, Support
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1009
  • sNews1.7
    • Comunidade Portuguesa
Re: IMPROVE SNEWS 1.7 RC2
« Reply #4 on: October 10, 2008, 11:32:16 PM »

Hello skian
I'm sorry, change
Quote
define('_SITE',site());_SITE
to
Quote
define('_SITE',site().'index.php');
is bad ideia

I'll explain: see this line
$_SESSION[_SITE.'Logged_In'] = token(); wont work with that change.

@kuazo
[Ay] make it valid
It's not valid? My sNews RC2 it was successfully checked as XHTML 1.0 Strict!

Thank you VERY MUCH for the tips and css.

Karma 2U
Logged
Need a Job on Europe. Linkdin - Facebook / Group

skian

  • Full Member
  • ***
  • Karma: 14
  • Posts: 120
Re: IMPROVE SNEWS 1.7 RC2
« Reply #5 on: October 11, 2008, 12:40:09 AM »

Hello skian
I'm sorry, change [...] is bad ideia

I'll explain: see this line
$_SESSION[_SITE.'Logged_In'] = token(); wont work with that change.

Sorry, my post wan't clear enough. I only want to remove references to "index.php" : "index.php" is a hard-coded string (this is bad), it doesn't match all snews installations. Again, i only want to remove "index.php" from string repersenting an url to another snews page.

For exemple, I'd like all url that looks like http://example.com/index.php?action=.... to be rewriten http://example.com/?action=...

So URLs should be coded : _SITE.'?action=...' instead of _SITE.'index.php?action=...'

Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: IMPROVE SNEWS 1.7 RC2
« Reply #6 on: October 11, 2008, 12:44:04 AM »

@RUI, there may be some parts of admin that don't quite pass inspection...

My template name is NOT index.php...
That raises the question as to whether we should handle templating in a different manner.

currently, index.php is by default the html template with code calls inserted.

a different approach is to make index.php include snews.php, and then include the template.php file (which has the code calls inserted), but index.php doesn't have any html at all.
Logged
Of all the things I have lost, it is my mind that I miss the most.

skian

  • Full Member
  • ***
  • Karma: 14
  • Posts: 120
Re: IMPROVE SNEWS 1.7 RC2
« Reply #7 on: October 11, 2008, 12:49:27 AM »


My template name is NOT index.php...
That raises the question as to whether we should handle templating in a different manner.

currently, index.php is by default the html template with code calls inserted.

a different approach is to make index.php include snews.php, and then include the template.php file (which has the code calls inserted), but index.php doesn't have any html at all.


My point is that removing all references to "index.php" from snews.php allows user to choose which template render using appropriate .htaccess rules
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: IMPROVE SNEWS 1.7 RC2
« Reply #8 on: October 11, 2008, 12:51:29 AM »

Hello skian
I'm sorry, change [...] is bad ideia

I'll explain: see this line
$_SESSION[_SITE.'Logged_In'] = token(); wont work with that change.

Sorry, my post wan't clear enough. I only want to remove references to "index.php" : "index.php" is a hard-coded string (this is bad), it doesn't match all snews installations. Again, i only want to remove "index.php" from string repersenting an url to another snews page.

For exemple, I'd like all url that looks like http://example.com/index.php?action=.... to be rewriten http://example.com/?action=...

So URLs should be coded : _SITE.'?action=...' instead of _SITE.'index.php?action=...'


yup... I tested a global replace of index.php? with ?  and seems to operate with minimal testing...
but needs thorough testing to ensure we don't break something
Logged
Of all the things I have lost, it is my mind that I miss the most.

skian

  • Full Member
  • ***
  • Karma: 14
  • Posts: 120
Re: IMPROVE SNEWS 1.7 RC2
« Reply #9 on: October 11, 2008, 12:54:55 AM »

yup... I tested a global replace of index.php? with ?  and seems to operate with minimal testing...
but needs thorough testing to ensure we don't break something
There is one single line where it should still be there :
Code: [Select]
$l['ignored_items'] = '.,..,cgi-bin,.htaccess,Thumbs.db,snews.php,index.php,lib.php,style.css,admin.js,'.s('language').'.php'; // list of files&folders ignored by upload/file list routine
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: IMPROVE SNEWS 1.7 RC2
« Reply #10 on: October 11, 2008, 01:00:07 AM »

There is one single line where it should still be there :

the exact search for replacement I used was  "index.php?" so only those items with questionmark were replaced ;)
« Last Edit: October 11, 2008, 01:01:47 AM by philmoz »
Logged
Of all the things I have lost, it is my mind that I miss the most.

Joost

  • Guest
Re: IMPROVE SNEWS 1.7 RC2
« Reply #11 on: October 11, 2008, 01:03:02 AM »

There is one single line where it should still be there :

the exact search for replacement I used was  "index.php?" so only those items with questionmark were replaced ;)
38 replacements, to be exact.

is bad ideia

I'll explain: see this line
$_SESSION[_SITE.'Logged_In'] = token(); wont work with that change.


I don't see any issues there.
Logged

skian

  • Full Member
  • ***
  • Karma: 14
  • Posts: 120
Re: IMPROVE SNEWS 1.7 RC2
« Reply #12 on: October 11, 2008, 01:11:23 AM »

two other suggestions :

1.
In admin.js, let
str = str.replace(/[^a-z 0-9]+/g,'');
be
str = str.replace(/[^a-z 0-9-]+/g,'');
so that char '-' is allowed in SEF

2. I'd like genSEF not to modify the SEF when updating article title (as opposed to when creating a new one) so that existing (and possibly allready indexed by search engines) articles are not "moved" to another location. Of course, if needed, the user would still be able to modify the SEF manually

« Last Edit: October 11, 2008, 01:18:22 AM by skian »
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: IMPROVE SNEWS 1.7 RC2
« Reply #13 on: October 11, 2008, 01:15:35 AM »

a clarification

... I only want to remove references to "index.php" : "index.php" is a hard-coded string (this is bad), it doesn't match all snews installations....
For exemple, I'd like all url that looks like http://example.com/index.php?action=.... to be rewriten http://example.com/?action=...
So URLs should be coded : _SITE.'?action=...' instead of _SITE.'index.php?action=...'
this doesn't require altering constant _SITE, but relies on htaccess and server to determine site root document -- if I have a handle on it...
Logged
Of all the things I have lost, it is my mind that I miss the most.

skian

  • Full Member
  • ***
  • Karma: 14
  • Posts: 120
Re: IMPROVE SNEWS 1.7 RC2
« Reply #14 on: October 11, 2008, 01:20:36 AM »

this doesn't require altering constant _SITE, [...]
no, _SITE should not be changed.
Logged
Pages: [1] 2 3