Quote:
Originally Posted by studify
Code:
if(!$adtype){
$item["adtype"] = 1;
} else {
$item["adtype"] = $adtype;
}
|
Code:
Even if your additional check is 100% correct, I prefer to avoid giving default values, as you never know where the link comes from. As this URL is accessible only from 2 menu options, and on these options there is the adtype=xx, means that the link is not really comes from a normal menu option. eg maybe a bot.
[quote=studify;2431133]
$item["userid"] = $vbulletin->userinfo['userid'];
$checkuserid = $item["userid"];
$docheckmax = getCheckMaxAds($checkuserid);//EDITED cause of permission
Why do you think that this is mistaken? First of all have you seen that the function getCheckMaxAds, calls another function getMaxAllowed ? Also have you understood how this function works? eg My primary usergroup is Registered Member which allows me to have 3 concurrent Ads. But at the same time I'm member (additional usergroupids) to VIP usergroup, which allows me 5 concurrent Ads. These 2 functions will return the maximum allowed value, which in this example is: 5.
But to be honest I haven't checked it in this version. But as these 2 functions are copy&paste from my previous Classifieds addon where it has been tested globaly, I can't see a reason that they don't work. But as I said, I haven't tested it, so you maybe be right and thank you for reporting it.