Phenotype 2.9 - What's new

(since) 2.90

ID ranges for content records

If you create a new content object class, the class will have two new variables $dat_id_min and $dat_id_max defining the id range of all content records created for that class. You can use this to determine how (new) content is created for the different types. This can be very helpfull if you want to migrate content and/or have to run multiple content altering instances for a while.

class PhenotypeContent_1 extends PhenotypeContent
{
  public $content_type = 1;
 
  protected $dat_id_min = 1000;
  protected $dat_id_max = 1999;

Be sure to have meaningfull values for all of your content classes, otherwise it won’t help you. If you don’t want id ranges, just comment them out in your classes.

Integration of PHPIDS (PHP-Intrusion Detection System)

read the related blog post.

Integration of Firebug / FirePHP logging

Per default Phenotype logs to the firebug console now, if you’re logged in into the backend:

define("PT_LOG_METHOD", PT_LOGMTH_FILEANDFIREBUG);
define("PT_LOG_LEVEL",PT_LOGLVL_DEBUG);

You can change that behaviour, if you adjust the settings in _config.inc.php. Here’s a list of all available options, should be pretty self-declaring:

define("PT_LOGLVL_ERROR", 1);
define("PT_LOGLVL_WARNING", 2);
define("PT_LOGLVL_INFO", 3);
define("PT_LOGLVL_DEBUG", 4);
 
define("PT_LOGMTH_FILE", "FILE");
define("PT_LOGMTH_FIREBUG", "FIREBUG");
define("PT_LOGMTH_FILEANDFIREBUG", "FILEANDFIREBUG");

The log level is only relevant for file based logging. If firebug logging is enabled, always every log entry gets displayed.

More infos on FirePhp here.

global $myLog

If you want to use that feature during development, just grab the global logger object and write into the console:

global $myLog;
$myLog->log("Hello world");

content preview

to be described.

content publish mode

to be described.

DB changes

For changes to the database see migration

(since) 2.91

PHPIDS exceptions

If you want to exclude some request parameters from PHPIDS processing, you can put them on a include list. E.g. if you allow entering html code on one specific form, exclude that form field and handle the sanitizing by yourself:

* default behaviour:

define ('PT_PHPIDS',1);
define ('PT_PHPIDS_MAXIMPACT',10);

index.php?id=1&a=1%27OR%201=1 will result in a 500 error page.

* customized behaviour

define ('PT_PHPIDS',1);
define ('PT_PHPIDS_MAXIMPACT',10);
define ('PT_PHPIDS_EXCLUDES','a,b');

index.php?id=1&a=1%27OR%201=1 won’t throw an error, since request variables named a or b are not processed by PHPIDS.

(since) 2.92

component development

  • a component will always be available as {$component} within it’s smarty templates. Usage e.g. {$component→getH(“headline”)}

Wiki Style URLs

  • new (de)coding methods codeWSL and codeHWSL and equivalent getters getWSL and getHWSL
  • can be used in components, if you want enable your user to write consistent links in a wiki style way
  • Examples:
get link of page 15: [[p15]] => will print out url of page 15
link to page 15: [[p15|more]] => will create link  tag with text "more"
link to content record 12: [[c12|news]] => will create link tag with text "news"
display image: [[i123|your text]] => will display image 123 from the mediabase
provide download link: [[d12|download]] => will create link tag to document 12
quick link: [[uhttp://www.phenotype-cms.com/Great CMS]] => will create link to this domain with text "Great CMS"

  • If you’re editors use this type of links, Phenotype will create the links on the fly, so dead links after changing page titles or link patterns will be a thing of the past

templating

  • {$canonical_url} displays (smart) url of a page within a template, can be used to avoid duplicate content

You think Phenotype Wiki/Documentation could be better?
We too. Please contribute: Edit this page

Bookmark and Share