Maintain Static Web Pages with Adobe Contribute
By Iain Lopata (Dino)
I followed the following four steps to get this solution to work for me:
1. Configure routes.php
I made a simple change to routes.php to redirect requests for static pages, including the site’s home page to my custom controller named display_controller.php:
$Route->connect('/', array('controller' => 'display', 'action' => 'display', 'home.shtml'));
$Route->connect('/pages/*', array('controller' => 'display', 'action' => 'display'));
2. Change file extension for static pages I then, somewhat regrettably, changed the file extension on all of the files in the /views/pages directory from .thtml to .shtml. I could have used .html, .htm and several other options. However I have been unable to persuade Contribute to allow me to edit files with a .thtml extension and so eventually decided to change to a supported file extension.
3. Implement controller to display static pages
The following controller code implemented the capability to support Contribute editing:
Controller Class:
<?php
define('SITE_HOME_PAGE','home.shtml');
define('GUARD_PAGE','index.html');
define('ADOBE_TEST_FILE_PREFIX','pages/TMP');
class DisplayController extends AppController {
var $uses = array();
var $helpers = array('Html', 'Javascript', 'Form');
/*
* This function displays static pages in a manner that will permit them to be edited using Contribute
*/
function display () {
if (empty($this->data)){
$this->layout = 'default';
if (isset($_GET['url'])) {
$path = $_GET['url'];
// If there is a trailing slash drop it
if (substr($path,strlen($path)-1) == '/') {$path =substr($path,0,strlen($path)-1);};
if (is_dir(VIEWS . $path)) {
if (substr($path,0,9) == ADOBE_TEST_FILE_PREFIX) {
$this->layout = 'blank';
$viewFullPath = VIEWS . $path . DS . GUARD_PAGE;
}
else {
$viewFullPath = VIEWS . $path . DS . SITE_HOME_PAGE;
}
}
else {
if (is_file(VIEWS . $path)) {
$viewFullPath = VIEWS . $path;
} else {
$this->redirect('/pages/' . SITE_HOME_PAGE);
exit;
}
};
$this->render(null, null,$viewFullPath);
} else {
$this->redirect('/pages/' . SITE_HOME_PAGE);}
}
}
}
?>
4. Create a blank layout You will also note that this controller action requires a new view layout which I chose to call ‘blank’. This layout renders the page content without any header or footer. This is required because when checking for Guard Pages, Contribute checks to ensure that the page it reads over HTTP is exactly the same as thethe page it has written over FTP. For the sake of completeness the code for the blank template is as follows:
View Template:
echo $content_for_layout;
Hopefully this is helpful to someone. Any problems setting this up please let me know
Editing a Web Page with Contribute
Start Editing
Editing existing web pages is Contribute’s reason for existence. With Contribute, you can begin editing after a connection is made—and, even better, Contribute adapts to the way you work.
Entering Edit Mode
When you browse to a page on a connected site, Contribute gets ready to edit. If the page is one that you have permission to modify, the toolbar displays the Edit Page button prominently in the upper-left corner (see Figure 1). When you select Edit Page, Contribute goes to work and enters Edit mode.
The Edit Page button becomes active whenever you have browsed to an available page.
- The file on the web server is locked to prevent other Contribute users from editing it.
- The HTML file is copied from the web server onto your machine as a working draft.
- Any associated files—such as images, style sheets, or external code—are also copied.
- The draft file in Contribute is opened for editing, and the toolbar changes to Edit mode.
TIP
If you prefer to use menus, you can also choose File > Edit Page to begin the process.
When you’re finished editing, you can publish the file, save it as a draft, or cancel the edit and lose your changes.
(c)Troubleshooting Editing Problems
It’s safe to say that sometimes you won’t be able edit a particular page. If that happens to you, check the following:
- Are you in a site that you have established a connection to? Contribute displays a note in the message bar and the Create Connection button in the toolbar if that’s the case.
- Is the page in a folder that you don’t have access to? Every Contribute user belongs to a particular group; the site administrator can limit a group to work only in particular folders. If you know you have established a connection to the site but can’t access a page in a particular folder, contact the site administrator.
- Is someone else modifying the page? Contribute not only tells you that someone else is currently editing the page, but it also tells you who it is and provides a link to e-mail that person. Click the link to send an e-mail and let the person know you also need to work on the page.
Using Contribute 2
Let’s face it: Avoiding the Web Development team is a prime goal in publishing and updating Web pages. Learn here how Macromedia Contribute 2 makes it easier than ever to do these tasks yourself.
What Is Contribute?
So with a name like Contribute what can you expect to happen by picking up a $99 copy of the software in the purple and blue box? Well, if you’re on the Web development team, you can expect your workflow to improve by leaps and bounds because you will no longer have to pop open Dreamweaver or another editor to make a change before uploading it to the staging server, testing it, and taking it live. Also, you won’t have to field endless email from co-workers about how you need to swap out the content on the About Us page and that it needs to be done yesterday. Sounds good to you, right? Yeah, I thought so.
The Contribute 2 logo.
On the other hand, if you’re responsible for writing content for your company’s site but are not on the development team directly, you will no longer have to send the aforementioned email to said Web developer for conversion and posting. You also won’t have to call the design team to reformat your lovely Microsoft Word document. Got a PDF? No problem. Contribute 2 enables you to turn it into a Web-ready Flash file (.swf) and have it up on your site in seconds flat.
Here’s a typical conversation for you (in fact, I had this one just last week):
Content writer: Hey, jerk. Can you get that new copy up online for me, like, now?
Developer: No. Go away. Got three projects in front of yours.
Content writer: I can’t go away—I need this done. You know, I outrank you.
Developer: So what? Your lack of planning does not constitute my emergency.
Content writer: But I need this done, and you are the guy who gets paid to tend to my whims.
Developer: Well, that’s too bad, Mr. Man. Put it in my inbox, and we’ll just see if I get to it this year.
Here’s the way the conversation could have gone:
Content writer: Hey, Robert, do you think you could get this new copy up sometime today?
Developer: Actually, Mr. Man, I have several projects that take a higher priority right now, but there’s a copy of Macromedia Contribute 2 sitting on the server just waiting for you to install it. If you can pull that off, Monkey Breath, I’ll send you a Connection Key and you can drag-and-drop that Word document right onto the page—you’ll be done in five minutes. Now go away.
Content writer: Wow, thanks! That was the most helpful thing you’ve ever said to me.
Developer: You mean the part about going away? Yeah, that’s helpful to me, too.
As you can clearly see, the second scenario is much better. Yes, the developer is still a jerk, but, hey, you can’t have everything you want. It’s best to just get over it.
In case you haven’t picked this up yet, Contribute 2 is for people like you, whomever you may be. If you’re involved in some aspect of the Web game, Contribute 2 can solve a lot of your workflow issues and get you moving right into a nicer car via the raise you’ll inevitably get for being so darn clever by using it. Contribute is for the CEOs who need their new job title shown off on the home page, the content contributors who need to expound upon the latest promotional thing-a-ma-jig, and the developers who just need to get some sleep once in a while.
It does exactly one thing: It allows you to edit and update live Web pages without the express written consent or aid of anyone, and without knowing one thing about HTML or any other language. And let me tell you, popping Web pages up this easily makes you feel smart. The thing pays for itself in a matter of minutes.
How to Set up a Word Press Blog Using a Panel Account
Today, it does seem like everyone and their dog has a blog. And, considering the broad range of free blogging software that’s available, it can be challenging to decide whether to set up your WordPress blog or get a blog with another provider. WordPress is one of the most accessible and popular blogging platforms out there, and even a beginner can easily set it up. The simplest way to do this is via a cPanel hosting account.
- Set up a domain name and web hosting account. Log into your cPanel account. Click on the “Fantastico” icon (or Fantastico De Luxe).
-
Step 2
Select “WordPress” when the Fantastico window opens. Then select “New Installation.” This will open a page that presents you with New Installation options.
-
Step 3
Fill in the form on this page with your preferred selections. Under the Installation Directory leave the “Install in directory” field empty unless you want to install your WordPress blog in a directory on your domain.
-
Step 4
Click “Install WordPress” and finish the installation once you are done entering all the required information. The installation will state the updates that have been made. Click on the “Finish Installation” button.
-
Step 5
Enter your email address to have the installation emailed to you or another party of your choosing. Providing your email will come in handy if you ever forget your user name or password. You can choose to go back to the overview instead.
-
Step 6
Go to your WordPress admin panel by typing in the URL: domainname.com/wp-login.php.
-
Step 7
Log into the WordPress admin panel at this URL: yourdomain.com/wp-login.php. Your password and user name will be the same as the ones that you previously used for the administrator account.
-
Step 8
Click the Write menu to begin blogging. You can now create posts, links or pages using the text editor. You can also change the layout an also create categories, which will help you organize your blog content so that readers can easily navigate.
How to Manage Time Writing for Multiple Websites
The trend with freelance writers is to write for multiple websites in order to provide a decent stream of income. We write for Associated Content, eHow, Suite101, and other places in hopes that the combined effort will make a steady, sizeable income. How can you best manage the time spent writing for multiple websites? Hopefully, this article will provide some tips to help you out.
- Develop a schedule and stick with it. It is so easy to get frazzled and weary when you think you’ve got to write an article for each website every day. Try giving yourself a schedule where you concentrate on one site a day. If you are only writing for two sites, write for one site three times a week, and the other twice a week. Do try very hard to take the weekends (or at least two other days) off a week, so you don’t become burned out.
-
Step 2
While freelance writing provides many freedoms that a traditional office setting can’t, don’t take advantage of that fact. It takes discipline to write articles to pay the bills. Yes, you can run errands when the malls aren’t so busy on weekday mornings, but if you tell yourself you are going to work four or five hours a day, do it! Otherwise, you will feel like you have fallen behind the wheel, and you won’t have anyone else to blame but yourself.
-
Step 3
Keep a theme each week for each website that you write for. For example, write about pet care for all of the websites that you write for, and you can keep a flow going from being in the same frame of mind. Then, switch to a different topic the next week and so on.
-
Step 4
Write quality articles with content that readers are actually interested in reading. This involves researching and knowing your facts before you begin writing an article. If you are flying through articles just to get them posted, you will not get many hits. Thus, you will think that you have to join more websites to write for in order to make money, when in actuality you may just need to revisit how well you are writing, and make good money from the sites that you are already at. In other words, you may just need to write for one or two websites providing good quality content, instead of writing for four websites and rushing to get articles up so you can get paid.
How to Design HTML Flyers
By using HTML you can send an electronic version of your flyer via email and also post your flyer on websites. There are paid programs, such as Constant Contact and iContact (no endorsements), that will allow you to pay a small monthly fee to create HTML flyers using their software. However, if you don’t want to pay a fee, you can use software that is already on your computer to create your flyer.
- Open the Microsoft Word program on your computer. You can also use other programs, such as Adobe Contribute and Xara, that will allow you to create HTML documents. For the purposes of this article, the focus will be on using Microsoft Word.
-
Step 2
Begin customizing your flyer by creating a page layout. For Microsoft Word 2007, simply click on the “Page Layout” tab. You will then be able to perform tasks such as setting your page margins and adding a page background color and borders. For Microsoft Word 2003, you must click on the “Format” link on the menu bar to customize your page.
-
Step 3
Create a “Header” or “Banner” for your flyer. The header doesn’t have to be fancy. You can create a simple banner in Word 2007 by clicking on the “Insert” tab and selecting “Word Art.” For Word 2003, click on “Insert,” “Picture” and “Word Art.”
-
Step 4
Insert pictures onto your flyer by clicking on the “Picture” option that is located underneath the “Insert” tab in Word 2007. For 2003, click on “Insert” and “Picture.”
-
Step 5
Insert text for your flyer. If you want your text to appear in columns, you can select the “Column” option that is located underneath the “Page Layout” tab in Word 2007.
If you would like to make some of your text clickable as a “Web Link,” highlight the text you want to turn into a link. Click on the “Hyperlink” option that is located underneath the “Insert” tab. You will then be able to enter the URL for the text. For Word 2003, click on “Insert” and “Hyperlink.”
-
Step 6
Click on the “Save” option after you have finished completing your HTML flyer. Choose the option to “Save As Web Page.”
-
Step 7
Get the HTML code for your flyer by clicking on “View” and “HTML Source.”
How to Change Hair Color With Virtual Hair Color
Want to try out a new hair color before making it permanent? Use Photoshop to change hair color virtually.
- In Adobe Photoshop, click “File – Open” to open the image you’d like to change. Choosing a closeup face shot is the best choice for changing hair color.
-
Step 2
On the “tools” bar, select “Polygonal Lasso Tool.”
-
Step 3
Use the Polygonal Lasso Tool to carefully trace only the hair from the image. You may want to zoom in for best results.
-
Step 4
With the hair selected, click “Edit – Copy” and then “Edit – Paste.” This should copy the hair onto a new layer.
-
Step 1
In the Layers box, select only the top layer.
-
Step 2
Click “Image – Adjustments – Hue / Saturation.”
-
Step 3
Adjust the “Hue,” “Saturation” and “Lightness” sliders to find the final color. Use “Hue” to get as close to the desired color as possible and then fine-tune the other settings.
-
Step 4
When you’re done, click “OK.” You can save the image as a JPG image by clicking “File – Save As.”
Changing Hair Color
How to Fix The Error “cannot Find iexplorer.exe”
If you have had a virus recently or restored your computer to an earlier date you may find that your internet explorer does not work. In this case, it’s for the error “cannot find iexplorer.exe.
- There are many reasons that your internet explorer might not work, but one of the major reasons is due to a trojan.downloader..which basically takes over your IE, or mimics it. You’ve tried a system restore..no luck. You’re tried uninstalling and reinstalling-still no luck. Here’s a few tips to get your IE back to normal and the virus gone.
-
Step 2
First step is too try hijack this. you can get it from trendmicro website. You will run a scan and then view the results. You can upload the results to a forum to get better help-but if you are like most people-You know what’s on your computer and if there is any suspicious file you delete it. Anyway, what you want to do is delete the unimportant BHO helper files that exist on your Internet explorer. You can do this straight from the scan results from hijack this.
-
Step 3
(by unimportant I mean active objects you can download as you need it. For instance, I have adobe PDF and Adobe Contribute bho helper files in IE. I cannot delete those. Anything with flash, java, shockwave etc, you can remove)
-
Step 4
Once you have done that run the scan once again to be sure you got the bho files. Also be sure to look for suspicious files in the rest of the scan results. If IE loads then congrats it should be fixed. But-if it isn’t then there is another step to follow.
-
Step 5
This step requires editing your registry. It’s not hard if you follow the directions, i promise.
Please see next step. -
Step 6
Click on start then click on run. Type in “regedit” which will take you to your registry editor. NOTE: you must be the administrator to be able to edit your registry.
-
Step 7
When your registry is open click on >HKEY_LOCAL_MACHINE>SOFTWARE>MICROSOFT>WINDOWS NT>IMAGE FILE EXECUTION OPTIONS>IEXPLORER.EXE (If you see that file, it means your Internet explorer has been hijacked and the trojan is acting as a “debugger”) There should be no instance of iexplorer.exe in your “IMAGE FILE EXECUTION OPTIONS”. So just click on iexplorer.exe and hit the delete button. Close your registry and then go to internet explorer.
-
Step 8
If it opens, than congrats it’s fixed. But it’s not fixed all the way. You need to open internet explorer, click on tools, internet options, advanced and then click on “RESET”. Reset defaults your IE back to original, it erases all plugins, bho files-this is necessary to do because the virus actually plants a bho help file into Internet explorer.
-
Step 9
Once you have done that then IE should be fine, but to be sure you must run a complete virus scan. Good luck.
How to Set Up a Computer With Administrator Privileges
Windows Vista and Windows 7 both contain a built-in administrator account, which is disabled by default. You can activate this administrator account through the command prompt, using a command that works for both OS versions. The account contains full administrative privileges over your computer, so it’s a good idea to set up a password soon after the system has been activated.
- Click “Start.”
-
Step 2
Type “cmd” (without the quotation marks) in the search box at the bottom of the Start menu. The menu will automatically display a list of search results.
-
Step 3
Right-click “Command Prompt” in the search results and select “Run as Administrator.” If you have User Account Control enabled, click “Continue” when prompted.
-
Step 4
Type the following command into the Command Prompt window exactly as it appears:
net user administrator /active:yes
-
Step 5
Press “Enter.” The administrator account will be enabled. You can log into the account by logging out of your current account and selecting “Administrator” from the login screen.
How to Edit a Web Site With Adobe Contribute
Adobe Contribute has many of the attributes of a word processor which makes it fairly easy to edit and administer websites. Basically, you can add new pages, edit existing ones and update sites with images, photos and Flash animations. Individual pages can be edited and the draft copies can be sent to other individuals by email for collaboration and approval. Microsoft Word can also be used to update sites simply by dragging the word processors’ document directly into Contribute and publishing them on the Web.
-
Step 1
Launch Adobe Contribute. If you have already run the registration process and you are not executing this program for the first time, skip this section and proceed to the next section titled “Editing the webpage.”
-
Step 2
Run the registration for the program if this is the first time you are executing it. You will also have to ensure that the network administrator has enabled the necessary connection keys, password and File Transfer Protocols (FTP) for site and server activity.
-
Step 3
Choose ?”Edit” and then “My Connections” from the task bar at the top of the screen. Click the “Create” button. The welcome screen appears.
-
Step 4
Click “Next.” The Website Home Page screen appears. Enter the complete Web address of your site, for example: http://mywebsite.com. Click “Next.” If Contribute is successful, you will be prompted to enter your name and address information. Click “Next.”
-
Step 1
Browse to the page to be edited and click Edit Page. This will open the page as a draft. You can start entering your text either by typing it in or pasting the content from another application.
-
Step 2
Insert images from your computer by choosing Insert then Image and finally, choose From My Computer from the Select Image dialog box. Click the “Select” button. The Select Image dialog appears.
-
Step 3
Navigate to the directory and file that has the image you want to insert. Select it in the Select Image dialog and click the “Select” button. The image appears on your page. You can modify the image by double-clicking it or select it and choose Format and then Image Properties. Make the changes and click “OK.”
-
Step 4
Preview the page in your browser by choosing Select File and then Preview in Browser or Press the “F12″ key.