1
Red_Bee
Restrict the files in My Downloads module based on number of post in the Forum
  • 2005/10/17 9:36

  • Red_Bee

  • Just popping in

  • Posts: 98

  • Since: 2004/5/12


How can I restrict the files in My Downloads module based on number of post in the Forum. I wanted to restrict my video clips so only active members will be able to download it because I have a very limited bandwidth and getting some visitors who just register and download the files without even droping a post.

Example:

File A - only members with more than 30 post in the forum can access
File B - only members with more than 50 post in the forum can access
File C - only members with more than 100 post in the forum can access
......

2
Red_Bee
Re: Restrict the files in My Downloads module based on number of post in the Forum
  • 2005/10/17 14:03

  • Red_Bee

  • Just popping in

  • Posts: 98

  • Since: 2004/5/12


badly need your help. Thank you in advance.
......

3
davidl2
Re: Restrict the files in My Downloads module based on number of post in the Forum
  • 2005/10/17 14:21

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Only way I think you could do this - is to create various user groups, and to assign members to them based on posts (which would have to be manual) and to lock the sections based on membership of the requires group...

However I dont think current download modules would handle this without additional coding?

4
Red_Bee
Re: Restrict the files in My Downloads module based on number of post in the Forum
  • 2005/10/17 22:40

  • Red_Bee

  • Just popping in

  • Posts: 98

  • Since: 2004/5/12


Thanks, any download module that has the feature I ma looking for.
......

5
brash
Re: Restrict the files in My Downloads module based on number of post in the Forum
  • 2005/10/17 22:45

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Great idea, but there is currently no download module with this functionality. You will need to hire a developer if you can't code it yourself...
IT Headquarters
Innovative IT Solutions

6
Red_Bee
Re: Restrict the files in My Downloads module based on number of post in the Forum
  • 2005/11/3 14:52

  • Red_Bee

  • Just popping in

  • Posts: 98

  • Since: 2004/5/12


Quote:

brash wrote:
Great idea, but there is currently no download module with this functionality. You will need to hire a developer if you can't code it yourself...


Wish I can afford to pay but I have very tight budget. If I only have a money my first option is to buy more bandwidth.

I may just wait for a module that has a feature to use the NewBB/CBB Karma.
......

7
highlander
Re: Restrict the files in My Downloads module based on number of post in the Forum
  • 2005/11/3 18:34

  • highlander

  • Not too shy to talk

  • Posts: 151

  • Since: 2004/12/5


Hello Red_Bee,

I believe you could abuse ccb/newbb for this.
allthough not really the ways things should work you could try this:

make XOOPS groups
- group A (users with + 30 posts)
- group B (users with + 50 posts)
- group C (users with + 100 posts)

make cbb/newbb forums A,B,C
- group A can access forum A
- group B can access forum B, A
- group C can access forum C, B, A

you can then add your downloads to the posts in the coreect forums. (edit newbb/cbb preferences)
Your making posts with the downlaods connected to them.

Now all you need is a way to tranfer users into the coreect groups. As far as I know there is no XOOPS way of doing this (yet).

You could try the following :
on a daily basis run the follwing SQL commands :
UPDATE xoops_groups_users_link g LEFT JOIN xoops_users u ON g.uid u.uid set g.groupid=10 WHERE u.posts >30;
UPDATE xoops_groups_users_link g LEFT JOIN xoops_users u ON g.uid u.uid set g.groupid=11 WHERE u.posts >50;
UPDATE xoops_groups_users_link g LEFT JOIN xoops_users u ON g.uid u.uid set g.groupid=12 WHERE u.posts >100;

change g.groupid to the correct groupID's for groups A,B,C and amke sure you run them in this order.
These sql commands will change a users group membership based on the number of posts they have made.

You might even run these sql-commands from a cron job on a hourly basis.

As you can clearly see this is not how things are meant to be done but it might just help you.

This might be an uphill struggle but I believe it will get the job done.
Does anyone else have a more elegant solution ?

kind regards, Highlander
So, I'm in the park wondering why frisbees get larger as they get closer when suddenly, it hits me...
www.AnimalPedigree.com

8
davidl2
Re: Restrict the files in My Downloads module based on number of post in the Forum
  • 2005/11/3 19:34

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


A good method Highlander - although i've not tried it myself yet.

I'm sure it would be easy to add an optional restriction to a module - but it should be an easily disabled feature from the admin end of course

9
Red_Bee
Re: Restrict the files in My Downloads module based on number of post in the Forum
  • 2005/11/5 9:07

  • Red_Bee

  • Just popping in

  • Posts: 98

  • Since: 2004/5/12


Thank you guys for your reply.

@Highlander
Your idea is good but I don't know where to run those commands.


@davidl2
Wow, it will be very easy to manage if it can be done from the Admin panel.
......

10
highlander
Re: Restrict the files in My Downloads module based on number of post in the Forum
  • 2005/11/5 13:21

  • highlander

  • Not too shy to talk

  • Posts: 151

  • Since: 2004/12/5


Red_Bee,

The option I posted is not the XOOPS way of doing things. It's just me trying to "think out of the box".
If you are unsure about how it works you might be better off not using this method.
This my sound a little harsh but you can do a little damage very easily if things are not done correctly.

However, if you do decide to give my method a go you will have to run the SQL commands directly on to the database; this is usualy done with pypmyadmin. If your server supports it it might also be an idea to look into running these commands as a cron job and save yourself a bit of work.

I do agree with davidl2 though that by far the best solution would be to get an extra option added to one of the download modules to support this. Maybe you could try getting in touch with the developers who have written the download modules ?

greetings Highlander
So, I'm in the park wondering why frisbees get larger as they get closer when suddenly, it hits me...
www.AnimalPedigree.com

Login

Who's Online

257 user(s) are online (147 user(s) are browsing Support Forums)


Members: 0


Guests: 257


more...

Donat-O-Meter

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

Latest GitHub Commits