solved Disable Guestbook Limit?

Bandwerkstatt
Bandwerkstatt
@bandwerkstatt
9 years ago
224 posts
How can i disable the Guestbook Limit if someone already signed in?
It makes no sense for me to sign only one time into a guestbook.


Do i have to set limit to zero '0', or false? Or should i set these lines as comments // ?

    // See if we have already signed...
    $_sp = array(
        'search'         => array(
            "_user_id = {$_user['_user_id']}",
            "guestbook_owner_id = {$pid}"
        ),
        'limit'          => 1,
        'skip_triggers'  => true,
        'ignore_pending' => true,
        'privacy_check'  => false,
        'return_count'   => true
    );
    $cnt = jrCore_db_search_items('jrGuestBook', $_sp);
    if (isset($cnt) && $cnt > 0) {
        $_res = array('error' => $_lng['jrGuestBook'][21]);
        jrCore_json_response($_res);
    }

btw. it would be good to set this at the quota settings (for an upcoming update)
updated by @bandwerkstatt: 02/26/15 10:21:51AM
Bandwerkstatt
Bandwerkstatt
@bandwerkstatt
9 years ago
224 posts
i have set the limit to zero, it works.

thanks for your help
brian
@brian
9 years ago
10,148 posts
SelfmadeClub:
It makes no sense for me to sign only one time into a guestbook.

That's the definition of a Guest Book...


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags