Mybb Mobile Theme <Verified Source>

$db->insert_query("settings", [ 'name' => 'mobile_swipe_back', 'title' => 'Enable Swipe to Go Back', 'description' => 'Allow users to swipe right to go to previous page.', 'optionscode' => 'yesno', 'value' => '1', ]); In global_start hook:

To add a to the MyBB Mobile Theme (e.g., the popular MyBB Mobile or GoMobile plugin/theme), you’ll need to edit template files, add JavaScript/CSS, and possibly modify plugin PHP code. mybb mobile theme

Below is a for adding a common feature: “Swipe to go back to previous page” (touch gesture support). 1. Locate the Mobile Theme’s JavaScript File Typically found in: Locate the Mobile Theme’s JavaScript File Typically found

Add to mobile.css :

$(document).on("swiperight", function(e) { if (history.length > 1) { history.back(); return false; } }); $(document).on("swipeleft", function(e) { // Optional: go forward (if you store next page) // Or just close modal/menu }); function(e) { if (history.length &gt

if($mybb->settings['mobile_swipe_back'] && $GLOBALS['mobile_theme_enabled']) { $GLOBALS['headerinclude'] .= "<script>// swipe code here</script>"; } Another popular feature request – toggles dark/light mode.