Quote: Because it's designed for other users to post on a users profile rather than for the profile owner to enter info, the guestbook doesn't have a form for the profile owner in the way that other modules have (there's no 'create new' on the admin side) so form designer doesn't appear. I would need to hard code the extra form fields and i'm still trying to figure out how to get those fields configured.
Yes, the GuestBook module is a bit different, as you say, because users other than the profile owner can create entries. This is why there is no 'jrGuestBook_create' view in the module's index.php file and the form is included in the module's 'item_index.tpl' template file (lines 19 - 39) -
<div class="item">
{if jrUser_is_logged_in()}
<div id="guestbook_notice" style="display:none;"><!-- any guestbook errors load here --></div>
<form id="gform" method="POST" onsubmit="jrGuestBook_post_entry('{$_profile_id}','#gform','#guestbooks');return false">
<input type="hidden" id="profile_id" name="profile_id" value="{$_profile_id}">
<textarea name="guestbook_text" cols="40" rows="5" class="form_textarea"></textarea>
<br>
<div style="vertical-align:middle">
<img id="form_submit_indicator" src="{$jamroom_url}/skins/{$_conf.jrCore_active_skin}/img/submit.gif" width="24" height="24" alt="{jrCore_lang module="jrCore" id="73" default="working..."}" style="margin:8px 8px 0px 8px;"><input id="guestbook_submit" type="submit" value="{jrCore_lang module="jrGuestBook" id="19" default="sign guest book"}" class="form_button" style="margin-top:8px;">
</div>
</form>
{else}
{jrCore_lang module="jrGuestBook" id="22" default="You must be logged in to post to this guestbook!"}
{/if}
</div>
Quote: Also, the logged into post - I explained that wrong, what I actually want is:
I have three quotas - A,B,C
Only quota A has the module on their profiles
Only quotas A, and B can post to the modules on other (quota A's) profiles
Anyone, logged in or out, can view entries on a quota A's profile
Do this by adding extra conditions to the if statement in the above template code -
{if jrUser_is_logged_in() && ($_user.profile_quota_id == A || $_user.profile_quota_id == B)}
A and B would need to be the numeric values of the quota_id's in question, of course.
You then might want to modify the view_jrGuestBook_sign function in the module index.php as an extra security feature -
jrUser_session_require_login();
if ($_user['profile_quota_id'] != A && $_user['profile_quota_id'] != B) {
jrUser_not_authorized();
}
jrCore_validate_location_url();
with A and B being the numeric quota_ids, as above.
hth
--
Paul Asher - JR Developer and System Import Specialist