1
culex
Almost done rotator module
  • 2006/10/9 22:16

  • culex

  • Module Developer

  • Posts: 711

  • Since: 2004/9/23


I have some time ago asked how to port a script to XOOPS and was told to try ModGen. So I did, but for some reason I can't get the blocks to work right (at all even).

My module, however undone it is as it is not finished, can be downloaded here. As I said it isn't done but you'll probably get the idea.

rotator module

All I really want is to have the preview.php in a block on the front page, eighter as an iframe or better as the script found in preview.php

The Preview.php can be seen here alson.

$dagenidag date("w");
$nydagenidag $dagarr[date("w")];
$tidnu date("H:i:s");
$nextevent date("H:i:s",strtotime("+1 minutes"));

$resultnext mysql_query("SELECT * FROM xoops_dj_dj WHERE 'djstart' > '$tidnu' AND '$dagenidag' = djdag LIMIT 1") or die(mysql_error()); 

while(
$nextnow mysql_fetch_array($resultnext))


        
$id            $nextnow['id']; 
         
$djtitel            stripslashes2($nextnow['djtitel']); 
         
$djname stripslashes2($nextnow['djname']); 
         
$djstation    stripslashes2($nextnow['djstation']); 
         
$djbeskrivelse   stripslashes2($nextnow['djbeskrivelse']); 
$nextmarquee""._AM_DJ_scripttextnext.$nextnow['djstart']._AM_DJ_breaker.$nextnow['djslut']." ".stripslashes2($nextnow['djtitel']).$marqueewith." ".stripslashes2($nextnow['djname'])." ";



$resultshow mysql_query("SELECT * FROM xoops_dj_dj WHERE ('$tidnu' BETWEEN djstart AND djslut) AND '$dagenidag' = djdag") or die(mysql_error()); 

while(
$now mysql_fetch_array($resultshow))


        
$id            $now['id']; 
         
$djtitel            stripslashes2($now['djtitel']); 
         
$djname stripslashes2($now['djname']); 
         
$djstation    stripslashes2($now['djstation']); 
         
$djbeskrivelse   stripslashes2($now['djbeskrivelse']); 


echo 
"
  
    
"."

"
._AM_DJ_ligenupåstation.stripslashes2($now['djstation'])."
".stripslashes2($now["djtitel"])."
"
.'preview2.php?mode=info&id='.$now[id].'',null,'height=500,width=550,status=no,toolbar=no,menubar=no,location=no,left=0,top=0')">.$now['djbillede'].'" width="100" height="120" alt="".$now[djnavn]." border="0">
'
.stripslashes2($now["djname"])."

"
.$nydagenidag."
"
.$now['djstart']." to ".$now['djslut']."


"
.$nextmarquee."

"
;

}


Anyone can give me an idea as to what I am doing wrong ?
Programming is like sex:
One mistake and you have to support it for the rest of your life.

2
wizanda
Re: Almost done rotator module
  • 2006/10/9 22:51

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Yeh for one...yet probably not the point you are looking for...yet marqueeeee is not W3C and most browsers won't like it...
This can be done in CSS; W3C recommend as on some browser it will cause the page to go all over the place....

3
culex
Re: Almost done rotator module
  • 2006/10/10 12:37

  • culex

  • Module Developer

  • Posts: 711

  • Since: 2004/9/23


thanks, any point is helpfull, as I am pretty much on thin ice creating modules, so anything new will make it easier next time :)

Think I've done something right...

The module is here for download
Culex Dj Rotator

And here is the demo on my site
culex.dk
Programming is like sex:
One mistake and you have to support it for the rest of your life.

Login

Who's Online

208 user(s) are online (117 user(s) are browsing Support Forums)


Members: 0


Guests: 208


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits