TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 15, 2024, 05:30:55 AM

Login with username, password and session length
Members
  • Total Members: 3,886
  • Latest: Grendor
Stats
  • Total Posts: 195,188
  • Total Topics: 21,220
  • Online today: 149
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 125
  • Total: 125

TPAdmin and edit article

Started by wildenborch, September 15, 2015, 09:13:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wildenborch

Hi,

When I add or edit an article and save the article than I'm redirected to the TPAdmin menu. This did not happen with the previous version (unless I changed some things... but I can't remember that)

Can this be changed into the behaviour of the previous version?

Rodebaert.nl
smf version 2.0.10
TP version 1.1
Default Forum Language is english
Browser Firefox
No mods installed

Ken.

Confirmed.
Seeing the same behavior with my article add/edits.
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

illori

TPortalAdmin.template.php

// edit/add single article
function template_editarticle($type = '')
{
global $context, $settings, $options, $txt, $scripturl, $modSettings, $boarddir, $boardurl, $language, $smcFunc;

$tpmonths=array(' ','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
$mg = $context['TPortal']['editarticle'];
if(!isset($context['TPortal']['categoryNAME']))
$context['TPortal']['categoryNAME'] = '-' . $txt['tp-uncategorised'] . '-' ;

echo '
<form accept-charset="', $context['character_set'], '" name="TPadmin3" action="' . $scripturl . '?action=tpadmin" enctype="multipart/form-data" method="post" style="margin: 0px;" onsubmit="submitonce(this);">


that form part replace it with this and let me know if it seems fixed.

<form accept-charset="', $context['character_set'], '" name="TPadmin3" action="' . $scripturl . '?action=tpadmin;sa=editarticle'. $mg['id'].'" enctype="multipart/form-data" method="post" style="margin: 0px;" onsubmit="submitonce(this);">

i bet other admin functions will redirect you back to that same page... same type of edit should fix those too.

lurkalot

Thank you illori Just tried it out and it works very nicely for me.  O0

And thanks for all the hard work you've done ( and still doing) for us these past few weeks, it's very much appreciated.  O0

wildenborch

Yeah!
Thank you all!

Regards,
Fred