1 ms6682 Feb 16, 2006 10:49
3 ms6682 Feb 16, 2006 18:13
First & foremost, thank you very much for your help.
The $theauthor != $current_User->get( 'login' ) correctly verify the condition and it did stop $hit from executing. However, the view count continues to increase.
I guessed $Hit->is_new_view() could still have been executed, it just didn't get logged into db. Hence, if( $dispmore && !$preview && $Hit->is_new_view() ) remains true.
I tried inserting $theauthor != $current_User->get( 'login' ) into _item.class.php but received a 'non-object' error instead. I was thinking if I can get $theauthor value into _item.class.php, your solution might work there... your advice pls.
4 yabba Feb 16, 2006 18:44
Try :-
if ( isset( $current_User ) and $Item->Author->get( 'login') == $current_User->get( 'login' ) ) $Item->set( 'views', $Item->views - 1);
$Item->content();
¥
5 ms6682 Feb 16, 2006 22:06
It works! It finally works!! This community truly rocks!!! Thank you both for your help. I do hope the beta/final release will take this into consideration since there's no reason why the author would want to increase his own view count. I just wanna say 'Thank you' once again. Cheers! :p
6 yabba Feb 17, 2006 00:54
No problem ;)
¥
Give this a try. Make the change in the skin. Go to the bottom and find
and change it to
Then, find this part
and add a line below it: