Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds

How-To Tutorials - CMS & E-Commerce

830 Articles
article-image-managing-images-and-videos-joomla-15-part-2
Packt
19 Nov 2009
7 min read
Save for later

Managing Images and Videos in Joomla! 1.5: Part 2

Packt
19 Nov 2009
7 min read
Using video files Video files are generally large due to the amount of content they contain and their length. It's beyond the scope of our article to describe them in detail, but in basic terms, they are a linear sequence of still images placed together to create a sequence of movement, usually accompanied by an audio track. Original video files are compressed using a codec to produce a compressed video file. The various codecs produce different results for file size, quality, and export. Video files play in the browser by downloading the data through the Internet, progressively streaming it so the movie begins to play before the whole file has downloaded. Audio files work in a similar way, but are often not as large. The final quality of a video also depends on the method used to capture it and how it's stored. The better the quality of the camera, the better the result. If you want to learn more about video, Wikipedia has a page at http://en.wikipedia.org/wiki/Video_formats. Just like anything else, there are pros and cons of adding videos to your website. YouTube alone has proven there is a strong market for a more visual medium. However, there are still many people who prefer text-based content as well. Consider whether adding a video to your site will enhance your user's experience. Is the material promotional or instructional? Is the content better demonstrated than explained? Video material can broaden your target audience. Many people prefer watching a video online to reading lengthy bodies of text. Videos aren't that great for search engine optimization. Consider adding a transcript to the page as well, in order to increase the ability to search. Choosing the best video file format Video played through the Internet requires a media player, which acts as an interface between the video file and the browser. These days most Internet users have one embedded within their browser. Popular versions include: QuickTime, a player created by Apple Windows Media Player WINAMP Real Player, developed by Real Networks Adobe Flash Player The following are some of the video file types that can be played through your website using third-party media players: .wmv files are a popular format developed by Microsoft and which come bundled within the Internet Explorer software package and are, therefore, preinstalled on Windows PCs. This is a format good for movies with movement within them. This format works with Windows Media Player, RealPlayer, and another called VLC Player. This format isn't very compatible with Mac or Linux computer users. .mov files are a QuickTime video platform extension that also plays back on the Windows operating system. The Apple QuickTime movie player software can be easily downloaded from Apple at http://www.apple.com/quicktime/download/. While not many browsers have the QuickTime media player installed, this format does provide very high quality video. You can always provide a link to the URL to download the software in order to play the video. .avi files are often the format of videos with smaller dimensions, played back through a website. They are a container for audio and video files (hence the name!). They can sometimes be quite large in file size, depending on the codec used to compress the video footage. They are a mainstream format. .swf and .flv videos are excellent for web video streaming and can also include interactive features. Most Mac and PCs have the Flash Shockwave Player installed; however, it can be downloaded from http://get.adobe.com/flashplayer/. Take note of the requirements for your individual operating system and browser preferences. Keep the following in mind when considering a video for your website: Ensure the video is succinct and the file size as small as possible. Even with a high speed download, time is still required to fully download the complete file. Keeping the video between one to three minutes long and the file size under five megabytes The more the movement in a video, the larger the file size. Consider whether the video really enhances the message. Viewers are only interested in material that is useful to them and will resent consuming their download resources on a video that holds no value for them. The larger the file size, the longer it takes to upload. Consider your audience's data rate. Do they have high speed downloads or are there some with dial-up connections? Video files are generally large due to the amount of content they contain. They stream (streaming is the way the Internet transfers multimedia information) through the data so the video will begin playing before it has fully downloaded itself into the browser, allowing it to be played back as quickly as possible. Audio files work in a similar way, but are not usually big files. There are various video file formats available and most website users have a player to see them already contained within the browser. Many users have QuickTime, a player created by Apple (that also runs on PCs) and Real Player, developed by Real Networks. Videos require a special plugin to play them through an article on your site, once you have uploaded it. Alternatively, you can embed a link from the popular YouTube site (http://www.youtube.com/). We'll look at how to do both in relation to the Party People website. Uploading a video We'll upload a new video, much the same way we would upload an image, to a new subfolder called videos within the Party People website. The steps are as follows: Navigate to the Media Manager. Select the stories folder and type videos into the Files input box. Click Create Folder. Select the new videos folder icon; then click the Browse button to choose the video from our desktop computer. Click Start Upload. Now we have a video file ready to be inserted into an article. The Party People website has the popular AllVideos plugin installed to do this. Updating videos—AllVideos plugin This is another neat plugin that works in much the same way as the Simple Image Gallery, a stablemate from this team of developers. If you don't have it installed and you would like to present videos on your site, ask your developer to install it for you or refer to the developers website http://www.joomlaworks.gr/content/view/35/41/ for instructions. Our Party People website has a .mov video on the Products and Services page, which we will update. To update the video display: Navigate to the Article Manager through the top menu and open theOur Services Include... article. Change the name of the video file between the { } and {/} tags within the text editor to the new filename. Depending on the format of the video being presented, the code should look like this: {mov}promoVideo{/mov} This code displays a QuickTime movie within the article. Save the changes. The following screenshot shows us how the video will look in context. Note that you do not need to include the format extension at the end of the filename, as the tag surrounding the name addresses this. Changing to a different video file and format The AllVideos plugin supports a number of video file formats and the developer's website lists them all at http://www.joomlaworks.gr/content/view/35/41/. We'll change the video we just linked to a different one which is in the .wmv format. The steps are as follows: Navigate to the Article containing the video presentation. Change the tag between the { } braces to reflect the new file type, taking care not to delete any of the symbols. For example: {wmv}updatedServicesVideo{/wmv} Save the changes to your article. You should take care to avoid rearranging any of the formatting within the code, as this will prevent the movie from playing. That is, don't add any extra spaces, colons, commas, and so on.  
Read more
  • 0
  • 0
  • 1029

article-image-installation-and-configuration-oracle-soa-suite-11g-r1-part-1
Packt
19 Nov 2009
6 min read
Save for later

Installation and Configuration of Oracle SOA Suite 11g R1: Part 1

Packt
19 Nov 2009
6 min read
These instructions are Windows based but Linux users should have no difficulty adjusting them for their environment. Checking your installation If you already have SOA Suite and JDeveloper installed, confirm that you have the correct version and configuration by following the steps in the section below called Testing your installation. In addition, you may want to complete the items in the section called Additional actions. Finally, you must complete the section called Configuration to run a tutorial. What you will need and where to get it This installation requires 3 GB or more available memory. If you have less memory, try separating the installation of the database, the servers, and JDeveloper onto different machines. Memory and Disk Space requirements This installation requires 3 GB or more available memory. If you have less memory, try separating the installation of the database, the servers, and JDeveloper onto different machines. The installation process requires about 12 GB of disk space. After installation, you can delete the files used by installation to save about 4 GB. As you can see, you are installing a lot of software with a large memory and disk footprint. Running your disk defragmentation program now, before you start downloading and installing, can significantly improve install time as well as performance and disk space usage later on. Downloading files Download all the software to get started. In the following steps, save all downloaded files to c:stageSOA. This document assumes that path. If you save them somewhere else then make sure there are no spaces in your path and adjust accordingly when c:stageSOA is referenced in this document. Go to: http://www.oracle.com/technology/products/soa/soasuite/index.html, and download the following from SOA Suite 11g Release 1 (11.1.1.1.0) to c:stageSOA: WebLogic Server:wls1031_win32.exe Repository Creation Utility:ofm_rcu_win32_11.1.1.1.0_disk1_1of1.zip SOA Suite:ofm_soa_generic_11.1.1.1.0_disk1_1of1.zip JDeveloper Studio, base install:jdevstudio11111install.jar Unzip the SOA Suite ZIP file to c:stageSOA. Unzip the RCU ZIP file to c:stageSOA. Additional Files needed: Tutorial Files: In Chapter 3, you were directed to download the files needed for this tutorial. Do that now as some are used during installation. You can download the files from here:http://www.oracle.com/technology/products/soa/soasuite/11gthebook.html. Unzip the tutorial ZIP file to c:stageSOA. SOA Extension for JDeveloper: You will get this later using the JDeveloper update option. Oracle Service Bus: When you are ready to do the Oracle Service Bus (OSB) lab, you will download the install file to install OSB. Checking your database Having your database up and running is the most important pre-requisite for installing SOA Suite. Read the following bulleted requirements carefully to be sure you are ready to begin the SOA Suite installation: You need one of: Oracle XE Universal database version 10.2.0.1 Oracle 10g database version 10.2.0.4+ Oracle 11g database version 11.1.0.7+ You cannot use any other database version in 11gR1 (certification of additional databases is on the roadmap). Specifically, you cannot use XE Standard, it must be Universal. We have seen problems with installing XE when a full 10g database is already installed in the environment. The Windows registry sometimes gets the database file location confused. It is recommended to pick one or the other to avoid such issues. If you need to uninstall XE, make sure that you follow the instructions in Oracle Database Express Edition Installation Guide 10g  Release 2 (10.2) for Microsoft Windows Part Number B25143-03, Section 7, Deinstalling Oracle Database XE (http://download.oracle.com/docs/cd/B25329_01/doc/install.102/b25143/toc.htm). If you need to uninstall 10.2, be sure to follow the instructions in Oracle Database Installation Guide 10g Release 2 (10.2) for Microsoft Windows (32-Bit) Part Number B14316-04, Section 6, Removing Oracle Database Software(http://download.oracle.com/docs/cd/B19306_01/install.102/b14316/ deinstall.htm). Optional: Install OracleXEUniv.exe—recommended for a small footprint database. Make sure that you read step 1 above before installing. You can get XE from here: http://www.oracle.com/technology/products/database/ xe/index.html. When you are using XE, you will see a warning when you install the database schema that this database version is too old. You can safely ignore this warning as it applies only to production environments. If needed, configure Oracle XE Universal. When you are using Oracle XE, you must update database parameters if you have never done this for your database installation. You only have to do this once after installing. Set the processes parameter to >=200 using the following instructions. C:OracleMiddlewarehome_11gR1user_projectsdomains domain1binsetSOADomainEnv.cmdCODE 1sqlplus sys/welcome1@XE as sysdbaSQL> show parameter sessionSQL> show parameter processesSQL> alter system reset sessions scope=spfile sid='*';SQL> alter system set processes=200 scope=spfile;SQL> shutdown immediateSQL> startupSQL> show parameter sessionSQL> show parameter processes The shutdown command can take a few minutes and sometimes the shutdown/startup command fails. In that case, simply restart the XE service in the Control Panel | Administrative Tools | Services dialog after setting up your parameters. Checking your browser Oracle SOA Suite 11gR1 has specific browser version requirements. Enterprise Manager requires Firefox 3 or IE 7. Firefox 3—get a portable version, such as the one available from http://portableapps.com, if you want it to co-exist peacefully with your Firefox 2 installation. Firefox 2 and IE 6 are not supported and will not work. BAM requires IE 7. Beware of certain IE 7 plugins that can create conflicts (a few search plugins have proved to be incompatible with BAM). IE 8 is not supported with 11gR1 (but is on the roadmap). IE 6 has a few issues and Firefox will not work with BAM Studio. Checking your JDK If you are going to install WebLogic server and JDeveloper on the same machine, you will use the JDK from WebLogic for JDeveloper too. However, if you are going to install on two machines, you need Java 1.6 update 11 JDK for JDeveloper. JDK 1.6 update 11—from the Sun downloads page: http://java.sun.com/products/archive/ You must use Java 1.6 update 11. Update 12 does not work.
Read more
  • 0
  • 0
  • 4518

article-image-creating-design-ez-publish-4-templating-system-part-2
Packt
19 Nov 2009
8 min read
Save for later

Creating a Design with eZ Publish 4 Templating System: Part 2

Packt
19 Nov 2009
8 min read
eZ Webin For this article it is assumed that the eZ Webin package is installed as a frontend for our site. This package is very flexible and is usually used as a starting point for developing a new site. By default, it includes: A flexible layout Some useful custom content classes (blog, event, forum, article, and so on) Web 2.0 features, such as a tag cloud and comment functions Custom template operators In our project, we will extend and override the eZ Webin template in order to create the Packtmedia Magazine site and add some features needed for the project. We will see this step-by-step as we understand better how eZ Publish works. Overriding the standard page layout The page layout is the main template and defines the style of the entire site. To create a page layout template, we need to create a file named pagelayout.tpl and place it inside the templates folder of our design extension. As we said, we will work with eZ Webin. This extension doesn't use the standard page layout but overrides the standard page layout with its own custom behavior. We need to do the same overriding from the eZ Webin pagelayout.tpl. To override the template, we have to copy it in our design's extension folder placed in extension/packtmedia/design/magazine/templates/. Now open a shell and execute this: # cd /var/www/packtmediaproject/extension# cp /ezwebin/design/ezwebin/templates/pagelayout.tpl /packtmedia/design/magazine/templates/ We will use this new pagelayout.tpl file to implement the wireframe that we developed in the previous sections. Section for our project eZ Publish includes features for creating a particular view in order to add content objects inside specified sections. For example, if we take a look at our wireframe, we need to assign a different layout for rendering the Issue archive folder and its subfolders. To do this, we have to create a new section in the administration panel and associate it to the entire Issue archive subtree. After that, we can use the fetch functions to select the correct view for that section. Creating a new section To create a new section, we have to open our browser and from the site's backend, select the Setup tab from the top menu. We then need to navigate to the Sections link in the left-hand menu, and then click on the New section button. Next, we will create a new section called Archive and select the default Content structure value in the select menu. Now, a new Archive link will appear in the Sections list. We have to click on the + button to the left of the Archive link, and then select the Issue archive node, by selecting the relevant checkbox. After we have saved, click on the Select button. All of the Issue archive subfolders will be placed inside the Archive section. We have to remember the ID of this section, which we'll use to create the override rules. In this case, the section ID number is 6, as seen in the first screenshot in the Creating a new section section. Setting up the section permission access By default, eZ Publish creates private sections that only an administrator can access. To make a section public, we need to give read permission to anonymous users. To set up the rules, we have to go back to Setup tab on the top menu, and then click on the Role and policies link on the left-hand menu. Here, we have to click on the Edit button on the right-hand side of the Anonymous link, and then click on the New policy button. Next, select the content option in the Module field, and then click on the Grant access to one function button. Select the read option in the Function field, and then click on the Grant limited access button. Next, select the Anonymous option for the Section field. Click on the OK button, and then click on the OK button on the Edit <Anonymous> Role page. Now, the anonymous user can access the Archive section. In the next paragraph, we will use this section to create custom override rules. Customizing the page layout After we copy the pagelayout.tpl template into the new path, we have to work on it in order to create the three columns inside the content layout of the eZ Webin template. To do this, first of all, we have to remove the leftmost sidebar, along with the secondary navigation menu, inside the Archive section that we have created. Open the pagelayout.tpl file that you have copied into your favorite IDE, and take a look at the code. At line 62 we will find the following code: {if and( is_set( $content_info.class_identifier ), ezini('MenuSettings', 'HideLeftMenuClasses', 'menu.ini' )|contains($content_info.class_identifier ) )}{set $pagestyle = 'nosidemenu noextrainfo'} Here, eZ Webin hides the side menu if the content class belongs to the array returned by the ezini operator. We now need to extend the IF sentence and add a control to the section ID, by using the following code: {if or(and( is_set( $content_info.class_identifier ), ezini('MenuSettings', 'HideLeftMenuClasses', 'menu.ini' )|contains($content_info.class_identifier ) ), $module_result.section_id|eq(6))}{set $pagestyle = 'nosidemenu noextrainfo'} As we can see, this code will now check to see if the browsed section has an ID equal to 6 (that is, the archive section ID that we previously created) and if it has, will hide the unnecessary sidebar. CSS editing Luckily, the entire template code of eZ Webin is strongly semantic and all of the elements have their own IDs and classes. Thanks to this, we can change a lot of things by simply working on the CSS. By default, the CMS uses six CSSes. These are: core.css: this is the global stylesheet where all of the standard tag styles for eZ Publish are defined; usually, this file is overridden by all of the others webstyletoolbar.css: this stylesheet is imported for the frontend web toolbar that is used for editing the content pagelayout.css: this is where all of the default styles of the global pagelayout are defined content.css: this is where all the default styles of the content classes are defined site-colors.css: this file is used to override the pagelayout.css to skin a site differently classes-colors.css: this file is used to override the default styles defined by the content.css file To edit the CSS, we have to copy the original eZ Webin stylesheet from the /var/www/packtmediaproject/extension/ezwebin/design/ezwebin/stylesheets folder to our design directory and then to execute the following commands: # cd /var/www/packtmediaproject/extension/# cp -rf ezwebin/design/ezwebin/stylesheets/* packtmedia/design/magazine/stylesheets/ Now, every time that we want to change the stylesheet, we have to remember to edit the CSS files in the design/magazine/stylesheets/ directory of our extension. Creating a new style package In eZ Publish, as we did for extension, it's possible to create a portable style package, so we can share and reuse our custom style in other sites. We can do this by navigating to the backend admin site and uploading the new stylesheet that we want to use. First, we have to create our CSS files by using our favorite CSS editor; we have to remember that they will override the default styles, so we only need to add the lines that we want to change. After we create the new stylesheet files, we have to open the browser, click on the Setup tab, and then click on the Package link in the left-hand sidebar. The system will ask us where we want to create our new package. We will select the local repository and click on the Create new package button. eZ Publish will then ask us which kind of package we want to create. We have to select the Site style wizard, and then click on the Create new package button. We can now choose a thumbnail for the style that we are uploading, or continue without it. After selecting the thumbnail, the wizard will ask us to choose the CSS file that we previously created. Select it, and then click on the Next button. With the wizard, we will also upload one or more images, for example a new logo file, or other images related to the CSS. To not upload files, we simply have to click on the Next button without selecting a file in the form. We have to remember that all of the images that we upload will be saved in a subfolder named images, which will be placed in the same directory as the stylesheet. This will be useful when we need to set the relative path of the images used inside the CSS. We can now add the package information and export it to our PC (if required). The new style package will automatically be installed in the eZ Publish package folder. It will be accessible from the Design tab, via the sidebar's Look and Feel link. If we select the package and clear the cache automatically, it will be applied to the frontend. Summary In this article, we learned the basics of the templating system of eZ Publish. We worked on template's function and operator, and also learned how to extend the default WYSIWYG editor of eZ Publish. Moreover, we created the site wireframe and learned how the design overriding feature works. We also created a new stylesheet package, and applied it to our extension.
Read more
  • 0
  • 0
  • 1913
Visually different images

article-image-creating-site-accesses-ez-publish-4
Packt
19 Nov 2009
6 min read
Save for later

Creating Site Accesses with eZ Publish 4

Packt
19 Nov 2009
6 min read
What is the siteaccess system? To override eZ Publish's default configuration, we need to create a collection of configuration settings called siteaccess. The role of a siteaccess is to indicate to eZ which database, design, and var directory should be used for a particular context. With siteaccess it is possible to use the same content and different designs (for example, when creating a mobile version of our site) or do the opposite (for example, managing a multilingual site where the template doesn't change but the content does). It's also possible to create an administration siteaccess, where we can manage any kind of content, such as users, media files and, of course, the articles, or a frontend siteaccess that is the website, where we can only view the public published content. A typical eZ publish site consists of two siteaccesses: a public interface for visitors and a restricted interface for editors. In this case, both siteaccesses use the same content, but different designs. Whereas the administration siteaccess would most likely use the built-in administration design, the public siteaccess would probably use a custom design. The following illustration, taken from the official eZ Publish documentation, shows this scenario: Usually, in big projects it is also useful to have two additional siteaccesses: a staging siteaccess and a developing siteaccess. The first is used in a staging environment to make frequent deployments of modifications that can be tested by the customer (in this case, the siteaccess uses a different database but the same design as for the public and admin siteaccesses). The second one, instead, is used by developers on their local machine (this siteaccess uses a local database, but once again uses the same design as for the public and admin siteaccesses). A single eZ publish installation can host a virtually unlimited number of sites by simply adding new siteaccesses, designs, and databases. Siteaccess folder structure The configuration settings for siteaccesses are located inside a dedicated subfolder within the /settings/siteaccess folder. The name of the subfolder is the actual name of the siteaccess. It is very important to remember that a siteaccess name can only contain letters, numbers, and underscores. The following illustration shows a setup with two siteaccesses: admin and public. When a siteaccess is in use, eZ publish reads the configuration file in the following sequence: Default configuration settings: /settings/*.ini Siteaccess settings: /settings/siteaccess/[name_of_siteaccess]/*.ini.append.php Global overrides: /settings/override/*.ini.append.php eZ Publish will first read the default configuration settings. Then, it will determine which siteaccess to use based on the rules that are defined in the global override for site.ini /settings/override/site.ini.append.php. When it knows which siteaccess has to be used, it will go into the correct siteaccess folder and read the configuration files that belong to that siteaccess. The settings of the siteaccess will override the default configuration settings. For example, if a siteaccess uses a database called packtmediaproject_test, the system will find this and automatically use the specified database when an incoming request is processed. Finally, eZ Publish reads the configuration files in the global override directory. The settings in the global override directory will override all other settings. So, if a database called packtmediaproject is specified in the global override directory for site.ini, then eZ publish will attempt to use that database regardless of what is specified in the siteaccess settings. If a setting is not overridden either by the siteaccess, or from within a global override, then the default setting will be used. The default settings are set by the .ini files located in the /settings directory. The following figure illustrates how the system reads the configuration files, using the site.ini file as an example:                                                                                             Creating a siteaccess for dev, staging, and production environments Once we have finished installing eZ Publish, we'll find a folder called setting/siteaccess, with the default siteaccess automatically configured. In our case we'll find these folders: admin: This folder usually isn't used as siteaccess, but it contains a standard configuration file that can be used to set up the administration panel setup: This folder contains all of the configuration files that are used during the installation process ezwebin_site: This is where the main design is imported directly from the eZ.no site for the package eZ Webin ita, eng, fre: Last but not least, the ita, eng, and fre folders have the configuration files used by the site to enable internationalization and localization The ezwebin_site_admin is created by the webmin site package, and contains all of the configuration files for the administration panel. Enterprise siteaccess schema In an enterprise development process, it is very important to have four more siteaccesses: dev dev_panel staging staging_panel The siteaccesses dev and dev_panel will be used as a development playground installation, which can be used by the development team members, with their own configuration parameters, such as database connection, path, and debug file. This will help them to test different configuration parameters or extensions without impacting the production site. The siteaccesses staging and staging_panel will be used as a staging arena that can be used by a customer to evaluate new functionality before it is released to production. Usually, the staging installation is installed on a clone of the production server, to make sure that everything works in the same way. In our case, we will work on the same server to better understand how to create the different siteaccesses. All siteacccesses will have some configuration files in common, and sometimes these have to assign the same value to the parameters specified inside them. For example, if you need to create a new language siteacccess, you'll need to copy the same module configuration files to be sure that they will work in the same way for all of the languages. In this case, it will be useful to create a symbolic link from one siteaccess to another. If you don't know what a Linux symbolic link is, you can think of it as a virtual pointer to a real file, like a Windows XP shortcut.
Read more
  • 0
  • 0
  • 1629

article-image-creating-design-ez-publish-4-templating-system-part-1
Packt
19 Nov 2009
11 min read
Save for later

Creating a Design with eZ Publish 4 Templating System: Part 1

Packt
19 Nov 2009
11 min read
eZ Publish templating In the first part of this article, we will introduce the basics of the eZ Publish templating system, which will help us to better understand the rest of the article Templating eZ Publish has its own templating system based on the decoupling of layout and content. This will help us to assign a custom layout to any content object in different sections. Moreover, just as other templating platforms, such as Smarty (http://www.smarty.net), eZ Publish has its own markup to help developers with control structure operations, subtemplating, and on-the-fly content editing. It also exposes a particular function to fetch and filter content from a database. The official eZ Publish website has a constant, up-to-date reference with the entire templating markup. We suggest you to use the following link every time that you need to know more details about the available arguments:http://ez.no/doc/ez_publish/technical_manual/4_0/templates/ The templating markup All of the eZ Publish templating code should be placed between curly brackets. When the CMS will parse our template file and find the curly brackets, it will start executing the related code. Escaping the curly bracketsIf we need to use curly brackets, for example to write a javascript function inside our template, we need to use the {literal} operator. {literal}<script type="text/javascript">function alertMe() { window.alert('Harkonen approaching!');}</script>{/literal} Control structure operators We can divide these function into two main families: Conditional (IF-THEN-ELSE) Looping (FOR-FOREACH-WHILE) Whereas the first one should be used to change the template behavior according to some predefined condition, the other one will help us to seek and manage array and content structures. Conditional control Conditional control is sometimes useful for changing the output when some data is received by the system. For example, we would need a different CSS class for a particular value, or to change the <div> class, if the current month is the same as the one displayed, as shown below: {def $current_month=currentdate()|datetime(custom, '%F')}{if $node.name|eq($current_month) }<span class="this-month">{else}<span class="default-month">{/if}{undef $current_month} In the first line, we define a $current_month variable that has a value of the name of the month (for example, October), retrieved by the datetime() operator. Then we use the IF conditional control to choose the correct class. In the last line, we delete the variable previously created, by releasing it from system memory. Loop control As stated above, the loop control structure can be used to iterate through an array. We can, for example, create an unordered list (<ul>) from an array of items. <ul>{foreach $items as $item} <li>{node_view_gui content_node=$item view=line}</li>{/foreach}</ul> This will be rendered as: <ul> <li>1st item</li> <li>2nd item</li> <li>3rd item</li> ...</ul> As you can see, the FOREACH structure is similar to the PHP structure. In this example, the most interesting line is the definition of the list object. This we can literally read as: render the content node (node_view_gui) from a specific node (content_node=$issue) using the line view template (view=line). Fetch functions With the fetch functions, we can retrieve all of the information about a content object for a module. The fetch functions can also be used to create custom queries to retrieve only the information we need, and not everything. eZ Publish exposes many fetch functions, which can be read about on the documentation site at http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_fetch_functions The most important, and most used, fetch functions are those regarding the content, sections, and user modules. For example, we can fetch the root content object by using the following code in our template: {$object = fetch('content', 'object', hash('id', '1'))} We can then use the $object variable to display the object inside the HTML code. Generic template functions and operators The CMS gives us a lot of functions and operators, all of them described in the reference manual of the eZ System documentation site. As a thumb rule, we should remember that to execute a particular function, we have to use the following syntax: {function_name parameter1=value1 ... parameterN=valueN } All parameters are separated by spaces and can be specified in no particular order. If we want to manage the operators, we have to remember that they accept the parameters passed in a specific order, separated by a comma. Moreover, an operator should handle a parameter passed to it with a pipe (|). {$piped_parameter|my_operator( parameter1, ..., parameterN ) } Every time we see a pipe after a variable, we have to remember that we are passing a value to an operator. We used the datetime() operator in the previous example for the conditional control functionality. As a reference to API functions and operators, you can use the official variable documentation that is constantly updated on the eZ System site:http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_operatorshttp://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_functions Layout variables By default, the page layout template can access some of the variables passed by the CMS. These variables, named Layout variables, can be used to render system and user information, or to change the output. These variables are automatically configured by eZ Publish when it analyzes and executes the code related to a view. One of the most important variables is $module_result, which contains the results generated by the module and the view that is being executed. A module is an HTTP interface that interacts with eZ Publish. A module consists of a set of views that contain the code to be executed. For example, if we call the following URL, the system executes the login view code of the user module:http://www.example.com/index.php/user/login. As an API reference, you can use the official variable documentation that is constantly updated on the eZ System site:http://ez.no/doc/ez_publish/technical_manual/4_0/templates/the_pagelayout/variables_in_pagelayout Overriding a template eZ Publish offers a set of standard templates that are useful, but they cannot cover all the possible design needs. To solve this issue, the CMF provides a fallback system that allows us to load different templates based on specific rules. This system is usually referred to as overriding, and allows us to change the template for each module's view by overriding the default template when the user is in a particular context. Embedding HTML inside the WYSIWYG XML editor, pt.2 We have to override a standard behavior of eZ Publish to create a generic HTML block inside the WYSIWYG XML editor. We use a content style named html for the online editor and we will work on it for the frontend to render it correctly. First, we have to create a file named literal.tpl and place it in the design folder of our extension. The following code will do exactly what we need: # mkdir -p /var/www/packtmediaproject/extension/packtmedia/design/magazine/templates/datatype/view/ezxmltags/# cd /var/www/packtmediaproject/extension/packtmedia/design/magazine/templates/datatype/view/ezxmltags/# touch literal.tpl Next, we will open the literal.tpl file in our preferred IDE. Now we will add the code that will, by default, render everything surrounded by a <pre> tag and the raw HTML code, if the class is html: {if ne( $classification, 'html' )} <pre {if ne( $classification|trim, '' )} class="{$classification|wash}"{/if}>{$content|wash( xhtml )}</pre>{else} {$content}{/if} This code will check to see if the $classification variable is different from the "html" string in order to add the <pre> tag and then, again, it will add a class attribute to the <pre> tag if the $classification variable is not null. To use it, we only need to reset the cache from the shell prompt by using the following command: cd /var/www/packmediaproject/php bin/php/ezcache.php --clear-all --purge The ezcache.php file is a PHP shell script that can be used to clear and manage the eZ Publish cache. This file has many parameters, which can be viewed by using the --help parameter. Creating a new design Before starting work on the eZ Webin template code, we need to create a wireframe in order to decide on the layout structure. We will use this structure to override the standard layout files. A wireframe is a basic visual guide that is used in web design to suggest the structure of a website and the relationships between its pages. Wireframe editorsThere are a lot of commercial and free wireframe editors. To create our site's wireframes, we will use the Firefox plugin called Pencil(http://www.evolus.vn/Pencil/).We have chosen Pencil because it is open source and works on every platform that runs the Firefox browser.If you need something more complete, you should take a look at Balsamiq (http://www.balsamiq.com/) or at OmniGraffle (http://www.omnigroup.com/applications/OmniGraffle/) if you have an Apple computer. Our site will have at least six different page layouts: The homepage The issue page, where we will display the cover and the articles list The issue archive page, by month and by years The staff profile page, where we will display the latest articles that the editor has written, along with his profile The article and the forum pages, with the default layout based on the eZ Webin design Now we will illustrate the first four layouts because we will work on them, overriding their standard eZ Webin layout. The homepage Starting from the homepage, we can see that the site will have, in the top-left corner, a logo for the magazine and a place-holder for a banner. Under these, we will have the main navigation menu and the main content area. We have chosen a three-column layout in order to easily manage the content that we want to show. In the homepage, the first column will show the latest news and the middle column will show the information and cover of the latest issue. The last column will have two boxes—one with the most important article from the latest issue and the other with the forum thread. Issue page The issue page will show some information of a specific magazine issue. In this page, the middle box of the homepage will shift towards the left, and in the right column there will be the highlighted article for the issue. At the bottom of the page, we will find all of the other articles. The issue archive We have to remember that our magazine is released monthly, so we need an archive page where we can collect all of the past issues. The issue archive page, which can be reached by clicking on the main navigation menu, will again show some information from the latest issue. (We need to sell our articles!) The rightmost column of the template will show all of the covers for the current or selected year. At the bottom of the page, we will create a box with links to the past issues grouped by years and months. The staff profile page The staff profile page will display information from a staff profile, such as his avatar, biography, and the latest articles that he has written. The staff profile page will have three columns. The first column will show information regarding the editor's profile, the middle column will show all of the articles the editor has written (paged five by five) and the third will be used for banners or other images. >> Continue Reading: Creating a Design with eZ Publish 4 Templating System: Part 2
Read more
  • 0
  • 0
  • 1734

article-image-installation-and-configuration-oracle-soa-suite-11g-r1-part-2
Packt
19 Nov 2009
6 min read
Save for later

Installation and Configuration of Oracle SOA Suite 11g R1: Part 2

Packt
19 Nov 2009
6 min read
Additional actions In the following section, you will be performing additional configuration that is optional but will greatly improve performance and usability in the context of the development work you are about to start. Setting memory limits Review the memory settings. This value is dependent on your machine resources and may need to be adjusted for your machine. Allocating less memory for startup will give you better performance on a machine with less memory available. This value is appropriate for a 3 GB memory machine or less. Edit the SOA domain environment file found here (make sure you have the SOA Domain environment file): C:OracleMiddlewarehome_11gR1user_projectsdomains domain1binsetSOADomainEnv.cmd Set memory values: set DEFAULT_MEM_ARGS=-Xms512m -Xmx512m Starting and stopping Now it's time to start your servers. You can start them using the provided script or you can start them separately. Instructions for both methods are included. Starting First set boot.properties and then start the servers. Before you start, set the boot properties so you are not prompted to log in during server startup. Copy C:pobinboot.properties to C:OracleMiddlewarehome_11gR1user_projectsdomainsdomain1. Edit the copied file to reflect the password for your configuration (entered during domain configuration). The first time the server is started this file is encrypted and copied to the server locations.You can start the servers one at a time or you can use the start_all script to start the admin and SOA managed servers (not BAM). To start them one at a time instead, skip to step 6. Copy the startup script to the Oracle directory: C:pobinstart_all.cmd toC:OracleMiddleware Edit the copied file to reflect your environment. Open a command window and start your servers as shown. You must specify how many seconds to wait after starting the admin server before starting the managed server. The admin server must be in the RUNNING state before the managed server starts (see the following screenshot). Try 180 seconds and adjust as necessary. You will need more time the first time you start after a machine reboot than for subsequent restarts: cd C:OracleMiddlewarestart_all.cmd 180 Your servers are now starting automatically so you can skip steps 6-10. Jump to step 12 to continue. To start the servers manually, continue with the following steps. Open three command windows, one for the WebLogic admin server, one for the SOA managed server, and one for the BAM managed server (only start BAM when you need it for a BAM lab). Start the Admin Server first: cd C:OracleMiddlewarehome_11gR1user_projectsdomainsdomain1startWebLogic.cmd Wait for the Admin Server to finish starting up. It takes a few minutes—watch for status RUNNING in the log console window: Start the SOA managed server in the second command window. This start script is in the bin directory. You can also run it directly from the bin directory: cd C:OracleMiddlewarehome_11gR1user_projectsdomainsdomain1binstartManagedWebLogic.cmd soa_server1 When prompted, enter the username weblogic and password welcome1. If you did step 1 and set boot.properties, you will not be prompted. The server is started when you see the message, INFO: FabricProviderServlet.stateChanged SOA Platform is running and accepting requests. Start the BAM managed server in the third command window—do this only when needed for the BAM lab: cd C:OracleMiddlewarehome_11gR1user_projectsdomainsdomain1binstartManagedWebLogic.cmd bam_server1 When prompted, enter the user name weblogic and password welcome1. If you did step 1 and set boot.properties, you will not be prompted. Watch for the RUNNING status. Console URLs Log in with weblogic/welcome1 for all consoles: Weblogic console: http://localhost:7001/console Enterprise Manager console: http://localhost:7001/em SOA worklist: http://localhost:8001/integration/worklistapp B2B console: http://localhost:8001/b2b BAM (must use IE browser): http://localhost:9001/OracleBAM Stopping servers Whenever you need to stop the servers complete the following: Stop the managed servers first by entering Ctrl+C in the command window. Wait until stopped. Stop the admin server by entering Ctrl+C in the command window. WebLogic Server console settings There are two suggested changes to make in the WebLogic Server console. First, you will be viewing application deployments often using the WebLogic server console. This is a lot more convenient if you change the settings not to show libraries as this makes the list a lot shorter and you can find what you need more quickly. Start the WebLogic Admin Server (WLS) if it is not already running. Log in to the WLS console http://localhost:7001/console. Click on Deployments in the left navigation bar. Click on Customize this table at the top of the Deployments table. Change the number of rows per page to 100 (there are only about 30). Select the checkbox to exclude libraries and click on Apply. Second, when the server is started, internal applications like the WLS console are not deployed completely and you see a slight delay when you first access the console. You saw this delay just now when you first accessed the console URL. You can change this behavior to deploy internal applications at startup instead and then you don't get the delay when you access the console. This is convenient for demos (if you want to show the console) and also if you tend to use the console each time you start up the server. Click on domain1 in the left navigation bar in the WLS console. Click on Configuration | General tab. Deselect Enable on-demand deployment of internal applications checkbox. Click on the Save button. EM settings for development The Enterprise Manager can provide different levels of information about composite runtime instances based on a property setting. During development, it is helpful to have a higher setting. These settings are not used on production machines except when specifically needed for debugging purposes as there is a performance cost. Start your servers if they are not already running. Log in to the EM console at http://localhost:7001/em. Right-click on the soa-infra (soa_server1) in the left navigation bar to open the SOA menu and select SOA Administration | Common Properties. Select Audit Level: Development and select the checkbox for Capture Composite Instance State. Click on Apply and click on Yes. If you need to uninstall JDeveloper and servers If you need to uninstall everything, complete the following: First save anything from C:OracleMiddlewarejdev_11gR1jdevelopermywork that you want to keep as this directory will be deleted. Run Uninstall from the program menu to completion for both JDeveloper and WLS. Delete C:OracleMiddlewarejdev_11gR1 and C:OracleMiddlewarehome_11gR1. If you get an error message about not being able to delete because a name or path is too long, change the names of the composite directories within home_ 11gR1user_projectsdomainsdomain1deployed-composites to abcd and try deleting again. Delete program groups from C:Documents and SettingsAll UsersStart MenuPrograms: Oracle Fusion Middleware 11.1.1.1.0 Oracle SOA 11g - Home1 Oracle WebLogic Complete the Dropping existing schema section earlier in this article to clean up the database.
Read more
  • 0
  • 0
  • 2075
Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at $15.99/month. Cancel anytime
article-image-user-management-joomla-15-part-2
Packt
19 Nov 2009
2 min read
Save for later

User Management in Joomla! 1.5: Part 2

Packt
19 Nov 2009
2 min read
Managing your users: The User Manager The User Manager within the administration interface gives you an overview of all the registered users of your website and the ability to manage them as needed. Only users registered as Administrator or Super Administrator can make changes here. Creating a new user The Party People website has only one administration user and we want to add a new user who has backend manager access. As the administrator, you can do this by accessing the User Manager from within the administration. Click Site | User Manager in the top menu or click the User Manager icon on the front page of the administration page. To add a new user, click the New icon on the top right toolbar. Type in a name, a username, an e-mail address, and a password into the Name, Username, and New Password input boxes, as shown in the following screenshot. Verify the password to be sure you have entered the correct string. Click on the user group that you want to allocate them to from the selection in the Group window. Your choice will obviously depend upon the content and access level you want them to have. We'll select Manager for our site. Click No for Block User, as we are setting up a new one. Select Yes or No for Receive System E-mails. Save your new user. Adding a new user as a site contact Before you add your new user to your contact list, consider whether they fit into the established contact categories. If they don't, you can add a new Category. Do this before you add the new contact. Adding a new contact Category Create contact Categories based on what role the user is to take within your site. It is described in the following steps: Select Components from the top menu, then Contacts and Manage Contacts to see the Contact Manager. To add a new contact Category, select that link. In the new Category screen, give the category a name and complete the details as shown in the following screenshot. Add a brief description if you need to. Save your new category.
Read more
  • 0
  • 0
  • 1016

article-image-user-management-joomla-15-part-1
Packt
19 Nov 2009
4 min read
Save for later

User Management in Joomla! 1.5: Part 1

Packt
19 Nov 2009
4 min read
The big picture: Who are users? Users are people who have registered their details with you and are allocated access to certain resources and information, depending on their role within the scope of your website. They can be administrators and content editors/contributors or customers who purchase goods and services from you. This is different to a casual visitor who lands up at the frontend of your site because he/she has your website address or hopefully has found you through a search engine. You may be able to turn these casual visitors into registered users if you have something to offer them. Say you want to provide special content to only those who are genuinely interested in your services or products. Encouraging them to register allows you to collect contact information (it's best to ask only for the most relevant details, as people generally don't want to give out more than they need to) and keep in touch. Hopefully, you can convert it into an ongoing relationship with sales and benefits for your business. Generating interest in your products and services is important here and suggesting some level of exclusivity can make your customers feel privileged in terms of being privy to information not readily available to just anyone. Put simply though, users are your website visitors, content contributors, and administrators. Depending on their role, they are essentially divided into two broad groups with smaller sub-categories within them. Frontend users Frontend users do not have access to the administration interface and can only access material and information through the frontend. They can be: Registered users, authors, editors, and publishers who have privileges to edit and update information. Guests or casual visitors to your site. These visitors come to your site anonymously and unregistered. People who register their details in order to transact with you. Frontend user definitions When a user is registered with you, they are allocated to a group, as per the settings applied within the Global Configuration. They can be any one of the following: Registered Users are visitors to your site who have registered themselves in order to view certain content or transact with you. Authors can submit new content articles to the site with approval, but can't edit existing articles. A publisher or someone higher must approve these submissions. Editors can submit and edit new content articles. A publisher or someone higher must also approve these entries. Publishers  can submit new content articles, edit existing articles, and publish the articles. None of these user groups have access to the administration interface, and can only edit or add material from the frontend. Administration users Administration users can edit and update the content of your site by logging into the administration control panel and are those who: Have Administrator Manager or Super Administrator access. Each of these roles has specific access. For example, the Manager profile does not have access to the User Manager section. Have various levels of access within the administration control panel, the highest level being Super Administrator. Editing the frontend Login Form From the frontend of your website, the Login Form allows users to access content that is potentially specialized and only visible to them, or to transact with you if you're running an e-commerce site. You can also customize your Login Form by adding text and a link to create new accounts. Lost usernames and passwords The Forgot your password and Forgot your username links are important not only for users to fi nd their password or username again, but also to help you to manage users. Rather than unnecessarily creating a new account if they have lost their login details, having an e-mail prompt sent to reset their details is a more efficient approach. Clicking the link for either will generate a request to enter an e-mail address. A confi rmation e-mail will be sent with a verification token or string of characters which allows the user to enter and reset their password. Alternatively, their username will be emailed to them.      
Read more
  • 0
  • 0
  • 2306

article-image-sticky-features-your-blog-network-wordpress-mu-28-part-2
Packt
19 Nov 2009
5 min read
Save for later

Sticky Features for your Blog Network with WordPress MU 2.8: Part 2

Packt
19 Nov 2009
5 min read
Community features—gravatars Gravatars are Globally Recognized Avatars. They allow people to carry the same avatar from site to site without having to register at each site and take the time to upload an image. Gravatars are supported by IntenseDebate by default. If a user has a gravatar and gives the email address that the gravatar is tied to when they make a comments, then the gravatar will be displayed beside that comment. Since version 2.5, WordPress MU has had gravatar support built in. Let's add gravatars to our post pages. Time for action – gravatars in WordPress MU Open your theme's index.php file. In our case we are editng the Blue Zinfandel theme. Find the secton that begins with < div class="contentdate" > . Remove all markup up to the closing tag and insert the following code: <?php $email = $authordata->user_email; $hash = md5($email); $uri = 'http://www.gravatar.com/avatar/' . $hash . '?d=identicon&r =any&size=80'; $headers = wp_get_http_headers($uri); if (!is_array($headers)) : echo "<h3>"; echo the_time('M'); echo "</h3><h4>"; echo the_time('j'); echo "</h4>";Stcky Features for your Blog Network[ 142 ] elseif (isset($headers["content-disposition"]) ) : echo get_avatar( $authordata->user_email, $size = '50') ; else : echo "<h3>"; echo the_time('M'); echo "</h3><h4>"; echo the_time('j'); echo "</h4>"; endif; ?> Save and upload the file. If you wish to use gravatars on user blogs, you will also need to edit the user's version of the theme file. Now, if a post author has a gravatar, it will be displayed in the title secton of their posts. If not, the default Date of Post box will appear instead. What just happened? We have used the built-in WordPress MU gravatars function to display a member's gravatar in the title section of any posts they make. As the default No Gravatar Set image is rather boring, our code checks to see if the author in question has a gravatar. If the author does not, or if the Gravatars web site is not accessible for any reason, then we display the normal post date icon instead. Gravatars provide a way for people to carry their identity from site to site. Showing a recognizable face for your site's authors builds recognition among readers and helps readers and blog authors to build a relationship with each other. You might be wondering why the output in the previous code is broken into several echo statements. I have chosen that method purely because I find it more readable. You could save yourself some typing if you built an echo statement similar to this one: echo "<h3>". the_time('M')."</h3>" Have a go hero – gravatars and themes The code used to edit the SlayerCafe blog theme was very simplistic. The theme you are using for your site may be structured differently. In the theme for the SlayerCafe, the calendar icon that shows the date of the latest post is coded into the CSS file. The change I have made to the index.php file does not prevent the calendar icon from being loaded. The gravatar image simply loads over the top of it. Try reworking the theme file to correct this. One way to do so would be to create a copy of the contentdate class in the styles.css file, which does not load the calendar image. Call the new class contentgravatar and then create different < div > tags to be displayed depending on whether you wish to show the calendar or the gravatar. Encouraging sign-ups with downloads for members only If you offer file downloads, restricting some of them to only members is a good way to encourage people to sign up. It is a good idea to offer some file downloads to visitors who are just passing through so that you can build up their trust, as some people are uncomfortable giving out their email address to an unknown web site. Also, some people do not want to take the time to register to download a file, especially if they don't know if it is going to be a worthwhile download. A good compromise is to offer some files to everyone and other files for members only, or to offer some content on your blog and then a download in a more convenient form. As an example, some of the Watchers on SlayerCafe could run tutorials about demon identification and slaying techniques. They may offer text and image versions as blog posts, with an MP3 version of the lesson that registered Slayers could download to listen to while they are on patrol. This is likely to have a high conversion rate in terms of registrations; the visiting Slayers will hopefully be impressed by the quality of the information in the tutorials and want to download the audio version. One useful plugin that restricts downloads to registered users only is the User Only Downloads plugin available at http://wpmudev.org/project/user-only-downloads. This plugin is very easy to use. For some reason the author uploaded the plugin to WPMU Dev as a text file, so you will need to rename it to a .php file before you can use it. Just upload the renamed file to your mu-plugins folder and tell your users that they can restrict file downloads to members only by using the following tag in their posts: [user_download URL] Logged in users will see a download link, while everyone else will see a bold message telling them that they need to be logged in to download files.  
Read more
  • 0
  • 0
  • 1141

article-image-sticky-features-your-blog-network-wordpress-mu-28-part-1
Packt
19 Nov 2009
9 min read
Save for later

Sticky Features for your Blog Network with WordPress MU 2.8: Part 1

Packt
19 Nov 2009
9 min read
What do people mean by "sticky"? If you have ever ran a blog or web site before, you may have noticed that it's fairly easy to get a spike in traffic by submitting a good story to a few social bookmarking sites or by being lucky enough to get a link to one of your posts from a much larger site. The problem is that after a day or so, when the submissions fall off the front page, it's likely your traffic will die down to its usual levels again. Some site owners fall into the trap of chasing after the next traffic spike, using "linkbait" articles with intentionally controversial titles and content, when they should really be focusing on quality content, improving the site, and working towards sustained growth. Many bloggers submit their site to StumbleUpon.com. StumbleUpon is a web service where users can enter their interests, and be sent to a random site that will match those interests. Those users can then either give a "thumbs up" to the site they are sent to indicating that they like the site or a "thumbs down" if they don't like it. Those votes are used to improve future suggestions and increase the chances of the next site that they "Stumble Upon" being one that they are interested in. Other popular sites for increasing traffic include Technorati (a site that measures the "authority" of a blog based on how many other bloggers are linking to it), and the news/story-related sites Reddit (a general interest site with everything from politics to gadgets-related news), and Digg (a site with a focus on tech and gaming news). A sticky blog is one that doesn't just attract new visitors, it keeps them. Instead of having a visitor click through from a link on Technorati or visit by using the Stumble! feature of StumbleUpon, skim the page they land on and then leave, a sticky blog would make that visitor stay around a little longer. Ideally, visitors would read the article they were interested in and then find themselves intrigued enough to read more articles. They may comment on some articles and then keep returning to read answers to their comments. Or, they may decide to subscribe to the blog so that they can read future posts. A sticky site encourages readers to become engaged with the community, resulting in long-term increases in traffic. When new readers arrive at the site for the first time, they get involved themselves and keep coming back. They may also tell their friends or link to the site from their own sites, giving you free promotion. Letting readers and authors communicate Interesting content is vital, but one of the best ways to get people coming back to your blog network is to give them a chance to interact with the site's authors and with each other. This not only makes the readers feel valued, it also opens up a dialogue that encourages repeat visitors. Contact forms Providing visitors with a way to contact you privately is useful for several reasons. The visitor may want to discuss advertising opportunities, submit some news you may be interested in, or ask for help with a problem they have accessing part of the site. You could post your email address on the site, but this makes you vulnerable to spam attacks. A contact form is a safer way to allow your visitors to contact you. Time for action – setting up contact forms Let's set up a contact form: Download Contact Form 7 from http://wordpress.org/extend/plugins/contact-form-7/. To install, upload the contents of the archive file to /wp-content/plugins. Activate the plugin and go to the settings page (Tools | Contact Form 7). You can also access the page by clicking Settings under the plugin name, which appears on the Manage Plugins page. You can add new fields using the Generate Tag drop-down menu. Further down the admin page you will see options to set error messages (such as the message users will see if they miss out a required field, or if they try to upload a file that is too big). Once you have created the form, make a note of the tag at the top of the screen (in our case this was [contact-form 1 "Contact form 1"] ). Create a new page (Pages | Add New) called Contact Us, add a short message to the page, and then paste the contact form tag into the page. Depending on the theme you are using, you may need to add the Pages widget to your sidebar so that visitors can find the new page. Your page should look something like this: What just happened? Contact Form 7 is a powerful contact form tool that supports CAPTCHAs (via the Really Simple CAPTCHA  plugin), file uploads, drop-down menus, and more. You can define multiple contact forms and have each one submit to a different email address. This could be useful if you wish to have different people contacted for, say, advertising queries, news submissions, and tech support. You can also have a contact form submit to multiple email addresses. So, as well as having the relevant person receive a copy of each message, the site administrator could ensure they receive a copy of all messages too. You can set a prefix for each message, in addition to the subject line the visitor sets. For example, if you set the prefix to [Slayer-Form1], all emails from that contact form will have a subject line that begins with that text. You can use this to set up filters in your email application, making it easy to prioritize emails from different contact forms. Improved comments The basic WordPress MU comment feature allows readers to post their thoughts about a blog post, but it is not very good for encouraging discussion. One useful service for bloggers is IntenseDebate. This service allows for threaded discussion in comments, subscription to comments by RSS and email, and the ability to tie blog commenting in with other social networking sites and follow comments made by other blog readers. Time for action – IntenseDebate Comments Download the IntenseDebate Comments plugin from http://wordpress.org/extend/plugins/intensedebate/. You will need to sign up for an account at http://intensedebate.com/. Activate the plugin. Go to Settings | IntenseDebate. You will be presented with a login screen. Enter the account details for the account you created in step 2. Once you have logged in, click Start Importing Comments. The import process can take a very long time, even if you don't have many comments to import. Once the import process is complete, you can tweak the settings to suit your blog—although I found the default ones were a good starting point. The IntenseDebate Comments plugin has its own Comments caption, so you may want to remove the Comments header from the index.php file in your theme folder. The new comment box should look something like this: You can moderate comments using the already familiar WordPress MU interface or the dashboard on the IntenseDebate site. What just happened? IntenseDebate is a commenting system that sits on top of WordPress and WordPress MU. It is ideal for all blogs, whether they are part of a blog network, or a standalone blog. It does not replace the existing WordPress comment system; it only complements it. This means you can use IntenseDebate in conjunction with other plugins that rely on the WordPress MU comment system. Readers can comment on your blog using the IntenseDebate comment system. If they have JavaScript turned off, they will be presented with the normal WordPress comment system instead. IntenseDebate has lots of useful features that will make your users feel a greater sense of engagement with your site's authors. Those features are described below: Threaded discussions: IntenseDebate supports threaded comments. This makes it easy for readers to follow the discussions going on in the comments section. Readers can reply to the blog post itself, or reply to a specific comment, and IntenseDebate will break related comments into threads so that the discussion is easy to keep track of. Track comments or comment anonymously: Readers can comment anonymously, or, if they have an IntenseDebate profile they can log in to it and comment using it. Any comments made will be stored in the WordPress comments database and also be sent to IntenseDebate. Subscribe to comments: Readers can subscribe to comments on a particular post by email or through their favorite RSS reader. If they have an IntenseDebate account, they also have the option to send a Twitter message or "Tweet" to alert their friends that they have commented on a particular post. Reputation and voting: Another useful feature is the reputation system. Visitors can vote on comments, and comments that get a lot of negative votes will be hidden from view unless a user requests to see them. This is a handy form of "self moderation" for the community. The reputation system applies to only logged in users and gives each user an overall rating based on the quality of their comments on sites all over the Internet. Activating IntenseDebate on your users' blogs One important thing to remember is that even if you set IntenseDebate to automatically activate for your users, it won't do anything unless they set it up. Your users will still have the original WordPress MU comment system. They will be alerted to the fact that the plugin is not working for them by a message that will appear at the top of every page in their admin panel. Have a go hero – tweaking IntenseDebate IntenseDebate has so many features that there is not enough room to cover them all here. Take a look at the Extras (http://intensedebate.com/extras) page for some widgets that you may want to add to your blog. Also, check the Settings page for your blog in IntenseDebate. You can edit the moderation settings on that page. The default settings include a list of spam words that will cause comments to be flagged for moderation. Comments will also be flagged for moderation if they contain more than two URLs. You can tweak the commenting system's settings to filter by IP address, email address, key words, and profanity. You can also alter how the comments are displayed, the text displayed when people report comments, the layout, and the location of the blog's RSS feed. You may want to change that to use the FeedBurner version of the RSS feed. >> continue Reading: Sticky Features for your Blog Network with WordPress MU 2.8: Part 2
Read more
  • 0
  • 0
  • 1531
article-image-increasing-traffic-your-blog-wordpress-mu-28-part2
Packt
19 Nov 2009
5 min read
Save for later

Increasing Traffic to Your Blog with WordPress MU 2.8: Part2

Packt
19 Nov 2009
5 min read
FeedBurner FeedBurner can be used to track the number of RSS feed subscribers you have and how many of those subscribers are actively engaged with your feed. Setting up FeedBurner is quite simple, although you will need to register for an account at http://feedburner.google.com. If you already have an account at the old Feedburner.com site, you can move the feeds to your Google account when you sign in. Time for action – let's burn some feeds Download the Feedburner FeedSmith plugin from http://feedburner.google.com/fb/static/feedburner_feedsmith_plugin_2.3.zip . Upload the plugin's PHP file to /wp-content/plugins. Activate the plugin for yourself, then for all other users. Log in to Feedburner.google.com and add your site's feed to your FeedBurner account by entering the URL into the Burn a feed right this instant box. In most cases the default title and address should be fine; you may want to change the address if yours is too cumbersome. For Slayercafe.com, FeedBurner picked http://feeds2.feedburner.com/TheSlayerCafe, which is nice and easy to remember. On the next screen, tick the box to allow FeedBurner to track Clickthroughs and Reach. Go to the Publicize tab and activate the FeedCount feature. On your main blog, go to the Settings | FeedBurner screen and paste the URL you created in step 5 into the FeedBurner box. Install the FeedBurner Widget available at http://wordpress.org/extend/plugins/feedburner-widget/. On the Appearance | Widgets page, add the widget just above the normal RSS feed, and set it up like shown in the following screenshot. You should now have two subscription options on your front page. Once your site starts getting subscribers, you should see some useful statistics on the FeedBurner Analyze page. What's my feed URL?If you aren't sure what your feed's URL is, check out the following list: RSS 2.0: http://www.mydomain.tld/feed/ RSS 2.0: http://www.mydomain.tld/feed/rss2/ RSS 0.92: http://www.mydomain.tld/feed/rss RDF/RSS 1.0: http://www.mydomain.tld/feed/rdf Atom: http://www.mydomain.tld/feed/atom All of the above feed types are offered by WordPress MU. The RSS 2.0 feed will be the one that is most frequently asked for by directories and aggregators; however, it is useful to know the address of the other feeds in case a site requests them. What just happened? We have just set up two different ways for people to subscribe to the main blog, and we have offered our blog network's users the chance to do the same with their blogs. Our users will need to create their own FeedBurner accounts, but the rest of the work has been done for them—they just need to add the right widgets to their page. Offering two different ways to subscribe may seem strange, especially when you consider that the count shown by FeedBurner is inaccurate because it doesn't track people who subscribed using the direct link. The reason I have chosen to do it this way is because FeedBurner offers some useful statistics, such as how many people clicked through and which readers they are using, about the users that have subscribed via its feeds. If you find that you have a huge number of subscribers but they are never clicking on articles, then perhaps your headlines aren't enticing enough. FeedBurner also tracks Uncommon Uses—for example, someone scraping your feed to use as free content for a spam blog. If FeedBurner is so useful, then why offer an alternative? Well, not all RSS readers can understand FeedBurner feeds. This is especially true if your site expects a lot of visitors from people using older mobile devices. Offering a plain old RSS feed option is a good idea; otherwise, you will lose those subscribers entirely. Remember that if FeedBurner ever goes down, your FeedBurner subscribers will not be able to read your RSS feed. In my experience as a subscriber, FeedBurner is a reliable service; as you would expect because the service is now owned by Google, and I feel that the usefulness of the statistics it offers outweighs the risk of downtime. You may feel differently about using a third-party service to manage your feeds. If you cannot afford any downtime, then perhaps serving your feeds directly is a better option. Have a go hero – offering more RSS options If you think that the Add to Any butt on is too intrusive, or if you want to offer subscribe links in more than one place (for example, as a widget in the sidebar and also as a link at the bottom of a post), then you can use the following text link code to add the different kinds of feed links. Link Format <?php bloginfo('rss2_url'); ?> RSS 2.0 <?php bloginfo('rss_url'); ?> RSS 0.92 <?php bloginfo('rdf_url'); ?> RSS 1.0 <?php bloginfo('atom_url'); ?> Atom <?php bloginfo('comments_rss2_url'); ?> RSS Feed For Comments   You can use the code presented in this table anywhere you would like to have the RSS icons appear. Personally, I like to display the RSS icons in a prominent position in the right sidebar by editing r_sidebar.php.
Read more
  • 0
  • 0
  • 1359

article-image-how-get-incoming-links-joomla-15-seo-part-1
Packt
19 Nov 2009
6 min read
Save for later

How to get Incoming Links in Joomla! 1.5 SEO: Part 1

Packt
19 Nov 2009
6 min read
Do you want to use paid incoming links? Paying for incoming links can be a tricky business if you do it the wrong way. Google doesn't like web sites that use this link building technique and their representative master anti-spam spokesman, Matt Cutts is very clear on this subject. Buy links and get penalized… sell links and get penalized as well The major penalty is a very likely drop in Page Rank. Although Page Rank is becoming less important as compared to your rankings on the search engine result pages, people still see it as a quality making if you do have a high Page Rank. Of course using AdWords to do a "Pay Per Click" campaign is also a form of paid links. If you want to use the sponsored link options to get your site started, that is fine, but the ultimate goal of this article is to get higher rankings in the organic results of the search engines. Studies support the idea of using sponsored links to bring in more traffic from the organic searchers even after the campaign has stopped. It depends on how hard you need the traffic to your site for business, or if you want to go for organic results. Helping people helps you with link building If you have a topic that you are passionate about and you build a web site about it, then this option is one for you. Find a forum that matches the topic of your web site and start helping other people with your knowledge. On most forums there is a possibility to have your own "Signature", where you can have one or more lines of text with a link that people can click on. For instance, the site http://forums.digitalpoint.com has a lot of requests for information on Joomla! where you can help people to solve their problems. After a number of replies to questions, you can put in your own signature such as:   The links you put in there will not only bring traffic from your posts, but they also count as incoming links for Google. Not all forums have the same rules—for example, some of them have a rule that you can put a link to your site, but it should be the URL only without your main keywords in the link. So, be sure to go to the best forums you can find on your topic and start helping others with your knowledge. In the meantime, work on your incoming links as well. Commenting done the right way Another option you have is to look for blogs about your web site's topic. You will already probably know the most useful ones in your field of expertise. Go to those blogs and read some of the posts they have published. If you are lucky, there will be some kind of widget that shows you how many readers they have on that blog for their RSS Feed or email system. Large numbers are a good sign as that means a lot of people will read the blog and it probably has a good ranking in Google. Read the posts that are relevant to your topic and if you can, write a comment which shows that you know more about the topic. Also, if possible, make a new suggestion or correct an error in the article. Don't write comments such as "I really liked this post", "Thank you for this information", or even "I really like your blog". If you write comments such as those you won't get any interaction with the blogger in question and you don't add value to the discussion. Such comments will get deleted or labeled as spam. When I get comment links such as these, I remove them as they add null to zero information for other visitors and they are clearly there just for link building. It won't work that way, and if you are outsourcing or want to outsource this kind of link building, here is a warning, make sure you state in your contract with these people that blog and comment spamming is not allowed! If you don't add that clause, they may start commenting in your name, linking to your site (well, you paid them to do that…) with the same remarks over and over again. What happens next is that bloggers will ban you from commenting on their blogs, and in the worst case scenario you will loose a lot of credibility in your community. People are sometimes better informed than you think and a mistake like the one mentioned above will cost you more than money alone. So, if you start commenting, ask yourself: Do I have something of value to add to the conversation? Will people read that comment? How effective will this blog be in sending me traffic? Keep those in mind, with more emphasis on the first point, and you will do fine. Finding places to comment As I said before, commenting is a great way to create your own incoming links. But how do you find more relevant blogs to read and comment on? First of all, do a search for blogs about your web site's topic. You can use http://blogsearch.google.com/ to find the most recent blog posts and see if the blogs it finds fit your web site's topic.   Technorati is of course the best place to look for blogs.   Go ahead and use the option search the blogosphere.... From the results of this initial search, you can filter based on several options. In the first selection list you will find options such as Search Posts, Search Blogs, Search Photos, and Seach Videos. The second selection list allows you to filter based on entire post or just tags. The third option is the one you really need to set and there you can choose to filter on a lot of authority.   This option means a lot of people are linking to that web site/blog and it will probably get lots of traffic and do well in the search engines. Those blogs are the ones you want your voice to be heard on and remember if you are going to comment, make sure it is a useful one. What you need to do after finding the blog, is to really check out the site. In some cases there might just be one post about your web site's topic on that blog. And you really want it to be on topic all the way!   Two other blog search services you can use are: http://www.icerocket.com http://www.blogpulse.com Both are set up to bring to you the most recent results like Google does but they have something extra. You can learn about trends as Icerocket has a trend tool and Blogpulse has its trend search option. Using those trend tools will give you more insight on which terms are "hot" at the moment and growing. If you combine that with the blogs you just found, for your keywords, you could have a winning team.
Read more
  • 0
  • 0
  • 1390

article-image-how-get-incoming-links-joomla-15-seo-part-2
Packt
19 Nov 2009
9 min read
Save for later

How to get Incoming Links in Joomla! 1.5 SEO: Part 2

Packt
19 Nov 2009
9 min read
WordPress As I mentioned before, WordPress is the biggest scoring free service that you can use. It is also the only one that doesn't allow you to spam their system and use it just for promotional actions. All the other services mentioned earlier allow you to monetize your blog or web site. Some share a portion of their revenue as well. So, if you want to make some money on the side, these services will provide you with the possibility to do so. WordPress doesn't allow you to build blogs just for Search Engine Optimization and I quote: We have a very low tolerance for blogs created purely for Search Engine Optimization or commercial purposes, machine-generated blogs, and will continue to nuke them. So if that's what you're interested in, WordPress is not for you. A self-hosted solution would be much more appropriate for you; suitable hosts can be found at http://www.wordpress.org/ hosting. Also see the following text taken from http://support.wordpress.com/advertising: This might be just one of the reasons that Google loves WORDPRESS.COM blogs. So how is it possible to use WORDPRESS.COM to promote your website? Actually, you don't. On this service you are not going the promote your site in a way that you can do on the other services. On WORDPRESS.COM you truly build a blog or site containing pages with true value to the visitors of that blog. You can create an About page where you put a link to your main website and in that way show the readers where to get more information. You can also put a link to your website in the link section (Blogroll) together with a few other relevant links that contain valid information. Blogging on WordPress and your ranking If you cannot promote your web site in a big way then what is the point of creating a blog on WORDPRESS.COM? A blog on WordPress can rank highly for the topic that you are blogging about and will give you some SEO love through those rankings. What is more important is the fact that you can take a special topic from your main web site's topic and create a blog around that. If you write your blog posts well and start to rank on that topic you will be seen as an authority on that topic and people will want to know more about you. That is the main reason to invest time to blog on WORDPRESS.COM to be recognized as an authority in your field of expertise. As you took only one topic out of all the topics that your site is about, you can do it again for another topic as well. You could also see these blogs as a collection of topic silos that create an array of highly related web sites that point to yours. This kind of link building takes time, and a lot of it! Is it worth it? Yes most certainly, and in more ways than one. With blogging you can achieve the following: An authority status if you do it right More traffic to your web site Better rankings in the search engines More insight into what the visitors of your web site are looking for To interact with other people having interest in the same topic as you Fun in writing and that will reflect on your site as you want to create more content on that site as well There is also a downside that you have to consider—it takes time away from building content on your main site and you have to cover more locations to maintain in the beginning. If you use that blog to write some timeless quality content on a niche part of your main site you will find out that you can stop maintaining those blogs after a short period of time. Remember, these are valid blogs to build incoming links to your main site! Digging deeper into WORDPRESS.COM blogs Creating a blog on WordPress is also very simple, go to WORDPRESS.COM and get a blog. Wait! Don't go yet! You need a few guidelines to start. Your initial user account name is going to be the first part of your URL, so name it right and remember, you cannot use a "-" in your username. My first account was seo4joomla so what I got was seo4joomla.wordpress.com. When you are logged in to WORDPRESS.COM and you type in the URL with a new keyword that you want (if it is not taken); you will get the option to add that blog to your account so that you can manage all of your WordPress.COM blogs from one place. Think about the title of your blog, if you want to change it later you can do that in the settings panel. Once you have your new blog, start cleaning. Delete the sample post and the comment along with it. Delete all the links in the blogroll (unless you are going to write about WordPress). Change the base post category from Uncategorized to a relevant topic name. Change the name of the links category from Blogroll to your most relevant keyword. Delete the About page and create a new one with the keywords of your blog in the title. That way your URL (page slug in WordPress) is containing the same keywords. Choose a nice theme layout that fits your topic, and if possible use a customized header. Using a customized header will give your site a slightly different look from the other WORDPRESS.COM web sites. Change the tagline in the general settings and start writing the way you do on your web site!   Using free blogging services As you saw, there are several blogging platforms and free web site building platforms that you can use to promote your web site. There are a lot more out there on the Internet, but you need to look for the ones that rank well in the search engines before you put your valued time into building a linking "empire". These services are free of charge and sometimes live on the revenue that comes from the blog content they host. If you don't want to be on such a platform where there are advertisements around your writing, don't use them. If you are afraid that you can lose your blog on such sites look for a way to make backups (for example, on WORDPRESS.COM you can use the Export function). How to minimize your blog writing time Keeping content fresh and up-to-date on all the blogs that you build is not that difficult. If you focus on blogging on your own web site, you should try to integrate the RSS Feed from your web site into those blog pages. RSS Feeds are the best possible automatic way of updating one-to-many, so use it to your advantage. Using your best content for link building Use the best articles from your web site to get into the picture of social bookmarking web sites. Find the most visited pages and the pages with the greatest number of comments, if you have a blog on your Joomla! site. Go to bookmarking sites and bookmark your pages using your own account. There are a lot of bookmarking web sites that you can use, just make sure you send your bookmarks to at least the following: Delicous Digg Reddit Newsvine Bloglines StumbleUpon These are some of the most influential ones that count towards your search engine ranking and are a great way to get traffic. Traffic from this kind of web site will come in bursts and mostly will not span a longer time period than a few days. The real power lies in the long term effect. Writing articles for links If you like writing about your passion, you can consider writing articles and submitting them to article publishing services. People are always looking for information and, if you can provide that to them in a smart way, it will help you to gain recognition as a field expert. You don't have to write long articles, but they must be informative and should give the reader an answer to a question they might have. Write those articles and submit them to services such as: www.thewhir.com www.ideamarketers.com www.goarticles.com www.ezinearticles.com Each of those services have their own "Terms of Service" that you should read before submitting your articles. They have their quality guidelines as well. The length of the article might need to be of a certain minimum or maximum number of characters. You might not be permitted to link deeper into your web site than the top level. Get that information before you choose a service to work with. Depending on the number of webmasters that will use your articles to republish, you could get a lot more incoming links from just a few well-written articles. What you should NOT do is take an old article from your site and send it as an article to be republished. That could backfire, as the services mentioned have a clause in their "Terms of Service" stating that the article is original and not published before. You should really not republish an already submitted article on your own web site, it could give your site a duplicate content penalty as that article will be published all over the Internet (with your link in it). An alternative could be that you publish some of your articles combined and rewritten into an e-book in PDF format that you give away for free from your web site.  
Read more
  • 0
  • 0
  • 3025
article-image-increasing-traffic-your-blog-wordpress-mu-28-part1
Packt
19 Nov 2009
10 min read
Save for later

Increasing Traffic to Your Blog with WordPress MU 2.8: Part1

Packt
19 Nov 2009
10 min read
Introduction In this article we will discuss some simple promotion techniques that will make it easy for you and your site's users to bring in visitors to their blogs. You will learn how to offer RSS feeds that interested visitors can subscribe to, and how to "converse" with other bloggers via trackbacks. You will also learn how to use pings to tell blog directories that your blog has been updated and how to promote your blog on Twitter. Improved tagging Tags are a way to label content to make it easier to find later. Tags are a complement to the traditional "categories" way of organizing things. Blog owners can label a post with tags that describe the important content, making it easier for visitors and search engines to find those posts at a later date. You can add as many tags as you wish to a post, giving you extra freedom to tag subjects even if you don't think you'll be posting on that topic regularly. In this way, tags are less restrictive than categories. As an example, one of our Slayers may write a blog post on the Impending Apocalypse of 2009, where stuffed toys come to life and attempt to kill their owners. If this apocalypse was quickly averted, they may write only one blog post about it, which would be posted under the "Impending Apocalypses" category. There's no point making an entire new category for strange happenings surrounding stuffed toys, as it's unlikely to be a subject that would see many posts, but tagging the post with "apocalypse" and "stuffed toys" would help if any future Slayers encountered killer teddy bears at some point in the future. Time for action – tagging blog posts WordPress MU does have a simple, built-in form of tagging system, but it isn't very convenient to use, and many users may decide it's too much trouble to add new tags and figure out which tags to mark each blog post with. Let's offer them a more convenient and nicer looking way of doing things. Download WP Auto Tagger from http://wordpress.org/extend/plugins/wp-auto-tagger/. Upload the contents of the ZIP file to your /wp-content/plugins directory. Enable the WP-Auto Tagger Plugin on your main blog via the Site Admin panel. Try creating a new post on the main blog. Beside the main post entry box you should see some new tag tools. Clicking on the Suggest Tags button should give you a list of appropriate tags. Submit the post and then look at the main blog. You should see some tags on the front page and tags on your new post, too. Using Plugin Commander, enable the plugin for your users. Suggest tags not working?If you get the curl not enabled message when you click on suggest tags or you simply see no suggested tags appear, you will need to have your web host enable curl for you. Some web hosts disable lib-curl by default because of security concerns, but most are willing to enable it if requested to do so. What just happened? We have set up an improved tagging system that our users may find very useful. The plugin will read new blog posts and suggest tags for them, saving our users the hassle of typing out tags for each post. Of course, our users can choose to type out the tags by hand if they prefer and can delete any tags that the plugin suggests if they don't like them; however, they should find that they get some very useful inspiration from the suggest tags feature. SlayerCafe displays a list of tags on the right-hand side of the blog. Tags that appear frequently show in a bigger font than tags that are used less often. This gives visitors an overview of the main focus of each blog. Sitewide tags Now that you have tags displaying for each individual user blog, let's offer a page with a tag cloud, which includes tags from all the blogs on the site. Time for action – sitewide tag clouds Download the WordPress MU Sitewide Tags application from http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/ Upload the plugin to your /wp-content/plugins folder. Enable the plugin via the Site Admin panel. Go to Site Options, scroll down to the bottom of the page, and check the Tags Blog box to enable tags. Check the Tags can be indexed by Search Engines box. Make a post or two on your test blogs, and then visit the tags subdomain for your site; you should see something like this: What just happened? We have just set up an improved tagging system for our users. The WP Auto Tagger plugin pulls out words that it thinks are important from blog posts and uses them as tags. The plugin isn't perfect and it does sometimes come up with silly suggestions, but users can remove tags that they don't want, or replace them with their own. The Auto Tagger plugin ensures that even users who don't take the time to pick out their own tags will still have the option on of having some kind of tagging system. Why is this important? Well, think ahead to this time next year—imagine how many posts the average user will have on their blog. Now imagine trying to find those posts by category. Athena may have made a post on SlayerCafe about the apocalypse that Watcherlicious almost caused when she read the wrong spell from the Dark Magikus book, but finding that post in the category "Impending Apocalypses" would be a time-consuming task when you consider that Athena fights to stop an apocalypse almost every week! If Athena used a tagging system, then it is likely that this particular apocalypse related post would have been tagged with "Watcherlicious" and with "Dark Magikus", making it much easier to find. We also set up a sitewide tagging system. This adds a stream of all new posts to a central blog. Watchers can keep an eye on this blog to see what's happening on a broader level, that is, what are people talking about and what are the most important issues. The most commonly appearing tags appear in a bolder, bigger font. You can see that at the moment our biggest theme is Slayers. Obviously, there's not much exciting happening on the vampire slaying front at the moment, as the Slayers are just talking amongst themselves about general slayer stuff . If the theme of conversation suddenly changed to "demonic robots", then that tag would appear prominently and the Watchers would know very quickly that there is a global demonic robot problem. The sitewide tags page is useful from a search engine perspective too, as it presents the most recent content to the search engines in one convenient place. Have a go hero – styling the tags page Our tags page at the moment looks just like a normal blog and has a rather boring name—tags.slayercafe.com. You can rename the tags page in the Site Options panel on the main blog. A better name might be "pulse" or "live-stream". The default setting indexes the last 5000 posts. This number can be changed, but don't set it too high as it could tax the server. Try customizing the layout of the Tags blog. The blog network's admin account can be used to log into the Tags blog's admin panel so that you can change the theme and make some other tweaks such as adding widgets. If you want to take things a step further, take a look at http://www.wordpress.com/tags. Here you can see a great example of a streamlined "what's hot on our network" tags page. You may have noticed that the Tags blog appears under Recent User Posts, so new posts appear twice—once by the original poster and once under Tags. Check the blog ID number of the Tags blog, and try changing the code we created earlier so that the posts to the Tags blog don't display. Using pings WordPress MU is set up to ping a service called Ping-o-Matic when new posts are made. This service is useful for English language blogs and for bloggers in America in particular because most of the services that Ping-o-Matic works with are U.S. centric. But there are other services that may be more suitable for bloggers in other countries or even blogs in specific niches. Let's look at ways to add extra ping services to our list of sites to ping for each blog. Time for action – pings Open up /wp-admin/includes/schema.php Find the line that says add_option('ping_sites', 'http://rpc.pingomatic.com/'); Change that line so that it reads add_option('ping_sites', "http://rpc.pingomatic.com/nhttp://rpc.NEWPINGSITE.TLD"); You can add multiple sites as long as you separate each URL with a n. Save and upload the file. Any future blogs will be created with the new ping sites set in Site Options. You can update existing sites either via MySQL or by using the Site Admin panel. What just happened? We have added a few extra sites to the list of ping services that will be notified when a new post is made. A ping is an example of a push mechanism. Instead of blog aggregation services having to look at all the blogs, they are listed to see which ones have new content. The blogs themselves inform the aggregators that they have been updated by sending them a ping. Ping-o-Matic is a service that receives pings and then passes them on to multiple servers. This reduces the amount of servers you have to ping, saving you time when you publish an article. However, Ping-o-Matic may not cover every site you would want to ping. We have added only two sites to the ping list— WhiteWiccaBlogs and TheWatcherNetwork. We don't want to draw too much attention from normal people on sites such as NewsNow or the My Yahoo service. Try to keep the number of individual sites you ping to a minimum. Not only is there a possibility that pinging huge numbers of sites could make adding posts take longer, pinging sites that are outside the topic of your blog is unlikely to get you any valuable traffic. It is better to focus on gaining visits from people who are actually interested in your blog network's subject. For an English language blog, using Ping-o-Matic, Technorati , and Google would be a good start. If your network is aimed at people who speak a different language, pinging local news aggregators would be a good idea. Have a go hero – more sites to ping Take a look at the list of sites in the following table, and think about the type of blog you have and the people you want to reach. The sites in the table are very general ones. You may find that there are aggregator services out there for your niche—be that houses in Singapore, computer games, or travel. A Google search for "keyword aggregator" should help you find the right kind of sites. Once you've chosen the sites you would like to ping, remember that each URL is separated by the characters n and you need to surround the entire list in double quotes (" "), not single ones (' '). Site URL FeedBurner http://ping.feedburner.com My Yahoo http://api.my.yahoo.com/rss/ping Syndic8 http://ping.syndic8.com/xmlrpc.php Myblog.jp (Japanese) http://ping.bloggers.jp/rpc/ Newsgator http://rpc.newsgator.com/ Blogg.de (German) http://xmlrpc.blogg.de/ Blogshares.com http://www.blogshares.com/rpc.php
Read more
  • 0
  • 0
  • 1836

article-image-version-management-upk-35-part-1
Packt
18 Nov 2009
12 min read
Save for later

Version Management with UPK 3.5: Part 1

Packt
18 Nov 2009
12 min read
Though this implies multi-user environment client/server setup, this article could still be of use to a single user. If you are a lone developer working in a stand-alone environment (sometimes referred to as a single-user environment), you may want to just skip straight to the section Exporting and importing content, at the end of this article. Sorry, but version management in a stand-alone environment is almost nonexistent, so you're largely on your own. In a client/server environment, all content objects are stored on a central server. Developers create and edit content on their own workstation (typically, a PC), and then send this content to a database on the central server for storage when they have finished with it. This is referred to as checking in a content object. If they subsequently want to change a content object that is on the server, they need to check out the content object, change it, and then check it back in. Checking in a content object When you create a content object in a client/server environment, the content object is stored in your local repository (that is, on the client side of the client/server set-up). It is important to understand that your local repository is located on your local workstation. This means that if you have a content object in your local repository, and then move to another workstation, you will not see your local version of this content object on the new workstation. This is because they are located on the workstation on which you created them or checked them out. You should, therefore, always use the same workstation, or check in all of your content objects before moving to a new workstation. Version Difference In UPK 3.5.1 client/server edition, it is possible to choose a specific location for your local repository. Documents that are checked out to your local repository are identified by a green check-mark () to the left of the object details in the Library. You will need to check these objects in if you want them to be stored in the central library so they will be accessible to other developers. Generally, you should do this whenever you have finished working on a content object. However, there are good reasons for checking in objects more frequently. Your local repository is (typically) in the C: drive of your computer, whereas the central library is on a central server. Unless you are very fastidious about backing up your PC, the chances are that the server is backed up more often than your PC, and is usually backed up automatically. Placing your files in the central library will, therefore, provide greater security in terms of having a backup that you can revert to in the event of a disaster. In addition to this, whenever you check in a content object, a back-up of the previous version is taken. Should you need to back out your changes, you can simply revert to a back-up version of the content object. Related to this, content objects are never really deleted from the server library. Actually, they can be deleted, but only by an Administrator, and typically as part of a cleanup. However, if you delete an object (that has never been checked in to the central server) from your local repository, it is gone. Forever! Finally, it is not unheard of that for a local repository to simply disappear when UPK crashes (which thankfully doesn't happen that often, but it has been known to happen). If this does happen to you, then you may again lose all of the content that you currently have checked out even though the Lost documents view, introduced in UPK 3.5, may save you. For all of these reasons, and more, it is recommended that you check in all of the content that is stored in your local repository to the server at least at the end of each work day. Fortunately, UPK provides a quick way of doing this. If you click the Check In All button (), then all of the content objects that you currently have checked out will be checked in again. The downside of this is that if you do check in all of the documents that you are currently working on at the end of the day, you need to remember which objects these are so that you can check them out again the next day. Before checking the documents in, you can use the All Checked Out view to identify all of the documents that you currently have checked out. You can then print this list, and will know which files you need to check out again the next day. There is one further thing to bear in mind when deciding how often you are going to check in your content objects. As mentioned above, UPK retains every version of a content that has been checked in. These are accessible via the Document History, as we will see later. This means that if you check in a content object ten times, then UPK will retain ten versions of it. This can also make it difficult to identify the "released" versions of the content object in the Document History, should you subsequently need to roll back to the last-released version. The Administrator can clean up the database periodically, but the only way of differentiating between versioned drafts and versioned released content objects is by using the check-in comments. These are explained in the section Step 2: Confirming the scope of the check-in, ahead. UPK Workflow The down-side to checking in content objects that you may not have finished working on is that these objects could be mis-perceived as being final, and actually used or published. In some cases, you may have checked some of them out not because you want to change them, but specifically to stop anyone else from changing them. UPK does not provide you with a simple, automatic solution to these shortcomings, but there is a manual workaround that you can use. This is to use the Workflow properties of the objects. UPK does not have a "real" workflow, it does not have "routing" of content objects based on their status, or automatic email notification of content objects that are due for review, or any of the things that you'd expect from workflow functionality. Of course users can use a Custom View to display content objects according to their Workflow properties, but this is still not really "workflow". If you display the Properties for a content object, by clicking on the Properties button (), the last category of properties (at the end of the Properties list) is the Workflow category. Within this, there are two properties: Assigned To: This property allows you to select (from a drop-down list) the user ID of any developer who is authorized to access the content object. If you select your own user ID in this field, then this is an indication to the other developers that they should not work on this content object themselves. State: This property can be used to specify the current status of a content object. The default values are (blank), Not Started, Draft, In Review, and Final. If you select a status of Draft, then this is an indication that you have not finished with the object. An example of the Properties pane, showing the Workflow category, is in the following screenshot: Of course, these Properties do not provide "hard checks". You still rely on people seeing, and then paying attention to, these Properties but it is a start. Some strong guidance from your Project Manager or Team Leader would help, here. Administrators can add, remove, or rename statuses. It is recommended that a suitable set of statuses are established and defined prior to any development work starting, and that these statuses and their meaning are communicated to all developers. Step 1: Selecting the content objects To select content objects for checking in, carry out the steps described below: In the Library, select the content objects that you want to check in. Normally, you will want to check in specific content objects, so you would only select these. As always, you click on a content object to select it. You can Ctrl-click to select multiple objects, or Shift-click to select a series of objects. You can also select a folder in the Library to check in all of the content objects in that folder. Do not worry if some of the objects that are included in your selection are not checked out; UPK will simply ignore these objects during check-in (it will not "error-out"). You can also check in content objects by selecting them in an Outline Element. Once you have selected all of the content objects that you want to check in, click the Check In button (). Step 2: Confirming the scope of the check-in When you check in one or more specific content objects and have not selected a folder in the Library to check in, UPK will automatically check for any content objects that are related to the object that you are checking in. You will be prompted to check these in, as well. An example of this prompt is shown in the following screenshot: What are related documents? In general, they are Web Pages and Packages used by the content object that you are checking in. For example: If you have created, or changed, an Outline Element (Module or Section) then UPK will automatically select all of the content objects (Modules, Lessons, and Topics) included in this Outline Element, along with any Web Pages used by any of these content objects will be selected as well. If you are checking in a Topic for which you have also created a Web Page that is linked to the Concepts pane, then UPK will automatically select this Web Page as a related document during check-in. If you have created a Glossary and are checking this in, the related documents will be all of the Web Pages for the content definitions used by the Glossary. An example of the Related Documents dialog box is shown in the following screenshot: This list of related documents can be confusing, as it does not match the list that you see in the Related Documents pane for the content object that you are checking in. The list will include Web Pages that have been explicitly linked to from the content object that you are checking, but will not include Glossaries, Templates, Packages, or icons, all of which are listed in the Related Documents pane. This limitation is important to understand. If you checked out, and updated, a Glossary and as a result UPK checked out several content objects during the glossary link regeneration, UPK will not identify all of the Glossary elements (Web Pages) as "related documents". You will need to locate these and check them in separately using custom views. Adding to the confusion, the list of related documents will include all of the explicitly-linked content objects, and not only those objects that are currently checked out to you. Do not worry about this – UPK will only physically check in the content objects that you do have checked out (these are the ones that have your User ID in the Checked Out To column of the Related Documents dialog box). In the example above, we are checking in an Outline Element that contains one Topic, which in turn contains a Web Page. The Topic is checked out, but the Web Page is not. Step 3: Specifying a reason for the change When you check in one or more content objects, you will be prompted to enter a short description of the change, as shown in the following screenshot: The title of the content object that you are checking in is shown above the comment text box. If you are checking in multiple content objects, then this will initially specify the first object and (assuming that you deselect the Apply same comments to all documents option) will specify the next object when you click OK. It then moves on to the next object. In this way, you can provide separate comments for each content object, even though you are checking them all in at the same time. Although it is entirely optional, it is a very good practice to always enter a comment. This comment will appear in the object History, and therefore serves as a useful audit log. Specify a reason for the change by carrying out the steps described below: Enter a suitable comment in the space provided. Note that you do not need to specify the date and time of the change, or your user ID. These are captured automatically by UPK. If you are checking in multiple objects, then UPK will initially suggest applying the same comments to all of the objects. You will see that the Apply same comments to all documents checkbox toward the bottom of the dialog box is selected. If you do not want to use the same comment for all objects that you are checking in, then deselect this checkbox. Now, when you click on OK, the Check In Comment dialog box for the next content object in the check-in selection will be displayed. You can repeat the above processing from Step 3. Once you have entered your description of the change (or reason for the change), click on OK. Once you have specified a comment, and clicked on OK for the last time, then the content objects are checked in, and the Library screen is redisplayed.  
Read more
  • 0
  • 0
  • 1355