Hola
Dany_s, gracias por tu interés. Pego el código a continuación.
Código:
{literal}
<script type="text/javascript">
function displayMail() {
$('#submit .input_mail').html('{/literal}{$lang53} : {if $smarty.session.USERID ne ""}<input type="text" name="email" value="{$smarty.session.EMAIL}" />{else}<input type="text" name="email">{/if}{literal}');
}
function cut(input) {
if (input.value.length >= {/literal}{$climit}{literal}) {
input.value = input.value.substring(0,{/literal}{$climit}{literal});
}
var reste = {/literal}{$climit}{literal} - input.value.length;
var print = reste;
$(".ok #compteur").html(input.value.length+'/{/literal}{$climit}{literal} {/literal}{$lang55}{literal}');
}
$(document).ready(function() {
$("#submitsh").submit(function() {
$(this).ajaxSubmit({
beforeSubmit: function(before) {
$('#loadingsubmitsh').css('display','block');
$("#resultsubmitsh").html('');
$("#resultsubmitsh").css('display','none');
},
success: function(retour) {
$('#loadingsubmitsh').css('display','none');
if(retour == 'error2') {
$('#resultsubmitsh').html('<p class=\"pasgood\">{/literal}{$lang33}{literal}</p>');
} else if(retour == 'error3') {
$('#resultsubmitsh').html('<p class=\"pasgood\">{/literal}{$lang31}{literal}</p>');
}else if(retour == 'error4') {
$('#resultsubmitsh').html('<p class=\"pasgood\">{/literal}{$lang57}{literal}</p>');
}else if(retour == 'error5') {
$('#resultsubmitsh').html('<p class=\"pasgood\">{/literal}{$lang60}{literal}</p>');
}else if(retour == 'error6') {
$('#resultsubmitsh').html('<p class=\"pasgood\">{/literal}{$lang191}{literal}</p>');
}else if(retour == 'error7') {
$('#resultsubmitsh').html('<p class=\"pasgood\">{/literal}{$lang205}{literal}</p>');
}else {
$('#resultsubmitsh').html('<p class=\"good\">{/literal}{$lang58}{literal}<br><a href="javascript:submitToggle();">{/literal}{$lang59}{literal}</a></p>');
setTimeout("$('#submitsh #update').val('');",5000);
}
$('#resultsubmitsh').hide();
$('#resultsubmitsh').fadeIn(500);
setTimeout("$('#resultsubmitsh').fadeOut();",5000);
}
});
return false;
});
});
</script>
{/literal}
<div id="submit" class="post">
<h2>{$lang7}</h2><br/>
<ul style="list-style-type: none; margin-bottom: 10px;">
<li>- <b>{$lang8} </b>: {$lang9}</li>
<li style="margin-top:5px;">- {$lang10}</li>
</ul>
<form method="post" id="submitsh" class="submitsh" action="{$baseurl}/submit.php">
<fieldset>
<div class="input_auteur">
{$lang50} : {if $smarty.session.USERID ne ""}{$smarty.session.USERNAME|stripslashes}<input type="hidden" name="uname" value="{$smarty.session.USERNAME|stripslashes}" /><input type="hidden" name="uid" value="{$smarty.session.USERID}" />{else}<input type="text" name="uname" value="">{/if}
</div>
<div class="input_cat">
{$lang11} :
<select name="cat">
<option value="">{$lang52}</option>
{insert name=get_categories assign=cat}
{section name=i loop=$cat}
<option value="{$cat[i].CATID}">{$cat[i].name|stripslashes}</option>
{/section}
</select>
</div>
<div class="input_sexe">
{$lang25}? :
<select name="gender">
<option value="">{$lang52}</option>
<option value="1" {if $smarty.session.GENDER eq "1"}selected="selected"{/if}>{$lang26}</option>
<option value="0" {if $smarty.session.GENDER eq "0"}selected="selected"{/if}>{$lang27}</option>
</select>
</div>
<textarea id="update" name="content" rows="6" onkeyup="cut(this);"></textarea>
<div id="loadingsubmitsh"><img id="loading" src="{$imageurl}/loader.gif"></div>
<div id="resultsubmitsh" class="result"></div>
<div class="input_mail"><a href="javascript:displayMail();">{$lang54}</a></div>
<div class="ok">
<table><tr><td><img src="{$baseurl}/include/captcha.php" style="border: 0px; margin:0px; padding:0px" /></td><td><input type="text" name="captcha" value=""></td><td><div id="compteur"></div> <input type="submit" name="ok" value="{$lang51}"/></td></tr></table>
</div>
</fieldset>
<input type="hidden" name="substory" value="1" />
</form>
</div>
Muchísimas gracias de nuevo!