Special (Ad-free) template for certain users?
Posted by sheik
August 31, 2005 07:02AM |
Registered: 20 years ago Posts: 687 |
My forum uses Google Ads to try and offset hosting costs. I thought it would be nice to allow users that have donated to the site to choose a different template that didn't contain these adverts.
I'm sure I could hack this functionality in, but can anyone suggest a cleaner way of doing it? I'm unsure how custom profile fields will work in 5.1, but if I use them then this could perhaps be created as a module?
Thanks,
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
I'm sure I could hack this functionality in, but can anyone suggest a cleaner way of doing it? I'm unsure how custom profile fields will work in 5.1, but if I use them then this could perhaps be created as a module?
Thanks,
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz

August 31, 2005 07:33AM |
Registered: 20 years ago Posts: 687 |
...actually, even better would be the ability to assign a date field to each user. This would allow "yearly subscriptions" for users to use an ad-free template.
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz

Re: Special (Ad-free) template for certain users? August 31, 2005 09:11AM |
Admin Registered: 21 years ago Posts: 9,240 |
August 31, 2005 09:41AM |
Registered: 20 years ago Posts: 687 |
Cool, many thanks Thomas.
Can I do date comparisons directly within a template or would I have to use PHP to do that?
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Can I do date comparisons directly within a template or would I have to use PHP to do that?
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz

Re: Special (Ad-free) template for certain users? August 31, 2005 11:10AM |
Admin Registered: 21 years ago Posts: 9,240 |
September 02, 2005 08:26AM |
Registered: 20 years ago Posts: 687 |
I thought I'd post an update in case anyone is interested.
Thanks to Brian and Thomas' help I now have what I wanted working as a hack.
Basically, I have a field per user which I store a "subscription expiry" date in, and I can then check this date in my templates to decide whether I should display an advert or not.
I could make this as a module, with probably the following initial features:
- forum administrator can manage list of subscribed users via the admin module screen.
- individual subscribers can choose whether they want to see adverts or not via their profile screen
- new template variables would be available, eg: USER_IS_SUBSCRIBER, SUBSCRIPTIO_EXPIRY_DATE and HIDE_ADVERTS. These could be used creatively in your own templates, and also as a base for other module code (eg: if you only wanted to allow subscribers to see full posts, and normal users just the first 50% of each post then that would be possible (nasty, but possible!).
If you have any ideas, please post them and I will see if I can clear some time to write the mod.
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Thanks to Brian and Thomas' help I now have what I wanted working as a hack.
Basically, I have a field per user which I store a "subscription expiry" date in, and I can then check this date in my templates to decide whether I should display an advert or not.
I could make this as a module, with probably the following initial features:
- forum administrator can manage list of subscribed users via the admin module screen.
- individual subscribers can choose whether they want to see adverts or not via their profile screen
- new template variables would be available, eg: USER_IS_SUBSCRIBER, SUBSCRIPTIO_EXPIRY_DATE and HIDE_ADVERTS. These could be used creatively in your own templates, and also as a base for other module code (eg: if you only wanted to allow subscribers to see full posts, and normal users just the first 50% of each post then that would be possible (nasty, but possible!).
If you have any ideas, please post them and I will see if I can clear some time to write the mod.
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz

September 03, 2005 09:43PM |
Registered: 20 years ago Posts: 687 |
My module is now written and in testing. I'll post it shortly.
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz

September 04, 2005 12:11AM |
Registered: 20 years ago Posts: 687 |
Module posted at : [phorum.org]
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz

September 06, 2005 12:49PM |
Registered: 20 years ago Posts: 868 |
Thnx, I will test it. Looks very interesting.
Sergej
------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
Sergej
------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
Sorry, only registered users may post in this forum.