Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

New Extension: QuickKeys

MarkMark Vanilla Staff
edited March 2007 in Vanilla 1.0 Help
Check out your Forum Preferences. There is a new option at the bottom to enable quickkeys.
«1

Comments

  • Options
    lechlech Chicagoland
    oh hell yeah!
  • Options
    lechlech Chicagoland
    what did you make the quick key for settings?
  • Options
    what are zzzzzzzzz quick keys then sir?
  • Options
    oh colour me stupid... the underlined letters in the tabs.
  • Options
    lechlech Chicagoland
    alt+D! :D
  • Options
    jonezyjonezy New
    edited July 2005
    me = alt+dumbass
  • Options
    lechlech Chicagoland
    lol@jonezy
  • Options
    crtl-letter for mac users.
  • Options
    MarkMark Vanilla Staff
    the other quick key that you can't see (because the hyperlink is underlined already) is ALT+n for a new discussion.
  • Options
    lechlech Chicagoland
    ahh, very nice indeed. I suppose you could also do all sorts of things with this to highlight or underline in whatever way you wish :)
  • Options
    MarkMark Vanilla Staff
    Yeah - I just added some new codes to the language file for the quickkeys, so you can edit it however you want - I just put some <u> tags in there.
  • Options
    lechlech Chicagoland
    ahh, good deal, man. :D
  • Options
    domdom
    edited July 2005
    I like using: <a href="..."><strong><span title="Accesskey: d">D</span></strong>iscussions<a>
    And then applying styles like underlining via the CSS

    edit // Although I can see an advantage of using <u>: It highlights it even when CSS is off.
  • Options
    MarkMark Vanilla Staff
    Well, that's a preference. You can change the english.php file to say whatever you want :)
  • Options
    edited July 2005

    The element, per HTML 4.01, is deprecated, but allowed in XHTML transitional. In strict and beyond, it is removed.

    The preferred method of doing this is with an inline element, such as:

    Key

    and CSS:

    .ul {  text-decoration: underline; }
    

    ~d

  • Options
    huh, this extension isn't working on my site. it works here. I tried disabling it, re-enabling it, logging out, logging back in. no joy.
  • Options
    MarkMark Vanilla Staff
    unipus: You've got to go to your account preferences and turn it on after it's been enabled.
  • Options
    Ahhaaaaa. Something else to add to the docs though! Probably should be a note in the extension description, that it works on a per-user basis. Good implementation, though.
  • Options
    To be multilingual compatible I modified this script a little so that it always uses the first usable letter in a word. I found it usefull, if others find think so too, here's my code:


    <?php
    /*
    Extension Name: Quick Keys
    Extension Url: http://lussumo.com/docs/
    Description: Allows users to use ALT+[KeyCode] to access various pages of Vanilla.
    Version: 1.0
    Author: Mark O'Sullivan
    Author Url: http://www.markosullivan.ca/

    Copyright 2003 - 2005 Mark O'Sullivan
    This file is part of Vanilla.
    Vanilla is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    Vanilla is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
    You should have received a copy of the GNU General Public License along with Vanilla; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    The latest source code for Vanilla is available at www.lussumo.com
    Contact Mark O'Sullivan at mark [at] lussumo [dot] com

    You should cut & paste these language definitions into your
    conf/your_language.php file (replace "your_language" with your chosen language,
    of course):
    */
    $Context->Dictionary['MenuOptions'] = 'Menu Options';
    $Context->Dictionary['UseQuickKeys'] = 'Use quick-keys to access common forum pages';

    if (in_array($Context->SelfUrl, array('account.php', 'categories.php', 'comments.php', 'index.php', 'post.php', 'search.php', 'settings.php')) && $Context->Session->UserID > 0) {
    $usedkeys = array();
    if (@$Menu && @$Context->Session->User) {
    if ($Context->Session->User->Preference('UseQuickKeys')) {
    foreach ($Menu->Tabs as $key => $tab)
    {
    for ($i=0;$iTabs[$key]['Text'] = substr($tab['Text'], 0, $i).''.substr($tab['Text'], $i, $i+1).''.substr($tab['Text'], $i+1);
    $Menu->Tabs[$key]['Attributes'] = 'accesskey="'.$char.'"';
    break;
    }
    }
    }

    //$Menu->AddTab($Context->GetDefinition('Account_QuickKey'), 'account', GetUrl($Configuration, 'account.php'), 'accesskey=\'a\'');
    // Add a hidden tab
    $text = $Context->GetDefinition('StartANewDiscussion');
    for ($i=0;$iContext->Dictionary['StartANewDiscussion_accesskey'] = substr($text, 0, $i).''.substr($text, $i, $i+1).''.substr($text, $i+1); break; } } $Menu->AddTab($Panel->Context->Dictionary['StartANewDiscussion_accesskey'], 'post', GetUrl($Configuration, 'post.php', 'category/', 'CategoryID', ForceIncomingInt('CategoryID',0)), 'accesskey="'.$char.'" class="Invisible"'); // alter the start a new discussion button in the panel function Panel_AlterStartDefinition(&$Panel) { $Panel->Context->Dictionary['StartANewDiscussion'] = $Panel->Context->Dictionary['StartANewDiscussion_accesskey']; } $Context->AddToDelegate('Panel', 'PreRender', 'Panel_AlterStartDefinition'); } } } // Add the QuickKeys setting to the forum preferences form if ($Context->SelfUrl == 'account.php' && $Context->Session->UserID > 0) { $PostBackAction = ForceIncomingString('PostBackAction', ''); if ($PostBackAction == 'Functionality') { function PreferencesForm_AddQuickKeysPreference(&$PreferencesForm) { $PreferencesForm->AddPreference('MenuOptions', 'UseQuickKeys', 'UseQuickKeys', 1); } $Context->AddToDelegate('PreferencesForm', 'Constructor', 'PreferencesForm_AddQuickKeysPreference'); } } ?>
  • Options
    Though I missed the comments about the <u> tag... Should be replaced again then I guess.
This discussion has been closed.