[FAQ] AJAX Quick Edit
-
- Administrator
- Beiträge: 620
- Registriert: Di 2. Sep 2008, 23:48
- phpbb.com: Marc
- Wohnort: Munich
-
- Administrator
- Beiträge: 620
- Registriert: Di 2. Sep 2008, 23:48
- phpbb.com: Marc
- Wohnort: Munich
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: Alles auswählen
'MAX_FONT_SIZE' => (int) $config['max_post_font_size'],
Code: Alles auswählen
'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: Alles auswählen
<input class="button2" type="button" onclick="cancel_changes({POST_ID});" value="{L_CANCEL}" style="font-size:0.9em;" />
Code: Alles auswählen
<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: Alles auswählen
<input class="button2" type="button" onclick="cancel_changes({POST_ID});" value="{L_CANCEL}" style="font-size:0.9em;" />
Code: Alles auswählen
<input class="button2" type="button" onclick="parent.location='{U_ADVANCED_EDIT}';" value="{L_ADVANCED_EDIT}" style="font-size:0.9em;" />
-
- Administrator
- Beiträge: 620
- Registriert: Di 2. Sep 2008, 23:48
- phpbb.com: Marc
- Wohnort: Munich
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: Alles auswählen
<input class="button2" type="button" onclick="advanced_edit({POST_ID}, '{U_ADVANCED_EDIT}');" value="{L_ADVANCED_EDIT}" style="font-size:0.9em;" />
Code: Alles auswählen
<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: Alles auswählen
var open_quick_edit = 0;
Code: Alles auswählen
var check_post_id = 0;
Code: Alles auswählen
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: Alles auswählen
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();
}