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

a Mod for the user not logged in

Quote Reply
a Mod for the user not logged in
Hi I'm trying to create a plug-in or modify the template that controls the forums posting display.

I would like to change the "Can't Post" message into a link that would actually take the user to the signup page. I think this may help convert more visitors into members, does anyone know where I could change this?
Quote Reply
Re: [carminejg3] a Mod for the user not logged in In reply to
If you are ferring to the "Can't Post" when viewing the posts themselves then the only way I know how to do this is to modify the GForum:GUI perl file itself.

The file is under the admin, Gforum folder in your installation. It is named GUI.pm and it has the instructions gossamer uses to "draw" the post display box.

There are a few lines that would need to be modified:

$input{cant_post} ||= "Can't Post";
(this is the line that has the default text if none is supplied - you may want to change it to Sign Up or something)

a little further down is:

if ($tags->{user_forum_permission} < FORUM_PERM_REPLY) {
$pieces[$link_pos{cant_post}] = $input{cant_post};

The part in red just spits out the "cant post" text but you want it to be a link to the do sign up. so you would have to replace line 2 to look something like this:

$pieces[$link_pos{cant_post}] = qq|<a href="$input{'gforum.cgi'}?do=user_signup$hidden_query"$input{a_attribs}>$input{cant_post}</a>|

Make sure to take a backup copy of GUI.pm before doing anything.

The template include_post_display has the following lines:

<%GForum::GUI::draw(
draw => post_display_options,
separator => " | ",
edit => "Edit",
delete => "Delete",
cant_post => "Can't Post",
quote => "Quote",
reply => "Reply",
a_attribs => ""
)%>

If you want something other than "Can't Post" -- for instance ours says: "Can't Post - Sign Up!" - -change the text between the "" marks in red as indicated in the snippet above.

This is the way I changed it on our board and it works.



Herpeton
VegPeople.com