Hello, a nice little hack that allows you to scroll a randomly citation.A each refresh of the page, change the citation (fully customizable)
Open the header.php file of the style that you used ....
Search header.php (to bottom of page)
Add After:
fun :rolleyes:
Open the header.php file of the style that you used ....
Search header.php (to bottom of page)
Quote:?>
Add After:
Quote:<center><?
/*** Congfigurer citations***/
$proverbes = Array("Love does not come cheap with the love and works with the works. "" There is a kind of love, but there are a thousand different copies. "" Love takes off the mind to those who give and those who do not. "" Love is the heart of the novel is the pleasure that is history. "," Love is a two selfishness. "" When you are loved, no doubt about anything. When we love, we doubt everything. "" It is often of love to ambition, but it does little ambition to love. "
"Love is the only passion that is paid for a currency that makes itself.", "Friendship often ends in love, but rarely love into friendship.", "Love is to everyone, but friendship is the test of heart. "," Offering friendship to anyone who will love is to give bread to dying of thirst. "," The violence that it is to remain faithful to what we love is not better than infidelity. "," In love, there are only the beginnings that are charming, so there is fun again often. ");
#Do not touch anything from here
function fake_array_rand ($array, $num_req = 1)
{
# Ensure that $num_req has a sane value
$num_req > 0 or $num_req = 1;
$count = count ($array);
for ($n=0; $n < $num_req; ++$n)
{
# Help keep the number generator random Smiley
$randval
and usleep ("0.$randval");
/***function to generate a random number***/
srand ((double) microtime() * 10000000);
$randval = rand();
# Use the random value to 'pick' an entry from the array
# Count the number of times that the entry is picked
++$index[$randval % $count];
}
# Loop through the array
for ($n = 0; $n < $count; ++$n, next ($array))
{
# When we get to an entry that has been picked
# Put the entry into an array for output
# Don't forget to decrease the counter
while ($index[$n])
{
$out[] = key ($array);
--$index[$n];
}
}
# Return a string if only on random key was asked for
# otherwise return an array
return ($num_req == 1) ? $out[0] : $out ;
}
#example of the application
$rand_citation = fake_array_rand ($proverbes);
/***Displaying quote***/
echo"<i>$proverbes[$rand_citation]<i>";
?>
<center>
fun :rolleyes: