Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
dbForge Studio for PostgreSQL 2.3.212
HTMLPad 2020 16.2
WeBuilder 2020 16.2
Rapid CSS 2020 16.2
Rapid PHP 2020 16.2
C# HTML to PDF 2020.8.1
Flowrigami 1.0.0.1
Vue Injector 3.3
Spectrum Analyzer pro Live 2019
Devart Excel Add-in for HubSpot 2.1
RentALLScript - Airbnb clone 2.2
SuiteCRM Theme Customization 7.11.6
iScripts NetMenus 3.1
iScripts EasyIndex 2.2
iScripts EasySnaps 2.0
Top Code
Video Conference Website Scripts 2.86
IcrediBB Bulletin Board System 1.0
HTMLPad 2020 16.2
Billing System 1.0.1
Temperature Controller 1.0
Java-2-Pseudo 1.0
Ticket Booking System 1.0
Cab Booking Script 1.3.2
MLM Software ONE 1.5.46
WeBuilder 2020 16.2
ChequePRO Cheque Printing writing System 1.0
Ad2Ex Adverser Php Script 1.06
iScripts eSwap 3.0
PHP Hangman Game 1.2.0
Azizi search engine script PHP 4.1.10
Top Rated
Uber Clone with Safety Measure Addons 2.0
Answers phpSoftPro 3.12
phpEnter 5.1.
Quick Maps For Dynamics CRM 3.1
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Apphitect Airbnb Clone Script 1.0
Deals and Discounts Website Script 1.0.2
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
Content Switcher 1.8.5
File ID: 94859






Content Switcher 1.8.5
Download Content Switcher 1.8.5http://wordpress.orgReport Error Link
License: Freeware
File Size: 51.2 KB
Downloads: 2
Submit Rating:
Content Switcher 1.8.5 Description
Description: Content Switcher allows you to easily insert into posts, pages and widgets of your website random numbers, and random or variable contents. You can use it, for example, to display COOKIE, ENV, GET, POST, SERVER or SESSION variables. Content Switcher also allows you to optimize your website with Google Optimizer.

Complete Documentation:

* in English
* in French

Random Numbers

To display a random number between 0 and M, insert into your posts/pages/widgets a code like this:

[random-number max=M]

Example (random number between 0 and 5):

[random-number max=5]

To display a random number between m and M (m and M relative integers), insert into your posts/pages/widgets a code like this:

[random-number min=m max=M]

Example (random number between -3 and 8):

[random-number min=-3 max=8]

To display a random number belonging to a set, insert into your posts/pages/widgets a code like this:

[random-number set=a/b/c/...]

Example (random number belonging to { 34; 5; -3; 8; -21 }):

[random-number set=34/5/-3/8/-21]

You can use the "digits" attribute to display a random number with at least d digits:

[random-number min=m max=M digits=d]

Example (random number between 0 and 144, displayed with at least 3 digits):

[random-number max=144 digits=3]

Other example (random image taken from the short film Big Buck Bunny):


Random Contents

To display a random content, insert into your posts/pages/widgets a code like this:

[random-content]
First random content[other]
Second random content[other]
Third random content[other]
...
[/random-content]

Example:

[random-content]
Somewhere over the rainbow, way up high[other]
There's a land that I heard of, once in a lullaby[other]
Somewhere over the rainbow, skies are blue[other]
And the dreams that you dare to dream, really do come true
[/random-content]

It's possible to display several times the same (random or not random) string of characters, using the "string" attribute. You can specify any string of characters for this attribute, including shortcodes, provided to replace "[" by "(" and "]" by ")". And don't forget to include the quotes at the beginning and the end of the string:

[random-content string="(random-content)First random string(other)Second random string(other)Third random string(other)...(/random-content)"]
[string]...[string]...[string][/random-content]

The [string] shortcode displays the string of characters.

Example (random image taken from the short film Big Buck Bunny):

[random-content string="(random-number min=1 max=30 digits=2)"]
[img]/medias/images/big-buck-bunny/screenshots/320/[string].jpg[/img]
[/random-content]

Variable Contents

To display a COOKIE, ENV, GET, POST, SERVER or SESSION variable, insert into your posts/pages/widgets a code like this:

[variable-string type=type name=name]

The "type" attribute can be equal to "cookie", "env", "get", "post", "server" or "session". Its default value is "get". The "name" attribute is the name of the variable.

To display a variable content, insert into your posts/pages/widgets a code like this:

[variable-content]
Default content[other]
First alternate content[other]
Second alternate content[other]
...
[/variable-content]

The displayed content is not random but is determined by the URL of the page.

Pages displaying the default content:

http://permalink-of-the-page/

http://permalink-of-the-page/?content=0

Page displaying the first alternate content:

http://permalink-of-the-page/?content=1

Page displaying the second alternate content:

http://permalink-of-the-page/?content=2

This is the value of the "content" variable of the URL which determines the displayed content. If its value:

* is equal to 0 or is not specified, then the displayed content is the default content
* is equal to 1, then the displayed content is the first alternate content
* is equal to 2, then the displayed content is the second alternate content
* ...

Example:

[variable-content]
Somewhere over the rainbow, way up high[other]
There's a land that I heard of, once in a lullaby[other]
Somewhere over the rainbow, skies are blue[other]
And the dreams that you dare to dream, really do come true
[/variable-content]

Pages displaying the default content:

http://permalink-of-the-page/

http://permalink-of-the-page/?content=0

Page displaying the first alternate content:
http://permalink-of-the-page/?content=1

Page displaying the second alternate content:
http://permalink-of-the-page/?content=2

Page displaying the third alternate content:
http://permalink-of-the-page/?content=3

If you don't want to use a GET variable to display the variable content, you can also do the same thing with a COOKIE, ENV, POST, SERVER or SESSION variable using the "type" attribute.

You can specify a name different than "content" for the variable using the "name" attribute:

Example:

[variable-content name=lyric]
Somewhere over the rainbow, way up high[other]
There's a land that I heard of, once in a lullaby[other]
Somewhere over the rainbow, skies are blue[other]
And the dreams that you dare to dream, really do come true
[/variable-content]

Pages displaying the default content:

http://permalink-of-the-page/

http://permalink-of-the-page/?lyric=0

Page displaying the first alternate content:

http://permalink-of-the-page/?lyric=1

Page displaying the second alternate content:

http://permalink-of-the-page/?lyric=2

Page displaying the third alternate content:

http://permalink-of-the-page/?lyric=3

You can specify values different than numbers for the variable using the "values" attribute.

Example:

[variable-content name=lyric values=first/second/third/fourth]
Somewhere over the rainbow, way up high[other]
There's a land that I heard of, once in a lullaby[other]
Somewhere over the rainbow, skies are blue[other]
And the dreams that you dare to dream, really do come true
[/variable-content]

Pages displaying the first lyric:

http://permalink-of-the-page/

http://permalink-of-the-page/?lyric=first

Page displaying the second lyric:

http://permalink-of-the-page/?lyric=second

Page displaying the third lyric:

http://permalink-of-the-page/?lyric=third

Page displaying the fourth lyric:

http://permalink-of-the-page/?lyric=fourth

You can display the value of the variable. To do this, simply use only the default content without specifying any alternate content. If the value of the variable is not specified in the URL, the default content will be displayed:

[variable-content name=name]Default content[/variable-content]

Example:

Welcome [variable-content name=first-name]to You[/variable-content]!

Page displaying your first name:

http://permalink-of-the-page/?first-name=your-first-name Google Optimizer://http://permalink-of-the-page/?first...oogle Optimizer://http://permalink-of-the-page/?first...oogle Optimizer://http://permalink-of-the-page/?first...oogle Optimizer://http://permalink-of-the-page/?first...oogle Optimizer://http://permalink-of-the-page/?first...oogle Optimizer

To use Google Optimizer, you must have an account. Sign up for one if you do not. Through the website of Google Optimizer, create a new experiment.

Click on "Multivariate Experiment" and on "Create". You will arrive on this page:

New multivariate experiment - Step 1

Enter a name for your experiment, enter the address of your test page, the address of your conversion page, and click on "Continue".

New multivariate experiment - Step 2

Select "You will install and validate the javascript tags", and click on "Continue". You will arrive on a page where you can get your control, tracking, and conversion scripts.

You will find your tracking ID in your tracking script. It's a string of characters which starts with "UA":

var gwoTracker=_gat._getTracker("UA-XXXXXXXX-X");

Enter your tracking ID in the "Google Optimizer Account Tracking ID" field in the options page of Content Switcher, check the "Add javascript code" box and click on "Save Changes".

For your test page, create the "optimizer" (in lowercase letters) custom field and enter the string starting with "/" and ending with "/test" in your tracking script:

gwoTracker._trackPageview("/XXXXXXXXXX/test");

Insert into the content of your test page at least a code like this:

[optimizer-content name="Name of your content"]
Your original content[/optimizer-content]

Don't forget to include the quotes at the beginning and the end of the name value:

Example:

[optimizer-content name="Title"]Content Switcher[/optimizer-content]

For your conversion page, create the "optimizer" (in lowercase letters) custom field and enter the string starting with "/" and ending with "/goal" in your conversion script:

gwoTracker._trackPageview("/XXXXXXXXXX/goal");

When you have configured your tracking ID, your test page and your conversion page as shown above, click on "Validate pages". Google Optimizer will not detect your control, tracking and conversion scripts because Content Switcher puts them in external files. Click on "Continue", and on "Continue anyway". You will arrive on a page where you will can complete your experiment by creating your different variations.

Installation :

1. Unzip the plugin file.
2. Upload the "content-switcher" folder to the "/wp-content/plugins/" directory.
3. Activate the plugin through the "Plugins" menu in WordPress.
4. Configure the plugin through the Content Switcher options page in WordPress.

License: Freeware

Related: Random, Displaying, Content, alternate, Variable, Display, Rainbow, Number, default, Tracking, Insert, String, displayed, postspageswidgets, Conversion, quotquot, Short, Image

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 51.2 KB

Downloads: 2



More Similar Code

Language Switcher for Drupal 7 is an enhancement for core language switcher block in local module. It's very useful for websites with multi-languages where you want to display content in different languages side-by-side. Watch this video to better understand the concept.
Features:

Divide your website page to a number of sections where each sections contains nodes in one language (see the screenshot).
How to?

1-...



Theme Switcher Reloaded was sponsored by Themebot for use with the demos in the WordPress Themes section on themebot.com. Coding was done by kingler of 72pines. This is an updated version of the venerable themeswitcher by Ryan Boren and Theme...



A free open-source content management application released under the GPL.

MySQL ASP Web Content Managementd-OC?D? is a complete content managment website. Create your very own web site in just minutes. Log into the web-based cms control...



Software Review Content Management is a free open-source content management application.

Content Management Software-Review is a complete software review content management website. Create your very own software review site in just...



A free open-source content management application released under the GPL.

Media Content Management Music-Reviewd-OC?D? is a complete music review content management website.

Create your very own music review site in just...



RSS (Really Simple Syndication) is a lightweight XML format designed for sharing headlines and other Web content.

This VBScript class makes it easy to download and display RSS XML feeds.

Features:
- Provides object-based...



RSS Content Generator is a comprehensive website generator from free RSS feeds (news, press releases and articles) to boost up your search engine rankings or make money with Google AdSense or another advertising program.

RSS Content...



Featured Content Slider makes a slideshow out of arbitrary content on your page, so users can manually select a content to see or have them rotated automatically.

Pagination links let the user quickly pick a content to show. Each...



This script randomly selects from a group of URLs and displays one of them inside an iframe. Since it's an iframe, the content can be anything and everything.

Ideas for using this script are:
- Randomly rotate and display HTML...



This script loads a different page into an iframe daily, depending on the day of the month (1-31).

You can use it to serve up daily, changing content, such as a "tip of the day." The script offers optional code to auto resize...

User Review for Content Switcher
- required fields
     

Please enter text on the image