Download the PHP package digitoimistodude/dude-really-simple-ads without Composer

On this page you can find all versions of the php package digitoimistodude/dude-really-simple-ads. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dude-really-simple-ads

Note This ad plugin is considered legacy. You should really consider using air-ads.

Really simple ads

version_1.2.2 Tested_up_to WordPress_5.6 Compatible_with PHP_7.0

Digitoimisto Dude Oy is a Finnish boutique digital agency in the center of Jyväskylä.

Table of contents

Please note before using

By using this code bases, you agree that the anything can change to a different direction without a warning.

Features

Basic feature list includes

Usage

Register ad places

Ad places are registered with drsa_ad_placement_sizes hook. You should pass nested array containing one array element per each ad place. See basic exmaple below.

Get active ad

Getting the active ad is fairly simple, just use get_the_active_ad function and pass the used ad place as a paremeter.

If there is active campaign for that ad place, a random active ad assigned to selected place will be returned. When there is no active campaign, active single ad for place is returned. Default ad and link will be returned if no active campaign or ad are found, if there is no default then return is false.

When there is ad, return is array containing the ad place name, image src, target address and click counter class. Simple usage example is below, but you can modify it according to your needs. Click counter class needs to be in the same element with the target href.

Always check the existance of function.

Adding a shortcode to embed ads into content

You can make your own shortcode to get ads everywhere you want, for example into the content of blog post. Below is simple example of shortcode usage.

Hooks

Plugin contains a set of hooks for you to use and modify behavior of plugin.

Set default ad and link

If there is no active ads for the place, you can set default image and link for the ad place in question with two different hooks.

Use filter drsa_default_ad/{place-id} to set default ad image src. Use filter drsa_default_ad_target/{place-id} to set default ad address.

Disable UTM tags in ad target url

By default UTM tags are inserted automatically to the ad target address, use filter drsa_use_utm to disable it.

To disable globally, use add_filter( 'drsa_use_utm', '__return_false' ); To disable by ad place, use add_filter( 'drsa_use_utm\{place-id}', '__return_false' ); To disable by single ad, use add_filter( 'drsa_use_utm\ad\{ad-id}', '__return_false' );

Disable or change ad view throttle time

If visitor reloads the page or visits in the same page again within 30 seconds after first visit, the new visit is not counted to ad views. If same ad is shown in multiple pages, each page has it's own throttle prevention. For exmaple if ad is in sidebar, reload within 30 seconds in frontpage does not count new view but visit in another page will.

This is simple prevention to ensure that view count is somewhat accurate.

Change the throttle time with filter drsa_counter_cookie_timeout, return thtrottle time in milliseconds. To disable the feature, return zero.

End ads display at specific amount of views

Set filter drsa_end_ads_by_show_count to true, to switch ad ending from date to view count.

Allow alternative images for ads

Set filter drsa_allow_alternative_image to true, to allow alternative images for ads. This will ad a alternative image field in ad edit screen. Use drsa_alternative_image_desctiption_text filter, to change the description of the field. Default ''.

Changelog

Changelog can be found from releases page.

Contributing

If you have ideas about the plugin or spot an issue, please let us know. Before contributing ideas or reporting an issue about "missing" features or things regarding to the nature of that matter, please read Please note section. Thank you very much.

TODO

[ ] better inline commenting


All versions of dude-really-simple-ads with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package digitoimistodude/dude-really-simple-ads contains the following files

Loading the files please wait ....