You'll most likely want to add linking to your plugin. Below, you'll find information about functions and naming conventions that will help you in this process.

The Basics

The following piece of code will produce a simple link pointing to /index.php/Special_Your_Script where A Label will be readable by the user.

echo common::Link('Special_Your_Script','A Label');
Will result in
<a href="<gpeasy_installation>/index.php/Special_Your_Script">A Label</a>
<a href="<gpeasy_installation>/index.php?r=Special_Your_Script">A Label</a>

If you have defined [Special:Special_Your_Script] in your plugin's Addon.ini file, then the php script you have associated with Special_Your_Script will be loaded.

Passing Arguments

echo common::Link('Special_Your_Script','A Label','cmd=do_something');
Will result in
<a href="<gpeasy_installation>/index.php/Special_Your_Script?cmd=do_something">A Label</a>
<a href="<gpeasy_installation>/index.php?r=Special_Your_Script&cmd=do_something">A Label</a>

As you can see, the string cmd=do_something, is added to the link as part of the query string.

Link Attributes

Passing HTML attributes to your links will be important for setting styles, ids, titles, etc.

echo common::Link('Special_Your_Script','A Label','','title="The Title"');
Will result in
<a href="<gpeasy_installation>/index.php/Special_Your_Script" title="The Title">A Label</a>
<a href="<gpeasy_installation>/index.php?r=Special_Your_Script" title="The Title">A Label</a>


elFinder 2.1.50 in Upcoming Release

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

Log In