News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SimpleAds

Started by [SiNaN], May 14, 2010, 02:49:55 AM

Previous topic - Next topic

[SiNaN]

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

JBlaze

Jason Clemons
Former Team Member 2009 - 2012

Afro

Great Mod Sinan. Ad Management has a sister now.
She has been there alone for long.
Congrats.

akbora

I try to install I get a error admin.php
like that:
Select:
  ), 'maintenance' => array( 

Change
  ), '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
---------------

Afro

Quote from: akbora on May 14, 2010, 03:40:05 PM
I try to install I get a error admin.php
like that:
Select:
  ), 'maintenance' => array( 

Change
  ), '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 ..

akbora

  ), 'maintenance' => array( 

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

Liam.

Take of the ),
'maintenance' => array(
should be on a line itself (with an indent)...

Great mod and great for it getting approved ;)

Afro

Quote from: akbora on May 14, 2010, 04:03:29 PM
  ), 'maintenance' => array( 

This code isn't there.

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

ggs234

really nice plugin and thank you

akbora

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
---------------

Afro

Quote from: akbora 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?

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..


grafitus

Congratulations to my friend! I'm immediately starting to translate. Hmmm :)

!RFAN

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 :)

ukhalik2

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

[SiNaN]

Quote from: Afro on May 14, 2010, 03:54:00 PM
Quote from: akbora on May 14, 2010, 03:40:05 PM
I try to install I get a error admin.php
like that:
Select:
  ), 'maintenance' => array( 

Change
  ), '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.

Quote from: akbora 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?


Quote from: amigozone 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 :)

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.

Quote from: ukhalik2 on May 16, 2010, 03:22:38 AM
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

Yağız...

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.

Afro

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

[SiNaN]

Quote from: Yağız... 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.

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.

Quote from: Afro on May 16, 2010, 05:39:37 AM
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

!RFAN

pleas e xplain " Custom Display options field."

Advertisement: