glx_image Admin Hack
This admin hack places links to create glx_image tags by the side of Textile / Textpattern / XHTML in the image section of the admin.
The final output will look like glx_img® / glx_img(l) / glx_img© / glx_img(sa) and when clicking on for example glx_img© a popup shows up with quicklinks to different glx_image tags with different attributes.
Before we start, remember to backup your files before you do any change to them.
To make this work there is two files we have to change in, first open txp_image.php that is located in the include directory.
Around line #80 look for
$xhtmlink under that line place the code below.
Okey, i know i looks kinda messy, but that is the code that is needed to pass the right variables to the pop up window.
One last change to this file and we are done, after the paste of the above code go to line #89 and replace that line with the below.
Alright, we are now done with txp_image.php.
Now open txp_tag.php that is located in the include directory.
tag_image() function around line #614
And on line #617 we have to add
$invars Replace the whole line with the bellow code.
$invars = gpsa(array('id','type','h','w','ext','alt', 'align'));
Under the case xhtml add the code below.
If you are using dca_pop in conjunction with glx_image, then instead of using the above code (00003.txt), use the following instead:
Alright, that’s it. Of course you can add your own glx_image tags and attributes to the image_element case.
If you are not familiar with php and still want this to work in your admin area, you can download a hacked version on txp_image.php and txp_tag.php from the available file: