[FAQ] AJAX Quick Edit
- Marc
- Administrator 
- Posts: 620
- Joined: Tue 2. Sep 2008, 22:48
- phpbb.com: Marc
- Location: Munich
- Contact:
Add an "Advanced Edit Button" to Quick Edit
Version: 1.0.9
Open quickedit.php
Find:
After add:
For prosilver based styles:
Open styles/*yourstyle*/template/quickedit.html
Find:
After add:
For subsilver2 based styles:
Open styles/*yourstyle*/template/quickedit.html
Find:
After add:
			
			
									
						
										
						Open quickedit.php
Find:
Code: Select all
        'MAX_FONT_SIZE'            => (int) $config['max_post_font_size'], Code: Select all
        'U_ADVANCED_EDIT'        => (!$user->data['is_registered']) ? '' : ((($auth->acl_get('f_edit', $row['forum_id']) && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || $auth->acl_get('m_edit', $row['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f={$row['forum_id']}&p={$row['post_id']}") : ''),
        'L_ADVANCED_EDIT'        => 'Advanced Edit', Open styles/*yourstyle*/template/quickedit.html
Find:
Code: Select all
<input class="button2" type="button" onclick="cancel_changes({POST_ID});" value="{L_CANCEL}" style="font-size:0.9em;" />Code: Select all
<input class="button2" type="button" onclick="parent.location='{U_ADVANCED_EDIT}';" value="{L_ADVANCED_EDIT}" style="font-size:0.9em;" />Open styles/*yourstyle*/template/quickedit.html
Find:
Code: Select all
<input class="button2" type="button" onclick="cancel_changes({POST_ID});" value="{L_CANCEL}" style="font-size:0.9em;" />Code: Select all
<input class="button2" type="button" onclick="parent.location='{U_ADVANCED_EDIT}';" value="{L_ADVANCED_EDIT}" style="font-size:0.9em;" />- Marc
- Administrator 
- Posts: 620
- Joined: Tue 2. Sep 2008, 22:48
- phpbb.com: Marc
- Location: Munich
- Contact:
Open Advanced Edit when clicking on "Quickedit" the second t
Open styles/*yourstyle*/template/quickedit.html
Find:
Replace with:
Find:
After add:
Find:
Replace with:
			
			
									
						
										
						Find:
Code: Select all
<input class="button2" type="button" onclick="advanced_edit({POST_ID}, '{U_ADVANCED_EDIT}');" value="{L_ADVANCED_EDIT}" style="font-size:0.9em;" />Code: Select all
<input class="button2" id="advanced_edit" type="button" onclick="advanced_edit({POST_ID}, '{U_ADVANCED_EDIT}');" value="{L_ADVANCED_EDIT}" style="font-size:0.9em;" />Code: Select all
var open_quick_edit = 0;Code: Select all
var check_post_id = 0;Code: Select all
	if (open_quick_edit != 1 && check == null)
	{
		divname = 'postdiv' + post_id;
		document.getElementById('postdiv' + post_id).innerHTML = '<img src="{T_THEME_PATH}/images/ajax-loader.gif" style="margin: 60px auto; display: block;" />';
		get_text(post_id);
		open_quick_edit = 1;
	}Code: Select all
	if (open_quick_edit != 1 && check == null)
	{
		divname = 'postdiv' + post_id;
		document.getElementById('postdiv' + post_id).innerHTML = '<img src="{T_THEME_PATH}/images/ajax-loader.gif" style="margin: 60px auto; display: block;" />';
		get_text(post_id);
		open_quick_edit = 1;
		check_post_id = post_id;
	}
	else if (open_quick_edit == 1 && check != null && check_post_id == post_id)
	{
		document.getElementById('advanced_edit').onclick();
	}

 Menu
Menu Birthdays
							 Birthdays PayPal donations
PayPal donations Clock
Clock Top Posters
Top Posters Newest members
Newest members