Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ A: This can happen when you use 3rd party libraries that already define their ow

## Resources

- [Admob App Download Tracking documentation](http://developer.admob.com/wiki/Android_App_Download_Tracking)
- [Admob App Download Tracking documentation](https://developer.admob.com/wiki/Android_App_Download_Tracking)
4 changes: 2 additions & 2 deletions public/md-articles/best-practice/aptana-set-svn-keywords.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ language: "en"

# Aptana - set SVN keywords

In Aptana it's very simple to set the [svn:keywords](http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html) property for a file.
In Aptana it's very simple to set the [svn:keywords](https://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html) property for a file.

For example if you want to set the svn keyword property ***Id***:

Expand Down Expand Up @@ -44,4 +44,4 @@ A: After the SVN commit of the file, the $Id$ keyword is replaced with text cont

## Resources

- [svn:keywords property documentation](http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html)
- [svn:keywords property documentation](https://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html)
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ini_set('display_errors', 1);

6. Use a version control system. **SVN is NOT dead.**

7. Use an **[IDE](http://en.wikipedia.org/wiki/Integrated_development_environment)**. [Aptana 2](http://www.aptana.com/products/studio2/download), [Aptana 3](http://www.aptana.com/products/studio3/download), Eclipse, even [Zend Studio](http://www.zend.com/en/products/studio/).
7. Use an **[IDE](https://en.wikipedia.org/wiki/Integrated_development_environment)**. [Aptana 2](https://www.aptana.com/products/studio2/download), [Aptana 3](https://www.aptana.com/products/studio3/download), Eclipse, even [Zend Studio](https://www.zend.com/en/products/studio/).

8. Know your **IDE**: code snippets, code assist, integration with Zend Framework, SVN integration, bug tracker integration, and so on

Expand All @@ -55,7 +55,7 @@ A: It recommends using a version control system (noting that SVN is not dead) an

## Resources

- [Integrated development environment (Wikipedia)](http://en.wikipedia.org/wiki/Integrated_development_environment)
- [Aptana 2 download](http://www.aptana.com/products/studio2/download)
- [Aptana 3 download](http://www.aptana.com/products/studio3/download)
- [Zend Studio](http://www.zend.com/en/products/studio/)
- [Integrated development environment (Wikipedia)](https://en.wikipedia.org/wiki/Integrated_development_environment)
- [Aptana 2 download](https://www.aptana.com/products/studio2/download)
- [Aptana 3 download](https://www.aptana.com/products/studio3/download)
- [Zend Studio](https://www.zend.com/en/products/studio/)
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ language: "en"

# htaccess 301 redirect non-www to www

To always redirect users to the www site (for example: http://dotboost.com to http://www.dotboost.com), add the following lines to .htaccess, right after **RewriteEngine On**:
To always redirect users to the www site (for example: https://dotboost.com to https://www.dotboost.com), add the following lines to .htaccess, right after **RewriteEngine On**:

```shell
RewriteCond %{HTTP_HOST} ^dotboost.com
RewriteRule ^(.*)$ http://www.dotboost.com/$1 [L,R=301]
```

If, on the other hand, you want to redirect http://www.dotboost.com to http://dotboost.com, add the following lines instead:
If, on the other hand, you want to redirect https://www.dotboost.com to https://dotboost.com, add the following lines instead:

```shell
RewriteCond %{HTTP_HOST} ^www.dotboost.com
Expand All @@ -29,7 +29,7 @@ Replace dotboost.com with your site's domain.
## FAQ

**Q: How do I redirect a non-www domain to www using .htaccess?**
A: Add RewriteCond %{HTTP_HOST} ^dotboost.com and RewriteRule ^(.*)$ http://www.dotboost.com/$1 to your .htaccess file, right after RewriteEngine On, replacing dotboost.com with your own domain.
A: Add RewriteCond %{HTTP_HOST} ^dotboost.com and RewriteRule ^(.*)$ https://www.dotboost.com/$1 to your .htaccess file, right after RewriteEngine On, replacing dotboost.com with your own domain.

**Q: How do I redirect a www domain to non-www instead?**
A: Add RewriteCond %{HTTP_HOST} ^www.dotboost.com and RewriteRule ^(.*)$ http://dotboost.com/$1 instead, again replacing dotboost.com with your own domain.
A: Add RewriteCond %{HTTP_HOST} ^www.dotboost.com and RewriteRule ^(.*)$ https://dotboost.com/$1 instead, again replacing dotboost.com with your own domain.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ language: "en"
DML (Data Manipulation Language) statements change data values in database tables.
This article, continuing the Zend_Db series, shows how the three primary DML statements - INSERT, UPDATE, and DELETE - are written in raw SQL and translated into Zend_Db method calls.

Continuing the Zend_DB article [series](http://www.dotkernel.com/dotkernel/sql-queries-using-zend-db-select/), we are stopping now at DML statements. DML (Data Manipulation Language) statements are statements that change data values in database tables. There are 3 primary DML statements:
Continuing the Zend_DB article [series](https://www.dotkernel.com/best-practice/sql-queries-using-zend-db-select/), we are stopping now at DML statements. DML (Data Manipulation Language) statements are statements that change data values in database tables. There are 3 primary DML statements:

- INSERT - Inserting new rows into database tables.
- UPDATE - Updating existing rows in database tables.
Expand Down Expand Up @@ -94,4 +94,4 @@ A: Call $db->delete('user', 'id = '.$id), which is equivalent to the SQL stateme

## Resources

- [Zend_Db series](http://www.dotkernel.com/dotkernel/sql-select-zend-db/)
- [Zend_Db series](https://www.dotkernel.com/best-practice/sql-queries-using-zend-db-select/)
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,6 @@ A: Before fetching it, echo the query to visualize it: echo $select->__toString(
## Resources

- [Zend_Db](https://docs.laminas.dev/laminas-db/adapter/)
- [What are returning the FETCH functions from Zend_Db](http://www.dotkernel.com/best-practice/what-are-returning-the-fetch-functions-from-zend-db/)
- [Subqueries with Zend_Db](http://www.dotkernel.com/best-practice/subqueries-with-zend-db/)
- [INSERT, UPDATE, DELETE statements with Zend_Db](http://www.dotkernel.com/best-practice/insert-update-delete-statements-with-zend-db/)
- [What are returning the FETCH functions from Zend_Db](https://www.dotkernel.com/best-practice/what-are-returning-the-fetch-functions-from-zend-db/)
- [Subqueries with Zend_Db](https://www.dotkernel.com/best-practice/subqueries-with-zend-db/)
- [INSERT, UPDATE, DELETE statements with Zend_Db](https://www.dotkernel.com/best-practice/insert-update-delete-statements-with-zend-db/)
4 changes: 2 additions & 2 deletions public/md-articles/best-practice/subqueries-with-zend-db.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ language: "en"

Continuing the Zend_Db series, this article shows a more complex query - combining COUNT(), LEFT JOIN, and GROUP BY across 3 tables, with a count taken from 2 different tables - and how to build it, including a nested subquery, using Zend_Db.

Continuing the Zend_DB article [series](http://www.dotkernel.com/dotkernel/sql-queries-using-zend-db-select/), we are stopping now at subqueries.
Continuing the Zend_DB article [series](https://www.dotkernel.com/best-practice/sql-queries-using-zend-db-select/), we are stopping now at subqueries.

As you note, the below is a complicate query, with *COUNT()*, *LEFT JOIN()*, *GROUP BY* - select from 3 tables, and make a count from 2 different tables:

Expand Down Expand Up @@ -69,4 +69,4 @@ A: Use ->joinLeft(array('b'=>'track_courses'), 'a.id = b.track_id', array('count

## Resources

- [Zend_Db series](http://www.dotkernel.com/dotkernel/sql-select-zend-db/)
- [Zend_Db series](https://www.dotkernel.com/best-practice/sql-queries-using-zend-db-select/)
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ where:
| Parameter | Meaning |
|---|---|
| `-r revisionNumber` | Optional. Exports a specific revision. By default, the latest revision is used. |
| `repositoryUrl` | The repository URL (e.g. `http://example.com/repos/project-name/trunk/`). Remember to add `/trunk/`, or change it appropriately for a branch or tag. |
| `repositoryUrl` | The repository URL (e.g. `https://example.com/repos/project-name/trunk/`). Remember to add `/trunk/`, or change it appropriately for a branch or tag. |
| `targetDirectory` - `./` | The current directory. |
| `targetDirectory` - `./project-name` | Exports to the `project-name` subdirectory. |
| `targetDirectory` - `/var/www/vhosts/example.com/httpdocs` | Exports to an absolute path. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ A: They provide better integration of SVN, your PHP IDE (Zend Studio), and a bug
A: It tells SVN to ignore local settings files such as *.project, *.prefs, .project, cache, .settings, .buildpath, and *.ini, since you don't want to commit your local settings to the main repository.

**Q: How do you set up basic bug tracker integration?**
A: Set the bugtracq:label property to "Tracker ID:" and bugtraq:message; if you have a public bug tracker such as Mantis, also set bugtraq:url to a URL pattern like http://www.dotkernel.net/view.php?id=%BUGID%.
A: Set the bugtracq:label property to "Tracker ID:" and bugtraq:message; if you have a public bug tracker such as Mantis, also set bugtraq:url to a URL pattern like https://www.dotkernel.net/view.php?id=%BUGID%.

**Q: Should these properties be applied recursively?**
A: No. For the properties above, apply them only to the project folder, not recursively.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The LIKE condition allows pattern matching in the WHERE clause of SELECT, INSERT
The `_` wildcard matches a single character, and `%` matches any string of any length (including zero).
This article shows how to use LIKE and NOT LIKE with both wildcards in Zend_Db.

Continuing the Zend_Db article series (http://www.dotkernel.com/dotkernel/sql-queries-using-zend-db-select/), let's discuss the LIKE condition.
Continuing the Zend_Db article [series](https://www.dotkernel.com/best-practice/sql-queries-using-zend-db-select/), let's discuss the LIKE condition.

The **LIKE** condition allows you to use wildcards in the *WHERE* clause of an SQL statement. This allows pattern matching. It can be used in any valid SQL statement (*SELECT*, *INSERT*, *UPDATE* or *DELETE*).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ language: "en"
Continuing the Zend_Db article series, this article walks through the FETCH methods available on Zend_Db_Adapter_Abstract: fetchAll, fetchAssoc, fetchCol, fetchOne, fetchPairs, and fetchRow.
Each method is shown next to the equivalent old-style code built on query(), next_record(), and f(), so the two approaches can be compared side by side.

Continuing the Zend_DB article [series](http://www.dotkernel.com/dotkernel/sql-queries-using-zend-db-select/), we are stopping now at *FETCH* methods that are in [Zend_Db_Adapter_Abstract](https://docs.laminas.dev/laminas-db/adapter/):
Continuing the Zend_DB article [series](https://www.dotkernel.com/best-practice/sql-queries-using-zend-db-select/), we are stopping now at *FETCH* methods that are in [Zend_Db_Adapter_Abstract](https://docs.laminas.dev/laminas-db/adapter/):

```php
array fetchAll (string|Zend_Db_Select $sql, [mixed $bind = array()])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ On a TIMESTAMP field that records date and time when inserting a new record, it'
This removes the need to set the value manually from PHP or with MySQL's NOW() function, and the ON UPDATE CURRENT_TIMESTAMP clause can additionally keep the field updated automatically on every row update.
Only one TIMESTAMP field per table can be DEFAULT CURRENT_TIMESTAMP.

On a *TIMESTAMP field* that records date and time when *inserting* a new record, it is encouraged to use as a *DEFAULT* value, the **CURRENT_TIMESTAMP** constant. **Why?** Because when inserting a new row in the table for the date and time field there is no need to specifically add its value, either by creating it from PHP code with the [Date/ Time functions](http://www.php.net/manual/en/ref.datetime.php) or with MySQL function [NOW()](http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_now)
On a *TIMESTAMP field* that records date and time when *inserting* a new record, it is encouraged to use as a *DEFAULT* value, the **CURRENT_TIMESTAMP** constant. **Why?** Because when inserting a new row in the table for the date and time field there is no need to specifically add its value, either by creating it from PHP code with the [Date/ Time functions](https://www.php.net/manual/en/ref.datetime.php) or with MySQL function [NOW()](https://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_now)

```sql
ALTER TABLE `user` CHANGE `dateCreated` `dateCreated` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This article is the upgrade guide for applying that icon patch.
*The new Icons listed in User and Admin Logins*

1. Make sure your project is running version **1.5.0** or **newer**.
2. Download the [patch](http://www.dotkernel.com/download/?did=46).
2. Download the [patch](https://www.dotkernel.com/download/?did=46).
3. Extract the archive into a folder, e.g. `icons_patch`.
4. Create a backup of your project before continuing (recommended).
5. Copy all the files in the `icons_patch` folder into your Dotkernel project.
Expand Down Expand Up @@ -55,5 +55,5 @@ A: You'll be prompted to replace 2 files (browser.xml and os.xml) and should agr

## Resources

- [Icon patch download](http://www.dotkernel.com/download/?did=46)
- [Dotkernel Reserved Variable Names for Caching](http://www.dotkernel.com/dotkernel/dotkernel-reserved-variable-names-for-caching)
- [Icon patch download](https://www.dotkernel.com/download/?did=46)
- [Dotkernel Reserved Variable Names for Caching](https://www.dotkernel.com/dotkernel/dotkernel-reserved-variable-names-for-caching)
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Dotkernel 1.8 implements a cache layer for router, acl_role, menu, options (incl

The configuration is set from `/configs/application.ini`: whether caching is enabled, how long the cache stays valid, the cache namespace, and the storage provider (File or APC).
The article recommends disabling the cache in development mode.
See [Configuring the Cache in Dotkernel](http://www.dotkernel.com/dotkernel/configuring-the-cache-in-dotkernel/) for more details.
See [Configuring the Cache in Dotkernel](https://www.dotkernel.com/dotkernel/configuring-the-cache-in-dotkernel/) for more details.

## 2. Using the cache

Expand Down Expand Up @@ -74,5 +74,5 @@ A: Yes, the article shows an example of saving and loading a stdClass object usi

## Resources

- [Dotkernel Reserved Variable Names for Caching](http://www.dotkernel.com/dotkernel/dotkernel-reserved-variable-names-for-caching)
- [Configuring the Cache in Dotkernel](http://www.dotkernel.com/dotkernel/configuring-the-cache-in-dotkernel/)
- [Dotkernel Reserved Variable Names for Caching](https://www.dotkernel.com/dotkernel/dotkernel-reserved-variable-names-for-caching)
- [Configuring the Cache in Dotkernel](https://www.dotkernel.com/dotkernel/configuring-the-cache-in-dotkernel/)
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ A: Add the line `lower_case_table_names=2` to your my.cnf file and restart MySQL

## Resources

- [MySQL lower_case_table_names documentation](http://dev.mysql.com/doc/refman/4.1/en/server-system-variables.html#sysvar_lower_case_table_names)
- [MySQL lower_case_table_names documentation](https://dev.mysql.com/doc/refman/4.1/en/server-system-variables.html#sysvar_lower_case_table_names)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Another 2 of our team members passed the ZCE exam.
Now we are 5.
That means we are really taking PHP into serious consideration, and at the very least we have good technical skills.

See the [Zend Yellow Pages](http://www.zend.com/store/education/certification/yellow-pages.php#list-cid=0&sid=&certtype_zf=1&certtype_php=1&certtype=&firstname=&lastname=&company=Dotboost%20Technologies&ClientCandidateID=).
See the [Zend Yellow Pages](https://www.zend.com/store/education/certification/yellow-pages.php#list-cid=0&sid=&certtype_zf=1&certtype_php=1&certtype=&firstname=&lastname=&company=Dotboost%20Technologies&ClientCandidateID=).

## FAQ

Expand All @@ -23,4 +23,4 @@ A: According to the article, 2 more team members passed the ZCE exam, bringing t

## Resources

- [Zend Yellow Pages listing](http://www.zend.com/store/education/certification/yellow-pages.php#list-cid=0&sid=&certtype_zf=1&certtype_php=1&certtype=&firstname=&lastname=&company=Dotboost%20Technologies&ClientCandidateID=)
- [Zend Yellow Pages listing](https://www.zend.com/store/education/certification/yellow-pages.php#list-cid=0&sid=&certtype_zf=1&certtype_php=1&certtype=&firstname=&lastname=&company=Dotboost%20Technologies&ClientCandidateID=)
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Optional backend-specific settings (like the file cache directory) are recommend
This article contains the Dotkernel cache layer configuration guide.
The Dotkernel Caching Layer is based on Zend Framework Cache; more configuration options can be found at the following links:

- [Zend Framework Cache Frontends](http://framework.zend.com/manual/1.12/en/zend.cache.frontends.html)
- [Zend Framework Cache Backends](http://framework.zend.com/manual/1.12/en/zend.cache.backends.html)
- [Zend Framework Cache Frontends](https://framework.zend.com/manual/1.12/en/zend.cache.frontends.html)
- [Zend Framework Cache Backends](https://framework.zend.com/manual/1.12/en/zend.cache.backends.html)

## Main Cache Settings (Cache Frontend)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Dotkernel's example mobile site normally relies on Wurfl to detect mobile browse
As of revision 408, this behavior is controlled by a single `resources.useragent.wurflapi.redirect` setting in application.ini.
The article shows that setting along with the matching condition in `IndexController.php` that checks it before registering and redirecting a visit.

Dotkernel has an example mobile site at [http://v1.dotkernel.net/mobile](http://v1.dotkernel.net/mobile) that uses [jQuery Mobile](http://jquerymobile.com/).
Wurfl is also used to detect mobile browsers (as discussed in a [previous blog post](http://www.dotkernel.com/dotkernel/wurfl-zend-framework-integration-into-dotkernel/)) and automatically redirect them to the mobile site the first time they view the homepage.
Dotkernel has an example mobile site at [https://v1.dotkernel.net/mobile](https://v1.dotkernel.net/mobile) that uses [jQuery Mobile](https://jquerymobile.com/).
Wurfl is also used to detect mobile browsers (as discussed in a [previous blog post](https://www.dotkernel.com/dotkernel/wurfl-zend-framework-integration-into-dotkernel/)) and automatically redirect them to the mobile site the first time they view the homepage.
Sometimes this behavior isn't desired (for example when you don't have a mobile site, or you don't plan on using Wurfl at all).

Starting with revision 408, there's an option in application.ini to disable the automatic redirect (by default the redirect is disabled):
Expand Down
6 changes: 3 additions & 3 deletions public/md-articles/dotkernel/dotkernel-1-2-0-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The release also adds new library classes (Dot_Geoip, Dot_Seo), updates existing
## Database Naming Conventions

On database, we changed the names and structure of tables to respect database naming convention.
See [http://www.dotkernel.com/dotkernel/dotkernel-database-naming-conventions-for-mysql/](http://www.dotkernel.com/dotkernel/dotkernel-database-naming-conventions-for-mysql/) for details.
See [https://www.dotkernel.com/dotkernel/dotkernel-database-naming-conventions-for-mysql/](https://www.dotkernel.com/dotkernel/dotkernel-database-naming-conventions-for-mysql/) for details.

## The "Dots" Concept

Expand All @@ -41,9 +41,9 @@ New library classes have been implemented: Dot_Geoip and Dot_Seo, and some of th
## SQL Prepared Statements

In Dotkernel, all SQL queries are written as prepared statements.
We strongly encourage this practice: [http://www.dotkernel.com/php-development/protection-against-sql-injection-using-pdo-and-zend-framework/](http://www.dotkernel.com/php-development/protection-against-sql-injection-using-pdo-and-zend-framework/)
We strongly encourage this practice: [https://www.dotkernel.com/php-development/protection-against-sql-injection-using-pdo-and-zend-framework/](https://www.dotkernel.com/php-development/protection-against-sql-injection-using-pdo-and-zend-framework/)

For more details, see [ChangeLog 1.2.0](http://www.dotkernel.com/changelog/1-2-0/).
For more details, see [ChangeLog 1.2.0](https://www.dotkernel.com/changelog/1-2-0/).

## FAQ

Expand Down
Loading
Loading