Advertisement:

Author Topic: SimpleAds  (Read 195342 times)

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
SimpleAds
« on: May 14, 2010, 02:49:55 AM »
Link to Mod

SimpleAds

This mod allows you to display HTML code in various locations of forum. You can limit ads by time, click, impressions, membergroups or actions. You can also create custom ad positions.

The mod requires minimal template edits. If you are using a custom theme, make sure you install the mod for those custom themes as well, using the "Install in Other Themes" option during the installation.

This mod uses FamFamFam Silk icons licensed under Creative Commons Attribution 2.5 License.
Former SMF Core Developer | My Mods | SimplePortal

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,159
  • Gender: Male
    • @fragicide on Twitter
Re: SimpleAds
« Reply #1 on: May 14, 2010, 03:27:51 AM »
Congrats [SiNaN]!
Jason Clemons
Former Lead Customizer/Support Specialist
Twitter | Facebook | Instagram

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: SimpleAds
« Reply #2 on: May 14, 2010, 03:11:04 PM »
Great Mod Sinan. Ad Management has a sister now.
She has been there alone for long.
Congrats.

Offline akbora

  • Sr. Member
  • ****
  • Posts: 960
    • Anında Tepki
Re: SimpleAds
« Reply #3 on: May 14, 2010, 03:40:05 PM »
I try to install I get a error admin.php
like that:
Select:
Code: [Select]
  ), 'maintenance' => array( 
Change
Code: [Select]
  ), 'ads' => array( 'title' => $txt['sa_admin_cat_title'], 'permission' => array('admin_forum'), 'areas' => array( 'ads' => array( 'label' => $txt['sa_admin_title'], 'file' => 'ManageAds.php', 'function' => 'ManageAds', 'permission' => array('admin_forum'), 'icon' => 'ads.png', 'subsections' => array( 'ads' => array($txt['sa_ads_list_title']), 'addad' => array($txt['sa_ads_add_title']), 'positions' => array($txt['sa_positions_list_title']), 'addposition' => array($txt['sa_positions_add_title']), ), ), ), ), 'maintenance' => array( 
I do samething but admin panel become off.... What can I do?
SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: SimpleAds
« Reply #4 on: May 14, 2010, 03:54:00 PM »
I try to install I get a error admin.php
like that:
Select:
Code: [Select]
  ), 'maintenance' => array( 
Change
Code: [Select]
  ), 'ads' => array( 'title' => $txt['sa_admin_cat_title'], 'permission' => array('admin_forum'), 'areas' => array( 'ads' => array( 'label' => $txt['sa_admin_title'], 'file' => 'ManageAds.php', 'function' => 'ManageAds', 'permission' => array('admin_forum'), 'icon' => 'ads.png', 'subsections' => array( 'ads' => array($txt['sa_ads_list_title']), 'addad' => array($txt['sa_ads_add_title']), 'positions' => array($txt['sa_positions_list_title']), 'addposition' => array($txt['sa_positions_add_title']), ), ), ), ), 'maintenance' => array( 
I do samething but admin panel become off.... What can I do?


I got it too but i manually edited that file. Its easy ..

Offline akbora

  • Sr. Member
  • ****
  • Posts: 960
    • Anında Tepki
Re: SimpleAds
« Reply #5 on: May 14, 2010, 04:03:29 PM »
  ), 'maintenance' => array( 

This code isn't there.
SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

Offline Liam.

  • SMF Hero
  • ******
  • Posts: 2,240
  • Gender: Male
Re: SimpleAds
« Reply #6 on: May 14, 2010, 06:33:28 PM »
Take of the ),
'maintenance' => array(
should be on a line itself (with an indent)...

Great mod and great for it getting approved ;)

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: SimpleAds
« Reply #7 on: May 14, 2010, 06:49:13 PM »
  ), 'maintenance' => array( 

This code isn't there.

you may also want to send the file here, i can edit it for you.

Offline ggs234

  • Semi-Newbie
  • *
  • Posts: 34
Re: SimpleAds
« Reply #8 on: May 15, 2010, 01:18:38 AM »
really nice plugin and thank you

Offline akbora

  • Sr. Member
  • ****
  • Posts: 960
    • Anında Tepki
Re: SimpleAds
« Reply #9 on: May 15, 2010, 08:39:21 AM »
Thanks Afro,

I installed however and mod is very very good, but mod doesn't perfectly.

For example

# Above Info Center
# After First Post
# Inside First Post
# After Last Post


I added these areas a html code but it doesn't seem in these area? Why?
 
SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: SimpleAds
« Reply #10 on: May 15, 2010, 09:29:03 AM »
Thanks Afro,

I installed however and mod is very very good, but mod doesn't perfectly.

For example

# Above Info Center
# After First Post
# Inside First Post
# After Last Post


I added these areas a html code but it doesn't seem in these area? Why?
 
I noticed that if you select where you want the ad to be placed, It gives you some codes.
You need to locate the {content} and replace it with your html code.
It worked on my test site.
I am still figuring out why i should use this since i have SP installed..


Offline grafitus

  • SMF Hero
  • ******
  • Posts: 3,034
    • beratdogan on GitHub
    • beratdogan on LinkedIn
    • @beratdgan on Twitter
Re: SimpleAds
« Reply #12 on: May 15, 2010, 03:48:14 PM »
Congratulations to my friend! I'm immediately starting to translate. Hmmm :)

Offline !RFAN

  • Sr. Member
  • ****
  • Posts: 716
  • Gender: Male
Re: SimpleAds
« Reply #13 on: May 16, 2010, 02:46:16 AM »
great mod.. :D

but i was unable to put ads.. i replaced {content} with adsense code... but nothing is shown on website... i selected headers...and above statistics..

thanks :)

