يمكنك بسهولة إنشاء اختصارات في منتداك.
قم بإنشاء قالب جديد (keyboard_shortcuts) وأدخل الكود الخاص بالاختصارات المطلوبة.
مثال على 3 اختصارات:
أضف إلى نهاية قالب PAGE_CONTAINER:
إذا لزم الأمر، قم بإنشاء صفحة تحتوي على الاختصارات:
قم بإنشاء قالب جديد (keyboard_shortcuts) وأدخل الكود الخاص بالاختصارات المطلوبة.
مثال على 3 اختصارات:
JavaScript:
<script>
document.addEventListener('keydown', function(event) {
// Check if the pressed key is the 'A' key and both the Ctrl and Alt keys are pressed
if ((event.key === 'a' || event.key === 'A') && event.ctrlKey && event.altKey) {
// Define the URL you want to navigate to
let newUrl = '/index.php?account/account-details'; // Change this URL as needed
// Navigate to the new URL
window.location.href = newUrl;
}
});
document.addEventListener('keydown', function(event) {
// Check if the pressed key is the 'F' key and both the Ctrl and Alt keys are pressed
if ((event.key === 'f' || event.key === 'F') && event.ctrlKey && event.altKey) {
// Define the URL you want to navigate to
let newUrl = '/index.php?'; // Change this URL as needed
// Navigate to the new URL
window.location.href = newUrl;
}
});
document.addEventListener('keydown', function(event) {
// Check if the pressed key is the 'H' key and both the Ctrl and Alt keys are pressed
if ((event.key === 'h' || event.key === 'H') && event.ctrlKey && event.altKey) {
// Define the URL you want to navigate to
let newUrl = '/index.php?pages/home/'; // Change this URL as needed
// Navigate to the new URL
window.location.href = newUrl;
}
});
</script>
أضف إلى نهاية قالب PAGE_CONTAINER:
HTML:
<xf:include template="keybord_shortcuts" />
إذا لزم الأمر، قم بإنشاء صفحة تحتوي على الاختصارات:
HTML:
HTML:
.shortcuts {
a:link {
text-decoration: none;
}
u {
color: #000;
}
</style>
<h2>Forum sneltoetsen</h2>.
<p>On this forum it is possible to use certain keyboard shortcuts. In combination with the [ctrl] key and the [alt] key, it is possible to go to a specific page with a third key. For this you have to press 3 keys at the same time. The overview:</p>
<ul class="shortcuts">
<li><button>ctrl</button> + <button>alt</button> + <button>a</button> = <a href="/index.php?account/account-details"><u>A</u>ccount settings</a></li>
<li><button>ctrl</button> + <button>alt</button> + <button>f</button> = <a href="/index.php"><u>F</u>orum index</a></li>
<li><button>ctrl</button> + <button>alt</button> + <button>h</button> = <a href="/index.php?pages/home/"><u>H</u>omepage</a></li>