Wsparcie » Wtyczki » TDO Mini Forms.

  • Witam

    Chciałbym trochę edytować TDO Mini Formsm, Widget -> Content
    W tym widgecie pojawiają się 2 pola

    Post Title oraz Post Text (Required)
    i chciałbym aby tego Post text nie wyświetlało wcale w widgecie ale do wysłanego postu zawsze wysyłało jeden tekst: „Zdjęcie dodane przez”

    Kod widgeta z „From Hacker”
    Code From

    <legend>Content</legend>
    		<?php if(isset($post_args["content-title-tf"])) {
    			$temp_text = $post_args["content-title-tf"];
    		} else {
    			$temp_text = "";
    		} ?>
    		<label for="content-title-tf">Post Title:
    			<br />
    		</label>
    		<input type="text" title="Post Title" name="content-title-tf" id="content-title-tf" size="30" value="<?php echo htmlentities($temp_text,ENT_QUOTES,get_bloginfo('charset')); ?>"/>
    		<br /><br />
    		<label for="content-text-ta" class="required">Post Text (Required):
    			<br />
    		</label>
    		<small>Allowable Tags: <p><b><em><u><strong><a><img><table><tr><td><blockquote><ul><ol><li><br /><sup></small>
    		<br />
    		<textarea title="Post Text" rows="10" cols="40" name="content-text-ta" id="content-text-ta" ><?php if(isset($post_args["content-text-ta"])) {
    				echo $post_args["content-text-ta"];
    			} else { ?><?php } ?></textarea>

    From Preview

    <p>
    <b>Content</b>
    	<br />
    	<?php $temp_text = $post_args['content-title-tf'];
    	$temp_text = apply_filters('the_title',$temp_text);
    	?>
    	<b>Post Title: </b>
    	<?php echo $temp_text; ?><br /><br />	<?php $temp_text = $post_args['content-text-ta'];
    	$temp_text = preg_replace('|\<!--tdomf_form.*-->|', '', $temp_text);
    	$temp_text = preg_replace('|\[tdomf_form.*\]|', '', $temp_text);
    	$temp_text = strip_tags($temp_text,'<p><b><em><u><strong><a><img><table><tr><td><blockquote><ul><ol><li><br /><sup>');
    	$temp_text = apply_filters('the_content',$temp_text);
    	$temp_text = preg_replace('/\\\&\#(\d*)\;/','&#$1;',$temp_text);
    	$temp_text = str_replace("\\'","'",$temp_text);
    	?>
    	<b>Post Text:</b>
    	<br />
    	<?php echo $temp_text; ?>
    </p>

    Czy jest ktoś w stanie pomóc?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter marcin0077

    (@marcin0077)

    Żadnej podpowiedzi? 🙂

    Toć to podstawy html o ile dobrze rozumuję (bo ciężko się połapać w tym pytaniu 😉 )..

    Zamiast textarea wstawiasz input o typie hidden i nadajesz mu parametr value=”Twój tekst jaki tylko przyjdzie do głowy”

Viewing 2 replies - 1 through 2 (of 2 total)
  • Temat ‘TDO Mini Forms.’ jest zamknięty na nowe odpowiedzi.