Offline ukhalik2

  • Full Member
  • ***
  • Posts: 458
  • Gender: Male
    • UltraUmair on Facebook
    • @UltraUmair on Twitter
    • Internet Magazine Blog
Re: SimpleAds
« Reply #14 on: May 16, 2010, 03:22:38 AM »
good work, you should also add some screenshots of the ads placements..

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: SimpleAds
« Reply #15 on: May 16, 2010, 04:05:36 AM »
I try to install I get a error admin.php
like that:
Select:
Code: [Select]
  ), 'maintenance' => array( 
Change
Code: [Select]
  ), 'ads' => array( 'title' => $txt['sa_admin_cat_title'], 'permission' => array('admin_forum'), 'areas' => array( 'ads' => array( 'label' => $txt['sa_admin_title'], 'file' => 'ManageAds.php', 'function' => 'ManageAds', 'permission' => array('admin_forum'), 'icon' => 'ads.png', 'subsections' => array( 'ads' => array($txt['sa_ads_list_title']), 'addad' => array($txt['sa_ads_add_title']), 'positions' => array($txt['sa_positions_list_title']), 'addposition' => array($txt['sa_positions_add_title']), ), ), ), ), 'maintenance' => array( 
I do samething but admin panel become off.... What can I do?


I got it too but i manually edited that file. Its easy ..

Yeah, you'll need to apply that edit manually then.

Afro, which mods you have installed? Can you attach your Admin.php file? If there is a conflict with a popular mod, I'm going to change the installation instructions.

Thanks Afro,

I installed however and mod is very very good, but mod doesn't perfectly.

For example

# Above Info Center
# After First Post
# Inside First Post
# After Last Post


I added these areas a html code but it doesn't seem in these area? Why?
 

great mod.. :D

but i was unable to put ads.. i replaced {content} with adsense code... but nothing is shown on website... i selected headers...and above statistics..

thanks :)

Are you sure you set the membergroups and actions to display ads for?

As a tip, if you want to display ads everywhere, just put "all" (without quotes) to Custom Display options field.

good work, you should also add some screenshots of the ads placements..

I'm unable to upload attachments to Mod Site these days. I had some screenshots here though:

http://i44.tinypic.com/1zn7k2r.png
http://i40.tinypic.com/29wkcg6.png
http://i39.tinypic.com/33ljlsi.png
http://i43.tinypic.com/6pz5hs.png
http://i42.tinypic.com/358rn2s.png
http://i43.tinypic.com/5d461d.png
Former SMF Core Developer | My Mods | SimplePortal

Offline Yağız...

  • SMF Super Hero
  • *******
  • Posts: 10,811
  • Gender: Male
    • MMO Browser
Re: SimpleAds
« Reply #16 on: May 16, 2010, 05:29:03 AM »
Putting "all" in Custom Display fixes it. Also, if you are using any portal, and want to show an ad above info center, write forum on the field.

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: SimpleAds
« Reply #17 on: May 16, 2010, 05:39:37 AM »
OK SINAN, I  have a few important mods..here is the /source/admin.php file.

Remember i got it fixed manually on the file i am sending.
     Facebook_Like v.1.2      1.2 
    Downloads System    1.3.2    
    SMF Archive    2.0    
    SimplePortal    2.3.2    
    SMFShop    3.1.5.2    
    RedirectPage    1.1c    
    Aeva Media    1.1b    
    Sitemap    2.1.2    
    Smf seo boards title[    1    
    Referrals Mod    2.2.7.2    
    SimpleAds    1.0    
   Custom_Top_menu    1.0    
    FantasticSmileys    1.0    
    SMF Quiz Categories    
    VB Style User Profile In Posts    1.0    
    Buddy Page    1.2    
    Error Log Counter    
    Activity_Bar    1.0.1.2
    SMF Quiz    1.0.8 beta3    
    Highslide 4 SMF
    Hide SMF Version
    Register At Post View v.1.1
   SMF Arcade
   Relative Dates

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: SimpleAds
« Reply #18 on: May 16, 2010, 05:57:26 AM »
Putting "all" in Custom Display fixes it. Also, if you are using any portal, and want to show an ad above info center, write forum on the field.

It's a feature, rather than a bug. You need to define where you want the ad to be displayed.

If you want to use the Above Info Center position, you can just use "all" or "Board Index" as display option. Since the position code is in BoardIndex.template.php, it won't be displayed on other pages anyway.

As for people using portal and Custom Display option; "forum" will always return true. Only wildcard-like thing for this field is "all" which displays the ad everywhere. Apart from that, you need to use PHP. I haven't documented it yet though. For displaying an ad on ?action=forum, you would use something like this as Custom Display option:

{action} == 'forum'

So there are two variables {action} and {board} you can use with Custom Display option. Like you can do:

in_array({board}, array(1, 2, 3))

and that would display the ad on boards with id of 1, 2, or 3.

I'll add some help texts in future versions explaining all these.

OK SINAN, I  have a few important mods..here is the /source/admin.php file.

I'll check that. Thanks!
Former SMF Core Developer | My Mods | SimplePortal

Offline !RFAN

  • Sr. Member
  • ****
  • Posts: 716
  • Gender: Male
Re: SimpleAds
« Reply #19 on: May 16, 2010, 08:14:21 AM »
pleas e xplain " Custom Display options field."