| @@ 493-521 (lines=29) @@ | ||
| 490 | * Return author's signiture |
|
| 491 | * @return string |
|
| 492 | */ |
|
| 493 | function getSignature() |
|
| 494 | { |
|
| 495 | // pass if the posting not exists. |
|
| 496 | if(!$this->isExists() || !$this->get('member_srl')) |
|
| 497 | { |
|
| 498 | return; |
|
| 499 | } |
|
| 500 | ||
| 501 | // get the signiture information |
|
| 502 | $oMemberModel = getModel('member'); |
|
| 503 | $signature = $oMemberModel->getSignature($this->get('member_srl')); |
|
| 504 | ||
| 505 | // check if max height of the signiture is specified on the member module |
|
| 506 | if(!isset($GLOBALS['__member_signature_max_height'])) |
|
| 507 | { |
|
| 508 | $oModuleModel = getModel('module'); |
|
| 509 | $member_config = $oModuleModel->getModuleConfig('member'); |
|
| 510 | $GLOBALS['__member_signature_max_height'] = $member_config->signature_max_height; |
|
| 511 | } |
|
| 512 | ||
| 513 | $max_signature_height = $GLOBALS['__member_signature_max_height']; |
|
| 514 | ||
| 515 | if($max_signature_height) |
|
| 516 | { |
|
| 517 | $signature = sprintf('<div style="max-height:%dpx;overflow:auto;overflow-x:hidden;height:expression(this.scrollHeight > %d ? \'%dpx\': \'auto\')">%s</div>', $max_signature_height, $max_signature_height, $max_signature_height, $signature); |
|
| 518 | } |
|
| 519 | ||
| 520 | return $signature; |
|
| 521 | } |
|
| 522 | ||
| 523 | function thumbnailExists($width = 80, $height = 0, $type = '') |
|
| 524 | { |
|
| @@ 1132-1153 (lines=22) @@ | ||
| 1129 | * Return author's signiture |
|
| 1130 | * @return string |
|
| 1131 | */ |
|
| 1132 | function getSignature() |
|
| 1133 | { |
|
| 1134 | // Pass if a document doesn't exist |
|
| 1135 | if(!$this->isExists() || !$this->get('member_srl')) return; |
|
| 1136 | // Get signature information |
|
| 1137 | $oMemberModel = getModel('member'); |
|
| 1138 | $signature = $oMemberModel->getSignature($this->get('member_srl')); |
|
| 1139 | // Check if a maximum height of signiture is set in the member module |
|
| 1140 | if(!isset($GLOBALS['__member_signature_max_height'])) |
|
| 1141 | { |
|
| 1142 | $oModuleModel = getModel('module'); |
|
| 1143 | $member_config = $oModuleModel->getModuleConfig('member'); |
|
| 1144 | $GLOBALS['__member_signature_max_height'] = $member_config->signature_max_height; |
|
| 1145 | } |
|
| 1146 | if($signature) |
|
| 1147 | { |
|
| 1148 | $max_signature_height = $GLOBALS['__member_signature_max_height']; |
|
| 1149 | if($max_signature_height) $signature = sprintf('<div style="max-height:%dpx;overflow:auto;overflow-x:hidden;height:expression(this.scrollHeight > %d ? \'%dpx\': \'auto\')">%s</div>', $max_signature_height, $max_signature_height, $max_signature_height, $signature); |
|
| 1150 | } |
|
| 1151 | ||
| 1152 | return $signature; |
|
| 1153 | } |
|
| 1154 | ||
| 1155 | /** |
|
| 1156 | * Change an image path in the content to absolute path |
|