HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/PvdBoogaard/indoorski.nl/backup/oude-site/cms/includes/sections/viewcontent.php
<?php
/**
 * This file contains the iwp_styleguide class.
 *
 * @author Jordie <jordie+code@interspire.com>
 *
 * @package IWP
 * @subpackage IWP_API
 */

/**
 * This class extends upon the base iwp_base class.
 * This file deals specifically with the style guide for themes
 *
 * @package IWP
 * @subpackage IWP_API
 *
 * @see iwp_base
 */

class iwp_section_viewcontent {

	public function ProcessBlock($styleGuideObj, $domElement, $attributes){

		$thisElement = iwp_domhelper::GetElementByClass($domElement, 'tplflag-content-breadcrumb-replace');
		if(is_object($thisElement)) {
			$thisElement->parentNode->insertBefore(iwp_domhelper::NewDOMText('{$contentBreadcrumb}'), $thisElement);
			$thisElement->parentNode->removeChild($thisElement);
		}
		iwp_domhelper::modifyTagByClassName($domElement, 'tplflag-content-breadcrumb', '{$contentBreadcrumb}');

		$fields = array(
			'title', 'target', 'content', 'summary', 'views',
			'categories', 'contenttypename', 'authors','publishdate'
		);


		foreach($fields as $thisField) {
			$fieldName =  ucfirst(iwp_strtolower(str_replace("-", "", $thisField)));
			iwp_domhelper::modifyTagByClassName($domElement, 'tplvar-content-'.iwp_strtolower($thisField), '{$contentprepend' . $fieldName . '}{$content' . $fieldName . '}{$contentappend' . $fieldName . '}');

			$fielObj = iwp_domhelper::GetElementByClass($domElement, 'tplvar-content-'.$thisField);

			if(is_object($fielObj)){ // should be a DOMElement
				iwp_domhelper::WrapElement($fielObj, '{$contentbefore' . $fieldName . '}{if strlen($content' . $fieldName . ') > 0 && $has' . $fieldName . '}', '{/if}{$contentafter' . $fieldName . '}');
			}
		}

		$fields = array(
			 'publishdate-monthshort' , 'publishdate-yearlong','publishdate-yearshort',
			'publishdate-monthlong', 'publishdate-daynum', 'publishdate-year', 'publishdate-monthnumber', 'publishdate-monthnumberwithzero',

		);

		foreach($fields as $thisField) {
			$fieldName =  ucfirst(iwp_strtolower(str_replace("-", "", $thisField)));
			iwp_domhelper::modifyTagByClassName($domElement, 'tplvar-content-'.iwp_strtolower($thisField), '{$contentprepend' . $fieldName . '}{$content' . $fieldName . '}{$contentappend' . $fieldName . '}');

			$fielObj = iwp_domhelper::GetElementByClass($domElement, 'tplvar-content-'.$thisField);

			if(is_object($fielObj)){ // should be a DOMElement
				iwp_domhelper::WrapElement($fielObj, '{$contentbefore' . $fieldName . '}{if strlen($content' . $fieldName . ') > 0  && $hasPublishdate}', '{/if}{$contentafter' . $fieldName . '}');
			}
		}


		$beforeDetails = iwp_domhelper::NewDOMText('{$contentbeforeDetails}');
		$afterDetails = iwp_domhelper::NewDOMText('{$contentafterDetails}');

		$tplDetails = iwp_domhelper::GetElementByClass($domElement, 'tplflag-content-details');
		if(is_object($tplDetails)){ // should be a DOMElement
			$tplDetails->insertBefore($beforeDetails, $tplDetails->firstChild);
			$tplDetails->insertBefore($afterDetails, $tplDetails->lastChild->nextSibling);
		}

		iwp_domhelper::modifyTagByClassName($domElement, 'tplflag-content-modules', '{$contentModules}');
		iwp_domhelper::modifyTagByClassName($domElement, 'tplflag-content-paging', '{$paging}');


		// loop through the modules which can declare what they want
		return iwp_domhelper::outerHTML($domElement);
	}
}