SMFHacks.com

SMF Classifieds => Support => Topic started by: rotorsrule on October 10, 2007, 02:58:58 am

Title: Different Listing/Auction options needed!
Post by: rotorsrule on October 10, 2007, 02:58:58 am
Right now we have the options of "can have auction listings", which if left unchecked leaves only the "Add listing" link in any category. We also have a "Only auction Listings", which hides the "Add listing" and leaves the "Add auction" link. But it seems is if it is only one or the other..

Several things would be greatly improved if the options were changed... Have the options of "allow listing" and "allow auctions." This way when you create sub-categories you can turn of the option of having users to be able to post anything in the parent category and only in the sub-categories. (Many users wont post listings/auctions in the correct place, and moving them isn't an easy option, and shouldn't have to be done due to users...stupidity..)

For example;

Currently

Fruits <users can post
        Apples <users can post
        Oranges <users can post

If modified

Fruits < users CANNOT post
        Apples <users can post
        Oranges <users can post

I'm just learning PHP and starting to understand how SMF and Classifieds is designed, but it seems fairly simple. Looks like most of the code that needs changing would be around line 74 in classifieds.template.php

echo '<table align="center" width="90%" class="tborder">
         <tr class="windowbg">
         <td>
         ';
         
         if ($context['class_only_auction'])
         {
            echo '<a href="', $scripturl, '?action=classifieds;sa=addauction;cat=', $cat ,'">',$txt['class_text_addauction'],'</a>';
         }
         else
         {
            echo '<a href="', $scripturl, '?action=classifieds;sa=addlisting;cat=', $cat ,'">',$txt['class_text_addlisting'],'</a>';
            
            // Check if the category allows auctions
            if ($context['can_auction'])
               echo '&nbsp;<a href="', $scripturl, '?action=classifieds;sa=addauction;cat=', $cat ,'">',$txt['class_text_addauction'],'</a>';
            
         }
      
         echo '
         </td>
         </tr>
         </table>
         <br />';
Title: Re: Different Listing/Auction options needed!
Post by: SMFHacks on October 10, 2007, 07:21:25 am
If you check "Can have auction listings" this includes both add listing and add auction.

If you check "Only auction Listings"  this just leaves Add Auction

If you do not check "Can have auction listings"  leaves just Add Listing
Title: Re: Different Listing/Auction options needed!
Post by: rotorsrule on October 10, 2007, 08:20:39 am
I know...the whole point was to remove both..
Title: Re: Different Listing/Auction options needed!
Post by: SMFHacks on October 10, 2007, 08:02:16 pm
What would if you remove both?
Like what could the user do or post?
Title: Re: Different Listing/Auction options needed!
Post by: rotorsrule on October 10, 2007, 11:53:29 pm
Exactly, I would like to have the option of users NOT being able to post in the Parent category and only in the Sub Categories..