Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Blu-Ray burning software (Data)

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > General IT Discussion

php question
Reply
 
Thread Tools
Old 25-04-2011, 13:29   #1
downquark1
cf.mega poster
 
Join Date: Jun 2003
Posts: 4,952
downquark1 has a bronzed appealdownquark1 has a bronzed appeal
downquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appeal
php question

I have a wordpress blog set up and I want the header image to rotate randomly, so I use this script http://www.alistapart.com/d/randomizer/rotate.txt (rename it to rotate.php)
and put this in CSS file
image:url(images/headers/rotate.php);
background-repeat:no-repeat;
background-position:top;
height:309px;
}


But the when I go to the rotate.php the website returns the text of the script instead of executing it.

How do I get it to execute?
__________________
"Knowledge is Power. Power Corrupts. Study Hard. Be Evil."
downquark1 is offline   Reply With Quote
Advertisement
Old 25-04-2011, 13:52   #2
craigj2k12
cf.mega poster
 
Join Date: Nov 2010
Location: Stafford
Posts: 4,225
craigj2k12 has a bronzed appealcraigj2k12 has a bronzed appeal
craigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appeal
Re: php question

image:url(images/headers/rotate.php);

image:
isnt a css property and:
rotate.php is the script file, and cant be added as an image anyway (image=picture)

i havnt used wordpress, is it PHP?
for php, you will want something like:
include 'images/headers/rotate.php';

for HTML you will want
<!--#include file="images/headers/rotate.php" -->

insert this line of code into the page, not the css
craigj2k12 is offline   Reply With Quote
Old 25-04-2011, 14:14   #3
downquark1
cf.mega poster
 
Join Date: Jun 2003
Posts: 4,952
downquark1 has a bronzed appealdownquark1 has a bronzed appeal
downquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appeal
Re: php question

the image property was in the original wordpress css file.

I was following the instructions here: http://sonspring.com/journal/easy-ra...ss-backgrounds

And wordpress is php
__________________
"Knowledge is Power. Power Corrupts. Study Hard. Be Evil."
downquark1 is offline   Reply With Quote
Old 25-04-2011, 16:08   #4
craigj2k12
cf.mega poster
 
Join Date: Nov 2010
Location: Stafford
Posts: 4,225
craigj2k12 has a bronzed appealcraigj2k12 has a bronzed appeal
craigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appeal
Re: php question

background: url(images/rotator.php);

thats right, you had

image: url(images/rotator.php)
craigj2k12 is offline   Reply With Quote
Old 25-04-2011, 17:13   #5
downquark1
cf.mega poster
 
Join Date: Jun 2003
Posts: 4,952
downquark1 has a bronzed appealdownquark1 has a bronzed appeal
downquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appeal
Re: php question

sorry I didn't copy it properly:
this is what doesn't work
#main-img{
width:906px;
background-image:url(images/headers/rotate.php);
background-repeat:no-repeat;
background-position:top;
height:309px;
}
__________________
"Knowledge is Power. Power Corrupts. Study Hard. Be Evil."
downquark1 is offline   Reply With Quote
Old 25-04-2011, 20:17   #6
Graham M
Inactive
 
Graham M's Avatar
 
Join Date: Jul 2003
Location: Poole, Dorset
Age: 41
Services: FreeSat+ Tivo V-Box VM 60MBit
Posts: 13,365
Graham M has a pair of shiny starsGraham M has a pair of shiny stars
Graham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny stars
Send a message via MSN to Graham M Send a message via Yahoo to Graham M
Re: php question

.php files can be linked as images as they can be set to return an encoded image file rather than text, downquark, maybe you could link me to your site so I can take a look
Graham M is offline   Reply With Quote
Old 26-04-2011, 00:35   #7
craigj2k12
cf.mega poster
 
Join Date: Nov 2010
Location: Stafford
Posts: 4,225
craigj2k12 has a bronzed appealcraigj2k12 has a bronzed appeal
craigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appealcraigj2k12 has a bronzed appeal
Re: php question

but "image:" isnt a css property
craigj2k12 is offline   Reply With Quote
Old 26-04-2011, 12:46   #8
downquark1
cf.mega poster
 
Join Date: Jun 2003
Posts: 4,952
downquark1 has a bronzed appealdownquark1 has a bronzed appeal
downquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appealdownquark1 has a bronzed appeal
Re: php question

Thanks to Graham for solving my problem. Some how some screwy metadata had got inserted into the file without me noticing.
__________________
"Knowledge is Power. Power Corrupts. Study Hard. Be Evil."
downquark1 is offline   Reply With Quote
Old 26-04-2011, 17:25   #9
Graham M
Inactive
 
Graham M's Avatar
 
Join Date: Jul 2003
Location: Poole, Dorset
Age: 41
Services: FreeSat+ Tivo V-Box VM 60MBit
Posts: 13,365
Graham M has a pair of shiny starsGraham M has a pair of shiny stars
Graham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny stars
Send a message via MSN to Graham M Send a message via Yahoo to Graham M
Re: php question

Basically something can converted all of the symbols in the code to HTML characters like &lt; for instance and some data had been inserted that didn't belong which would have corrupted the output images anyway
Graham M is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 18:32.


Server: lithium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum