Ok guys, it works and perhaps somebody would use it too ...
1. insert a field names order_form in Table "users" (tinyint = 1).
2. profil.php
find:
if ($form['link_to_new_win'] != '1') $form['link_to_new_win'] = '0';
after it
if ($form['order_form'] != '1') $form['order_form'] = '0';
The replace this
$result = $db->query('SELECT username, email, title, realname, url, icq, msn, aim, yahoo, location, use_avatar, signature, disp_topics, disp_posts, email_setting, save_pass, notify_with_post, smilies, show_img, show_avatars, show_sig, link_to_new_win, timezone, style, num_posts, status, last_post, registered, admin_note FROM '.$db->prefix.'users WHERE id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
with this
$result = $db->query('SELECT username, email, title, realname, url, icq, msn, aim, yahoo, location, use_avatar, signature, disp_topics, disp_posts, email_setting, save_pass, notify_with_post, smilies, show_img, show_avatars, order_form, show_sig, link_to_new_win, timezone, style, num_posts, status, last_post, registered, admin_note FROM '.$db->prefix.'users WHERE id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
The find this
<?php echo $lang_prof_reg['Save user/pass info'] ?></div>
<input type="checkbox" name="form[save_pass]" value="1"<?php if ($user['save_pass'] == '1') echo ' checked' ?>>
<?php echo $lang_prof_reg['Save user/pass'] ?>
and replace it with this
<input name="form[order_form]" type="checkbox" value="1" <?php if ($user['order_form'] == '1') echo ' checked' ?>>
I would read the newest postings first.
</p>
</div>
<div style="padding-left: 4px"><?php echo $lang_prof_reg['Save user/pass info'] ?></div>
<input type="checkbox" name="form[save_pass]" value="1"<?php if ($user['save_pass'] == '1') echo ' checked' ?>>
<?php echo $lang_prof_reg['Save user/pass'] ?>
3. viewtopic.php
find this
$result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.status, u.registered, u.admin_note, p.id, p.poster, p.poster_id, p.poster_ip, p.poster_email, p.message, p.smilies, p.posted, p.edited, p.edited_by FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$disp_posts) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
and replace with this
if ($cur_user['order_form'] == '1')
$result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.status, u.registered, u.admin_note, p.id, p.poster, p.poster_id, p.poster_ip, p.poster_email, p.message, p.smilies, p.posted, p.edited, order_form, p.edited_by FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id WHERE p.topic_id='.$id.' ORDER BY p.id DESC LIMIT '.$start_from.','.$disp_posts) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
else
$result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.status, u.registered, u.admin_note, p.id, p.poster, p.poster_id, p.poster_ip, p.poster_email, p.message, p.smilies, p.posted, p.edited, order_form, p.edited_by FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$disp_posts) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
Thanks too gary, who gives me the idea for this option ...
Well, i wish u a nice weekend guys and thx for this awesome forum ....
Michaela