Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Site Info
Webmasters
admin
admin

Who's Online
3 user(s) are online (1 user(s) are browsing XOOPS Docman)

Members: 0
Guests: 3

more...

2.5. Blocks

Blocks are discreet sections of content that can be created and configured in the admin interface. Custom blocks can be created and are typically made up of text, graphics and pictures. The content in these blocks may be formatted individually or inherit the site formatting. Blocks may also be part of a modules display output. The blocks administration page is where all blocks are configured and administered.

2.5.1. Overview

The Blocks Administration page allows the Site administrator to organize the blocks for every page in the site. This page is divided in two sections. The first section displays the blocks configured in the system, filtered by three drop-down menu options at the top of the table. The second section is for the creation of a new block. As we have said, any installed modules are also displayed in this page; they will be discussed later in the guide.

First, to set properties of a block, it has to be displayed in the table of the Blocks Administration page. The following image represents the filters one can use to display the blocks information:

Blocks Administration

Figure 2.5. Blocks Administration

The three drop-down combo boxes select options for Show blocks visible in and Group and Visible. These options (together with the options set on each page) control much of the content and functions of the site, so it’s really worth getting familiar with this section.

Let’s look at fig.1. By default, the table will display the blocks that are defined to appear in the Top Page, for the “Registered Users”. Let’s have a look at some of the terms here.

  • Show blocks visible in” - This combo box sets the page where blocks are displayed. For example, the Top Page is the home page of the site. When a user types http://www.yoursite.com, the top page is what he sees. (This page can be set in the General Settings of the site). The other choices of this combo box will list the different modules of the site (Downloads, Web Links, Forum, etc…).

  • Group” - This combo box lists all the groups of the site. If the group “Webmaster” is selected, the table will display all the blocks for which the Webmaster group has access. Please note that the blocks permissions are defined in the Groups section and discussed later in this guide.

  • Visible” - The purpose of this combo box is simply to help the site administrator by filtering a specific visible status. This combo box has 3 items: “Yes”, “No” and “All”. The table will display the blocks that have their visible property set to that value. If “All” is selected, the table will return every block.

2.5.2. Configuring the blocks

Let’s have a look at the columns of the blocks table below these three menus.

ColumnDescription
Block DescriptionGives a short description of what the block displays.
TitleThe actual title of the block. This is the title that will be displayed by the block on the pages where the block is visible.
ModuleThe module that produces the block, i.e.; that puts the information in the block.
Side Left-Center-Right The position of the block. One of the 5 ‘option’ buttons must be selected for each block. For an easier explanation, we will give a number to each option, as represented on the image below:

  • Option 1 will display the block at the left end of the page.

  • Options 2, 3 and 4 represent the central section of the page. If option 3 is selected, the block will be display across the complete width of the central section.

  • However, if option 2 or 4 is selected, the block will be display across the center left or at the center right. Selecting option 2 or 4 will result in a smaller block then selecting option 3, but it will allow two blocks to be displayed side by side in the central section.

  • Finally, selecting option 5 will display a block at the right end of the page.

If no blocks are displayed in the right section of the page, the central section will start at the end of the left section and will expand to the end of the page. However, if no block is displayed in the left section, it will not affect the width of the central section and the left section will just be blank. It is, of course, not recommended to leave the left section with no block.

Also, the blocks that are defined with option 3 will always be displayed before the blocks that are defined with options 2 and 4.

Weight The weight is the value used by XOOPS to sort the display order of blocks in a page. The sorting is done by section. This means that the weight of a block in the left section will not affect the order of a block in the right section. The normal page is divided into four sections;
  • The top panel, or banner.

  • The left hand section, or main navigation bar.

  • The centre panel, or main page content.

  • The right panel, or second navigation bar.

The general principle is the following: the higher the number, the lower the block will be. It is indeed exactly like weight in real life: heavier things go down faster. It is useful to input your block weight in 5 or 10 increments. This allows for inserting items later without needing to change other weights.

Visible For a block to be displayed, it has to have its visible property set to ‘Yes’.
ActionThis column will be blank if the block cannot be modified. If it can, the word ‘Edit’ will appear, on which one could click to edit certain parameters of the block. If the block is a Custom block, the Action column will also have the word ‘Delete’ to permanently delete the block.

Table 2.4. Block Administration

2.5.3. Editing a block

When the “Edit” option is available, the Site administrator can click on the ‘Edit’ link in the action column of a block. This will display the detail properties of the block and allow editing of some of these. Here are the properties and their descriptions:

FieldDescription
NameThis is the name of the block. It cannot be modified here.
Block TypeThis is the position of the block, as defined in the ‘Side Left-Center-Right’ row of the Table 2. It may be set here also.
Weight This is the weight property of the block, as defined in the ‘Weight’ row of the Table 2. It may be set here also.
Visible This is the visible property of the block, as defined in the ‘Visible row of the Table 2. It may be set here also.
Visible in This property sets the pages where the block will be displayed. In addition to all the modules, the combo box items have ‘Top Page’ and ‘All Pages’. The ‘Top Page’ will display the block only in the top page; the ‘All Pages’ will display the block in every page of the site. Selecting multiple, non-consecutive pages is possible by holding “Ctrl” on keyboard.
Title This is the title that will be displayed in the webpage for the block.
Content The ‘Edit Template’ link will allow the Site administrator to edit the template of the block. Some HTML and/or PHP knowledge are required to do this.
OptionsMany blocks have options that can be set to fully customize the block. As the options are different for each block, we will not detail each one of them here.
Cache lifetime Cache lifetime is a useful feature for making a site run faster. If a block has fixed content that is unlikely to change on a regular basis, it is possible to instruct the browser to call the content from cache, rather than from the server. This is particularly effective if graphics are part of the content. Use the settings here to determine how long this content should be held in cache before returning to server fed data.

Table 2.5. Block Editing

2.5.4. Adding custom blocks

As we said before, the Blocks Administration page allows the Site administrator to add custom blocks. This is done by filling the fields of the Add a new block section. The properties are the same as the Table 2.5, “Block Editing”. Only one new property has to be set: Content Type, which defines the type of content that is entered in the Content area: HTML, PHP, etc..

The comments are owned by the author. We aren't responsible for their content.

Author Thread
dalong
Published: 2006/11/16 8:00  Updated: 2006/11/16 8:00
Just popping in
Joined: 2006/11/16
From:
Comments: 2
 Re: xo-002 http://www.apachefriends.org/en/xampp.html
very good!
I like here!

Author Thread
dalong
Published: 2006/11/16 10:13  Updated: 2006/11/16 10:13
Just popping in
Joined: 2006/11/16
From:
Comments: 2
 Re: xo-002 http://www.apachefriends.org/en/xampp.html
thank for your work!

Author Thread
huqilong
Published: 2006/11/20 2:50  Updated: 2006/11/20 2:50
Just popping in
Joined: 2006/11/16
From:
Comments: 3
 Re: xo-002 http://www.apachefriends.org/en/xampp.html
I hava a question ,when I have installed phpeclipse,I can't user the button for the apache in the Eclipse IDE,how shoud I do?

Author Thread
huqilong
Published: 2006/11/20 3:10  Updated: 2006/11/20 3:10
Just popping in
Joined: 2006/11/16
From:
Comments: 3
 Re: xo-002 http://www.apachefriends.org/en/xampp.html
dddd

Author Thread
Mark_1900
Published: 2006/11/18 11:05  Updated: 2006/11/18 11:09
Just popping in
Joined: 2006/11/18
From:
Comments: 2
 Alias Permission Problems
For an Alias I also had to add a Directory tag to the httpd.conf, otherwise I had permission problems accessing the files... <br /> [code] Alias /wiki "C:/Documents and Settings/Me/wiki"<br /> <Directory "C:/Documents and Settings/Me/wiki"><br /> Options Indexes MultiViews<br /> AllowOverride None<br /> Order allow,deny<br /> Allow from all<br /> </Directory><br /> [/code]<br /> Oh and all these editing tags seem broken!!

Author Thread
Mark_1900
Published: 2006/11/18 11:21  Updated: 2006/11/18 11:32
Just popping in
Joined: 2006/11/18
From:
Comments: 2
 Getting the correct php_dbg.dll
I want a debugger. I downloaded the latest XAMPP 1.5.4a and noticed that it comes with PHP 5.1.6 & PHP 4.4.4, and neither are supported. The debugger module only supports a subset of these major versions from 5.1.0 to 5.1.2 and 4.4.0 to 4.4.2 (http://dd.cron.ru/dbg/downloads.php). I think right at the beginning you should specify which versions to download to get a debugger Version "XAMPP 1.5.2" would be fine.

Author Thread
huqilong
Published: 2006/11/30 6:28  Updated: 2006/11/30 6:28
Just popping in
Joined: 2006/11/16
From:
Comments: 3
 Re: xo-002 http://www.apachefriends.org/en/xampp-windows....
I want to know how to use phpeclipse with eclipse detailly!

Author Thread
thierrybo
Published: 2007/2/3 16:19  Updated: 2007/2/3 16:21
Just popping in
Joined: 2007/2/3
From:
Comments: 1
 Re: xo-002 ch02s03.html Workspace Method 2
I do not agree with the suggested method 2: Quote:
For example you have set up XAMPP and your “document root” path is the XAMPP default:
C:Program Filesapachefriendsxampphtdocs
Quote:
,then your appropriate workspace path should be one level less:
C:Program Filesapachefriendsxampp
If htdocs is your document root, then each folder inside IS a new project and you should set workspace directory as Document Root directory. With suggested method, all your web projects are managed with ONE big PHPeclipse project.

Author Thread
dafydd
Published: 2007/4/3 6:01  Updated: 2007/4/3 6:01
Just popping in
Joined: 2007/4/3
From:
Comments: 2
 Re: xo-002 ch01.html
Trying this out on a Mac. J2SE 1.5.0_07-164 installed. 1.5.0_06 is what's available on the download site. However, it would almost certainly be updated with Software Update.

Author Thread
dafydd
Published: 2007/4/6 1:00  Updated: 2007/4/6 1:00
Just popping in
Joined: 2007/4/3
From:
Comments: 2
 Re: xo-002 ch01s04.html
Second question: How do we point the XAMPP start/stop buttons in the Eclipse toobar to where we put XAMPP?

dafydd

Author Thread
dysmas
Published: 2007/8/4 14:18  Updated: 2007/8/4 14:18
Just popping in
Joined: 2007/8/4
From:
Comments: 1
 Debugging standalone PHP applications
Thanks hundred times for all the detailed explanations here !!

And especially for the note which explains why debugging a CLI application does not work in 1.1.8 version and only in 1.1.9. (wrong port, as I guessed, but I have been looking for this information for some hours before coming here). Unfortunately this 1.1.9 CVS version does not work in the last 3.2.0 Eclipse version I just got. Let us hope the stable version is going quickly.

Author Thread
Mercyful
Published: 2007/9/10 14:46  Updated: 2007/9/10 14:46
Just popping in
Joined: 2007/9/10
From:
Comments: 1
 Re: dbg is not working
I want using eclipse3.2 with php-plugin and for debugging i want using dbg.
I'm using xampp 1.6.3a with php 4.4.7. and php_dbg.dll-4.4.x
After step by step installation
http://docs.schuetzengau-freising.de/ ... =xo-002&file=ch01s05.html
the debugger dbg will not work.
When i called phpinfo() there is no section dbg shown.
Who have any ideas?
Thanks a lot!
Regards Mercyful

Author Thread
keryx
Published: 2007/9/26 22:59  Updated: 2007/9/26 22:59
Just popping in
Joined: 2007/9/26
From:
Comments: 1
 Re: xo-002 ch04.html
A section about verrors should be nice. I get the following:


<terminated, exit value: 0>PHP C:\Program\PHP\php.exe : <path>/<fil>.php

I've googled like crazy but to no avail. And yes - it does not stop at breakpoints and "variables" are empty. DBG is working:

if (function_exists ("DebugBreak")) {
DebugBreak ();
echo "debugging started!<br />\n";
}

Outputs "debugging started!" And DBG is reported on phpinfo().

Author Thread
koski
Published: 2007/10/19 3:55  Updated: 2007/10/19 3:55
Just popping in
Joined: 2007/10/19
From:
Comments: 1
 Re: xo-002 ch01s03.html
Hi,

Seems that the mentioned link for cvs:

http://phpeclipse.sourceforge.net/update/cvs

is out of date or wrong.

Author Thread
andybruk
Published: 2007/11/18 1:11  Updated: 2007/11/18 1:11
Just popping in
Joined: 2007/11/18
From:
Comments: 1
 Re: xo-002 index.html
I've been searching for a PHP debugger for ages. This is the only one I can find that works perfectly, thanks very much for providing this documentation.<br /><br />I doubt if I could ever get it to work on Windows, but it works so well with Ubuntu Linux and Eclipse 3.1.<br />
Powered by XOOPS 2.0 © 2001-2005 The XOOPS Project