This is a port of SimpleAds, thanks to
@[SiNaN] for allowing this to be ported to ElkArte under BSD 3 :D
SimpleAds for ElkArte
LicenseThis Elkarte addon is released under a [BSD-3-Clause](http://opensource.org/licenses/BSD-3-Clause) license.
IntroductionThis addon allows you to display HTML code in various locations of forum.
FeaturesYou can define HTML ads and then set when, where and who will see those ads
You can position your Ads in the following areas
- Overall Header
- Overall Footer
- Below Menu
- Above Info Center
- Above Footer
- Left Side
- Right Side
- After First Post
- Inside First Post
- After Last Post
You can limit the displaying of an ad by
- time
- clicks
- impressions
- membergroups
- actions
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.
Repohttps://github.com/Spuds/Elk-Simple-Ads
Downloadhttp://addons.elkarte.net/feature/Simple-Ads.html
Awesome..
Thanks
@Spuds ,
@[SiNaN]
So Google Adsense can be used in this addon?
Cool stuff as usual you two! :D
Good job Spuds :)
One small error, you forgot to replace timeformat in file AdsAdmin.subs.php (line 122).
Ooppsie ... thanks, will fix!
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
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!
Thanks Sinan and Spuds, excellent addon
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.
Thank you for the translation .. I've added it to the package :D
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
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.
Add the permissions to who you want to see ads.
Works fine with Adsense.
Well, I dont think i need to add my forum domain on my adsense panel though. It worked with my other wordpress sites.
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.
Check the permissions, as already suggested. The addon works fine.
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
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! ;)
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.
Good idea ahrasis. Thanks!
Updated package to support ElkArte 1.1
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
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.
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
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. ;)
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
Russian translation in attachment.
I didn't see in ManageAds.english.php where are these language strings?
Translation for this:
- Верхний колонтитул
- Нижний колонтитул
- Под меню
- Над информационным центром
- Над нижним колонтитулом
- Слева
- Справа
- После первого сообщения
- Внутри первого сообщения
- После последнего сообщения
Will there be an update of this addon for the version ElkArte 1.1.7
I am using it with 1.1.7, nothing to report for now.
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.
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).
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. 😂
Hmmm... Sounds like the typical issue for who you are using for an avatar. :laugh:
It's classic stuff.
So is the avatar! 😁
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"]
Here's the encountered error with SA on php 8.1, when attempting to access the ACP:
Call to undefined function create_function()
This isn't encountered on php 7.4. Am I missing something?
Nope. Just the relevant code need to be changed to be php 8+ compatible.
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.
Indeed, it was 1.0.3. Somehow I missed the update, operator errrrrrrooorrrr... :grin:
:man_dancing: :partying_face: Love easy fixes
Yeah, easy fixes are great. Fixing dummies are harder. ;D Thanks for your help
@Spuds