[thelist] Joomla anyone? also PHP randomizer?

Jenni Beard jenni at theweblotus.com
Sun Aug 23 20:34:37 CDT 2009


Thanks Paul!  Here's what I have now in ASP:

<%
  Function RandomNumber(intHighestNumber)
	Randomize
  	RandomNumber = Int(intHighestNumber * Rnd) + 1
  End Function

touse = RandomNumber(4)  '4 is the number of dancers to rotate %>

<p><a href="#content" id="skiplinks" tabindex="1">skip to main
content</a></p>
<div id="wrapper"><div class="dancer" id="dancer<%= touse %>">
---------------------------------------------
The related CSS:

.dancer {
	overflow: visible;
	visibility: visible;
	position: relative;
	background-position: 650px 30px;
	background-repeat: no-repeat;
	height: 850px;
	 }

#dancer1 {
	background-image: url(../dancers/dancer.png);	
}

#dancer2 {
	background-image: url(../dancers/dancer.png);
}
#dancer3 {
	background-image: url(../dancers/dancer.png);
}
#dancer4 {
	background-image: url(../dancers/dancer.png);
}
------------------------------

So, the code you gave me does nto work with the css the way that I have it
set up... it needs to work within the css.  Any ideas??

Thanks!!!

Jenni


-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Paul Bennett
Sent: Sunday, August 23, 2009 4:26 PM
To: thelist at lists.evolt.org
Subject: Re: [thelist] Joomla anyone? also PHP randomizer?

Hi Jenni,

Assuming images are named swapImage1.jpg, swapImage2.jpg etc..


//php
function randImage(){
	// 
	return 'swapImage'.rand(1,10).'.jpg';
}


// html
<img src=" <?php echo randImage(); ?> " alt="" ..>

http://www.php.net has a great online function reference and helpful
example code also.

HTH,
:)
Paul


-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Jenni Beard
Sent: Saturday, 22 August 2009 1:27 p.m.
To: thelist at lists.evolt.org
Subject: [thelist] Joomla anyone? also PHP randomizer?

Hi all,

 

Increasingly frustrated here!  I posted last week while trying to make
an
image randomize within a CSS layout.  Thanks again for the help on that.

 

Now I have a new problem.  The client wants Joomla added to the site,
and
has had it installed on his server (GoDaddy).  I've used an Access based
CMS
before, but never Joomla or any other one.  The CMS I was using
previously,
a proprietary one with the company I used to work for, was very simple
to
integrate with an html template.  Joomla, apparently, is not.

 

So, now I've got this great template for my site, with ASP code to make
the
one background image switch out.  And, Joomla's main page is a php page
so
it won't even read my ASP code.  It appears as though I have to create
my
template somewhat differently than my usual method, though I'm finding
some
workarounds for that to simplify things a little.

 

Any suggestions?  I don't know PHP at all, though I am guessing that
there
is a PHP function similar to that which I'm using in ASP to make the
background switch out (thank you again, Brian!).  Or I could use
Javascript
if I could figure that out.  As I've mentioned previously, my web
expertise
is more in the marketing area, and the more technical things I am very
shaky
on-trying to learn, though!

 

Thanks for any help!

 

Jenni

 

 

-- 

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 

www.mch.govt.nz  -  www.teara.govt.nz  -  www.nzhistory.net.nz  -
www.nzlive.com

The information contained in this email message does not necessarily reflect
the views of the Ministry for Culture and Heritage and may contain
information that is confidential or subject to legal privilege. If you are
not the intended recipient and receive this email in error: please notify
the Ministry for Culture and Heritage by return email or telephone (64 4 499
4229) and delete this email; you must not use, disclose, copy or distribute
this message or the information in it.

PLEASE CONSIDER THE ENVIRONMENT BEFORE YOU PRINT THIS EMAIL



-- 

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 




More information about the thelist mailing list