News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Convert Quick Edit/Modify Inline image into a text link?

Started by samborabora, July 24, 2014, 11:03:28 AM

Previous topic - Next topic

samborabora

I'd like to convert the quick edit/inline modify img into to a text link, so I tried this:

<a class="modifybutton" id="modify_button_', $message['id'], '" href="#" onclick="oQuickModify.modifyMsg(\'',
$message['id'], '\')">Modify</a>


No good, just refreshes the page. How can I turn this:

<img src="', $settings['images_url'], '/icons/modify_inline.gif" alt="', $txt['modify_msg'], '" title="', $txt['modify_msg'], '" class="modifybutton" id="modify_button_', $message['id'], '" style="cursor: ', ($context['browser']['is_ie5'] || $context['browser']['is_ie5.5'] ? 'hand' : 'pointer'), '; display: none;" onclick="oQuickModify.modifyMsg(\'', $message['id'], '\')" />

Into a text link?

Hj Ahmad Rasyid Hj Ismail

I checked my SimpleRevamp2 theme as I changed all buttons to text in that theme.

I made it inline with other button. Here was my code:

<li class="modify_button">| <a onclick="oQuickModify.modifyMsg(\'', $message['id'], '\')" title="' . $txt['modify'] . ' inline" />i', $txt['modify'], '</a></li>';

I am pretty sure that it was working (at least I think so :D ).

samborabora

Quote from: ahrasis on July 24, 2014, 11:28:49 AM
I checked my SimpleRevamp2 theme as I changed all buttons to text in that theme.

I made it inline with other button. Here was my code:

<li class="modify_button">| <a onclick="oQuickModify.modifyMsg(\'', $message['id'], '\')" title="' . $txt['modify'] . ' inline" />i', $txt['modify'], '</a></li>';

I am pretty sure that it was working (at least I think so :D ).

Perfect, thank you!! :D

Hj Ahmad Rasyid Hj Ismail


samborabora

Quote from: ahrasis on July 24, 2014, 01:31:10 PM
Glad it still works. ;)

Actually, it turned out the Quick Edit is broken on my board, lol. Your link's fine cause I tried it with the original image version and it fails. Goes as far as to pop up the textbox box, and even saves and reloads the page, but it reflects no changes, the original post stays the same as it was, so I may need to open a new thread to see if anyone knows anything about what's causing the problem.

Hj Ahmad Rasyid Hj Ismail

It may be the given code as well. I haven't tested it for quite sometimes.

In any event, have you install any ajax mod that changed display page? It might be the cause you know. If I remember correctly, there is one ajax mod that will cause that. I am not sure whether it is ajax quick reply or ajax message inline preview.

samborabora

Quote from: ahrasis on July 24, 2014, 05:49:44 PM
It may be the given code as well. I haven't tested it for quite sometimes.

In any event, have you install any ajax mod that changed display page? It might be the cause you know. If I remember correctly, there is one ajax mod that will cause that. I am not sure whether it is ajax quick reply or ajax message inline preview.

I tried removing the quick moderation, and it's still broken, There must be another one that's interfering with the Ajax. Just can't imagine why it wouldn't work on my theme and it would on the default if the mods are supposed to be installed on both themes?

Hj Ahmad Rasyid Hj Ismail

Redo your custom theme one by one. Each time check the quick edit whether it is working or otherwise. Finding the fault is easier that way.

Note that the whole thing is within one form. I have to break the form into two parts when I was doing QRR: Qucik Reply Reposition Mod. Do share your finding so theme authors would know how to resolve this if they do the same edit to display page in the future.

Advertisement: