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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 790
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 641
  • Total: 642
  • tino

Problem with Html Description On New File Upload.

Started by alan s, June 24, 2008, 05:43:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alan s

When you go to upload a new file , In the html description box you can see the forum ( Like when you go to edit a themes style.css and you see a preview of the forum.

No mods have been added recently , except a updated version of a custom mod , Create Post on TP Upload , Which creates a new post in a specific board when a file is uploaded. But the upload page was fine untill yesterday it seems.

Any ideas what is wrong?

{Screen Attached}

This should be the relevent code from TPDlManager.template.php ( as far as i can tell )


// the submit upload form
elseif($context['TPortal']['dlaction']=='upload'){
// check that you can upload
if(allowedTo('tp_dlmanager') || allowedTo('tp_dlupload'))
$show=true;
else
fatal_error($txt['tp-adminonly']);

   echo '
<div class="tborder" style="margin-top: 4px;">
<table width="100%" border="0" cellspacing="0" cellpadding="8">
<tr class="catbg"><td>'.$txt['tp-downloadsection'].'</td></tr>
<tr class="titlebg"><td><b>'.$txt['tp-dlupload'].'</b></td></tr>
<tr class="windowbg2"><td>
<form accept-charset="', $context['character_set'], '" name="tp_dlupload" action="'.$scripturl.'?action=tpmod;dl=upload" method="post" enctype="multipart/form-data">
<span class="smalltext">';

if($context['TPortal']['dl_approve']=='1' && !allowedTo('tp_dlmanager'))
echo '<b>! '.$txt['tp-warnsubmission'].'</b><br />';

echo $txt['tp-maxuploadsize'].': '. $context['TPortal']['dl_max_upload_size'].'Kb</span><br /><br />
<table width="100%" border="0" cellspacing="1" cellpadding="5" class="tborder">
<tr>
<td valign="top" align="right" class="windowbg">'.$txt['tp-dluploadtitle'].'</td>
<td class="windowbg">
<input name="tp-dluploadtitle" type="text" value="-no title-" size="40">
</td>
</tr><tr>
<td valign="top" align="right" class="windowbg">'.$txt['tp-dluploadcategory'].'</td>
<td class="windowbg">
<select size="1" name="tp-dluploadcat">';

foreach($context['TPortal']['uploadcats'] as $ucats){
echo '
<option value="'.$ucats['id'].'">', isset($ucats['indent']) ? str_repeat("-",$ucats['indent']) : ''  , ' ' . $ucats['name'].'</option>';
}
echo ' </select>
</td>
</tr>';
//----Create Post on upload changes
if($context['TPortal']['dl_enable_post'] == 1) {
$board = TPDLgetBoards();
echo '
<tr>
<td valign="top" align="right" class="windowbg">',$txt['cp_selectBoard'],'</td>
<td class="windowbg">
<select size="1" name="tp-dluploadboard">
<option value="0">',$txt['cp_dontCreatePost'],'</option>';

foreach ($board as $c)
{
foreach ($c['boards'] as $b)
echo '
<option value="'.$b['id'].'"> ' . str_repeat('-', $b['child_level']) . '- ' . $b['name'] . '</option>';


echo ' </select>
</td>
</tr>';
}
//----- End
echo '

<tr>
<td align="right" class="windowbg">'.$txt['tp-dluploadtext'].'</td>
<td class="windowbg"><textarea name="tp-dluploadtext" rows=5 cols=50 wrap="on"></textarea>';

// use the WYSIWYG editor here
if($context['TPortal']['use_wysiwyg']>0)
echo '
<script language="javascript" type="text/javascript">
SmallerEditor("tp-dluploadtext");
</script>';

echo ' </td>
</tr>
<tr>
<td height="40" align="right" class="windowbg">'.$txt['tp-dluploadfile'].'</td>
<td class="windowbg">';
if((allowedTo('tp_dlmanager') && !isset($_GET['ftp'])) || !allowedTo('tp_dlmanager'))
echo '<input name="tp-dluploadfile" id="tp-dluploadfile" type="file"> ('.$context['TPortal']['dl_allowed_types'].')';


Thanks for any help.


alan s

That change didnt make a difference to the FCk editor.

This website is proudly hosted on Crocweb Cloud Website Hosting.