[ABD] AJAX Quick Edit

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
User avatar
iyeru42
Registered User
Posts: 1120
Joined: Wed Feb 01, 2006 7:22 pm
Location: Madison, WI
Contact:

Re: [DEV] AJAX Quick Edit

Post by iyeru42 »

I'd love to see this modification complete.
My Website | My MOD Requests | Foreign Key Docs (some topics are not requests)
"It's easy to rebel, but it's hard to be recognized."
nick445
I've Been Banned!
Posts: 222
Joined: Fri Sep 15, 2006 3:52 am

Re: [DEV] AJAX Quick Edit

Post by nick445 »

Does anyone know if they have this for PHPBB2?

that be hella nice if sum1 could do it :O
User avatar
iyeru42
Registered User
Posts: 1120
Joined: Wed Feb 01, 2006 7:22 pm
Location: Madison, WI
Contact:

Re: [DEV] AJAX Quick Edit

Post 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.
My Website | My MOD Requests | Foreign Key Docs (some topics are not requests)
"It's easy to rebel, but it's hard to be recognized."
nick445
I've Been Banned!
Posts: 222
Joined: Fri Sep 15, 2006 3:52 am

Re: [DEV] AJAX Quick Edit

Post by nick445 »

that mod doesnt work on phpbb 0.22.. rofl
User avatar
iyeru42
Registered User
Posts: 1120
Joined: Wed Feb 01, 2006 7:22 pm
Location: Madison, WI
Contact:

Re: [DEV] AJAX Quick Edit

Post 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.
My Website | My MOD Requests | Foreign Key Docs (some topics are not requests)
"It's easy to rebel, but it's hard to be recognized."
nick445
I've Been Banned!
Posts: 222
Joined: Fri Sep 15, 2006 3:52 am

Re: [DEV] AJAX Quick Edit

Post 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
User avatar
iyeru42
Registered User
Posts: 1120
Joined: Wed Feb 01, 2006 7:22 pm
Location: Madison, WI
Contact:

Re: [DEV] AJAX Quick Edit

Post by iyeru42 »

nick445 wrote:LOL There's non that work with phpbb 2 bro
Then go request one. :?
My Website | My MOD Requests | Foreign Key Docs (some topics are not requests)
"It's easy to rebel, but it's hard to be recognized."
User avatar
RealistST
Registered User
Posts: 6
Joined: Mon Jun 25, 2007 9:05 pm

Re: [DEV] AJAX Quick Edit

Post 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?
"The most beautiful thing we can experience is the mysterious." - Albert Einstein
User avatar
iyeru42
Registered User
Posts: 1120
Joined: Wed Feb 01, 2006 7:22 pm
Location: Madison, WI
Contact:

Re: [DEV] AJAX Quick Edit

Post by iyeru42 »

Err, the Quick Edit may not be able to handle UTF8.
My Website | My MOD Requests | Foreign Key Docs (some topics are not requests)
"It's easy to rebel, but it's hard to be recognized."
User avatar
^[GS]^
Registered User
Posts: 274
Joined: Sun Aug 06, 2006 10:59 pm
Location: Argentina
Contact:

Re: [DEV] AJAX Quick Edit

Post 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 ^^
swbfguy
Registered User
Posts: 75
Joined: Tue Dec 11, 2007 6:26 am

Re: [DEV] AJAX Quick Edit

Post by swbfguy »

when i click the quick edit, it reloads the current page.. doesn't allow you to even edit a post
User avatar
iyeru42
Registered User
Posts: 1120
Joined: Wed Feb 01, 2006 7:22 pm
Location: Madison, WI
Contact:

Re: [DEV] AJAX Quick Edit

Post 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.
My Website | My MOD Requests | Foreign Key Docs (some topics are not requests)
"It's easy to rebel, but it's hard to be recognized."
swbfguy
Registered User
Posts: 75
Joined: Tue Dec 11, 2007 6:26 am

Re: [DEV] AJAX Quick Edit

Post by swbfguy »

i did.. but i may try to reinstall again
User avatar
^[GS]^
Registered User
Posts: 274
Joined: Sun Aug 06, 2006 10:59 pm
Location: Argentina
Contact:

Re: [DEV] AJAX Quick Edit

Post 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 = '';
}
:)
User avatar
PCGUY112887
Registered User
Posts: 502
Joined: Thu Apr 01, 2004 12:39 am
Location: Illinois
Contact:

Re: [DEV] AJAX Quick Edit

Post by PCGUY112887 »

Bump, anymore updates? Stable enough for gold?
Locked

Return to “[3.0.x] Abandoned MODs”