FicerTan
Usuario (Argentina)

Aqui les comparto este generador de posts, este va integrado al script a diferencia de los que habian visto, que se hacian desde un enlace externo.. Se le agrega un boton para acceder al generador, ya que vi que algunos tienen problemas con el bbcode para agregarlo les deje asi con un boton.. En m.agregar_form.tpl buscamos: <li> <label>Título</label> <span style="display: none;" class="errormsg"></span> <input type="text" tabindex="1" name="titulo" maxlength="60" size="60" class="text-inp required" value="{$tsDraft.b_title}" style="width:760px"/> <div id="repost"></div> </li> Y agregamos abajo: <li>{include file='modules/m.generador_posts.tpl'}</li> Agregamos al final de extras.css .spacev { padding-bottom:10px; } #contenido { width:775px; } #contenido .caja { border: 1px dashed #979797; width:375px; margin:5px; -moz-border-radius:2px; float:left; background:#EEE; } .big { width:762px!important; } .completo { width:670px!important; } .caja h2 { background-color: #FAFCFD; color:#FFF; margin-top:0; font-size:14px; text-shadow:1px 1px 0 #7E7E7E; clear: left; background: #979797; height: 20px; line-height: 1.5; box-shadow: 0 2px 20px #858D93; } .caja h2 { padding: 3px 0 2px 8px !important; } .caja .caja-cont { overflow: hidden; white-space: nowrap; } .caja .caja-cont p { font-size:13px; font-family:Arial, Helvetica, sans-serif; color:#757575; text-align:justify; padding-left:7px; } .caja .caja-cont input,textarea { color:#388418; padding:2px; margin:6px; } .caja .caja-cont img {display: block; margin: auto; float:left} .icono_bien { background: url(images/bien.png) no-repeat left center; list-style-type: none; padding-left: 18px; } .icono_mal { background: url(images/mal.png) no-repeat left center; list-style-type: none; padding-left: 18px; } .PostText { color: #black; font-size: 17px; } .caja2 { font-size: 17px; font-family: Arial, Helvetica, sans-serif; color: #757575; text-align: justify; padding-left: 7px; } .btn { display: inline-block; padding: 5px 10px; margin: 3px; border: 1px solid; border-radius: 4px; font-weight: bold; font-size: 12px; font-family: Helvetica Neue, Helvetica, Arial; cursor: pointer; box-shadow: 0 1px 0 0 #DDD; } .btn.a { border-color: #4081AF #2E69A3 #20559A; color: #ffffff; text-shadow: 0 -1px 1px #3275BC; background: #52a8e8; background: -moz-linear-gradient(top, #52a8e8 0%, #377ad0 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#52a8e8), color-stop(100%,#377ad0)); background: -webkit-linear-gradient(top, #52a8e8 0%,#377ad0 100%); background: -o-linear-gradient(top, #52a8e8 0%,#377ad0 100%); background: -ms-linear-gradient(top, #52a8e8 0%,#377ad0 100%); background: linear-gradient(top, #52a8e8 0%,#377ad0 100%); filter: progidXImageTransform.Microsoft.gradient( startColorstr='#52a8e8', endColorstr='#377ad0',GradientType=0 ); } .btn.a:hover { border-color: #2A73A6 #165899 #07428F !important; border-style: solid !important; border-width: 1px !important; box-shadow: 0 1px 0 0 #62B1E9 inset !important; text-shadow: 0 -1px 1px #1D62AB !important; background: #3e9ee5; background: -moz-linear-gradient(top, #3e9ee5 0%, #206bcb 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3e9ee5), color-stop(100%,#206bcb)); background: -webkit-linear-gradient(top, #3e9ee5 0%,#206bcb 100%); background: -o-linear-gradient(top, #3e9ee5 0%,#206bcb 100%); background: -ms-linear-gradient(top, #3e9ee5 0%,#206bcb 100%); background: linear-gradient(top, #3e9ee5 0%,#206bcb 100%); filter: progidXImageTransform.Microsoft.gradient( startColorstr='#3e9ee5', endColorstr='#206bcb',GradientType=0 ); } .btn.a:hover { text-decoration: none !important; } .btn.a:active, .btn.a.active { -moz-border-bottom-colors: none !important; -moz-border-image: none !important; -moz-border-left-colors: none !important; -moz-border-right-colors: none !important; -moz-border-top-colors: none !important; background: none repeat scroll 0 0 #3282D3 !important; border-color: #154C8C #154C8C #0E408E !important; border-style: solid !important; border-width: 1px !important; box-shadow: 0 0 6px 3px #1657B5 inset, 0 1px 0 0 #FFFFFF !important; text-shadow: 0 -1px 1px #2361A4 !important; } Al final de funciones.js agregamos: function hxywg() { var txt = ""; document.getElementById("markItUp".value = ""; if (document.getElementById("titulo".value != ""{ txt = ""; txt += document.getElementById("titulo".value; txt += "n"; document.getElementById("markItUp".value += txt;} if (document.getElementById("portada".value != ""{ txt = ""; txt += "[hr]n"; txt += "nn"; document.getElementById("markItUp".value += txt;} if (document.getElementById("swf1".value != ""{ txt = ""; txt += "n"; txt += "nn"; document.getElementById("markItUp".value += txt;} if (document.getElementById("youtube".value != ""{ txt = ""; txt += "n"; txt += "nn"; document.getElementById("markItUp".value += txt;} if (document.getElementById("info".value != ""{ txt = ""; txt += "n"; txt += "n"; txt += document.getElementById("info".value; txt += "nnn"; document.getElementById("markItUp".value += txt;} if (document.getElementById("ss1".value != ""{ txt = ""; txt += "n"; txt += "nn"; document.getElementById("markItUp".value += txt;} if (document.getElementById("ss2".value != ""{ txt = ""; txt += "n"; txt += "nn"; document.getElementById("markItUp".value += txt;} if (document.getElementById("ss3".value != ""{ txt = ""; txt += "n"; txt += "nn"; document.getElementById("markItUp".value += txt;} if (document.getElementById("downlinks".value != ""{ txt = ""; txt += "n"; txt += ""; txt += document.getElementById("downlinks".value; txt += ""; document.getElementById("markItUp".value += txt;} if (document.getElementById("pass".value != ""{ txt = ""; txt += "n"; txt += document.getElementById("pass".value; txt += "nn"; document.getElementById("markItUp".value += txt;} } Subimos los archivos a sus respectivas carpetas... Descargar archivos En la descarga les deje la Instalacion en un txt por si no se ve bien en el topic. Por ahora este editor solo tiene lo basico del bbcode.. En la segunda le agregare todas las opciones que se puedan agregar. Hay que mencionar que use el generador que le dieron un estilo, no recuero bien el user que lo hizo.. si alguien lo recuerda asi me lo dice ya que en parte del diseño es de el.. aunque funciona con el que estaba primero solo que este tiene otro color y un poco de diseño añadido. Espero que les sea de utilidad.. Hasta la Proxima..