#5 A way to remove quotes being approved

open
nobody
None
5
2013-02-19
2010-06-12
Anonymous
No

I would like to know a way so quotes do not have to be approved by an admin they just go sight onto the site

Discussion

  • tyteen4a03
    tyteen4a03
    2010-07-10

    I seriously do not recommend a quote system without quote approving, which can lead to spam. But if you want it, here it is.

    This has not been tested, but should work.

    Find:
    if (ini_get("magic_quotes_runtime") or ini_get("magic_quotes_gpc")) {
    $sql = "INSERT INTO ".$_qdbs[tpfx]."queue (id,quote) VALUES ('NULL', '".mysql_real_escape_string(stripslashes($quote))."')";
    } else {
    $sql = "INSERT INTO ".$_qdbs[tpfx]."queue (id,quote) VALUES ('NULL', '".mysql_real_escape_string($quote)."')";
    }

    Replace with:
    if (ini_get("magic_quotes_runtime") or ini_get("magic_quotes_gpc")) {
    $sql = "INSERT INTO ".$_qdbs[tpfx]."quotes (id,quote) VALUES ('NULL', '".mysql_real_escape_string(stripslashes($quote))."')";
    } else {
    $sql = "INSERT INTO ".$_qdbs[tpfx]."quotes (id,quote) VALUES ('NULL', '".mysql_real_escape_string($quote)."')";
    }

    Pretty much it. The rest you need to do is to go into templates and edit out pending quotes (layout_footer) and the message (quote_added). Tell me if you want the quote id to be shown directly after the quote is added.
    -tyteen