PXN8 Update… Edit from any page

Over the weekend I released a new and improved version of PXN8.
A limitation in previous versions of PXN8 was the requirement that the editor page (be it JSP/PHP/ASP) had to reside in the same directory as PXN8. (e.g. if you installed PXN8 in a folder called ‘photoeditor’ then your editor page had to reside in the same folder.)
The latest version of PXN8 does not have this limitation. By default PXN8 should be installed in your webroot folder (all of the files actually get installed into a ‘pixenate’ subfolder). But now the editor pages can reside anywhere on your website.
For example if you installed PXN8 in the default location (your webroot) then your directory structure will look something like this…

- /var/www/html/ (webroot)
  - pixenate/
   - themes/
     - toolbar1/index.html (toolbar theme)

…but you might have an existing photo-detail page here…

- /var/www/html/ (webroot)
      - gallery/detail.php

.. and want to add the edit page here…

- /var/www/html/ (webroot)
      - gallery/photoeditor.php

Previously this wasn’t possible without changing a lot of client and server code because the server and client code worked on the assumption that the editor page would always be in the same directory as the pxn8 server code. This meant that you always had to place your custom editor in the same folder as the rest of the PXN8 code.
I’ve fixed this in the latest release. Now you can place your editor page whereever you like…
However, the client code must know where PXN8 was installed and you tell it using a javascript variable called PXN8.root.
Include the following code in your editor page and PXN8 should work fine from any file on your website…

<script type=”text/javascript”>
PXN8.root = “/pixenate”;
</script>

Remember if you installed PXN8 in a location other than the webroot then you should change the PXN8.root variable accordingly.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: