dolibarr  7.0.0-beta
Functions
website.lib.php File Reference

Library for website module. More...

Go to the source code of this file.

Functions

 dolWebsiteReplacementOfLinks ($website, $content, $removephppart=0)
 Convert a page content to have correct links (based on DOL_URL_ROOT) into an html content. More...
 
 dolWebsiteOutput ($content)
 Render a string of an HTML content and output it. More...
 
 includeContainer ($containeralias)
 Format img tags to introduce viewimage on img src. More...
 
 getAllImages ($object, $objectpage, $urltograb, &$tmp, &$action, $modifylinks=0)
 Download all images found into page content $tmp. More...
 
 dolSavePageAlias ($filealias, $object, $objectpage)
 Save content of a page on disk. More...
 
 dolSavePageContent ($filetpl, $object, $objectpage)
 Save content of a page on disk. More...
 
 dolSaveHtmlHeader ($filehtmlheader, $htmlheadercontent)
 Save content of a page on disk. More...
 
 dolSaveCssFile ($filecss, $csscontent)
 Save content of a page on disk. More...
 
 dolSaveJsFile ($filejs, $jscontent)
 Save content of a page on disk. More...
 
 dolSaveRobotFile ($filerobot, $robotcontent)
 Save content of a page on disk. More...
 
 dolSaveHtaccessFile ($filehtaccess, $htaccess)
 Save content of a page on disk. More...
 

Detailed Description

Library for website module.

Definition in file website.lib.php.

Function Documentation

dolSaveCssFile (   $filecss,
  $csscontent 
)

Save content of a page on disk.

Parameters
string$filecssFull path of filename to generate
string$csscontentContent of file
Returns
boolean True if OK

Definition at line 512 of file website.lib.php.

References dol_mkdir(), dol_syslog(), and setEventMessages().

dolSaveHtaccessFile (   $filehtaccess,
  $htaccess 
)

Save content of a page on disk.

Parameters
string$filehtaccessFull path of filename to generate
string$htaccessContent of file
Returns
boolean True if OK

Definition at line 593 of file website.lib.php.

References dol_mkdir(), dol_syslog(), and setEventMessages().

dolSaveHtmlHeader (   $filehtmlheader,
  $htmlheadercontent 
)

Save content of a page on disk.

Parameters
string$filehtmlheaderFull path of filename to generate
string$htmlheadercontentContent of file
Returns
boolean True if OK

Definition at line 485 of file website.lib.php.

References dol_mkdir(), dol_syslog(), and setEventMessages().

dolSaveJsFile (   $filejs,
  $jscontent 
)

Save content of a page on disk.

Parameters
string$filejsFull path of filename to generate
string$jscontentContent of file
Returns
boolean True if OK

Definition at line 539 of file website.lib.php.

References dol_mkdir(), dol_syslog(), and setEventMessages().

dolSavePageAlias (   $filealias,
  $object,
  $objectpage 
)

Save content of a page on disk.

Parameters
string$filealiasFull path of filename to generate
Website$objectObject website
WebsitePage$objectpageObject websitepage
Returns
boolean True if OK

Definition at line 391 of file website.lib.php.

References dol_syslog().

Referenced by Website\createFromClone().

dolSavePageContent (   $filetpl,
  $object,
  $objectpage 
)

Save content of a page on disk.

Parameters
string$filetplFull path of filename to generate
Website$objectObject website
WebsitePage$objectpageObject websitepage
Returns
boolean True if OK

Definition at line 420 of file website.lib.php.

References dol_delete_file(), and dol_syslog().

Referenced by Website\createFromClone().

dolSaveRobotFile (   $filerobot,
  $robotcontent 
)

Save content of a page on disk.

Parameters
string$filerobotFull path of filename to generate
string$robotcontentContent of file
Returns
boolean True if OK

Definition at line 566 of file website.lib.php.

References dol_mkdir(), dol_syslog(), and setEventMessages().

dolWebsiteOutput (   $content)

Render a string of an HTML content and output it.

Used to ouput the page when viewed from server (Dolibarr or Apache).

Parameters
string$contentContent string
Returns
void
See also
dolWebsiteSaveContent

Definition at line 71 of file website.lib.php.

References dol_syslog(), and print.

dolWebsiteReplacementOfLinks (   $website,
  $content,
  $removephppart = 0 
)

Convert a page content to have correct links (based on DOL_URL_ROOT) into an html content.

Used to ouput the page on the Preview from backoffice.

Parameters
Website$websiteWeb site object
string$contentContent to replace
int$removephppart0=Replace PHP sections with a PHP badge. 1=Remove completely PHP sections.
Returns
boolean True if OK

Definition at line 35 of file website.lib.php.

getAllImages (   $object,
  $objectpage,
  $urltograb,
$tmp,
$action,
  $modifylinks = 0 
)

Download all images found into page content $tmp.

If $modifylinks is set, links to images will be replace with a link to viewimage wrapper.

Parameters
Website$objectObject website
WebsitePage$objectpageObject website page
string$urltograbURL to grab (exemple: http://www.nltechno.com/ or http://www.nltechno.com/dir1/ or http://www.nltechno.com/dir1/mapage1)
string$tmpContent to parse
string$actionVar $action
string$modifylinks0=Do not modify content, 1=Replace links with a link to viewimage
Returns
void

Definition at line 227 of file website.lib.php.

References dol_mkdir(), getRootURLFromURL(), getURLContent(), and setEventMessages().

includeContainer (   $containeralias)

Format img tags to introduce viewimage on img src.

Parameters
string$contentContent string
Returns
void
See also
dolWebsiteOutput Clean an HTML page to report only content, so we can include it into another page. It outputs content of file sanitized from html and body part.
Parameters
string$containeraliasPath to file to include (must be a page from website root. Example: 'mypage.php' means 'mywebsite/mypage.php')
Returns
void

Definition at line 174 of file website.lib.php.

References print.