ElkArte Community

Extending Elk => Addons => Topic started by: Spuds on November 02, 2014, 07:37:28 pm

Title: [ADDON] Simple Ads
Post by: Spuds on November 02, 2014, 07:37:28 pm
This is a port of SimpleAds, thanks to @[SiNaN] for allowing this to be ported to ElkArte under BSD 3 :D

SimpleAds for ElkArte


License
This Elkarte addon is released under a [BSD-3-Clause](http://opensource.org/licenses/BSD-3-Clause) license.

Introduction
This addon allows you to display HTML code in various locations of forum.

Features
You can define HTML ads and then set when, where and who will see those ads

You can position your Ads in the following areas

You can limit the displaying of an ad by

Create custom ad actions when other addons are installed.
Use predefined templates to wrap your ads or use just your own HTML.
Requires no template or source edits.

Repo
https://github.com/Spuds/Elk-Simple-Ads
Download
http://addons.elkarte.net/feature/Simple-Ads.html
Title: Re: [ADDON] Simple Ads
Post by: meetdilip on November 02, 2014, 09:32:20 pm
Awesome..

Thanks @Spuds , @[SiNaN]
Title: Re: [ADDON] Simple Ads
Post by: kucing on November 02, 2014, 10:13:45 pm
So Google Adsense can be used in this addon?
Title: Re: [ADDON] Simple Ads
Post by: meetdilip on November 02, 2014, 11:26:52 pm
Quote from: kucing – So Google Adsense can be used in this addon?
Yes.
Title: Re: [ADDON] Simple Ads
Post by: emanuele on November 03, 2014, 05:06:58 am
Cool stuff as usual you two! :D
Title: Re: [ADDON] Simple Ads
Post by: Adrek on November 03, 2014, 04:34:13 pm
Good job Spuds :)

One small error, you forgot to replace timeformat in file AdsAdmin.subs.php (line 122).
Title: Re: [ADDON] Simple Ads
Post by: Spuds on November 03, 2014, 08:40:05 pm
Ooppsie ... thanks, will fix!
Title: Re: [ADDON] Simple Ads
Post by: radu81 on February 25, 2015, 03:22:55 pm
I just did a quick test, and I have to say I'm impressed how simple and powerful is this addon. And Google responsive ads work just out of the box  :o
Congrats and thanks for sharing this addon...  Never seen something similar for xf
Title: Re: [ADDON] Simple Ads
Post by: radu81 on March 18, 2015, 05:46:43 am
I'm really impressed with this addon, I know it exists since years for smf, but never use it.

Recently a company asked for a couple of banners on my forum for a year. Nothing special but just a block on right side in SimplePortal. I know I can do it with an html block, but I cannot set the expiration time and have no idea about clicks/impressions. With this addon I am able to display an ad on SimplePortal block and also have some stats about the ad ;)

Thanks again Sinan and Spuds for creating and porting this addon to Elkarte!
Title: Re: [ADDON] Simple Ads
Post by: IndianTalkZone on January 25, 2016, 12:26:05 am
Thanks Sinan and Spuds, excellent addon
Title: Re: [ADDON] Simple Ads
Post by: shaitan on February 06, 2017, 02:35:16 pm
French translation in attachment.

Thank Spuds.

I never have Ads on my site. But In combination with SP Portal blocs, you can show or build what you want where you want.
Title: Re: [ADDON] Simple Ads
Post by: Spuds on February 06, 2017, 09:31:56 pm
Thank you for the translation .. I've added it to the package :D
Title: Re: [ADDON] Simple Ads
Post by: mmagss on February 22, 2017, 01:02:10 pm
I tried the addon and successfully installed it. But when I tried to add adsense code it doesnt show up any ads at all. Also I put the code on the body section
Title: Re: [ADDON] Simple Ads
Post by: ahrasis on February 22, 2017, 06:11:18 pm
Last time I checked adsense did work using this addon. I hope you did not forget to add your forum domain in your adsense panel.
Title: Re: [ADDON] Simple Ads
Post by: Trekkie101 on February 22, 2017, 07:08:55 pm
Add the permissions to who you want to see ads.

Works fine with Adsense.
Title: Re: [ADDON] Simple Ads
Post by: mmagss on February 23, 2017, 01:22:19 am
Quote from: ahrasis – Last time I checked adsense did work using this addon. I hope you did not forget to add your forum domain in your adsense panel.
Well, I dont think i need to add my forum domain on my adsense panel though. It worked with my other wordpress sites.

