Hello

July 30, 2010, 05:21:18 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
What sNews Is: - sNews is a simple, basic, customizable CMS tool suitable for developers with beginner-to-advanced PHP skills. It is also useful to have a good working knowledge of how to work with, set up and manage MySQL databases. sNews is not - geared towards the end-user who knows little or nothing about building and developing PHP-MySQL based websites.
News: Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: 1.5.31 Redirect removed?  (Read 5473 times)
michael kennedy
Full Member
***

Karma: 3
Posts: 207



WWW
« on: February 22, 2007, 10:48:13 PM »

Hi all, I remember inside of 1.5.30 that after you clicked on "Edit" and saw the "Operation completed succesfully!" page, then after a few seconds it would redirect you back to the newly completed page.

But it no longer does this in 1.5.31.  How much code is it to re-insert this?

I found it useful to be able to see the newly edited article again incase I made any errors, or wanted to quickly send the URL to someone.

Or if you think it's better that it stay on the "Operation completed" page, can't we atleast get a few more links there besides "back"?

How about having that page display:

- View Article
- Administration
- Logout

Just a thought...
Logged

mike | spektredesign.net
tarmithius13
Sr. Member
****

Karma: 7
Posts: 476



« Reply #1 on: February 22, 2007, 10:55:34 PM »

I would like the redirect back. I thought I did something in my template conversions to break it but apparently it is not just me.
Logged

The trick to flying is to throw yourself at the ground and miss.

Free sNews templates HERE
piXelatedEmpire
MIA
Thread Moderator
ULTIMATE member
*****

Karma: 37
Posts: 1456


currently MIA


« Reply #2 on: February 22, 2007, 11:49:10 PM »

I was wondering what happened there... I think it is very important to either redirect to the article automatically or provide a view article link.
Logged

my apologies to the sNews crew, but I will be MIA for the forseeable future
KayDee
Newbie
*

Karma: 0
Posts: 2


« Reply #3 on: February 26, 2007, 05:15:27 AM »

If you want it to redirect back to the article you just edited, you just need to add back in the meta refresh line that was removed from this version.

In function processing(), find this line (around line 1540 or so)
Code:
echo notification('','','administration/'); unset($_SESSION['temp']);
and add after it:
Code:
echo '';
Change the content number from 2, to however many seconds you want it to take before it redirects you there.
Logged
tarmithius13
Sr. Member
****

Karma: 7
Posts: 476



« Reply #4 on: February 26, 2007, 01:34:41 PM »

Oh thank you that works perfectly.
Logged

The trick to flying is to throw yourself at the ground and miss.

Free sNews templates HERE
michael kennedy
Full Member
***

Karma: 3
Posts: 207



WWW
« Reply #5 on: February 26, 2007, 06:49:16 PM »

Thanks, not bad for your first post KayDee.  Smiley
Logged

mike | spektredesign.net
Keyrocks
Administrator
ULTIMATE member
******

Karma: 411
Posts: 5452


Semantically Challenged


WWW
« Reply #6 on: February 26, 2007, 07:05:58 PM »

Removal of this string from 1.5.31 bugged me too. Thanks for sharing this KayDee. Makes me happier. I wonder why it was removed from 1.5.31 in the first place? Must have been an oversight. Smiley
Logged

Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU
michael kennedy
Full Member
***

Karma: 3
Posts: 207



WWW
« Reply #7 on: February 26, 2007, 07:20:54 PM »

Yeah, do you have the power to put it back in the core build keyrocks?

I also noticed what I think is another bug....  I tried changing the username and password from the admin panel and it keeps saying that the password doesn't match.  :/
Logged

mike | spektredesign.net
Zucye
Sr. Member
****

Karma: 5
Posts: 354



WWW
« Reply #8 on: February 26, 2007, 07:49:33 PM »

Quote from: keyrocks
Removal of this string from 1.5.31 bugged me too.
Me tooo...
 Cheesy
Logged

We can always learn from our failures, not so much from obvious success - C. Robinson (W. Disney). Smiley
Luka
Administrator
ULTIMATE member
******

Karma: 35
Posts: 1732


WWW
« Reply #9 on: February 26, 2007, 08:38:09 PM »

I decided to remove that because it seemed that sometimes you don't want it to redirect you automatically. Also, automatic redirection was removed along with some other things to keep the core secure. Is this a thing you miss?
Logged
Zucye
Sr. Member
****

Karma: 5
Posts: 354



WWW
« Reply #10 on: February 26, 2007, 08:41:43 PM »

YES!

** Also the tabs on the top part of this forum suddenly don't look nice (they are overlapping).
Logged

We can always learn from our failures, not so much from obvious success - C. Robinson (W. Disney). Smiley
piXelatedEmpire
MIA
Thread Moderator
ULTIMATE member
*****

Karma: 37
Posts: 1456


currently MIA


« Reply #11 on: March 01, 2007, 01:36:49 AM »

Quote from: Luka
I decided to remove that because it seemed that sometimes you don't want it to redirect you automatically. Also, automatic redirection was removed along with some other things to keep the core secure. Is this a thing you miss?
I think many of us miss this particular feature.
Thanks for the fix KayDee Smiley
Logged

my apologies to the sNews crew, but I will be MIA for the forseeable future
philmoz
High flyer
Administrator
ULTIMATE member
******

Karma: 150
Posts: 1836



WWW
« Reply #12 on: March 01, 2007, 04:20:40 AM »

Quote from: Luka
I decided to remove that because it seemed that sometimes you don't want it to redirect you automatically. Also, automatic redirection was removed along with some other things to keep the core secure. Is this a thing you miss?
Actually, that is fair.
different people want the redirect to take them to different places. for eg,

someone commenting -- possible redirects
--show (thank you)/(awaiting moderation) =pause=> return to article
--show (thank you)/(awaiting moderation) =pause=> return to category
--show (thank you)/(awaiting moderation) =pause=> return to home

then there is admin.
-- operation success/error message =pause=> show article
-- operation success/error message =pause=> show (return to) editor
-- operation success/error message =pause=> show admin panel

so, maybe they should be 'left out' of basic snews, and some enterprising coder make a mod that puts them back in, and makes it possible to select the site options which are then stored in settings table...

ps.. I too liked the redirect, but I like security better Wink
Logged

Take offs are optional, landings are mandatory, unless you get into space, then you have other issues.
michael kennedy
Full Member
***

Karma: 3
Posts: 207



WWW
« Reply #13 on: March 02, 2007, 05:52:36 PM »

@philmoz

so back to my orginal idea - It's impossible to please everyone, so why not give them a list of several pages to then redirect to?
Logged

mike | spektredesign.net
KayDee
Newbie
*

Karma: 0
Posts: 2


« Reply #14 on: March 05, 2007, 08:31:55 AM »

You are all welcome, and I like security better too  Smiley

Instead of the meta refresh, you could add a list of links there instead. Here is the way I did it. There might be a better way. If someone knows of one (or I goofed somewhere), they can let me know.

First, delete the meta refresh line from before that enables the redirect. Then, add the following language variables(the original 'Back' variable is near line 186, if you wanted to keep them organized together):
 
Code:
$l['back_admin'] = 'Go To Admin Panel';
$l['back_list'] = 'Show Article List';
$l['back_article'] = 'View Edited Article';
Again, find In function processing(), find this line (around line 1540 or so)
 
Code:
echo notification('','','administration/'); unset($_SESSION['temp']);
Change that line to:
 
Code:
echo notification('','',''); unset($_SESSION['temp']);
echo '

'.l('back_admin').'

';
echo '

'.l('back_article').'

';
echo '

'.l('back_list').'

';
Now it will give you a choice of links:: 'Go To Admin Panel', 'View Edited Article', or 'Show Article List'
Logged
Pages: [1] 2
  Print  
 
Jump to:  

English Steel 1.6 © Saxon North Technologies
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!