1. enuuk Auction platform tutorial
At this tutorial you will have related info about:
- Installation
- Multiligual - adding new languages
- CSS
- enuuk Auction platform REST web services
- Technical documentation
We are preparing a more complete tutorial including Administrator manual. It will be available soon.
Thanks for your cooperation.
2. Installation
enuuk Auction platform should be installed using the enuuk platform installer
1.1 Installation script
1.1.1 Setting up
Once you have purchased and downloaded your enuuk Auction platform, extract or
unzip the archive into the directory on your web server in which you want to place
your auction site.
Remember to check your server requirements:
http://www.phpauction.net/server-requirements
The installation script will check your server compatibility.
Permissions
Before running the enuuk platform installer you will need to give permissions to the
following files and directories.
Files can be in the hosting root folder (the main one which contains httpdocs or
public_html or web or www) or a subdirectory which you installation could be residing
such as # /home/yoursite/public_html/auctions/
* chmod 777 /uploaded
* chmod 777 config.php
1.1.2 Running Enuuk platform installer
Before you start with your installation confirm you have the following info:
· Database
Database host name, username & password, database name.
Step 1
Point to www.yourdomain.com/install. This is the enuuk platform installer welcome
screen.
Step 2
The enuuk platform installer will perform pre-installation checks on server settings
requirements. After verification and if everything is correct click in the Next button.
If you incur in an error at this stage, make the necessary changes. After, click the button
stating that you have made the corrections. If everything is correct, you can proceed
by clicking the Next button.
Step 3
The enuuk platform installer will perform pre-installation checks on files writable
requirements. After verification and if everything is correct click in the Next button.
If you incur in an error at this stage, make the necessary changes. After, click the button
stating that you have made the corrections. If everything is correct, you can proceed
by clicking the Next button.
You have to manually create the database, username and password. Once they are
created fill the correspondent fields in this form.
Step 4
enuuk platform installer will setup some generally used options for your site:
3. * Site Name
* Language
* From email account
* Admin email account
Step 5
enuuk platform installer will setup the administrator's configuration
* Admin login
* Admin password
* Base country
The platform is installed. Login at the front end with the administrtor info and access
the admin back-end. You can configure now your auction site.
Note: Remember to rename your installation script after it is installed for security.
4. Enuuk platform design documentation
Enuuk platform web design is based on template PHP files and CSS styles.
Customizing the look and feel will depend on your html, CSS and design skills.
This document will give you the basic guide to understand the structure of the
php files and the CSS styles used in enuuk platform. Also how the theme selection tool
behaviors so you can create or edit your themes.
Theme selection
To facilitate the look & feel customization, enuuk platform has a Theme Selection
feature. This feature allows to select some themes available in the package.
By default enuuk platform includes 1 design with 5 colors variation. The design is
named enuukColor and the color variation by default is enuuk logo color scheme.
Each color variation is considered one theme.
The themes must be placed in the /themes folder. The theme selected by default is:
Default. Each theme is grouped in a folder with the name. As an example:
- enuukBlue
- enuukGreen
The theme folder has the CSS style file and the php files if necessary.
There are 2 CSS files: styles and color
- styles.css contains the general information about the site structure: columns,
text, etc.
- color.css contains color information.
The php can be included in the theme folder but is not necessary if they are not modified
from the default theme. In that case the package will use the default template but with
the CSS style defined in the theme. Normally to edit the look & feel the usual modified
files are the ones related to header, footer and index.
You can add as many themes as you want in this features and select them in the
admin back-end.
PHP files
As explained, template php files are used to define each page. These files can be
modified for a theme, so in that case you should have the modified file in the theme
folder. We highly recommend to always using a copy to modify the templates and
leave the default theme as a base for future designs or as a backup.
The structure of each enuuk platform website page is the following:
- Header
- Content PHP file
- Footer
Each page contains the header and the footer and it’s the same for all of them.
The header file (header.php) is the first file read by the browser and contains all the
opening tags for the html page such as <html>, <header>, <body>, etc. It has all the
info display in each page header such as logo, counters, menu bar, etc.
The content PHP file contains the information displayed between the header and the
5. footer. All of them are related to the URL display at the browser. As an example for the
registration, the URL display at the browser is:
Http://www.yourauction.com/user/register, the php file related is userForm.php.
The footer file includes the footer displayed at every page. In this file you close all html
tags for the html page.
CSS styles
The styles use in enuuk platform are contained in the files style.css and color.css of
the selected theme. As we have mentioned before, we only recommend editing them
if you have the necessary skills to edit them.
This is the list of the principal styles. You can edit and add new ones as desired.
- Clear: Used to clear a floating layout, usually inside an empty DIV in this
manner:
<div class=”clear”></div>
- c1 through c23: Used to make column-based layouts. Any container is divided in
24 imaginary columns, which can be used to make up space. For example:
<div class=”c6”>this DIV would occupy the 25% of the width</div>
<div class=”c18 cLast”>this one would occupy the other 75%</div>
- cLast: Each row of columns must be ended with this class in order for it to
display correctly. Moreover, a clearing DIV is mandatory after the cLast.
<div class=”c6”>First column</div>
<div class=”c12”>Second column</div>
<div class=”c6 cLast”>Third and last column</div>
<div class=”clear”></div>
- p1 through p23: Used to push a column element to the right.
- fullBox: Makes a 10 pixel padding all around an element. Do NOT use on any of
the c1-23 classed elements.
- hBox: Makes a 10-pixel padding to the left and right of an element. Do NOT use
on any of the c1-23 classed elements.
- vBox: Makes a 10-pixel padding to the top and bottom of an element.
- inlineList: Only for UL and OL. Makes a list of inline LI, putting a border
between each one.
- indentList: Only for UL and OL. Create a list of LI with bullets for decoration.
6. Multilngual feature -
Adding new languages
To add new languages to your auction site please follow the next steps.
For text display at the site:
1. Add the language at the admin back-end at:
Set up / Languages
Remember to follow the Languages and locations standards, using RFC4646 codes
(based on ISO-639), such as "es-MX" (Spanish spoken in Mexico), "en" (general English)
or "ca-va" (Catalan variant named Valencian)
More info at:
http://www.ietf.org/rfc/rfc4646.txt
http://www.iana.org/assignments/language-subtag-registry
2. Duplicate any of the languages files available at locale/ folder on your installation
3. Rename it for the new language using the language standards
4. Perform the translation using a gettext catalogs application. We recommend PoEdit:
http://www.poedit.net/
Poedit is cross-platform gettext catalogs (.po files) editor. It is built with wxWidgets
toolkit and can run on any platform supported by it (although it was only tested on
Unix with GTK+ and Windows). It aims to provide more convenient approach to editing
catalogs than launching vi and editing the file by hand.
Open the .po file of the new language. It will be a copy of the one selected with the
primary language (English) and the secondary selected. Translate the secondary
language.
5. Upload the new language folder with all its content.
Emails
Mail texts are now in files (themes/mails/*.txt). Perform the translation.
Modifying default text
To modiy the english default text, you will have to modify it directly at the php file.
Open the correspondent file and search the text you want to modify. It is mandatory
to keep the structure and modify exclusive the text <?= _('Home') ?>. Next time you
open the extra languages with poEdit remember to first update them.
Problems
Sometimes it happens. Usually, if you want to transtate enuuk Auction platform to a
non common language, or your server is does not have installed your language, you
can even get this error trying to change the default language.
How to solve this?
Ask your server admin (or support) to actually check the installed languages in the
server (tell him they are located in /usr/lib/locale and can display them with
locale -a). The new language will not be in the list, so he has to manually add it,
with locale-gen shell order.
7. enuuk Auction platform REST web services
Virtually all pages in enuukAuction platform provide different ways to display data. By
default HTML is returned after a user request, using a HTML template filled with the
returned data. But there are other formats to get the processed data, and these formats
can even be extended easily.
Suppose, for instance, the following REST request:
In this case you are calling the search page, with a "keyword" as parameter.
By default HTML is returned, but you can change the format just adding a "v" parameter,
like:
This returns the same dynamic data, but in PHP (serialized) format.
Currently, the following formats are implemented in all pages:
- HTML : by default if no "v" parameter is defined. Uses HTML templates.
- PHP : serialized PHP data
- JSON : Javascript notation (you need PHP 5.2 in your server, or PECL json module
loaded)
- Echo : just flush out data using PHP's var_dump
In the next weeks we expect to deploy: pure XML (all pages), and RSS (main pages)
formats.
As input for the request, GET or POST can be used. The system process all request
parameters (Get, Post and Cookies) the same way.
Technically speaking, the code responsible for generating those formats is located in
the files of class/View/. Adding a new file tailored to your needs can be easily done by
a proficient programmer painless. For example, using v=Echo for reference, he can
prepare a new View to filter the data he needs to import to other system.