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]

Author Topic: Revolutions from RUI - the best sNews 1.6 fork ever!  (Read 12099 times)

centered

  • Guest
Re: Revolutions from RUI - the best sNews 1.6 fork ever!
« Reply #15 on: January 20, 2009, 02:09:05 am »

Actually I leave that job to God.  The only saving i am doing right now is my nose from running.
Logged

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: Revolutions from RUI - the best sNews 1.6 fork ever!
« Reply #16 on: January 20, 2009, 02:32:26 am »

I wish you a fast and complete healing (God is the best Doctor)!
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Revolutions from RUI - the best sNews 1.6 fork ever!
« Reply #17 on: January 23, 2009, 06:14:51 pm »

funi (and Rui) -- great job on Revolutions both of you. I only have one question at the moment, I've only just begun testing this version which works very well initially. Here's the question:
Is there any particular reason why using the include feature on a Page would result in the included text not being published and a div with class "clear" being published in its place? I have checked and double-checked both my index.php file and the included text file (.txt) and neither contain this div (I tend to use the class name "clearer" for my clearing divs so I suspect it's in the downloaded files somewhere ...

oh, wait I just found it, in snews.php:
Code: [Select]
echo file_include(str_replace('[break]', '', $text), $shorten);
// EQ Add For Keyword Mod
echo '<div class="clear"></div>';

Hmm -- could it be that it's some problem with file_inclusion, similar to the problem I had with Eq's SNLite? Could someone perhaps confirm this?
The file I'm using for the include test is a normal .txt file and txt is in both the allowed_files and file_include_extensions arrays (in config.php), so it should work, no?

This is not a crucial thing, and it's why I test odd stuff like include before starting on an actual site build, but it would be nice to sort it out. Thanks.

Jason -- hope you're feeling better soon.
Logged

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: Revolutions from RUI - the best sNews 1.6 fork ever!
« Reply #18 on: January 23, 2009, 11:10:09 pm »

Hi Fred,

As I remember, when I published it on freehostia.com for testing purposes, I disabled the option of including files... I don't know if I changed it back... I used "clear" because Sasha's theme need that (and, of course, I'm not so good on CSS)...

I will try to fix it if is broken but right now, I'm modify it for SEF switcher (I am at half - admin is not working right now)

Edit:
-----------------
SEF switch mod almost inserted (only control panel remaining). Indeed, inserting file is not working, article is truncated at file insertion point.  I will search the bug... after a good sleep.
Anyway, this line echo '<div class="clear"></div>'; have no effect on inserting a file. you know this...
« Last Edit: January 24, 2009, 08:44:27 am by funlw65 »
Logged

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: Revolutions from RUI - the best sNews 1.6 fork ever!
« Reply #19 on: January 25, 2009, 01:30:06 am »

Function file_include fixed.
SEF switcher mod included.
Include function mod from Philmoz included.

Package updated!
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Revolutions from RUI - the best sNews 1.6 fork ever!
« Reply #20 on: January 25, 2009, 03:02:13 am »

Hi vasile. Thanks for updating the package. A couple of notes:

1) You've changed the basic if ($_SESSION[site]... line to $_SESSION[siteBase]...  Such a change should be documented, in case people -like me- use that line outside of snews.php to do some magicry. I have a few instances of it in my index.php for example (to exclude some content from the admin area)

2) The db.sql and config.php files are different than in previous package which should also be documented -- i.e, it's not just a matter of using the new snews.php file, it's necessary to update the database as well.

These are just minor notes, but might save you some stupid questions and/or headaches simply by documenting the changes in the first post.
I'll get back to you if I should find anything else worth noting.

Thanks! Great work!

EDIT! Sorry, forgot to mention one important bit: The following line in the new db.sql causes an SQL error:
Quote
INSERT INTO 'settings' SET name='up_date';
The error message is this:
Quote
Error
SQL query:

INSERT INTO  'settings'
SET name =  'up_date';


MySQL said:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''settings' SET name='up_date'' at line 1
« Last Edit: January 25, 2009, 03:05:08 am by Fred K (agentsmith) »
Logged

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: Revolutions from RUI - the best sNews 1.6 fork ever!
« Reply #21 on: January 25, 2009, 03:54:42 am »

Understood! I will correct that line and add a file named changes.txt to document changes. Then, upgrade package again...

Thank you!

EDIT:
------------------------------
Package updated! Hope this time I did it right...
« Last Edit: January 25, 2009, 03:00:04 pm by funlw65 »
Logged

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: Revolutions from RUI - the best sNews 1.6 fork ever!
« Reply #22 on: April 13, 2009, 03:20:11 am »

Package updated! Code changed as here. You can say "bye! bye!" to another bottle neck of sNews!
Logged

centered

  • Guest
Re: Revolutions from RUI - the best sNews 1.6 fork ever!
« Reply #23 on: April 13, 2009, 06:08:20 am »

Understood! I will correct that line and add a file named changes.txt to document changes. Then, upgrade package again...

Thank you!

EDIT:

------------------------------
Package updated! Hope this time I did it right...

Quote
4.index.php file - Because we can change URL's with SEF switcher, we must
                   manually do changes also at feed URL's. Example:
                   
Why don't you make a function that changes the link upon the rewrite switch - then adding the function in function title??  One less manual thing the end user has to do....
Logged

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: Revolutions from RUI - the best sNews 1.6 fork ever!
« Reply #24 on: April 13, 2009, 09:24:25 pm »

For first quote:
  - was late last night... solved. Some how, I thought that topic will be enough for a while... now changes.txt is pointing there.

For second quote:
 - very good idea, never thought about... I will try...
Logged

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: Revolutions from RUI - the best sNews 1.6 fork ever!
« Reply #25 on: April 16, 2009, 04:11:15 am »

Thank you Equilni, it worked! No extra function needed, I had one at hand.

Package updated!
Logged

centered

  • Guest
Re: Revolutions from RUI - the best sNews 1.6 fork ever!
« Reply #26 on: April 29, 2009, 01:27:59 pm »

Here is something for you to consider...

Code: [Select]
// In a config file or in a database
/************ For non-rewrite environments ************/

// Show index.php in url
// Example with index.php: www.domain.com/index.php?uri=page1/subpage2/
// Example without index.php: www.domain.com/?uri=page1/subpage2/
// TRUE or FALSE
$showIndex = 'TRUE';

// Query String to show
// www.domain.com/?uri=page1/
$queryString = 'uri';

// Show Index
// Shows index.php if mod_rewrite if off
// Example if on - www.domain.com/index.php?queryString=page/
// Example if off - www.domain.com/?queryString=page/
function showIndex() {
global $showIndex;
if ( $showIndex == strtoupper( 'TRUE' ) ) {
$index = 'index.php';
} else {
$index = '';
}
return $index;
}
unset( $showIndex );

// Link Base - for non mod_rewite sites
// Example if on (full options) - www.domain.com/index.php?queryString=page/
// Example if on (no index) - www.domain.com/?queryString=page/
// Example if on (no queryString) - www.domain.com/?=page/
// Example if off - www.domain.com/page/
function siteBase() {
if (
!in_array( 'mod_rewrite', apache_get_modules() ) ||
!file_exists( '.htaccess' )
) {
global $queryString;
$siteBase = showIndex(). '?' .$queryString. '=';
} else {
$siteBase = '';
}
return $siteBase;
}

Only negative is, if you then use htaccess, you have to do it as php and need to have apache render it as htacess..
Logged

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: Revolutions from RUI - the best sNews 1.6 fork ever!
« Reply #27 on: May 03, 2009, 05:15:41 pm »

Hi Equilni,

What is the point of hiding index.php from url? I really don't know so please explain.
Logged

centered

  • Guest
Re: Revolutions from RUI - the best sNews 1.6 fork ever!
« Reply #28 on: May 04, 2009, 06:01:32 pm »

I have no real technical reasoning, other than it being influenced by sNooze-IC, and in my minimal testing it works.  It is cosmetic to me actually since one may not want "index.php" on every link.
Logged

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: Revolutions from RUI - the best sNews 1.6 fork ever!
« Reply #29 on: May 04, 2009, 10:17:14 pm »

Thank you Equilni for your response. I will think about it. In fact, no problem to add it, just to make some time.
Logged
Pages: 1 [2]