

when uploading new article in admin mode, i'd like to
the 'yes' for 'Display Topic Image' as default(currently, 'no' as default)
could u give me answer for how i modify with related-scripts?
thanks!

//Begin: QuickReply Hack
$post_id=$key1;
//End: QuickReply Hack
//Begin: QuickReply Hack
$post_id=$eachpost->postid();
//End: QuickReply Hack
//Begin: QuickReply Hack
if (!empty($post_id)){
$sql = "SELECT forum_type, forum_name, forum_access, allow_html, allow_sig, posts_per_page, hot_threshold, topics_per_page FROM ".$xoopsDB->prefix("bb_forums")." WHERE forum_id = $forum";
if ( !$result = $xoopsDB->query($sql) ) {
} else {
$forumdata = $xoopsDB->fetchArray($result);
$myts =& MyTextSanitizer::getInstance();
if ( $forumdata['forum_type'] == 1 ) {
$accesserror = 0; //initialize
if ( $xoopsUser ) {
if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
if ( !check_priv_forum_auth($xoopsUser->uid(), $forum, true) ) {$accesserror = 1;};
};
} else {$accesserror = 1;};
} else {
$accesserror = 0;
if ( $forumdata['forum_access'] == 3 ) {
if ( $xoopsUser ) {
if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
if ( !is_moderator($forum, $xoopsUser->uid()) ) {$accesserror = 1;};
};
} else {$accesserror = 1;};
} elseif ( $forumdata['forum_access'] == 1 && !$xoopsUser ) {$accesserror = 1;};
};
if ( $accesserror != 1 ) {
include_once 'class/class.forumposts.php';
$forumpost = new ForumPosts($post_id);
$r_message = $forumpost->text();
$r_date = formatTimestamp($forumpost->posttime());
$r_name = ($forumpost->uid() != 0) ? XoopsUser::getUnameFromId($forumpost->uid()) : $xoopsConfig['anonymous'];
$r_content = _MD_BY." ".$r_name." "._MD_ON." ".$r_date."
";
$r_content.= $r_message;
$r_subject = $forumpost->subject();
if (!preg_match("/^Re:/i",$r_subject)) {$qa['subject'] = 'Re: '.$myts->htmlSpecialChars($r_subject);} else {$qa['subject'] = $myts->htmlSpecialChars($r_subject);};
$q_message = $forumpost->text("Quotes");
$hidden = "["."quote]\n";
$hidden .= sprintf(_MD_USERWROTE,$r_name);
$hidden .= "\n".$q_message."["."/quote]";
$message = "";
$pid = $post_id;
unset($post_id);
$topic_id = $forumpost->topic();
$forum = $forumpost->forum();
$isreply =1;
$istopic = 0;
include_once XOOPS_ROOT_PATH."/class/xoopslists.php";
include XOOPS_ROOT_PATH."/include/xoopscodes.php";
$lists = new XoopsLists;
$filelist = $lists->getSubjectsList();
$count = 1;
$qa['icons_list'] = '';
while ( list($key, $file) = each($filelist) ) {
$checked = "";
if ( isset($icon) && $file==$icon ) {$checked = " checked='checked'";}
$qa['icons_list'].=" ";
$qa['icons_list'].="";
if ( $count == 8 ) {
$qa['icons_list'].="
";
$count = 0;
};
$count++;
};
ob_start();
xoopsCodeTarea("message");
if ( !empty($isreply) && isset($hidden) && $hidden != "" ) {
echo "";
echo "
";
}
xoopsSmilies("message");
$qa['message_area']=ob_get_contents();
ob_clean();
//-- Options
if ( $xoopsUser && $forumdata['forum_access'] == 2 && !empty($post_id) ) {
echo " if ( isset($noname) && $noname ) {
echo " checked='checked'";
};
echo " /> "._MD_POSTANONLY."
\n";
};
echo " if ( isset($nosmiley) && $nosmiley ) {
echo " checked='checked'";
};
echo " /> "._MD_DISABLESMILEY."
\n";
if ( $forumdata['allow_html'] ) {
echo " if ( $nohtml ) {
echo " checked='checked'";
};
echo " /> "._MD_DISABLEHTML."
\n";
} else {
echo "";
};
if ( $forumdata['allow_sig'] && $xoopsUser ) {
echo " if (isset($HTTP_POST_VARS['contents_preview'])) {
if ( $attachsig ) {
echo " checked='checked' /> ";
} else {
echo " /> ";
};
} else {
if ($xoopsUser->getVar('attachsig') || !empty($attachsig)) {
echo " checked='checked' /> ";
} else {
echo "/> ";
};
};
echo _MD_ATTACHSIG."
\n";
};
if (!empty($xoopsUser) && !empty($xoopsModuleConfig['notification_enabled'])) {
echo "";
echo " // Check previous subscribed status...
$notification_handler =& xoops_gethandler('notification');
if (!empty($topic_id) && $notification_handler->isSubscribed('thread', $topic_id, 'new_post', $xoopsModule->getVar('mid'), $xoopsUser->getVar('uid'))) {
echo ' checked="checked"';
};
echo " /> "._MD_NEWPOSTNOTIFY."
\n";
};
$qa['options_area']=ob_get_contents();
ob_clean();
//--Ñàáìèò è õèääåíû
$post_id = isset($post_id) ? intval($post_id) : '';
$topic_id = isset($topic_id) ? intval($topic_id) : '';
$order = isset($order) ? intval($order) : '';
$pid = isset($pid) ? intval($pid) : 0;
echo "
} else {
echo "viewforum.php?forum=".intval($forum)."\"'";
};
echo " class='formButton' value='"._MD_CANCELPOST."' />";
$qa['submit_area']=ob_get_contents();
ob_end_clean();
$xoopsTpl->assign("qa",$qa);
};
};
};
//Begin: QuickReply Hack
//Begin: Autologin hack
if ((empty($HTTP_SESSION_VARS['xoopsUserId'])) && (!empty($HTTP_COOKIE_VARS['al_pass'])&&(!empty($HTTP_COOKIE_VARS['al_uid'])))) {
$al_uid=$HTTP_COOKIE_VARS['al_uid'];
$pass=trim($HTTP_COOKIE_VARS['al_pass']);
$member_handler =& xoops_gethandler('member');
$user =& $member_handler->getUser($al_uid);
if (is_object($user)) {
$uname= $user->getVar('uname');
} else {
unset($uname);
};
unset($user);
$myts =& MyTextsanitizer::getInstance();
$user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($uname)), addslashes($myts->stripSlashesGPC($pass)),true);
if ($user != false){
setcookie('al_pass', $pass, time()+86400*100,'/','',0);
setcookie('al_uid',$user->uid(),time()+86400*100,'/','',0);
$user->setVar('last_login', time());
if (session_id()==''){session_destroy(); session_start();};
$HTTP_SESSION_VARS = array();
$HTTP_SESSION_VARS['xoopsUserId'] = $user->getVar('uid');
$HTTP_SESSION_VARS['xoopsUserGroups'] = $user->getGroups();
if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
setcookie($xoopsConfig['session_name'], session_id(), time()+$xoopsConfig['session_expire'], '/', '', 0);
$HTTP_COOKIE_VARS[$xoopsConfig['session_name']]=session_id();
}
$user_theme = $user->getVar('theme');
if (in_array($user_theme, $xoopsConfig['theme_set_allowed'])) {
$HTTP_SESSION_VARS['xoopsUserTheme'] = $user_theme;
}
};
};
//End: Autologin Hack
//Begin: Autologin hack
function &loginUser($uname, $pwd, $al_login = false)
{
$criteria = new CriteriaCompo(new Criteria('uname', $uname));
if (!$al_login){$mypwd=md5($pwd);} else {$mypwd=$pwd;};
$criteria->add(new Criteria('pass', $mypwd));
$user =& $this->_uHandler->getObjects($criteria, false);
if (!$user || count($user) != 1) {
return false;
}
return $user[0];
}
//End: Autologin hack
//Begin: Autologin hack
function &loginUser($uname, $pwd, $al_login = false)
{
$criteria = new CriteriaCompo(new Criteria('uname', $uname));
$criteria->add(new Criteria('pass', $pwd));
$user =& $this->_uHandler->getObjects($criteria, false);
if (!$user || count($user) != 1) {
return false;
}
return $user[0];
}
//End: Autologin hack
//Begin: Autologin hack
if (!empty($HTTP_POST_VARS['union_al'])&&($HTTP_POST_VARS['union_al']=='Yes')){
setcookie('al_pass', md5($pass), time()+86400*100,'/','',0);
setcookie('al_uid',$user->uid(),time()+86400*100,'/','',0);
};
//End: Autologin hack
//Begin: Autologin hack
setcookie('al_pass', '', time()-33600,'/','',0);
setcookie('al_uname', '', time()-33600,'/','',0);
setcookie('al_uid', '', time()-3600,'/','',0);
//End: Autologin hack
<input type="checkbox" name="union_al" value="Yes">Remember password<br>