Quote from: Trekkie101 – Add the permissions to who you want to see ads.

Works fine with Adsense.
Yeah I guess I made something wrong. I also didnt bought a domain yet. I am currently using it on a VPS IP. But this is not the first that I have tried a VPS IP and add some adsense codes.

Please correct me if what I did was wrong.

First I downloaded the file.
2. I uploaded it on the package manager>>>upload file
3. Click on install.
4. After it was activated I went to add ad and put Name of the ad, put the code in the body section and check all section to show in the forum. Although I only add the code at the Header overall, there might be somethign I have done wrong. I also want the adsense ad to show only at the top. Like 1 adsense banner only per page.
Title: Re: [ADDON] Simple Ads
Post by: radu81 on February 23, 2017, 01:56:50 pm
Check the permissions, as already suggested. The addon works fine. 
Title: Re: [ADDON] Simple Ads
Post by: radu81 on September 15, 2017, 09:32:54 am
This installs and seems to work fine with elkarte 1.1 ( I didn't test all ads positions) only some errors in elkarte log

Type of error: General
Unknown Error: Use of loadTemplate to add style sheets to the head is deprecated.
http://test.sss.ovh/elk11/index.php?
File: /sources/Templates.class.php
Line: 145
Title: Re: [ADDON] Simple Ads
Post by: badmonkey on September 22, 2017, 11:11:22 pm
Does anyone know a javascript or other code which could be used with SA to show the RSS feed of another elkart forum on the same server?  Alternatively perhaps an SSI could be used as well.  In a nutshell the goal is to display the last 3 posts from one forum to another.  Thanks! ;)
Title: Re: [ADDON] Simple Ads
Post by: ahrasis on September 22, 2017, 11:33:54 pm
You can refer to simple portal site for that too @badmonkey. They have various samples of portal block code of which may be very useful in your case.

Or you may request an addon for that kind of rss, if we don't have any yet.
Title: Re: [ADDON] Simple Ads
Post by: badmonkey on September 22, 2017, 11:55:08 pm
Good idea ahrasis. Thanks!
Title: Re: [ADDON] Simple Ads
Post by: Spuds on November 26, 2017, 05:28:38 pm
Updated package to support ElkArte 1.1
Title: Re: [ADDON] Simple Ads
Post by: russena on March 05, 2018, 12:45:09 pm
I installed this addon to create blocks like a portal. It works fine but I can not get the blocks created to display them in the "Left side" and "Right side" positions.

Maybe I'm wrong in something I can not understand? Thanks for your help
Title: Re: [ADDON] Simple Ads
Post by: radu81 on March 05, 2018, 12:50:45 pm
Why not using simple portal to create blocks on the left or on the right? Or you use both add-ons, you can have an ad created with this addon so you can track the visits and display it on portal. 
Title: Re: [ADDON] Simple Ads
Post by: russena on March 05, 2018, 01:03:54 pm
Simpleportal is the best thing but there is the risk that every update becomes a problem. For example I have my official website with Elkarte 1.0.10 + SP and it works quite well. But SP, now, is not very stable for Elkarte 1.1 and I'm not very good with php code.
This is why I decided to install very few simple addons to the forum.
I would like to address the forum homepage to recent posts and around to simply insert some block or menu.
In this way, Elkarte remains a forum but with just one simple addon even a small and simple portal for better navigation.
An example of a test: http://www.genitoricapuana.superscuola.com/index.php?action=recent
Title: Re: [ADDON] Simple Ads
Post by: badmonkey on March 05, 2018, 02:00:46 pm
SP is an excellent addon.  Make no doubt about it.  However, it's also a lot of extra code execution to obtain one or two basic blocks.  JMHO.   ;)
Title: Re: [ADDON] Simple Ads
Post by: Jason on May 03, 2018, 01:34:25 pm
Does this work with version 1.1.3? I have added the addon and choose footer and above info..i don't see any ads getting displayed

The addon works, sorry for the wrong information
Title: Re: [ADDON] Simple Ads
Post by: forumovod on September 07, 2020, 06:30:48 pm
Russian translation in attachment.

I didn't see in ManageAds.english.php where are these language strings?
Quote from: Spuds –
  • Overall Header
  • Overall Footer
  • Below Menu
  • Above Info Center
  • Above Footer
  • Left Side
  • Right Side
  • After First Post
  • Inside First Post
  • After Last Post

Translation for this:
Title: Re: [ADDON] Simple Ads
Post by: forumovod on April 26, 2021, 11:39:23 am
Will there be an update of this addon for the version ElkArte 1.1.7
Title: Re: [ADDON] Simple Ads
Post by: radu81 on April 26, 2021, 11:56:15 am
I am using it with 1.1.7, nothing to report for now.
Title: Re: [ADDON] Simple Ads
Post by: Spuds on May 04, 2021, 12:46:31 pm
I made some minor updates and released a 1.0.4 version https://addons.elkarte.net/feature/Simple-Ads.html

Its for 1.1.x only and has a couple of php 7.4 changes that could throw a depreciation error. 
Title: Re: [ADDON] Simple Ads
Post by: badmonkey on March 17, 2023, 03:56:23 pm
I've been hesitant to report this as @Spuds already has plenty on his plate with development. Nonetheless we've apparently released this Kraken, so here's another tentacle. 

This add-on functions with php 8.x. However, the admin panel does not. It's been a while since I messed with it so I don't recall the specific error. I'll follow-up if needed once I return to civilization (read laptop). 
Title: Re: [ADDON] Simple Ads
Post by: Spuds on March 17, 2023, 04:53:36 pm
I just did some quick testing on 1.1.9 and did not see any errors, so I'll need some more details :D
Title: Re: [ADDON] Simple Ads
Post by: badmonkey on March 17, 2023, 07:15:13 pm
Quote from: Spuds – I just did some quick testing on 1.1.9 and did not see any errors, so I'll need some more details :D
Oh great. The error is an operator error. 😂
Title: Re: [ADDON] Simple Ads
Post by: DeadMan on March 17, 2023, 09:59:49 pm

Hmmm... Sounds like the typical issue for who you are using for an avatar.  :laugh:
Title: Re: [ADDON] Simple Ads
Post by: badmonkey on March 17, 2023, 11:09:08 pm
Quote from: Burke_Knight –
Quote from: badmonkey – The error is an operator error.

Hmmm... Sounds like the typical issue for who you are using for an avatar.  :laugh:
It's classic stuff. 


So is the avatar! 😁
Title: Re: [ADDON] Simple Ads
Post by: Steeley on March 18, 2023, 03:10:58 am
Quote from: badmonkey
The error is an operator error.


AKA "Loose nut on the keyboard"

(I have an 89 y/o mother in a senior living facility 1500 miles away from me with a laptop as her primary means of communication with the outside world. I just spent two days providing "remote tech support" talking her through removing malware from it so she can use it again.
You should see the email filters I've set up on her Email account on my server, probably takes the mailserver 5 minutes to chunk through them all before it passes an email to her inbox.)

"You clicked on WHAT????"  (I know all about 'loose nuts on keyboards'.. mine occasionally has that issue too, as some of my bug-reports in this forum are evidence of..)

-Steeley 


Did you exchange, a walk-on part in the war for a lead role in a cage?
[~ Pink Floyd: "Wish You Were Here"]

Title: Re: [ADDON] Simple Ads
Post by: badmonkey on March 18, 2023, 09:40:24 pm
Here's the encountered error with SA on php 8.1, when attempting to access the ACP:

Code: [Select]
Call to undefined function create_function()


This isn't encountered on php 7.4. Am I missing something?
Title: Re: [ADDON] Simple Ads
Post by: ahrasis on March 18, 2023, 11:20:55 pm
Nope. Just the relevant code need to be changed to be php 8+ compatible.
Title: Re: [ADDON] Simple Ads
Post by: Spuds on March 19, 2023, 09:17:33 am
Are you sure you are using version 1.0.4 which is the latest?  Its available on the addons site (link in first post).    Its possible I uploaded an old version (going to check next), but the current version does not use create_function() anywhere.
Title: Re: [ADDON] Simple Ads
Post by: badmonkey on March 19, 2023, 11:02:06 am
Indeed, it was 1.0.3. Somehow I missed the update, operator errrrrrrooorrrr...  :grin: 
Title: Re: [ADDON] Simple Ads
Post by: Spuds on March 19, 2023, 11:06:07 am
:man_dancing: :partying_face: Love easy fixes
Title: Re: [ADDON] Simple Ads
Post by: badmonkey on March 19, 2023, 11:17:25 am
Quote from: Spuds – :man_dancing: :partying_face: Love easy fixes
Yeah, easy fixes are great. Fixing dummies are harder. ;D Thanks for your help @Spuds