Archive

Posts Tagged ‘rotating text’

Rotating Text

November 17th, 2009 Comments off

I’m trying to do a rotation of some text on a php page.
One each page I want 2 random texts but they can’t be the same value.

Here’s a script:

<?php
// number in the array
$rand = rand(0,2);

// value for each element
$testimonial[0] = “alan”;
$testimonial[1] = “andrew”;
$testimonial[2] = “beth”;
?>

The later in the page here is the text:

“This is a testimonial from <?php echo $testimonial[$rand]; ?> and
this is a testimonial from <?php echo $testimonial[$rand]; ?>”

In the above sentence there should be two different values.

Microsoft Outlook Plugin Tweak

July 1st, 2009 Comments off

OK, I already have a plugin that rotates quotes in in and out of my messages. ONE problem… I want the messages to go in order, instead of random.. so start at the top.. and go to the bottom. I will paste the code below…. It will likely only take a small tweak so instead of generating a random quote it does down the list one at a time…

Ready to get started on this one ASAP… I need it immediately.

# This extension provides “random” rotating text through a new
# template element named &amp;rotating_text; Please look at the
# “Rotating text.” Quote Template for a demonstration.

proc etx_rotating_text {args} {
set items {
{
“I have never let my schooling interfere with my
education.” – Mark Twain
}
{
“Beware of the man of one book.” – Thomas Aquinas
}
{
“Common sense is not so common.” – Voltaire
}
{
“Only two things are infinite, the universe and human stupidity,
and I’m not sure about the former.” – Albert Einstein
}
{
“It is not only fine feathers that make fine birds.” – Aesop
}
{
“Dignity does not consist on possessing honors, but in
deserving them.” – Aristotle
}
{
“No opinion, however absurd or incredible, can be imagined,
which has not been maintained by someone of the philosophers.” -
- Rene Descartes
}
{
“Do not be in a hurry to tie what you cannot untie.” – English Proverb
}
{
“If money is your hope for independence you will never have
it. The only real security that a man will have in this world
is a reserve of knowledge, experience, and ability.” – Henry Ford
}
{
“Injustice anywhere is a threat to justice everywhere.” -
- Martin Luther King
}
{
“Hatred is the coward’s revenge for being intimidated. ” –
- George Bernard Shaw
}
{
“Good taste is the enemy of creativity.” – Pablo Picasso
}
{
“Don’t go around saying the world owes you a living. The
world owes you nothing. It was here first.” – Mark Twain
}
{
“Once you have missed the first buttonhole you’ll never
manage to button up.” – Goethe
}
}
set count [llength $items]
set pseudo_random [expr [clock seconds] % $count]
return [lindex $items]
}

Php/mysql Link Exchange

May 27th, 2009 Comments off

I need a clone script similar to AlstraSoft Text Link Exchange Pro – http://www.alstrasoft.com/textlink.htm , but with a few differences as well as similarities.

Overview of what the software must do:

Complete traffic exchange system which allows us to run our own rotating text link exchange program. Users join our link exchange program and receive personalized code to insert a software generated “link box” on any page they choose to insert the code on their site. Link exchange program displays rotating text links plus individual company logos (logo is optional, per user preference). No banners. Only text ads plus logo. Similar to Google Adwords but with addition of logo and more flexibility over ad length and number of lines.

Rotation is based on calendar period, i.e. 1, 5, 7, 30, 60, 90 days or whatever number of days we choose for links to remain on each site before cycling away to another member site or up or down the page the ad is on, until the link cycle expires. Specific rotation order will be revealed to winning bidder.

General Exchange Features:

Bear