dolibarr
9.0.0
|
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... | |
dolStripPhpCode ($str, $replacewith='') | |
Remove PHP code part from a string. More... | |
dolWebsiteOutput ($content) | |
Render a string of an HTML content and output it. More... | |
redirectToContainer ($containerref, $containeraliasalt='', $containerid=0) | |
Format img tags to introduce viewimage on img src. More... | |
includeContainer ($containerref) | |
Clean an HTML page to report only content, so we can include it into another page. More... | |
getAllImages ($object, $objectpage, $urltograb, &$tmp, &$action, $modifylinks=0, $grabimages=1, $grabimagesinto='subpage') | |
Download all images found into page content $tmp. More... | |
dolSaveMasterFile ($filemaster) | |
Save content of a page on disk. 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... | |
dolSaveIndexPage ($pathofwebsite, $fileindex, $filetpl, $filewrapper) | |
Save content of the index.php and wrapper.php page. 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... | |
Library for website module.
Definition in file website.lib.php.
dolSaveCssFile | ( | $filecss, | |
$csscontent | |||
) |
Save content of a page on disk.
string | $filecss | Full path of filename to generate |
string | $csscontent | Content of file |
Definition at line 789 of file website.lib.php.
dolSaveHtaccessFile | ( | $filehtaccess, | |
$htaccess | |||
) |
Save content of a page on disk.
string | $filehtaccess | Full path of filename to generate |
string | $htaccess | Content of file |
Definition at line 870 of file website.lib.php.
dolSaveHtmlHeader | ( | $filehtmlheader, | |
$htmlheadercontent | |||
) |
Save content of a page on disk.
string | $filehtmlheader | Full path of filename to generate |
string | $htmlheadercontent | Content of file |
Definition at line 762 of file website.lib.php.
dolSaveIndexPage | ( | $pathofwebsite, | |
$fileindex, | |||
$filetpl, | |||
$filewrapper | |||
) |
Save content of the index.php and wrapper.php page.
string | $pathofwebsite | Path of website root |
string | $fileindex | Full path of file index.php |
string | $filetpl | File tpl to index.php page redirect to |
string | $filewrapper | Full path of file wrapper.php |
Definition at line 718 of file website.lib.php.
dolSaveJsFile | ( | $filejs, | |
$jscontent | |||
) |
Save content of a page on disk.
string | $filejs | Full path of filename to generate |
string | $jscontent | Content of file |
Definition at line 816 of file website.lib.php.
dolSaveMasterFile | ( | $filemaster | ) |
Save content of a page on disk.
string | $filemaster | Full path of filename master.inc.php for website to generate |
Definition at line 593 of file website.lib.php.
dolSavePageAlias | ( | $filealias, | |
$object, | |||
$objectpage | |||
) |
Save content of a page on disk.
string | $filealias | Full path of filename to generate |
Website | $object | Object website |
WebsitePage | $objectpage | Object websitepage |
Definition at line 620 of file website.lib.php.
dolSavePageContent | ( | $filetpl, | |
$object, | |||
$objectpage | |||
) |
Save content of a page on disk.
string | $filetpl | Full path of filename to generate |
Website | $object | Object website |
WebsitePage | $objectpage | Object websitepage |
Definition at line 650 of file website.lib.php.
dolSaveRobotFile | ( | $filerobot, | |
$robotcontent | |||
) |
Save content of a page on disk.
string | $filerobot | Full path of filename to generate |
string | $robotcontent | Content of file |
Definition at line 843 of file website.lib.php.
dolStripPhpCode | ( | $str, | |
$replacewith = '' |
|||
) |
Remove PHP code part from a string.
string | $str | String to clean |
string | $replacewith | String to use as replacement |
Definition at line 105 of file website.lib.php.
dolWebsiteOutput | ( | $content | ) |
Render a string of an HTML content and output it.
Used to ouput the page when viewed from server (Dolibarr or Apache).
string | $content | Content string |
Definition at line 145 of file website.lib.php.
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.
Website | $website | Web site object |
string | $content | Content to replace |
int | $removephppart | 0=Replace PHP sections with a PHP badge. 1=Remove completely PHP sections. |
Definition at line 36 of file website.lib.php.
getAllImages | ( | $object, | |
$objectpage, | |||
$urltograb, | |||
& | $tmp, | ||
& | $action, | ||
$modifylinks = 0 , |
|||
$grabimages = 1 , |
|||
$grabimagesinto = 'subpage' |
|||
) |
Download all images found into page content $tmp.
If $modifylinks is set, links to images will be replace with a link to viewimage wrapper.
Website | $object | Object website |
WebsitePage | $objectpage | Object website page |
string | $urltograb | URL to grab (exemple: http://www.nltechno.com/ or http://www.nltechno.com/dir1/ or http://www.nltechno.com/dir1/mapage1) |
string | $tmp | Content to parse |
string | $action | Var $action |
string | $modifylinks | 0=Do not modify content, 1=Replace links with a link to viewimage |
int | $grabimages | 0=Do not grab images, 1=Grab images |
string | $grabimagesinto | 'root' or 'subpage' |
Definition at line 415 of file website.lib.php.
includeContainer | ( | $containerref | ) |
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.
string | $containerref | Path to file to include (must be a page from website root. Example: 'mypage.php' means 'mywebsite/mypage.php') |
Definition at line 360 of file website.lib.php.
redirectToContainer | ( | $containerref, | |
$containeraliasalt = '' , |
|||
$containerid = 0 |
|||
) |
Format img tags to introduce viewimage on img src.
string | $content | Content string |
string | $containerref | Ref of container to redirect to (must be a page from website root. Example: 'mypage.php' means 'mywebsite/mypage.php'). |
string | $containeraliasalt | Ref of alternative aliases to redirect to. |
int | $containerid | Id of container. |
Definition at line 280 of file website.lib.php.