webksde

Make Firefox and Firefox Development Edition running together (64-Bit)

After upgrading my Firefox and Firefox Development Edition to 64-Bit, i was no longer able to start them at the same time. Trying this will result in a message like „Firefox is already running but not responding“.

Today i found the solution on the Mozilla support page – but only inside the google cache, because the topic is no longer available for some reason, so i publish it this way again.

The solution is to use different profiles for each Firefox. To do this you have to create a second profile and add a custom shortcut and link directly to the second profile via the -P (= Profile) parameter.

Here we go (just for Windows – see links beyond to get help for other systems):

  1. Create a second Firefox profile
    1. Press WIN+R and type: „firefox -ProfileManager“ – hit enter.
    2. Create a new Profile (i create a new profile for the DEV Edition), as i can say it’s not nessesary to choose a folder manually, simply click next.
    3. Create a shortcut to the FF Dev EXE (which is typicaly located under „C:\Program Files\Mozilla Firefox“ or „C:\Program Files\Firefox Developer Edition“, which one you have to choose depends on the Firefox edition you want to use your new profile with)
    4. In the target field add the -P parameter, example: „C:\Program Files\Firefox Developer Edition\firefox.exe“ -P „tf@webks.de“ (in this case including all quotes!)

For more detailed informations see:

https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options

    Typesetter CMS: Create a reusable object, structured with page manager

    Let’s say you want to add a „call to action“-section beyond the content which is usable inside the template.

    1. Create a regular page holding your contents
    2. Create a new extra content block (/admin/extra), choose type „file include“. (You will notice, that the edit link is disabled inside the backend, ignore this)
    3. Possibility 1: Use Layout Manager
      1. Jump back to your frontend, klick „Layout“ at the top right
      2. Hover the region you wish to include your created extra block, click insert and choose your block
      3. Click save and click abort when finished
    4. Possibility 2: Insert your extra block directly inside your template
      1. Insert the following code to your template: <?php gpOutput::Get(‚Extra‘,’Technical_section_name‘); ?> (the technical section name is the name you choosed with underscores instead of spaces, but still case sensitive!)
      2. Save and reload your page
    5. Now hover the new appeard block (which will show something like „Insert File“ per default), click the edit link and choose the page you created in step 1

    The gerat thing about this is: the configuration of this extra is stored globaly and not per page, you have to set it just once and you can reuse it easily. You have it available to print it out inside your Template, or using a simple include section type with the page manager.

      Smart Sticky Sidebar via hcSticky

      If you ever need to have a sticky sidebar, which has a variable height, which is working well with a footer region, without having a second scrollbar … try https://github.com/somewebmedia/hc-sticky

      Trying to build this with waypoint.js or something, is pain in the ass. This great library finished the job in < 5 minutes.

        Smooth scrolling anchor links and hash url’s – also base tag fix

        This solution is also very usefull on pages with -Tag. Sometimes the basetag will make anchor links not working properly anymore (redirecting to the base url).

        $(document).ready(function () {
          // Anchor links on click based on Chris Coyier's solution: https://css-tricks.com/snippets/jquery/smooth-scrolling/
          $('a[href^="#"]:not([href="#"])').click(function(e) {
            if (location.hostname == this.hostname) {
              var target = $(this.hash);
              target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
              if (target.length) {
                $('html, body').animate({
                  scrollTop: target.offset().top - 80 + 'px'
                }, 1000);
                return false;
              }
            }
          });
        
        });
        
        // Smooth scrolling anchor links
        // to top right away
        if (window.location.hash)
          scroll(0, 0);
        // void some browsers issue
        setTimeout(function () {
          scroll(0, 0);
        }, 1);
        
        $(function () {
          // *only* if we have anchor on the url
          $( window ).load(function() {
            if (window.location.hash && $(window.location.hash).length > 0) {
              // smooth scroll to the anchor id
              $('html,body').animate({
                scrollTop: $(window.location.hash).offset().top - 80 + 'px'
              }, 1000, 'swing');
            }
          });
        
        });
        

          Typesetter aka gpEasy – Remove edit and login locks

          To remove the edit lock, simply navigate to your main directory, open the „data“ folder, and delete the temporary „lock_….“ file.

          To reset the login lock, navigate to: „/data/_site/“ and edit the „user.php“. Now simply reset the „attempts“ to 0.

            Adaptive background (color taken from an image via JS)

            Take a look at this amazing library. You may now the effect from Googles image search.

            The library take´s the „primary color“ of an image, and set it to the image container as background color. Similar to the tv technique „Ambient Light“.

              Webfont „Amiri“ wrong underline position

              In a current project we used the beautiful looking font „Amiri“. After hovering the first link, i saw the underline appearing way too to far at the bottom.

              As we can´t fix this via CSS, i modified the font with FontForge. The result is called „Amirifix“ and is attached to this post.

              Amiri is an Open Font by Khaled Hosny & Sebastian Kosch.

              Credits:

              Copyright (c) 2010-2013, Khaled Hosny <khaledhosny@eglug.org>.
              Portions copyright (c) 2010, Sebastian Kosch <sebastian@aldusleaf.org>

              This Font Software is licensed under the Open Font License, Version 1.1.

                iOS Radiobuttons & Checkox Label behavoir

                For some reason, a click on the label of radio- & checkbox form elements does not work (to check the related form item). After some research we figured out, that we have to set the css attribute cursor:pointer to fix this issue.

                Another amazing „feature“ made by Apple, big thx for wasting my time guy´s, you´re so great.

                  Drupal Mimemail Module (HTML Mails, Newsletter, …) unwanted attachment.dat *Update*

                  In a current project we ran into a curious problem, every HTML Mail has an file attachment named „attachment.dat“.

                  After some research in the „mimemail.theme.inc“ (function „template_preprocess_mimemail_message()“), we figured out that the problem is located inside the $css content.

                  In our case the implementation of the google webfont produces this issue (@import url(http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600)). Basicly @import has to work inside html mails, so mimemail seems to do something wrong here?

                  Whatever. We can work around this problem, using the <link …> – implemantation inside the mimemail-message.tpl file instead of the declaration directly inside the css code.