Page 1 of 5 123 ... LastLast
Results 1 to 10 of 47
Like Tree3Likes

Thread: Remove Required Login for Generating Reviews (90% Complete)

  1. #1
    Thread Starter
    luxor's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    599
    Thanks
    8
    Thanked 141 Times in 74 Posts

    Remove Required Login for Generating Reviews (90% Complete)

    A lot of us don't need people to register just to leave a review, so this tutorial will show you how to edit the files within a child-theme.

    Just take note that as of now, 4/8/13, the code below is 90% complete as I'm not 100% familiar with PHP. So I am sure someone will come along and help put the rest together!


    The entire "Review Process" revolves around wordpress's /wp-comments-post.php file, which controls comments. If you have a captcha plugin, then you will need to edit some of the html/php to make the captcha form appear.

    These are the files we are editing:

    Vantage/single-listings.php
    Vantage/form-review.php
    Vantage/reviews-listings.php

    1. Starting with single-listings.php:

    Look for the following PHP code:

    PHP Code:
    <?php if ( $review_id va_get_user_review_idget_current_user_id(), get_the_ID() ) ) : ?>
            <p>
                <?php _e'You have already reviewed this listing.'APP_TD ); ?>
            </p>
        <?php elseif ( va_user_can_add_reviews() ) : ?>
            <?php appthemes_load_template'form-review.php' ); ?>
        <?php elseif ( get_current_user_id() == get_the_author_meta('ID') ) : ?>
            <p>
                <?php _e"You can't review your own listing."APP_TD ); ?>
            </p>
        <?php elseif ( !is_user_logged_in() ) : ?>
            <p>
                <?php printf__"Please %s to add your review."APP_TD ), html_linkwp_login_url(), __'login'APP_TD ) ) ); ?>
            </p>
        <?php endif; ?>
    Delete it and replace it with:

    PHP Code:
        <?php if ( $review_id va_get_user_review_idget_current_user_id(), get_the_ID() ) ) : ?>
            <p>
                <?php _e'You have already reviewed this listing.'APP_TD ); ?>
            </p>
        <?php elseif ( !is_user_logged_in() ) : ?>
            <?php appthemes_load_template'form-review.php' ); ?>
        <?php elseif ( get_current_user_id() == get_the_author_meta('ID') ) : ?>
            <p>
                <?php _e"You can't review your own listing."APP_TD ); ?>
            </p>
        <?php endif; ?>
    This removes the "login link" and makes it so that all "non-logged in" users (the public) can leave a review.

    It will look like this:








    REMEMBER: This review system utilizes /wp-comments-post.php therefore trying to leave a review at this step will give an ERROR:

    ERROR: please fill the required fields (name, email).

    Therefore, we must now edit - Vantage/form-review.php
    Attached Images Attached Images

  2. The Following 2 Users Say Thank You to luxor For This Useful Post:

    jmega (April 9th, 2013), romainvincent (May 17th, 2013)

  3. #2
    Thread Starter
    luxor's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    599
    Thanks
    8
    Thanked 141 Times in 74 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Attached Images Attached Images

  4. The Following User Says Thank You to luxor For This Useful Post:

    jmega (April 9th, 2013)

  5. #3
    Thread Starter
    luxor's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    599
    Thanks
    8
    Thanked 141 Times in 74 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Attached Images Attached Images

  6. The Following 2 Users Say Thank You to luxor For This Useful Post:

    crixx (May 28th, 2013), jmega (April 9th, 2013)

  7. #4
    Thread Starter
    luxor's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    599
    Thanks
    8
    Thanked 141 Times in 74 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  8. The Following User Says Thank You to luxor For This Useful Post:

    jmega (April 9th, 2013)

  9. #5
    Thread Starter
    luxor's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    599
    Thanks
    8
    Thanked 141 Times in 74 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    tbase likes this.

  10. The Following 3 Users Say Thank You to luxor For This Useful Post:

    archersoftech (May 15th, 2013), jmega (April 9th, 2013), tbase (April 8th, 2013)

  11. #6
    Veteran tbase's Avatar
    Join Date
    Feb 2010
    Location
    Idaho
    Posts
    2,018
    Thanks
    246
    Thanked 67 Times in 64 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    [CENTER]


    TreasureValleyBusiness.com

    [/CENTER]

  12. #7
    Thread Starter
    luxor's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    599
    Thanks
    8
    Thanked 141 Times in 74 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  13. #8
    Thread Starter
    luxor's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    599
    Thanks
    8
    Thanked 141 Times in 74 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  14. #9
    Expired Customer jmega's Avatar
    Join Date
    Apr 2013
    Location
    Canada
    Posts
    5
    Thanks
    6
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  15. #10
    Veteran tbase's Avatar
    Join Date
    Feb 2010
    Location
    Idaho
    Posts
    2,018
    Thanks
    246
    Thanked 67 Times in 64 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    [CENTER]


    TreasureValleyBusiness.com

    [/CENTER]

Page 1 of 5 123 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Similar Threads

  1. Login not needed for reviews
    By waboom in forum Vantage General Discussion (Legacy)
    Replies: 12
    Last Post: April 9th, 2013, 04:51 AM
  2. /classipress/includes/forms/login/wp-login.php required!
    By sp33dit in forum Report ClassiPress Bugs
    Replies: 4
    Last Post: November 16th, 2012, 10:55 AM
  3. Remove Required Login for Classipress users
    By esme86 in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: July 18th, 2012, 04:38 AM