You are here: Home Page > Free Stuff > Plugins

Developer Plugin

We had a need for some way to easily see cat_ids, field_ids etc when developing templates so we came up this little plugin. After adding the plugin tags to a template, and if you are logged in as a Super Admin, a small tab appears at the top left. Clicking this opens a pane with 6 tables of data:

Weblogs, Member Groups, Categories, Weblog Fields, Admin Quicklinks and Weblog Entries

Each table line has shortcut links that will open that specific item in the CP in a new window.

Checked for EE: 1.6.0 Download: pi.pur_developer.php (Zipped)

Installation Instructions

  1. Unzip the archive
  2. Copy pi.pur_developer.php into your /system/plugins/ directory
  1. Copy the pur_developer folder into your /system/plugins/ directory

Usage

There are two tags:


{exp:pur_developer:js}

Should be placed within the < head > of your template. This adds links to the Javascript and the CSS.


{exp:pur_developer}

Should be placed directly after the < body > tag. This creates the developer pane tab and populates the tables. Now when you are logged in as a Super Admin and viewing a front-end template a small tab appears at the top left. Clicking this tab toggles a sliding pane with the details and links shown.

Restrict Entries To Member Groups

This extension enables another tab in the Publish page (configurable by weblog) that allows you to restrict that entry to certain member groups including the Guest group (anonymous site visitors).

It was originally conceived as a more robust way of ‘sandboxing’ content rather than either creating separate templates or defining member group/status conditionals within the main templates.

Updated to Version 1.0.3
Changed language file to avoid conflicts in CP

Updated to Version 1.0.2
Changed $EXT->script_ends variables to FALSE
Modified check for $EXT->last_call in publish_form_new_tab_block

Updated to Version 1.0.1
Added $EXT->last_call variable to place nice with other extensions

Checked for EE: 1.6.0 Download: ext.restrict_entries.1.0.3.php (Zipped)

Installation Instructions

  1. Unzip the archive
  2. Copy ext.restrict_entries.php to your /system/extensions/ folder
  3. Copy lang.restrict_entries.php to your /system/language/ folder
  1. Enable the extension in Utilities/Extensions Manager

Usage

In the extension settings you can define which weblogs will have the new tab on the Publish page. If you choose the ‘Select All’ radio button then all existing and new weblogs will have the new tab.

Choose to publish a new entry in a weblog that you have chosen in the settings. A new tab will appear called Groups. This has checkboxes for all member groups except Super Admin, Banned and Pending. All groups selected will not see that entry even if its status is Open. The Guest group is the one to select if you wish to stop anonymous visitors from viewing that entry.

Once the extension is installed a new column is shown in the Edit tab. This is called Restricted and shows which entries have had some sort of restriction applied.

Comments and suggestions are welcome either direct to hello@purple-dogfish.co.uk or in the Expression Engine forum thread.

Accessible Captcha

This extension changes the captchas from graphic words to user-definable questions and answers. The settings allow you to create up to 8 simple questions and answers that will be randomly chosen in place of the captcha. These captchas are completely accessible as long as you remember to make the questions straightforward and without cultural context (unless you need to restrict usage to a specific group or type of site visitor).

Checked for EE: 1.6.0 Download: ext.accessible_captcha.php (Zipped)

Installation Instructions

  1. Unzip the archive
  2. Copy ext.accessible_captcha.php into your /system/extensions folder
  1. Copy lang.accessible_captcha.php into your /system/language/english folder

    Werner Gusset has kindly provided a German language file for this extension. You can download it from his site.

    N.B. You will probably want to edit the lang.core.php file to change the error messages associated with either no captcha submitted or an incorrect one. The keys are ‘captcha_required’ and ‘captcha_incorrect’ on about lines 98 and 101 respectively.

    Usage

    Go to Utilities/Extensions and make sure that they are enabled then enable the Accessible Captcha extension. Click on Settings and add up to 8 question and answer pairs. It’s best to make sure that the answer is a single word but you can customise them depending upon your website audience. So, for example you could have:

    Question: What is missing: North, South, East?
    Answer: West

    Question: 2+2 is equal to?
    Answer: 4

    Question: An … a day keeps the doctor away. What word is missing?
    Answer: apple

    Use the captcha code as per the Expression Engine documentation but modify the explanatory text to describe the requirement to answer a question rather than type the text in an image.

    The captcha will then be replaced by one of these questions. The answer is case insensitive so for question 1 ‘West’ and ‘west’ will validate.

    There are two additional settings:

    • Answer hinting, that places text showing the number of characters required to complete the answer after the question. The hint will be wrapped in a span with the class ‘captcha-hints’ like so:
      What is missing: North, South, East? <span class="captcha-hints">4 character(s) required</span>
    • Wrap hints in ( and ), places brackets around the hints like so:
      What is missing: North, South, East? <span class="captcha-hints">(4 character(s) required)</span>

      Note that no other HTML tags are output so you can use whatever you wish to wrap and style the captcha question. The input is cleaned and processed by the existing form code.

      Format Link

      If you have custom fields that require URLs then you may wish to ensure that they always have http:// prepended so that in template links work correctly.

      Checked for EE: 1.4.2 + Download: pi.format_link.php (Zipped)

      Installation Instructions

      1. Unzip the archive
      1. Copy pi.format_link.php into your /system/plugins/ directory

      Usage

      Wrap {exp:format_link} around any text with a URL in it.


      {exp:format_link}
      www.purple-dogfish.co.uk
      {/exp:format_link}

      Will return


      http://www.purple-dogfish.co.uk

      External Links

      Designating external links, either with a graphic or a different colour, is an important feature of accessible and usable websites. If you or your clients use Textile or a WYSIWYG editor then you may not be able to ensure that an appropriate CSS class is applied to such links. This plugin enables you to do that.

      Checked for EE: 1.5.2 + Download: pi.external_links.php (Zipped)

      Installation Instructions

      1. Unzip the archive
      1. Copy pi.external_links.php to your /system/plugins/ directory

      Usage

      Wrap {exp:external_links} around text you wish to process. There are two parameters:

      • class=”the CSS class you wish assigned to external links” (will default to ‘external-link’ if you don’t specify a class)
      • local=”the site domain name”

        So, assuming your domain is ‘myblog.com’ then this:


        {exp:external_links class="external" local="myblog.com"}
        <p><a href="http://www.anotherblog.com">consectetuer</a>, <a href="http://www.myblog.com/gallery/">hendrerit</a></p>
        {/exp:external_links}

        will output this:


        <p><a href="http://www.anotherblog.com" class="external">consectetuer</a>, <a href="http://www.myblog.com/gallery/">hendrerit</a></p>

        It is will take extra attributes like ‘title’ into account and place the class at the end of them.

        Email Encode

        This plugin will ASCII encode any email address and create a mailto link. Useful if you need to switch off the ‘Turn URLs and Email Addresses into Links’ weblog preference. It certainly won’t stop all spambots but every little bit helps!

        Checked for EE: 1.4.2 + Download: pi.emailencode.php (Zipped)

        Installation Instructions

        1. Unzip the archive
        1. Copy the enclosed file into your /system/plugins/ directory

        Usage

        Wrap any text with the tag pair like so:


        {exp:emailencode}
        Any text with an email address
        {/exp:emailencode}

Free Stuff Categories

Do you like and use any of this stuff?

If so then think about donating something. We can’t promise that we’ll spend it responsibly; Rach will probably want to spend it on toys for Skateboard, Greg will put it towards another Mighty Mouse (’cos his keep breaking).