<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=MyCallbacks</id>
	<title>MyCallbacks - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=MyCallbacks"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=MyCallbacks&amp;action=history"/>
	<updated>2026-08-22T20:33:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=MyCallbacks&amp;diff=2292&amp;oldid=prev</id>
		<title>Admin: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=MyCallbacks&amp;diff=2292&amp;oldid=prev"/>
		<updated>2016-04-06T20:15:45Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;I&amp;#039;d say this is one of the more confusing aspects of callbacks.&lt;br /&gt;
&lt;br /&gt;
Some people reference this mysterious directory as ...rt3/local/html/Callbacks/&amp;amp;lt;[[MyCallbacks]]&amp;amp;gt;/...&lt;br /&gt;
&lt;br /&gt;
Others reference it even MORE mysteriously as ...rt3/local/html/Callbacks/*/...&lt;br /&gt;
&lt;br /&gt;
Do this -- don&amp;#039;t make yourself crazy. Wherever it says anything like that -- just name the directory&lt;br /&gt;
&lt;br /&gt;
[[MyCallbacks]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Now, since you&amp;#039;re here. I&amp;#039;m guessing you&amp;#039;re slightly baffled about all this Callback gibberish anyway.&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s what they&amp;#039;re saying.&lt;br /&gt;
&lt;br /&gt;
In RT, each page is made up of a lot of different parts. Each of these parts is stored in a different area in the (hard to navigate) rt3 source tree.&lt;br /&gt;
&lt;br /&gt;
Now, in each page, there are sub-objects -- often referred to as Elements -- potentially referred to as other things as well. These Elements in the original source tree hold the magical Callbacks (don&amp;#039;t panic, I&amp;#039;m still explaining).&lt;br /&gt;
&lt;br /&gt;
So! For example -- you open a Ticket. It shows you all that Metadata junk (that&amp;#039;s a group of Elements), and it shows you the History (that&amp;#039;s an Element) and so on.&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s pretend that you want to mess with the History display (as I did when I wanted to learn this painful lesson).&lt;br /&gt;
&lt;br /&gt;
First you have to find the original bit that makes this happen. You&amp;#039;ll find it under the .../share/html/Ticket tree.&lt;br /&gt;
&lt;br /&gt;
That means that it&amp;#039;s a sub-Element of the Ticket display... that almost makes sense.&lt;br /&gt;
&lt;br /&gt;
Under the .../share/html/Ticket directory -- there&amp;#039;s an Elements directory.&lt;br /&gt;
&lt;br /&gt;
Inside THAT directory is a little piece of code called &amp;quot;[[ShowHistory]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Now -- as a hardcore coder, you COULD edit that file -- but you&amp;#039;d be sorry later on. RT changes dramatically between versions, and you might make a lot of changes to that Element and then have that work lost later on.&lt;br /&gt;
&lt;br /&gt;
The right way to edit it directly is to create an &amp;quot;override&amp;quot; version under .../local/html/Ticket/Elements/[[ShowHistory]] ... but even THAT might not be great because the code would still be subject to change without notice.&lt;br /&gt;
&lt;br /&gt;
So you use Callbacks! Let&amp;#039;s get excited.&lt;br /&gt;
&lt;br /&gt;
All a Callback does is check a directory for potential extra code.&lt;br /&gt;
&lt;br /&gt;
So, in this &amp;quot;[[ShowHistory]]&amp;quot; Element, there&amp;#039;s are many Callbacks -- one is called &amp;quot;[[SkipTransaction]]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What that means is that when the [[ShowHistory]] Element&amp;#039;s code is being run, it checks against the .../local/html/Callbacks/[[MyCallbacks]]/Ticket/Elements/[[ShowHistory]] directory to see if there is a FILE in there named &amp;quot;[[SkipTransaction]]&amp;quot; ... if so, run the code in that file.&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s the magic -- it&amp;#039;s a way of calling out to new code without losing your place in the source code.&lt;br /&gt;
&lt;br /&gt;
SOOOO!!!!&lt;br /&gt;
&lt;br /&gt;
When you want to edit a Callback, you create a FILE according to the name suggested by the programmer who made that Callback -- and store it in the right place as described above.&lt;br /&gt;
&lt;br /&gt;
Hope that helps.&lt;br /&gt;
&lt;br /&gt;
[[MGMead]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>