Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

Greyed out Post New button mod

Quote Reply
Greyed out Post New button mod
Here's a little mod that I did. I didn't like the "Post New" button being greyed out and unclickable for guests. This mod tweaks the "Post New" button so that guests are taken directly to the Sign Up page, and works as normal for those already logged in.

In the forum_view.html template, I changed:

<input type="submit"<%unless user_forum_permission >= 5%> disabled<%endif%> name="do=post_write;forum=<%forum_id%>" value="Post New" class="submit">


to this:

<input type="submit" name="do=<%if user_forum_permission <= 5%>user_signup<%else%>post_write<%endif%>;forum=<%forum_id%>" value="Post New" class="submit">

Or if you'd prefer to take them to the Log In page instead:

<input type="submit" name="do=<%if user_forum_permission <= 5%>login<%else%>post_write<%endif%>;forum=<%forum_id%>" value="Post New" class="submit">

Last edited by:

Katana Man: Feb 6, 2002, 1:30 PM
Quote Reply
Re: [Katana Man] Greyed out Post New button mod In reply to
Just a thought - you could also add an "<%if current_user_id%>" in there somewhere; that way, if it is already a logged in user without permission, they won't be taken to the signup or login page. The "current_user_id" variable is only set for logged in users.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com