Hi:
I have found this to be a really useful addition of Forum- thanks Alex. And, like Paul, I decided to make this the "normal" way I run forum- so thanks Paul for the fix os "*" vs. "+"- I would have never figured this out!
Anyway, after doing the conversion, I had some users complain that now when they click on a thread, they are no longer forwarded to the first NEW post in the thread- they just go to the top of the thread. So I checked the code, and sure enough, that is the case!
So, I figure this would ONLY be a problem if you are a registered user, and logged in... the SE's and such do not log in... so I made the following changes. Thought I would post them- they are pretty obvious if you think about it- but figured if you did not think about it, this easy mod might escape you!
in forum_view.html, beneath:
<%if post_moved%><B>Post Moved:</B> <%endif%>
add this:
<%if current_user_id%>
<a href="gforum.cgi?post=<%if post_moved%><%post_moved_id%><%else%><%post_id%><%endif%>;sb=<%sb%>;so=<%so%>;forum_view=<%this_do%>;<%hidden_query%><%if current_user_default_post_display == 1%><%if post_depth%>#<%post_id%><%elsif current_user_jump_to_unread%>;page=unread#unread<%endif%><%endif%>">
<%else%>
<a href="<%cat_path($cat_id)%><%escape_name($forum_name)%>_F<%forum_id%>/<%escape_name($post_subject)%>_P<%if post_moved%><%post_moved_id%><%else%><%post_id%><%endif%>/">
<%endif%>
<%endif%>
in place of this:
<a href="<%cat_path($cat_id)%><%escape_name($forum_name)%>_F<%forum_id%>/<%escape_name($post_subject)%>_P<%if post_moved%><%post_moved_id%><%else%><%post_id%><%endif%>/">
And just a bit further down, replace:
<a href="<%cat_path($cat_id)%><%escape_name($forum_name)%>_F<%forum_id%>/<%escape_name($post_subject)%>_P<%post_id%>/">
with:
<%if current_user_id%>
<a href="gforum.cgi?post=<%if post_moved%><%post_moved_id%><%else%><%post_id%><%endif%>;sb=<%sb%>;so=<%so%>;forum_view=<%this_do%>;<%hidden_query%><%if current_user_default_post_display == 1%><%if post_depth%>#<%post_id%><%elsif current_user_jump_to_unread%>;page=unread#unread<%endif%><%endif%>">
<%else%>
<a href="<%cat_path($cat_id)%><%escape_name($forum_name)%>_F<%forum_id%>/<%escape_name($post_subject)%>_P<%post_id%>/">
<%endif%>
Now, all un-signed-in users (including SE bots) will get the modified URL's, but your real users will get the old URL which takes them to the first unread post!
Good Luck!
dave
Big Cartoon DataBase
Big Comic Book DataBase
I have found this to be a really useful addition of Forum- thanks Alex. And, like Paul, I decided to make this the "normal" way I run forum- so thanks Paul for the fix os "*" vs. "+"- I would have never figured this out!
Anyway, after doing the conversion, I had some users complain that now when they click on a thread, they are no longer forwarded to the first NEW post in the thread- they just go to the top of the thread. So I checked the code, and sure enough, that is the case!
So, I figure this would ONLY be a problem if you are a registered user, and logged in... the SE's and such do not log in... so I made the following changes. Thought I would post them- they are pretty obvious if you think about it- but figured if you did not think about it, this easy mod might escape you!
in forum_view.html, beneath:
<%if post_moved%><B>Post Moved:</B> <%endif%>
add this:
<%if current_user_id%>
<a href="gforum.cgi?post=<%if post_moved%><%post_moved_id%><%else%><%post_id%><%endif%>;sb=<%sb%>;so=<%so%>;forum_view=<%this_do%>;<%hidden_query%><%if current_user_default_post_display == 1%><%if post_depth%>#<%post_id%><%elsif current_user_jump_to_unread%>;page=unread#unread<%endif%><%endif%>">
<%else%>
<a href="<%cat_path($cat_id)%><%escape_name($forum_name)%>_F<%forum_id%>/<%escape_name($post_subject)%>_P<%if post_moved%><%post_moved_id%><%else%><%post_id%><%endif%>/">
<%endif%>
<%endif%>
in place of this:
<a href="<%cat_path($cat_id)%><%escape_name($forum_name)%>_F<%forum_id%>/<%escape_name($post_subject)%>_P<%if post_moved%><%post_moved_id%><%else%><%post_id%><%endif%>/">
And just a bit further down, replace:
<a href="<%cat_path($cat_id)%><%escape_name($forum_name)%>_F<%forum_id%>/<%escape_name($post_subject)%>_P<%post_id%>/">
with:
<%if current_user_id%>
<a href="gforum.cgi?post=<%if post_moved%><%post_moved_id%><%else%><%post_id%><%endif%>;sb=<%sb%>;so=<%so%>;forum_view=<%this_do%>;<%hidden_query%><%if current_user_default_post_display == 1%><%if post_depth%>#<%post_id%><%elsif current_user_jump_to_unread%>;page=unread#unread<%endif%><%endif%>">
<%else%>
<a href="<%cat_path($cat_id)%><%escape_name($forum_name)%>_F<%forum_id%>/<%escape_name($post_subject)%>_P<%post_id%>/">
<%endif%>
Now, all un-signed-in users (including SE bots) will get the modified URL's, but your real users will get the old URL which takes them to the first unread post!
Good Luck!
dave
Big Cartoon DataBase
Big Comic Book DataBase