Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Forced Ads - Force Header and Footer Ads on Your Users
#1
Hi everyone, I know you are all waiting patiently for 1.2 to be finished, so in the meantime I have this for you Smile.

This plugin allows admins with root access to their server to force ads on accounts created with THT. This is not for the average user, but I have made the instructions as easy as possible.

Thanks go To KrakJoe @ http://krakjoe.com for writing this wonderful script.

Installation Instructions:
  1. Install mod_layout

    Okay, first thing is first, we need mod_layout for this to work. To install mod_layout, pop open SSH as root and enter this code:
    Code:
    wget http://download.tangent.org/mod_layout-5.1.tar.gz
    tar xzf mod_layout-5.1.tar.gz
    cd mod_layout*
    make
    make install


  2. Restart Apache
    Run this from terminal to restart your apache. Alternitively, use WHM Root to restart.
    Code:
    apachectl restart


  3. Upload the files to your server.
    get the files from here: http://thehostingtool.com/forum/attachment.php?aid=87
    now, upload the files from the scripts folder to /scripts on your server, and the files from the tht folder to your tht includes directory.


  4. Edit the files
    open up mod-layout.conf.php and edit the values according to your details.
    save postwwwacct.php as postwwwacct and chmodd to 755
    open up the header and footer ads files and put in your desired ads.


  5. Restart Apache Again
Congratulations! All new accounts created with the plans listed will have your forced ads in them.

Enjoy!


Attached Files
.zip   ForcedAds.zip (Size: 2.42 KB / Downloads: 1,871)
Nick - TheHostingTool Staff Coordinator

[Image: standard.png]

Reply
#2
Isnt httpd restart like so:
Code:
service httpd restart

And very nice work mate.
Reply
#3
It depends on your Linux distribution.

These are some ways to restart apache. At least one of them will probably work on your distro. Make sure to run this with sudo or directly as root.
Code:
/usr/sbin/apachectl graceful
Code:
apachectl graceful
Code:
/usr/sbin/apache2ctl graceful
Code:
apache2ctl graceful
Code:
/etc/init.d/apache2 reload|graceful
Kevin Mark - TheHostingTool Lead Developer
Reply
#4
Thanks Nick! Is there any way this could work without root at all?
Reply
#5
This cant work without root because you need to edit the httpd file
Reply
#6
(08-14-2009, 06:13 AM)umarsa Wrote: This cant work without root because you need to edit the httpd file

If you're root, you can edit the .httpd file. Wink
Kevin Mark - TheHostingTool Lead Developer
Reply
#7
um... duh. thats why he said it won't work without root.
Nick - TheHostingTool Staff Coordinator

[Image: standard.png]

Reply
#8
(08-14-2009, 10:18 AM)Nick Wrote: um... duh. thats why he said it won't work without root.

Sorry. I missed the "without" in his post.
Kevin Mark - TheHostingTool Lead Developer
Reply
#9
For all users or can u select the users you want this option enabled to?
Reply
#10
(08-25-2009, 12:48 PM)Guy Wrote: For all users or can u select the users you want this option enabled to?

I believe this is for all accounts created after the edit.
Kevin Mark - TheHostingTool Lead Developer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)