Foros del Web » Programando para Internet » PHP »

aun no me resulta

Estas en el tema de aun no me resulta en el foro de PHP en Foros del Web. no soy muy experta necesito ayuda pero con pinsas ya he intentado de todo esta es una parte del codigo de un formulario donde quiero ...
  #1 (permalink)  
Antiguo 17/11/2003, 17:42
 
Fecha de Ingreso: octubre-2003
Mensajes: 139
Antigüedad: 20 años, 6 meses
Puntos: 0
aun no me resulta

no soy muy experta necesito ayuda pero con pinsas ya he intentado de todo

esta es una parte del codigo de un formulario donde quiero mandar un mensaje con una carita se supone que guardo en la base de datos en signo por ejemplo :) pero aun no me resulta hacer el cambio cuando muestro el mensaje

trate usando srt_replace pero nno se donde colocarlo ya que me aparece un error
a todo esto tengo este archivo php (no se si deba colocar aqui esta funcion)

archivo php:
<?php
function mostrarTemplate($tema, $variables)
{
//var_dump($variables);
extract($variables);
eval("?>".$tema."<?");
}

function parsearTags($mensaje)
{
$mensaje = str_replace("[citar]", "<blockquote><hr width='100%' size='2'>", $mensaje);
$mensaje = str_replace("[/citar]", "<hr width='100%' size='2'></blockquote>", $mensaje);
return $mensaje;
}


este es parte del codigo del formulario


function DoSmilie(addSmilie) {

var addSmilie;
var revisedMensaje;
var currentMensaje = document.coolsus.mensaje.value;
revisedMensaje = currentMensaje+addSmilie;
document.coolsus.mensaje.value=revisedMensaje;
document.coolsus.mensaje.focus();
return;
}
//--></SCRIPT>


<form name="coolsus" action="agregar.php" method="post">
<input type="hidden" name="identificador" value="<?=$id?>"

<td bgcolor="#DBE7F3">
<A onclick="DoSmilie(' ;) ');"
href="javascript:%20x()"><IMG alt=;) hspace=5
src="monitos/icon1.gif"
border=0></A>
<A onclick="DoSmilie(' :roll: ');"
href="javascript:%20x()"><IMG alt=:roll: hspace=5
src="monitos/icon2.gif"
border=0></A>
<A onclick="DoSmilie(' :) ');"
href="javascript:%20x()"><IMG alt=:) hspace=5
src="monitos/icon3.gif"
border=0></A>
<A onclick="DoSmilie(' :( ');"


hasta ahi todo bien pero como lo cambio para que se vea la carita al mostrar el mensaje

gracias por su ayuda.....
  #2 (permalink)  
Antiguo 18/11/2003, 00:47
Avatar de nuevo  
Fecha de Ingreso: mayo-2003
Ubicación: Spain
Mensajes: 2.009
Antigüedad: 20 años, 11 meses
Puntos: 2
3 fichero, este es HTML todo, con lo cual, se llama inf.html


Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>BBCode Class Documentation</title>
                                         
  <meta http-equiv="content-type"
 content="text/html; charset=ISO-8859-1">
</head>
<body>
           
<div style="text-align: center;">      
<h1>BBCode Class Documentation</h1>
      For version 1.0.0<br>
           
<hr width="100%" size="2">      
<div style="text-align: left;">      
<h2>Contents</h2>
           
<ul>
        <li><a href="#overview">Overview</a><br>
     </li>
     <li><a href="#functions">Functions</a></li>
           
  <ul>
       <li><a href="#add_alias">add_alias</a></li>
       <li><a href="#add_tag">add_tag</a></li>
      <li><a href="#change_setting">change_setting</a></li>
     <li><a href="#export_definition">export_definition</a></li>
     <li><a href="#get_data">get_data</a></li>
     <li><a href="#import_definition">import_definition</a></li>
     <li><a href="#parse_bbcode">parse_bbcode</a></li>
           
  </ul>
   <li><a href="#settings">Settings</a></li>
   
  <ul>
     <li><a href="#enced">enced</a><br>
     </li>
   
  </ul>
           
</ul>
           
<h2><a name="overview"></a>Overview</h2>
           
<div style="margin-left: 40px;">      
<h3>Name</h3>
      BBCode Class<br>
           
<h3>Description</h3>
      Class for parsing of BBCode.<br>
           
<h3>Author</h3>
      Leif K-Brooks (<a href="mailto:[email protected]">[email protected]</a>)<br>
     </div>
         
<h2><a name="functions"></a>Functions</h2>
     
<div style="margin-left: 40px;">   
<h3><a name="add_alias"></a>$succeeded=<a>$bbcode-&gt;</a>add_alias($name,$aliasof)</h3>
   Adds a tag that is an alias of another tag.&nbsp; For example<br>
     
<pre>add_alias('image','img');<br></pre>
   Adds an alias of the "img" tag named "image". &nbsp;This function returns 
 true on success, false on failure.<br>
     
<h3><a name="add_tag"></a>$error=<a>$bbcode-&gt;</a>add_tag($params)</h3>
   Adds a tag to the current BBCode definition. &nbsp;It returns an error 
message  if adding did not succeed, otherwise it returns an empty string.<br>
     
<p>The $params argument is an associative array with parameters to the function.<br>
   </p>
     
<h4>Parameters</h4>
     
<ul>
     <li>Name<br>
   (required)<br>
                 
    <p>This argument specifies what the tag will be called. &nbsp;For a tag 
 that will be used as [b], for example, this would be "b".</p>
     </li>
     <li>HasParam<br>
   (defaults to false)<br>
                 
    <p>This argument is a boolean. &nbsp;True means the tag has a parameter 
 ([tag=parameter] for example), false means it doesn't ([tag] for example)</p>
     </li>
     <li>HtmlBegin<br>
   (required)<br>
                 
    <p>The HTML that the start tag is replaced with. &nbsp;"%%P%%" is replaced 
 by the tag's parameter. &nbsp;For a [b] tag, this would be "&lt;b&gt;".</p>
     </li>
     <li>HtmlEnd<br>
   (required for complex HtmlBegin)<br>
                 
    <p>The HTML that the end tag is replaced with. &nbsp;For a [b] tag, this 
 would be "&lt;/b&gt;".<br>
       </p>
                 
    <p>The class attempts to determine HtmlEnd from the HtmlBegin parameter 
 if HtmlEnd isn't specified, but you should always specify this as it has 
trouble with anything more complex than a single tag with no parameters.</p>
     </li>
     <li>ParamRegex<br>
   (defaults to "[^\]]+")<br>
                 
    <p>A PCRE-fragment to determine if the parameter is valid. &nbsp;It is 
 highly reccomened that you do not allow "]" to be in the parameter, as it 
 tends to be confused with the tag's ending.</p>
     </li>
     <li>ParamRegexReplace<br>
   (defaults to empty array)<br>
                 
    <p>Associative array of PCRE replacments to do on the parameter, with 
 the keys being the search values and the values being the replacment.</p>
     </li>
     <li>HasEnd<br>
   (defaults to true)<br>
                 
    <p>Boolean for whether there is an end tag. &nbsp;If it is set to true, 
 the class ensures that all tags are ended.</p>
     </li>
     
</ul>
     
<h3><a name="change_setting"></a><a>$bbcode-&gt;</a>change_setting($name,$value)</h3>
   Changes the <a href="#settings">setting</a> named $name to $value.<br>
   
<h3><a name="export_definition"></a><a>$bbcode-&gt;</a>export_definition()</h3>
  Returns the a serialized copy of the current tag definition, ready to be
 imported with <a href="#import_definition">import_definition</a>.<br>
   
<h3><a name="get_data"></a>$data=<a>$bbcode-&gt;</a>get_data($name)</h3>
  Returns an array of the data of the tag named $name. &nbsp;Note that if 
$name is an alias, the "Name" property will be the alias's name.<br>
   
<h3><a name="import_definition"></a>$succeeded=<a>$bbcode-&gt;</a>import_definition($definition,$mode)</h3>
  Imports a tag definition from the <a href="#export_definition">export_definition</a>
 function.<br>
   
<h4>Modes</h4>
   
<ul>
    <li>append<br>
  (default)<br>
  Appends $definition to the current definition, using&nbsp; $definition's
 tag for duplicates.</li>
    <li>prepend<br>
  Prepends $definition to the current definition, using the current definition
 for duplicates.</li>
    <li>overwrite<br>
  Removes the current defintion and adds $definition.<br>
    </li>
   
</ul>
   
<h3><a name="parse_bbcode">$result=$bbcode-&gt;parse_bbcode($text)</a></h3>
  Parses $text according to the current BBCode definition, and returns the
 result.<br>
  </div>
 
<h2><a name="settings"></a>Settings</h2>
 
<div style="margin-left: 40px;">These settings change how certain features 
behave. &nbsp;They can be set with the <a href="#change_setting">change_setting</a> 
function.<br>
 
<h3><a name="enced"></a>enced</h3>
 (defaults to true)<br>
 Boolean for whether or not strings passes to the <a
 href="#parse_bbcode">parse_bbcode</a> function are html-encoded.<br>
 <br>
 </div>
 <br>
   </div>
   </div>
       
</body>
</html>
__________________
3w.valenciadjs.com
3w.laislatv.com
  #3 (permalink)  
Antiguo 19/11/2003, 07:44
 
Fecha de Ingreso: octubre-2003
Mensajes: 139
Antigüedad: 20 años, 6 meses
Puntos: 0
un tanto enredado jijiji
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 17:44.