| @@ 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 | { |
|
| @@ 1094-1115 (lines=22) @@ | ||
| 1091 | * Return author's signiture |
|
| 1092 | * @return string |
|
| 1093 | */ |
|
| 1094 | function getSignature() |
|
| 1095 | { |
|
| 1096 | // Pass if a document doesn't exist |
|
| 1097 | if(!$this->isExists() || !$this->get('member_srl')) return; |
|
| 1098 | // Get signature information |
|
| 1099 | $oMemberModel = getModel('member'); |
|
| 1100 | $signature = $oMemberModel->getSignature($this->get('member_srl')); |
|
| 1101 | // Check if a maximum height of signiture is set in the member module |
|
| 1102 | if(!isset($GLOBALS['__member_signature_max_height'])) |
|
| 1103 | { |
|
| 1104 | $oModuleModel = getModel('module'); |
|
| 1105 | $member_config = $oModuleModel->getModuleConfig('member'); |
|
| 1106 | $GLOBALS['__member_signature_max_height'] = $member_config->signature_max_height; |
|
| 1107 | } |
|
| 1108 | if($signature) |
|
| 1109 | { |
|
| 1110 | $max_signature_height = $GLOBALS['__member_signature_max_height']; |
|
| 1111 | 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); |
|
| 1112 | } |
|
| 1113 | ||
| 1114 | return $signature; |
|
| 1115 | } |
|
| 1116 | ||
| 1117 | /** |
|
| 1118 | * Change an image path in the content to absolute path |
|