TinyPortal

Development => Support => Topic started by: wildenborch on September 15, 2015, 09:13:08 PM

Title: TPAdmin and edit article
Post by: wildenborch on September 15, 2015, 09:13:08 PM
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
Title: Re: TPAdmin en edit article
Post by: Ken. on September 15, 2015, 09:40:38 PM
Confirmed.
Seeing the same behavior with my article add/edits.
Title: Re: TPAdmin en edit article
Post by: illori on September 16, 2015, 10:33:33 PM
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.
Title: Re: TPAdmin en edit article
Post by: lurkalot on September 16, 2015, 11:14:46 PM
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
Title: Re: TPAdmin en edit article
Post by: wildenborch on September 17, 2015, 06:19:26 AM
Yeah!
Thank you all!

Regards,
Fred