Jump to content

Submit Listing Requirement


Lee Wilson1424296153

Recommended Posts

I need the ability to limit the number of entries based upon directory.

 

What I need to achieve is as follows:

 

I am using noixacl to create new joomla access groups so that I can achieve three levels of access across 3 jreviews directories on one site.

 

User group 1 can submit 1 listing to directory 1 only

User group 2 can submit 1 listing to directory 1 and unlimted to directory 2

User group 3 can submit 1 listing to directory 1 and unlimited to entries to directory 2 & 3

 

In essence I am only limiting listing submissions to the fiest directory.

 

I have access groups set up so this part works... the only limitation / issue at present is restricting the single entry in directory 1. I'm not sure whether the user groups have any bearing on what I am looking to achieve, but have included this information anyway.

 

I am looking for someone to come up with the code that will allow me to do this.

 

I was looking at another post that only limited a single entry using the create.thtml file, whether this can be built upon I don't know...

 

<?php

$user =& JFactory::getUser();

$userID = $user->get('id');

$qry = 'SELECT count(*) COUNT FROM `jos_content` where created_by=' . $userID;

$res = mysql_query($qry);

$numPosts = $res['COUNT'];

if($numPosts >= 1)

{

  return 'You already submitted a listing';

}

?>

 

Please contat me urgently if this is of interest to you...

 

Thanks

Link to comment
  • 4 weeks later...
×
×
  • Create New...