Page 3 of 18

Re: [DEV] AJAX Quick Edit

Posted: Tue Dec 25, 2007 2:05 am
by iyeru42
I'd love to see this modification complete.

Re: [DEV] AJAX Quick Edit

Posted: Tue Dec 25, 2007 5:59 am
by nick445
Does anyone know if they have this for PHPBB2?

that be hella nice if sum1 could do it :O

Re: [DEV] AJAX Quick Edit

Posted: Tue Dec 25, 2007 10:33 am
by iyeru42
nick445 wrote:Does anyone know if they have this for PHPBB2?

that be hella nice if sum1 could do it :O
http://www.phpbb.com/community/viewtopi ... quick+edit

Ask in the 2.0x modification requests next time.

Re: [DEV] AJAX Quick Edit

Posted: Wed Dec 26, 2007 7:16 pm
by nick445
that mod doesnt work on phpbb 0.22.. rofl

Re: [DEV] AJAX Quick Edit

Posted: Wed Dec 26, 2007 10:33 pm
by iyeru42
nick445 wrote:that mod doesnt work on phpbb 0.22.. rofl
Then don't be like that, and go search for one that DOES.

Re: [DEV] AJAX Quick Edit

Posted: Thu Dec 27, 2007 8:13 am
by nick445
iyeru42 wrote:
nick445 wrote:that mod doesnt work on phpbb 0.22.. rofl
Then don't be like that, and go search for one that DOES.
LOL There's non that work with phpbb 2 bro

Re: [DEV] AJAX Quick Edit

Posted: Thu Dec 27, 2007 2:42 pm
by iyeru42
nick445 wrote:LOL There's non that work with phpbb 2 bro
Then go request one. :?

Re: [DEV] AJAX Quick Edit

Posted: Thu Dec 27, 2007 6:54 pm
by RealistST
I have a problem with this mod...

(I have russian languagepack)

http://img404.imageshack.us/img404/2792/problemqx4.jpg

Can you help me?

Re: [DEV] AJAX Quick Edit

Posted: Thu Dec 27, 2007 7:37 pm
by iyeru42
Err, the Quick Edit may not be able to handle UTF8.

Re: [DEV] AJAX Quick Edit

Posted: Fri Dec 28, 2007 1:03 am
by ^[GS]^
There are errors that allow modify multiple messages at once, and this causes many problems ... IN ADDITION, if the message contains edited the "&", the message is cut. I leave you my version, "homemade" as correct mistakes.

../template/Quickedit.html

Code: Select all

<!-- IF EDIT_FORM -->
<form method="post" name="quickedit" id="quickedit">
<textarea id="textarea" style="width:95%; height:95%;" rows="5">{POST_TEXT}</textarea><br />
<input type="button" class="btnmain" onclick="submit_changes({POST_ID});" value="{L_SAVE}" />
<input type="button" class="btnmain" onclick="cancel_changes({POST_ID});" value="{L_CANCEL}" />
</form>
<!-- ELSEIF SEND_TEXT -->
{TEXT}
<!-- ELSE -->
<script type="text/javascript">
<!--
var http_request = getHTTPObject();
var divname = '';
var editando = '';

function quick_edit(post_id)
{
	if(editando!='') {
		window.alert('You can only edit an answer at once.');
	} else {
		editando = post_id;
		divname = 'pd' + post_id;
		get_text(post_id);	
		contents = document.getElementById('quick_edit' + post_id).style.display = 'none';
	}
}

function submit_changes(post_id)
{
	contents = document.forms['quickedit'].elements['textarea'].value;
	contents = contents.replace("&","and");
	get_text(post_id, contents);
	contents = document.getElementById('quick_edit' + post_id).style.display = '';
	editando = '';
}

function cancel_changes(post_id)
{
	contents = 'cancel';
	get_text(post_id, contents);
	contents = document.getElementById('quick_edit' + post_id).style.display = '';
	editando = '';
}

function get_text(post_id, contents)
{
	if (contents)
	{
		contents = '&contents=' + contents + '&submit=true';
	}
	else
	{
		contents = '';
	}
	param = 'post_id=' + post_id + contents;	
	http_request.open("POST", '{U_QUICKEDIT}', true);
	http_request.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
  	http_request.onreadystatechange = handle_text;
  	http_request.send(param);
}

function handle_text()
{
	if (http_request.readyState == 4)
	{
		if (http_request.status == 200)
		{
			result = http_request.responseText;
			document.getElementById(divname).innerHTML = result;
		}
		else
		{
			alert('ERROR! Problema de recepcion.');
		}
	}
}

function getHTTPObject()
{
	if (window.XMLHttpRequest)
	{
		return new XMLHttpRequest();
	}
	else if(window.ActiveXObject)
	{
		return new ActiveXObject("Microsoft.XMLHTTP");
	}
	else
	{
		document.getElementById('p_status').innerHTML = 'Status: Cound not create XmlHttpRequest Object.  Consider upgrading your browser.';
	}
}
-->
</script>
<!-- ENDIF -->
Thanx ^^

Re: [DEV] AJAX Quick Edit

Posted: Fri Dec 28, 2007 10:05 pm
by swbfguy
when i click the quick edit, it reloads the current page.. doesn't allow you to even edit a post

Re: [DEV] AJAX Quick Edit

Posted: Fri Dec 28, 2007 11:04 pm
by iyeru42
swbfguy wrote:when i click the quick edit, it reloads the current page.. doesn't allow you to even edit a post
Did you do the skin edits, purge the cache, refresh the templates and made sure you have JavaScript Enabled? If you did all that... well I'd be stumped.

Re: [DEV] AJAX Quick Edit

Posted: Sun Dec 30, 2007 5:11 am
by swbfguy
i did.. but i may try to reinstall again

Re: [DEV] AJAX Quick Edit

Posted: Tue Jan 01, 2008 1:16 pm
by ^[GS]^
Sorry ^^ The code above, had a malfunction, now works PERFECT ^ ^

Code: Select all

function submit_changes(post_id)
{
	contents = document.forms['quickedit'].elements['textarea'].value;
	contents = contents.replace(/[&]/g,"%26");
	get_text(post_id, contents);
	contents = document.getElementById('quick_edit' + post_id).style.display = '';
	editando = '';
}
:)

Re: [DEV] AJAX Quick Edit

Posted: Tue Jan 01, 2008 6:23 pm
by PCGUY112887
Bump, anymore updates? Stable enough for gold?