Saturday, June 14, 2008

Works

It's all finally working.

Through trial and error on all the path issues, I finally got the test editor to work, but the editor was still not showing up in the website. Eventually it occurred to me that I wasn't calling the rteINC file from the website in the same way that I was from the rteTest file.

I copied the call from the test file into the include on the web page and it worked.

Now when logged in as an administrator, you can edit the content section of home page yourself.

When implemented, this will require some user education--particularly that all writing should be reviewed by a professional editor before being put up.

This implementation took many, many hours. Too many to bill. On the upside, I now know a lot more about paths in complex dynamic web programming than if everything had gone smoothly.

Friday, June 13, 2008

One last shot

I'm going back for one last try.

I'm guessing that I'm generating an internal path for an external call. Maybe I should just start the whole thing again on dreamhost instead of zephir.

Sounds daunting. It's 10pm. I'm tired. I have five cans of Red Bull and pretty good radio programming coming up on NPR. Maybe I'll try.

Thursday, June 12, 2008

I went through and hard coded all the paths to /home/classes/dwelle01/public_html/.

I was ready to give up when I tried the test file one last time. I finally got functioning buttons back, but the files are not being found. Message:

The requested URL /home/classes/dwelle01/public_html/fckeditor/editor/fckeditor.html was not found on this server.

I may stick to it for another half hour.

running out of time

I thought that I had made progress. The buttons were at least functioning in the rteTest page. Then suddenly it was gone.

I may have to abandon this and settle for failure of this portion of the application. I need to turn to other subjects tonight, plus I still have a little left to do on ASP.

All I'm getting to print in the test page is the html. None of the interactive elements. I will learn this, it just may not be in time to get credit for the assignment.

One more whack

I'm back for one more whack at it. I've tried tracing all the paths and everything seems to be in place. The sessions are running.

I have rteINC included on the content section of the index page.

I'm getting no errors and no tool bar. I've tried changing out the default toolbar, making sure only one toolbar is enabled and making sure they're both enabled. Nothing's printing to the view. I know the paths are working because when I change them I get a 'no file' error.

I'm here to spend no more than two hours on this tonight. If I can't get it fixed I may have to settle for not getting it done within the quarter. I have an actual client who wants me to spend time on her website, so it may have to take priority.

Wednesday, June 11, 2008

troubleshooting log

I'm going to keep this log as I attempt to fix problems. I have a feeling it could get pretty long:

rteINC.php fixed broken comment code on line 2.


Fatal error: Call to undefined function startSession() in /home/classes/dwelle01/public_html/itc280/newphp63/fckeditor/rteINC.php on line 61

'fixed' this by commenting out the startSession wrapper

No errors, but no functionality: I think I'll go back and work on the admin login problem first (couldn't get admin link to show up in navs)

Fixed the peek a boo problem by fixing the startSession problem. It took me a long time to figure out that when I get a function not defined error, I should check to see if the function is defined. I defined the function and it worked. Now there are possibilities that I could run the function too many times in places where I have too many includes and have lost control of where I'm placing the function.

I would think that allowing the function to start only once in the labyrinthine file structure should take care of it, but I'm not sure that I have only one path through the includes where the session is started. A more reasonable solution may be wrapping the startSession statement in an if statement, so that it starts only if it is already not running. I will figure out how to do this, but maybe not before the end of the quarter.

not working

rte is not working. I wasn't confident with all the paths. I haven't been working in root of the public directory, and I had a feeling from the beginning of the documentation of this exercise that it might have been a mistake.

Looks like I have an evening of troubleshooting ahead.

rte

Notes on troubleshooting rte implementation:

hard coded 'quasi-absolute' address--changed from

require_once($_SERVER['DOCUMENT_ROOT'] . "/include/adminOnlyINC.php");

to

require_once("/home/classes/dwelle01/public_html/itc280/newphp63/inc/utilINC.php");

Doing this changed a page full of errors into no errors at all. Still haven't tested functionality, though.

Saturday, June 7, 2008

Table editor working

The table editor is now working. It is so cool.

time to implement: 5 minutes

Image upload working

Image upload is now working

Total time for this assignment:

3 hours

I'll spend the rest of the time this evening working on some aspnet, then go through php tomorrow and make sure everything is working and up to date (that is, fix the remaining problems). Someone told me there was also an RTE assignment. I haven't seen it yet, would love to do it, but won't focus on it until it comes up.

Image upload, again

Scratch that last part. I just found the images I'm uploading in the wrong directory, with the wrong names. I guess I should follow this clue and track down the problem now.

image upload

Image upload seems to be perfect--no error messages--except that it's not updating the images.

I think that, because of the late date, I'll go through and fix the little things I've been missing but haven't been able to catch up on, then go on to work on the image uplink:

date fix

admin access from the view pages.

Monday, June 2, 2008

admin login assignment

Everything is done on the Admin Login assignment except the nmEdit.php table editor. This is a pretty important piece, but I haven't been able to figure it out.

On all the permutations of table editing (showFirst, firstTable2, and mnEdit) I get a long list of errors, always starting with:

undefined variable myConn

To my simple mind, it looks like the variable is defined in myConnINC.php, which is called in every case.

I'm going to go ahead and publish what I have. If you want to see the errors, just click on the table editing option. I'll give bill@example.com developer access so you can do that.

Time spent on this assignment 7 hours. Before hitting the nmEdit wall, it was probably closer to 4 or 5.

Monday, May 26, 2008

Herbs Store finished

The herb store categories - list - view pages are finally working within the context of the Radiant Health page layout.

A few details to be addressed later:

On the dynamic horizontal nav, when one of the pages in the nav list is active, the list seems to expand, shoving the last item in the list into a smaller space. When the 'contact' page is activated from the footer, the horizontal nav at the top looks correct.

The date issue, called from the footer, is still unresolved. I get an error saying that it's dangerous to use the server to get the date. For now I just wrote in the year. I can always just get it through javascript if I can't get the php to work. I do agree that there is a danger that on the last day of the year, people around the world could get the wrong date using php, but somehow that doesn't make me shudder.

The side nav is not dynamic. It would have taken more coding to fit a dynamic side nave into the table-based layout I had to use. I could do it, but it's working, there is no time left, and for this site, a dynamic nav probably isn't necessary anyway.

I had to rebuild this site from the bottom up in order to make it work. The div based layout I had originally designed kept breaking. Also I didn't know how to get the old-fashioned javascript mouseover side nav they want to work with the php. Before actual deployment, I'm going to have to make these elements work together or come up with compromises.

Left to do is the spreadsheet documentation, catch up to the login assignments. then spend a similar amount of time catching up on ASPnet assignments.

Hours spent on this: 10 on Saturday, 8 on Sunday, 4 on Monday.

Sunday, May 25, 2008

date error

Getting warnings that it's dangerous to publish date generated from the server. Whenever I try to combine my stand alone php categories - list - view code within a larger page layout context, I get this date error and it seems to break the layout.

Will keep trying--may have to ask Bill about it.

Saturday, May 24, 2008

2 navs

Note to self: I'm programming both an horizontal and a vertical nav. I'll comment out the print command on the horizontal nav. This will allow flexibility of design when it comes to implementation. If they like the horizontal nav better, I can just switch it on and switch off the vertical nav.

Thursday, May 22, 2008

Finishing up categories

I worked around the error I was getting without actually fixing it. Seems to work as is.

A couple of minor details left to change within the Chinese Herbs shop, but I'm going to move on anyway to save time.

1. need to find the to upper command that puts the field name in upper case letters and get rid of it.

2. need to find out if I can alias the field names so that the name in the unique herbs page header doesn't look funny when the field names isn't an appropriate title -- coldflu, for example.

3. need to dynamically change plural 'products' to singular 'product' when there is only one item in the category list

time spent this sitting: 4 hours

I may keep going for awhile

Wednesday, May 21, 2008

One more try

I now have about two hours to try and fix the categories. We'll see what I can manage.

Categories almost ends - unresolved error

Receiving an unspecified error when returning from the view to the list on line 94 of listview:

print '@lt;a href="herbsview.php?id=' . dbOut($row['HerbID']) . '&cid=' . $myID . '&cat=' . $_GET['cat'] . '">';

This is a line I added while adding categories.

Times up for now. I'll have to leave it this way until I can sit back down to it.

time spent on categories so far: 3 and a half hours.

Categories begins

I have about 4 hours of seat time to devote to catching up on the PHP. My goal will be to add the categories to the Chinese herbs store pages. First step will be to change the database tables, then to integrate the search by categories functionality into the pages. If I get that far, next I begin integrating these pages into the larger page format.

Monday, May 19, 2008

Pagination complete

Still too much time spent staring at errors without seeing them. I think what I need is more practice.

4 pm Monday. Just finished paging the herb store items. Haven't integrated the navigation and template into these pages yet. I'll return this evening (after my kids' fastpitch games) to do the categories assignment, then work on integrating the pages.

If my template doesn't work easily and quickly with these view integrated into them, I'll mock up a quick alternative pages in order to facilitate the assignments.

Hours spent on this--too many. Four or five creating the database. Ten or twelve making these pages work so far. (This may be an under-estimate)
I keep beating and beating on this, but I can't seem to make all the elements come together. I have a rare opportunity to work all day on it today. I'm going back to basics--starting with getting the pagination right on Radiant Health Chinese Herb Store, without fitting it into the web design.

I've been struggling all quarter making things work within the design that they want. For the sake of time, I may have to go back to a previous design that is easier to work with but not as pretty.

Saturday, May 17, 2008

Back up

Finally sat back down to it. First thing I did was look up the site online. Found no error messages. It's magic. Now there is a lot more work to do to catch up.

Friday, May 16, 2008

Leaving in non-working state

After fussing for too many hours trying to make the images working with the dynamic navigation, I've decided I'm spending too much time with these side issues and not enough keeping up with class work. I'll revisit the image issue later (maybe after the quarter is over) and go with mundane side navigation.

After making this decision, I made a couple of quick changes to the css and a quick change to the hnavINC page that I thought would make the appearance more palatable.

The change to hnavINC was just a change to the value of a string. I thought it would be innocuous. As soon as I dropped it into the website file structure, however, I came up with the following error:

Fatal error: Cannot redeclare checklink() (previously declared in /home/classes/dwelle01/public_html/itc280/radiant/hNavINC.php:56) in /home/classes/dwelle01/public_html/itc280/radiant/hNavINC.php on line 67

At this time I am not able to work at fixing this. It will have to wait a few hours at least.

I didn't change the checklink function, and certainly didn't declare it twice.

Thursday, May 8, 2008

Assignment 4 - time

php -- adapting php to my client's application: 2 hours

css, javascript -- 2 hours

photoshop -- creating images -- 4 hours - not yet finished with images

Assignment 4 - List and View

My favorite bit of code from assignment 4.

|img src="images/m|?=$myID?>.gif" /> (vertical line replaces less than symbol)

It would never have occurred to me that php code could be used to provide part of the html name of an image. It is so neat and simple. It automatically associates the correct image with the correct view and associated database information. And it imposes a certain amount of discipline and regularity in naming images.

My primary client has no use for these list and view instances, but another client wants to sell novelty merchandise on-line. These exercises represent the beginning of a possible rebuilt of their site.

Monday, April 28, 2008

Assignment 3 finished

Just finished assignment 3. I was almost incredulous when the dynamic navigation actually worked. I don't completely understand the code yet . I expect that I will use it a lot in the future and understand it better as my programming skills develop.

I chose to jettison the table structure provided in the sample, partly to keep the design compliant with current design standards and partly because the clients want vertical navigation that includes small images. I have designed the page in html to use javascript image rollovers for navigation. I hope to be able to integrate these rollovers into the dynamic php structure before I'm through with this course. I did spend a couple of hours trying to accomplish this with no success. I'll try again in a day or two.

This site needs to be dynamic primarily because the clients need to be able to update it themselves. I hope to be able to provide them with an administrative login which will give them access to a rich text editor, allowing them to change the content sections of each page at will.

Time spent on this assignment: about 8 hours, including a lot of time spent staring blankly at line 51 of one of the include files trying to figure out why I was getting an error.

One other item I have to take care of that does not lie within the realm of PHP programming is to fix the css to allow the page to grow as large as the content dictates. As it is, when the content div grows longer than the nav div, the structure breaks. This is just a css error that I made when designing the page and will be fixed with relative ease as soon as I give it the time.

Wednesday, April 9, 2008

First posting for ITC 280 PHP Development

The first thing I've learned from this class is how easy it is to start a blog. Now that I know, maybe I'll start blogging about politics or education.