1
sarahmx
mylinks admin submission auto approve
  • 2007/12/28 12:43

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


when i submit a link through front end i as an admin have to approve the video at backend


how do make auto approve link submission for admin at front end



thank you

2
trabis
Re: mylinks admin submission auto approve
  • 2007/12/28 13:52

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Hello sarahmx,
I supose you have autoaprove disable for users so, to enable autoaprove for the admin of the site:

in submit.php line 85
change to this:
if ( $xoopsModuleConfig['autoapprove'] == || $xoopsUser->isAdmin()) {
        
// RMV-FIXME: shouldn't this be 'APPROVE' or something (also in mydl)?
        
$status $xoopsModuleConfig['autoapprove'];
    } else {
        
$status 0;
    }


I have not tried but should work.

3
sarahmx
Re: mylinks admin submission auto approve
  • 2007/12/28 16:11

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


i've updated the module and cleared templates_c but not working for me..the link is put in
- Links Waiting for Validation

yes i disable the auto approve
but for admin i want it to be auto approve...there is no option to do this right now

4
sarahmx
Re: mylinks admin submission auto approve
  • 2007/12/28 16:18

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


line 85
if ( $xoopsModuleConfig['autoapprove'] == ) {
        
// RMV-FIXME: shouldn't this be 'APPROVE' or something (also in mydl)?
        
$status $xoopsModuleConfig['autoapprove'];
    } else {
        
$status 0;
    }


line 109
-------

if ( $xoopsModuleConfig['autoapprove'] == ) {
        
$notification_handler->triggerEvent('global'0'new_link'$tags);
        
$notification_handler->triggerEvent('category'$cid'new_link'$tags);
        
redirect_header("index.php",2,_MD_RECEIVED."<br />"._MD_ISAPPROVED."");
    }else{


Which line do i have to edit

5
Catzwolf
Re: mylinks admin submission auto approve
  • 2007/12/28 16:36

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Try changing line 85 to this:

Quote:

if ( is_object( $xoopsUser ) && $xoopsUser->isAdmin() ) {
$status = 1;
} elseif ( $xoopsModuleConfig['autoapprove'] == 1 ) {
// RMV-FIXME: shouldn't this be 'APPROVE' or something (also in mydl)?
$status = $xoopsModuleConfig['autoapprove'];
} else {
$status = 0;
}

6
sarahmx
Re: mylinks admin submission auto approve
  • 2007/12/28 16:55

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


yes that works thank you to both of you trabis and catwolf

happy new year

7
Catzwolf
Re: mylinks admin submission auto approve
  • 2007/12/28 17:50

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Glad you got it working,

Happy New year to you as well,

Catz

Login

Who's Online

211 user(s) are online (141 user(s) are browsing Support Forums)


Members: 0


Guests: 211


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits