Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
David N. Posted May 5, 2022 Posted May 5, 2022 Is there a way to disable the preview that pops-up when you leave your mouse over a topic title when you're inside a forum?
Solution teraßyte Posted May 5, 2022 Solution Posted May 5, 2022 No, there's no specific setting to disable it. You can either edit it out of the template or have a plugin made to disable it. Going the plugin way will keep your templates unedited and any future updates to it will automatically apply, which is what I usually suggest. If you want to edit the template thought just find this code in "forums > front > forums > topicRow" (line ~113): <a href='{$row->url( "getPrefComment" )}' class='' title='{{if $row->mapped('title')}}{$row->mapped('title')}{{else}}{lang="content_deleted"}{{endif}} {{if $row->canEdit()}}{lang="click_hold_edit"}{{endif}}' {{if $row->tableHoverUrl and $row->canView()}} data-ipsHover data-ipsHover-target='{$row->url()->setQueryString('preview', 1)}' data-ipsHover-timeout='1.5'{{endif}}{{if $row->canEdit()}} data-role="editableTitle"{{endif}}> and replace it with (basically remove the data-ipsHover attributes): <a href='{$row->url( "getPrefComment" )}' class='' title='{{if $row->mapped('title')}}{$row->mapped('title')}{{else}}{lang="content_deleted"}{{endif}} {{if $row->canEdit()}}{lang="click_hold_edit"}{{endif}}' {{if $row->canEdit()}} data-role="editableTitle"{{endif}}> Marc and David N. 2
David N. Posted May 5, 2022 Author Posted May 5, 2022 35 minutes ago, teraßyte said: No, there's no specific setting to disable it. You can either edit it out of the template or have a plugin made to disable it. Going the plugin way will keep your templates unedited and any future updates to it will automatically apply, which is what I usually suggest. If you want to edit the template thought just find this code in "forums > front > forums > topicRow" (line ~113): <a href='{$row->url( "getPrefComment" )}' class='' title='{{if $row->mapped('title')}}{$row->mapped('title')}{{else}}{lang="content_deleted"}{{endif}} {{if $row->canEdit()}}{lang="click_hold_edit"}{{endif}}' {{if $row->tableHoverUrl and $row->canView()}} data-ipsHover data-ipsHover-target='{$row->url()->setQueryString('preview', 1)}' data-ipsHover-timeout='1.5'{{endif}}{{if $row->canEdit()}} data-role="editableTitle"{{endif}}> and replace it with (basically remove the data-ipsHover attributes): <a href='{$row->url( "getPrefComment" )}' class='' title='{{if $row->mapped('title')}}{$row->mapped('title')}{{else}}{lang="content_deleted"}{{endif}} {{if $row->canEdit()}}{lang="click_hold_edit"}{{endif}}' {{if $row->canEdit()}} data-role="editableTitle"{{endif}}> Great, thanks a lot for the detailed answer, I appreciate it!
David N. Posted May 5, 2022 Author Posted May 5, 2022 1 hour ago, teraßyte said: If you want to edit the template thought just find this code in "forums > front > forums > topicRow" (line ~113): <a href='{$row->url( "getPrefComment" )}' class='' title='{{if $row->mapped('title')}}{$row->mapped('title')}{{else}}{lang="content_deleted"}{{endif}} {{if $row->canEdit()}}{lang="click_hold_edit"}{{endif}}' {{if $row->tableHoverUrl and $row->canView()}} data-ipsHover data-ipsHover-target='{$row->url()->setQueryString('preview', 1)}' data-ipsHover-timeout='1.5'{{endif}}{{if $row->canEdit()}} data-role="editableTitle"{{endif}}> and replace it with (basically remove the data-ipsHover attributes): <a href='{$row->url( "getPrefComment" )}' class='' title='{{if $row->mapped('title')}}{$row->mapped('title')}{{else}}{lang="content_deleted"}{{endif}} {{if $row->canEdit()}}{lang="click_hold_edit"}{{endif}}' {{if $row->canEdit()}} data-role="editableTitle"{{endif}}> That worked great. Thanks again.
David N. Posted May 5, 2022 Author Posted May 5, 2022 I duplicated the theme and edited the original, so that users can still choose to see the previews if they want! 😀 Marc 1
teraßyte Posted May 5, 2022 Posted May 5, 2022 I actually just submitted a quick plugin to disable the topic preview. It's pending approval here in the IPS Marketplace and already available on my site: The plugin has only a setting to exclude certain forums, not themes though. Maybe I'll consider it for a future version. Marc and David N. 2
David N. Posted May 5, 2022 Author Posted May 5, 2022 1 minute ago, teraßyte said: I actually just submitted a quick plugin to disable the topic preview. It's pending approval here in the IPS Marketplace and already available on my site: The plugin has only a setting to exclude certain forums, not themes though. Maybe I'll consider it for a future version. Wow you're fast! That's great. I think if you're making a plug-in then ideally (if possible) it should have a simple switch for users to turn the preview on or off in their account settings. That way one doesn't have to create two themes just to change that setting.
teraßyte Posted May 5, 2022 Posted May 5, 2022 Just now, Jamynee said: Wow you're fast! That's great. I think if you're making a plug-in then ideally (if possible) it should have a simple switch for users to turn the preview on or off in their account settings. That way one doesn't have to create two themes just to change that setting. Yeah, I was thinking I'd add a member setting to let everyone choose rather than excluding specific themes. Otherwise you'd have to duplicate all the installed themes. 😅 David N. 1
Recommended Posts