| Re: Text over rotating image? |
| by JMorris on 2005/6/28 13:48:56 Quote: Btw> how dificult would be to call a quotes module on your header? I tried using 3 different random quote modules in conjunction with the default banner manager and I could not get it to work. Oh well, plan B. I'll just use a timed animated .gif applied through the CSS background-image property and use the default banner manager to rotate the quotes. Thanks for the help. |
| Re: Text over rotating image? |
| by simeon on 2005/6/27 17:46:34 i don“t know if i got it right. but maybe try to put the code into a <div> inside the banners <td> le="color: #000000"><?php <{php}> $quoteFile = "quotes.txt"; $fp = fopen($quoteFile, "r"); $content = fread($fp, filesize($quoteFile)); $quotes = explode("n",$content); fclose($fp); srand((double)microtime()*1000000); $index = (rand(1, sizeof($quotes)) - 1); $var = $quotes[$index]; $GLOBALS['xoopsTpl']->assign( 'xoops_bantxt', $var); <{/php}> <td align="center" style="background-image:url(<{$xoops_banner}>); background-position:center; [color=990000] (i dont think this centering is nessecary cause of the td is already centered)[/color] background-repeat:no-repeat;"> <div><{$xoops_bantxt}></div></td> i didnt tryed it.see whats going on! sime |
| Re: Text over rotating image? |
| by wcrwcr on 2005/6/27 16:46:51 Hi Jmorris Did you see this theme?s random header function? https://xoops.org/modules/news/article.php?storyid=2271& At least to rotate the headers i guess it works ![]() Btw> how dificult would be to call a quotes module on your header? See you |
| Text over rotating image? |
| by JMorris on 2005/6/27 13:56:39 I'm working on the theme for work and what I want to do is use the built in Banners module to rotate a header graphic, then using a simple php script that reads a flat text file DB, display a random quote over top of the random graphic. Here's my code thus far: The problem I'm running into is that php cannot be added to theme.html I've also tried inserting the custom code in the banner manager itself, like so: Still no dice. Does anyone know how to create a random image background with random text displayed over it? Thanks for the help. |