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: 1.5.31 Redirect removed?  (Read 188408 times)

michael kennedy

  • Full Member
  • ***
  • Karma: 3
  • Posts: 207
    • SpektreDesign
1.5.31 Redirect removed?
« 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...

tarmithius13

  • Sr. Member
  • ****
  • Karma: 7
  • Posts: 469
1.5.31 Redirect removed?
« 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
  • ULTIMATE member
  • ******
  • Karma: 37
  • Posts: 1401
  • currently MIA
1.5.31 Redirect removed?
« 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
1.5.31 Redirect removed?
« 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: [Select]
echo notification('','','administration/'); unset($_SESSION['temp']);and add after it:
Code: [Select]
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: 469
1.5.31 Redirect removed?
« 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
    • SpektreDesign
1.5.31 Redirect removed?
« Reply #5 on: February 26, 2007, 06:49:16 pm »

Thanks, not bad for your first post KayDee.  :)

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
1.5.31 Redirect removed?
« 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. :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

michael kennedy

  • Full Member
  • ***
  • Karma: 3
  • Posts: 207
    • SpektreDesign
1.5.31 Redirect removed?
« 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.  :/

Zucye

  • Sr. Member
  • ****
  • Karma: 5
  • Posts: 347
    • Simplemente una Mujer
1.5.31 Redirect removed?
« 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...
 :D
Logged
We can always learn from our failures, not so much from obvious success - C. Robinson (W. Disney). :)

Luka

  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 36
  • Posts: 1717
    • http://www.snewscms.com
1.5.31 Redirect removed?
« 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: 347
    • Simplemente una Mujer
1.5.31 Redirect removed?
« 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). :)

piXelatedEmpire

  • MIA
  • ULTIMATE member
  • ******
  • Karma: 37
  • Posts: 1401
  • currently MIA
1.5.31 Redirect removed?
« 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 :)
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
1.5.31 Redirect removed?
« 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 ;)
Logged
Of all the things I have lost, it is my mind that I miss the most.

michael kennedy

  • Full Member
  • ***
  • Karma: 3
  • Posts: 207
    • SpektreDesign
1.5.31 Redirect removed?
« 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?

KayDee

  • Newbie
  • *
  • Karma: 0
  • Posts: 2
1.5.31 Redirect removed?
« Reply #14 on: March 05, 2007, 08:31:55 am »

You are all welcome, and I like security better too  :)

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: [Select]
$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: [Select]
echo notification('','','administration/'); unset($_SESSION['temp']);Change that line to:
 
Code: [Select]
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