For the sixth week of coding, I worked on the Full Page with Preview version of the UI Options. The Full Page with Preview version requires an iframe where users can preview the changes that they make to the website inside this iframe. I had to figure out a way to convert a Drupal php page into an html file and pass that to the Infusion settings to use inside the iframe. This blog post by Nick Lewis on how to convert a Drupal site to straight HTML was very useful. I've learned of a handy little Drupal function called drupal_http_request() from his blog post which allows you to perform an http request. From there, I just had to save it as an html file using another Drupal function.
There are still some stuff that needs to be resolved with the Fat Panel UI Options namely the custom template that I need to include with the module. I've figured out the best way to provide this and it is by using hook_menu() to register a separate page printing it out and just using drupal_exit() so that it doesn't get rendered with any theme and also the rest of the page like the sidebars and other regions won't be included.
Sunday, 28 July 2013
Sunday, 21 July 2013
Week 5 Update
Today is Sunday and I wanted to write an update on my GSOC
project. This past week was the fifth week of coding and I’ve had to rewrite a
lot of the code that I wrote in the beginning when I started my project. The
reason for this is that I had to switch to the latest version of the Infusion
Fluid library, version 1.5, and the code that I’ve written when I started was
for the current stable version 1.4 of the library. A lot of new files has been
added to the latest version of the library, most of which are CSS files. There
were also some changes to the API so I had to update my code to reflect these changes. There will probably be more changes
since they’re still continuing to work on it and this is one of the challenges of this project since I am working with a version of the Infusion that's still undergoing lots of changes.
Aside from these changes, I also have implemented some new
settings to the module. I have added an option for admins to use a block for
the link to the the Full Page and Full Page with Preview UIO so that they can have
the option of changing where this link appears on their page by going to the Block
configuration page.
My next task is to create a custom template file to replace
the default template file for the Fat Panel Frame that comes with the library
and include it with my module. I need to use my own template file since my
module uses a custom build of the Infusion library and the default template
file does not link to the proper js and css files.
Wednesday, 3 July 2013
GSOC Week 3
It's now the third week of coding and last week I've made considerable progress on my module but a lot of work still needs to be done. With the code I've written so far, the module now works with the Fat Panel version of the UI Options. It seems to work on Mac and Windows in IE 10 and 9, Firefox, Chrome, and Safari but for some reason when I tested the module in Ubuntu, it did not work.
What's next? First I need to figure out what is causing it not to function in Ubuntu. At first I found that the main Infusion.js was not being loaded so I looked at the file permissions and I did find that I had to change some permissions on some of the file in order for it to load. Now that it seems to be properly loading the .js file, I now see some javascript error in the browser's console.
Also, I will need to start working on integrating the other two versions of the UI Options: Full Page and Full Page with Preview. Integrating the Full Page UI Options involves creating a separate page in plain html and integrating that into Drupal. I need to find out the "Drupal Way" of working with static html or if it would be possible to just use a node in Drupal.
What's next? First I need to figure out what is causing it not to function in Ubuntu. At first I found that the main Infusion.js was not being loaded so I looked at the file permissions and I did find that I had to change some permissions on some of the file in order for it to load. Now that it seems to be properly loading the .js file, I now see some javascript error in the browser's console.
Also, I will need to start working on integrating the other two versions of the UI Options: Full Page and Full Page with Preview. Integrating the Full Page UI Options involves creating a separate page in plain html and integrating that into Drupal. I need to find out the "Drupal Way" of working with static html or if it would be possible to just use a node in Drupal.
Subscribe to:
Posts (Atom)