Welcome Guest [Log In] [Register]
Bienvenido a High-Definition. Esperamos disfrute su visita.


Actualmente estas viendo el foro con un invitado. Esto significa que usted esta limitado a ciertas areas del foro y no puedo usar algunas funciones. Si te unes a nuestro foro, podras acceder a las areas de Solo-miebros, y usar muchas funciones de miembro como tener un perfil, crear y responder temas, enviar mensajes personales y votar en encuestas. El registro es simple, gratis y rapido.

Unete!

Username:   Password:
Add Reply
Nuevo Codigo
Topic Started: Sep 1 2007, 07:43 PM (612 Views)
.CrystalDream
Member Avatar
Design Is Life And Crativity
Admin
Yo solo aņado cosas utiles:

Esta vez se trata de un codigo que permite editar rapidamente un post tuyo y otros 8si eres mod o admin) con solo dar doble clic en cualquier area de dicho post.

Pruebelo veran que funciona.

El codigo si lo quieren en su foro aca esta:
[spoiler=Clic Para Ver Code]<script type='text/javascript'>
/* Quick Edit by CrAzY_J
http://s9.invisionfree.com/iFusion/index.php?
do not redistribute, rehost or edit this code without the creator's permission
This copyright header must stay intact at all times*/

var _rows = 10;
var _cols = 50;
var add_edit = 1;

if(/showtopic/i.test(this.location.href)){
document.write('<div id="mine" style="display:none;"></div>');
var sig = '';
function getpage(link,td){
sig = (td.getElementsByTagName('div')[td.getElementsByTagName('div').length-1].className == 'signature')? getsig(td):false;
td.innerHTML = '<span id="temp"><br /><strong>Loading....<strong></span>';
if(sig) td.appendChild(sig);
if(request = getrequest()){
request.open('GET',link.replace(/&amp;/g,'&'),true);
request.onreadystatechange = function(){
puttext(request,link,td);
}
request.send('');
}
}

function puttext(request,link,td){
if(request.readyState == 4 && request.status == 200){
var text = request.responseText;
var mydiv = document.getElementById('mine');
mydiv.innerHTML = text;
var inputs = mydiv.getElementsByTagName('input');
var Post = mydiv.getElementsByTagName('textarea')[0].value;
var link2 = ''
var re = /^(st|act|f|auth_key|CODE|p|t)$/
for(var i=0;i<inputs.length;i++){
if(inputs.name && re.test(inputs.name) && !/code/i.test(inputs.value))
link2 += '&'+inputs.name+'='+inputs.value;
}
link2 = link2.replace(/^&/,'');
var Frag = document.createElement('span');Frag.id='temp2';
var iput = document.createElement('input');
var itext = document.createElement('textarea');
iput2 = iput.cloneNode(false);
iput.type = 'hidden';iput.id = 'mine2';iput.value = link2;
iput2.type = 'button';iput2.onclick = function(){ save(link,td); };iput2.value = 'Edit';iput2.id ='ed';
itext.id = 'nvalue';
if(_cols&&_rows){
itext.cols = _cols;itext.rows = _rows;
}else{
itext.cols = 30;itext.rows = 10;
}itext.value = Post;
Frag.appendChild(itext);
Frag.appendChild(document.createElement('br'));
Frag.appendChild(iput);
Frag.appendChild(iput2);
td.removeChild(document.getElementById('temp'));
td.insertBefore(Frag,td.firstChild);
}
}

function save_edit(request,td,link){
if(request.readyState == 4 && request.status == 200){
var mydiv = document.getElementById('mine');
mydiv.innerHTML = request.responseText;
tables = mydiv.getElementsByTagName('table');
for(var t=0;t<tables.length;t++){
if(tables[t].width == '100%' && tables[t].cellSpacing == '1' && tables[t].getElementsByTagName('img')){
var links = tables[t].getElementsByTagName('a');
for(var i=0;i<links.length;i++){
if(/code=08/i.test(links.href) && links.href.split(/st=/)[0]==link.split(/st=/)[0]){
td.innerHTML = tables[t].rows[1].cells[1].innerHTML;
break;
}
}
}
}
}
}

function save(link,td){
var myn = document.getElementById('mine2');
var min = document.getElementById('ed');
var mvalue = document.getElementById('nvalue');
td.removeChild(document.getElementById('temp2'));
if(mvalue.value == ''){
alert('You did not enter a post');
return false;
}
add_edit = (add_edit)? 1:add_edit;
var myne = myn.value+'&enablesig=yes&enableemo=yes&add_edit='+add_edit+'&Post='+encodeURIComponent(mvalue.value);
if(request = getrequest()){
request.open('POST','http://'+this.location.host+this.location.pathname,true);
request.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
request.onreadystatechange = function(){
save_edit(request,td,link);
}
request.send(myne);
}
td.innerHTML = '<br /><strong>Submitting data...</strong>'+td.innerHTML;
}

function getrequest(){
return (window.ActiveXObject)? new ActiveXObject('Microsoft.XMLHTTP'):(window.XMLHttpRequest)? new XMLHttpRequest():false;
}

function getsig(td){
var frag = document.createDocumentFragment();
frag.appendChild(document.createElement('br'));
frag.appendChild(document.createElement('br'));
frag.appendChild(document.createTextNode('--------------------'));
frag.appendChild(td.getElementsByTagName('div')[td.getElementsByTagName('div').length-1].cloneNode(true));
return frag;
}

tables = document.getElementsByTagName('table');
for(var t=0;t<tables.length;t++){
if(tables[t].width == '100%' && tables[t].cellSpacing == '1' && tables[t].getElementsByTagName('img')){
var links = tables[t].getElementsByTagName('a');
for(var i=0;i<links.length;i++){
if(/CODE=08/.test(links.href)){
document.createAttribute('holder');
tables[t].rows[1].cells[1].setAttribute('holder',links.href);
tables[t].rows[1].cells[1].ondblclick = function(){
getpage(this.getAttribute('holder'),this);
}
}
}
}
}
}
</script>
[/spoiler]

Todo eso lo copias y lo pegas en el Footer (Board Wrappers > Footer)

:beerdrink ire aņadiendo mas codes utiles :miau
TAGS ROTATOR
Posted Image
// Super Admin // Designer //

GIFTS
NENEADRI 2 FIRMAS
Posted Image
Posted Image
Imagina - Plasma - Diseņa - Comparte y Aprende %mh%-200%mh%
Offline Profile Quote Post Goto Top
 
Lordsiyei
No Avatar

Miembros
Gracias men por el code xd muy buena idea
%mh%0%mh%
Offline Profile Quote Post Goto Top
 
.CrystalDream
Member Avatar
Design Is Life And Crativity
Admin
Oye me intriga, tu si ves abajo del avatar y de group y de post ves algo q dice Money [x cantidad] Donate???

aparte luego te mando los codes de todo lo q he hecho.
TAGS ROTATOR
Posted Image
// Super Admin // Designer //

GIFTS
NENEADRI 2 FIRMAS
Posted Image
Posted Image
Imagina - Plasma - Diseņa - Comparte y Aprende %mh%-200%mh%
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Noticias del Foro · Next Topic »
Add Reply