Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-10-21 01:08:21

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

adi_scripts – Script File Management

Summary

This plugin provides a system for managing external script files from within TXP Admin.

There’s an admin tab, under Extensions, to organise the scripts and a tag for use on pages.

See the help supplied with the plugin, or have a look online. You can download the latest version from here.

Quickstart guide

  1. Install adi_scripts.
  2. In the “Scripts” tab choose your directories & manage your scripts.
  3. Put the <txp:adi_scripts /> tag in the <head>...</head> section of your pages.

Scripts tab

Here you can:

  • select script directories which are of interest
  • select which scripts you want to include on your pages
  • define the script order
  • restrict scripts to certain sections
  • tag scripts
  • specify scripts within IE conditional comments
  • temporarily prevent scripts from being linked

Directories of interest

These are the directories where your script files are located. In a new installation, the textpattern directory is automatically listed.

By order of the management

Script files have to be “managed” before they are included in pages. Files found in the directories selected above, are listed in the “Unmanaged scripts” section.

Under new management

Script files which are “managed” will be automatically linked into your pages by the <txp:adi_scripts /> tag.

Sorted

You can drag & drop the scripts into whichever order you want.

Tagging

Scripts can be tagged and loaded selectively.

Uninstalling adi_scripts

Simply delete the plugin & remove the <txp:adi_scripts /> tag from your pages.

Textpack

To install the Textpack, go to the plugin’s options page and click on “Install textpack”. This will copy & install it from a remote server. The number of language strings installed for your language will be displayed.

If the Textpack installation fails (possibly due to an error accessing the remote site), the alternative is to click the Textpack also available online link. This will take you to a website where the Textpack can be manually copied & pasted into the TXP Admin – Language tab.

Updates and corrections to the Textpack are welcome – please use the Textpack feedback form.

Languages currently available:

  • French (thanks Pat64)
  • Japanese (thanks HJ)

Requirements

TXP 4.7+.

Known restrictions

  • Javascript only
  • locally hosted script files only

Version history

  • 0.5
    • TXP 4.7+ only
    • anti-caching measure (in scripts admin tab)
    • anti-caching measure (in page markup)
    • OS agnosticism
    • table settings tweak
  • 0.4
    • NOT OFFICIALLY RELEASED
    • fix: http/https impartiality
  • 0.3
    • Updated for TXP 4.6
    • minimum supported release 4.5
    • all script files must have “.js” extension
  • 0.2
    • tagging
    • security fix
    • updates lastmod
  • 0.1
    • initial release

Other Script plugins

There are some other plugins that deal with scripts in various ways. Check them out & use whichever one works best for you.

  • soo_required_files – per-article loading of JavaScript and CSS files
  • spf_js – JavaScript management – create, edit, delete, export to file
  • stm_javascript – Stores JavaScript files within the database and handles them similar to CSS files

Feedback

Comments are most welcome.

Make a developer’s day

If you find this plugin useful, please consider donating to the Textpattern development team.

Last edited by gomedia (2021-06-22 05:09:21)

Offline

#2 2012-10-30 20:38:07

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,638
GitHub Twitter

Re: adi_scripts – Script File Management

Hi adi ;)

Here is the missing entries for the french textpack:

adi_directory => Répertoire
adi_directories => Répertoires
adi_enabled => Activé
adi_not_readable => Non lisible
adi_ie_conditionals => commentaires conditionnels IE
adi_scripts => Scripts
adi_scripts_dir => Répertoire des scripts
adi_scripts_dir_not_found => Répertoire inexistant
adi_scripts_general_warning => Certains répertoires/fichiers ne sont pas lisibles
adi_scripts_manage_fail => Impossible de gérer les scripts
adi_scripts_manage_selected => Gérer les scripts sélectionnés
adi_scripts_managed => Scripts choisis pris en compte
adi_scripts_managed_scripts => Scripts gérés
adi_scripts_unmanaged_scripts => Scripts non gérés
adi_scripts_updated => Configuration du script mise à jour
adi_update_directories => Actualiser
adi_update_scripts => Mettre à jour

Last edited by Pat64 (2012-10-30 20:38:43)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#3 2012-10-30 22:07:59

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_scripts – Script File Management

Pat64 wrote:

Hi adi ;)

Here is the missing entries for the french textpack:

Hi Patrick. Thanks very much – uploaded & ready to go.

Offline

#4 2012-11-02 21:54:12

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_scripts – Script File Management

Pat64 wrote:

The advantage to call a TXP official translator ;)

Merci Patrick, tu es un cavalier super!

(er, that’s meant to translate as “Thanks Patrick, you’re an absolute gentleman)

Offline

#5 2015-03-04 03:01:34

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_scripts – Script File Management

Version 0.2 available for download:

  • tagging
  • security fix
  • updates lastmod

Offline

#6 2016-06-14 00:12:23

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_scripts – Script File Management

Version 0.3 now available:

  • Updated for TXP 4.6
  • minimum supported release TXP 4.5
  • all script files must have “.js” extension

The plugin online help has details about upgrade steps for before, or after, TXP 4.6.

Offline

#7 2021-06-22 05:11:17

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_scripts – Script File Management

Version 0.5 available now.

- TXP 4.7+ only
- anti-caching measure (in scripts admin tab)
- anti-caching measure (in page markup)
- OS agnosticism
- table settings tweak
- fix: http/https impartiality

Offline

Board footer

Powered by FluxBB