my $MyAdCounter; # 전역변수는 이 앞에 적어 주시고
sub MacroThread {
my ($itself, $id, $up, $long, $threadindent) = @_;
my $txt;
if ($threadindent > 0) {
my $marginleft = 0;
$marginleft = 3.3*($threadindent-1) if ($threadindent > 0);
$txt .= "<DIV class='threadreply' style='margin-left: $marginleft"."em'>";
} else {
$txt .= "<DIV class='threadnew'>";
}
$txt .= &MacroComments($itself, $id, $up, $long, $threadindent)."</DIV>";
if ($threadindent >= 1) {
$txt .= "<A name='$up'></A>";
}
if (int(rand(0)) == 0 and $MyAdCounter < 100) { # 여기서부터 닫는 중괄호까지 추가
$MyAdCounter++;
$txt .= <<EOF
<p />
<div>
구글 광고 스크립트
</div>
EOF
}
return $txt;
}
if ($threadindent ne '') {
if ($threadindent >= 0) { # "새글쓰기"도 감추고 싶다면 1 대신 0으로 할 것
sub GetHtmlHeader {
....
# 주석처리 $bodyExtra .= qq(ondblclick="location.href='$ScriptName?action=edit&id=$id'");
....
}
sub EmoticonSubst {
...중략...
# $txt =~ s/(\s)\:[-]*\)([^A-z])/$1$e4$2/g; (\s)를 없애준다.
$txt =~ s/\:[-]*\)([^A-z])/$1$e4$2/g;
sub GetEditGuide {
my ($id, $rev) = @_;
my $result = "\n<HR class='footer'>\n<DIV class='editguide'>";
# print "<HR class='footer'>\n" if (!&GetParam('embed', $EmbedWiki));
# 구글광고
$result .= <<EOF;
<DIV style="float: left">
여기에 구글광고 코드 삽입
</DIV>
EOF
# 여기까지
my $aladdin_url = "http://www.aladdin.co.kr/shop/wproduct.aspx?ISBN=$num&TTBKey=ttb키값";
