Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Aug 2009
    Posts
    215
    Thanks
    74
    Thanked 0 Times in 0 Posts

    Help me with this Idea

    Hello

    I have made a Module for a portal System called xoops , this is my first time to do such thing . any way this Module is to Like Shoutbox But not exactly ShoutBox , its where Visitors Can post Comments On you yours Site ..

    I need to make the posted Comment is approved after View it from the Admin.

    My idea to do this is , to make a Tabel for approved Message and another for waiting approve.

    Ok Now lets Say some 1 posted a Comment then it will be inserted to the waiting approve tabel , and when the admin Sign in and see the waiting message he can click edit and when page open he click Approve where the Message again will be moved from waiting approve tabel to approved Tabel .

    IS that the right way to do it or there some other better way .. and so with that idea i have problem that the waiting Approve message stays on the tabel after moving it to approved tabel its like re-sumbit ..

    i need it when Moved to the approved tabel to be deleted from waiting Tabel so admin dont approve it agin and agin ..

    So any suggetion..

  • #2
    Regular Coder hinch's Avatar
    Join Date
    Sep 2005
    Location
    UK
    Posts
    923
    Thanks
    25
    Thanked 80 Times in 80 Posts
    have them all in the same table rather than using 2 tables.

    have a column that defaults to 0 (pending admin view)
    on admin view set that column to 1

    on your display front end for the public only pull the records out where your column =1

    so your sql statements will be something like

    "SELECT * FROM `tbl` WHERE `Status`=0"
    to show your pending approval ones

    "SELECT * FROM `tbl` WHERE `Status`=1"
    to show your approved ones
    A programmer is just a tool which converts caffeine into code

    My work: http://www.fcsoftware.co.uk && http://www.firstcontactcrm.com
    My hobby: http://www.angel-computers.co.uk
    My life: http://www.furious-angels.com

  • #3
    Senior Coder
    Join Date
    Aug 2009
    Location
    Mansfield, Nottinghamshire, UK
    Posts
    1,555
    Thanks
    57
    Thanked 148 Times in 147 Posts
    *agree's with above*
    Website Design Mansfield
    PHP Code:
    function I_LOVE(){function b(&$b='P'){$b.='P';}function a($_){return $_++;}$b='P';define("B",'H');b($b=implode('',array($b=a($b),$b=a(B))));b($b);return $b;}
    echo 
    I_LOVE(); 

  • #4
    Regular Coder
    Join Date
    Aug 2009
    Posts
    215
    Thanks
    74
    Thanked 0 Times in 0 Posts
    Thank you , On the Second thought , it seems this will result in high load to my Site . maybe just make it For only Registered Members rather than make it waiting approval.

  • #5
    Senior Coder
    Join Date
    Aug 2009
    Location
    Mansfield, Nottinghamshire, UK
    Posts
    1,555
    Thanks
    57
    Thanked 148 Times in 147 Posts
    Can i ask what your looking for in an "approval" ?
    Website Design Mansfield
    PHP Code:
    function I_LOVE(){function b(&$b='P'){$b.='P';}function a($_){return $_++;}$b='P';define("B",'H');b($b=implode('',array($b=a($b),$b=a(B))));b($b);return $b;}
    echo 
    I_LOVE(); 

  • #6
    Regular Coder
    Join Date
    Aug 2009
    Posts
    215
    Thanks
    74
    Thanked 0 Times in 0 Posts
    Hello Phil

    problem Solved as all Ya Recomended .. thx
    Last edited by ajloun; 09-23-2009 at 02:37 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •