|
Thème HQ_flash |
|
Supporter Xoops
Inscrit: 24/06/2006 05:39
|
Bonjour, J'aimerais avoir un petit coup de main qui m'aiderait énormément svp. Je suis vraiment débutant en ce qui concerne le php et le flash. J'ai trouvé un thème en flash pour xoops qui s'appelle hq_flash, mais je suis incapable de faire une résolution en 1004px. Habituellement nous allons dans le fichier style.css et avec la commande width tout va bien, mais on dirait que ça ne fonctionne pas pour ce thème. Je ne sais pas si c'est parce que c'est du flash, mais comparé aux autres, ce n'est pas theme.html, mais theme.php et je ne sais pas si ça peut changer quelque chose. Voici le code du theme.php
<?php
/* version: SE 1.0 build 20011202 */
/************************************************************/
/* Theme Name: phpkaox (v1.0) */
/* Theme Developer: kaox 2001 (http://www.kaox.d2g.com) */
/* Last Updated: 12/14/2001 */
/* */
/* Note: This theme looks best in IE 5-6 and Netscape 6. */
/* It looks okay in Netscape 4.7x but the right-hand side */
/* of the Story Box displays a little off by a few pixels. */
/************************************************************/
/************************************************************/
/* Theme Colors Definition */
/* */
/* Define colors for your web site. $bgcolor2 is generaly */
/* used for the tables border as you can see on OpenTable() */
/* function, $bgcolor1 is for the table background and the */
/* other two bgcolor variables follows the same criteria. */
/* $texcolor1 and 2 are for tables internal texts */
/************************************************************/
$xoopsTheme['thename'] = "HQ_Flash";
/************************************************************/
/* OpenTable Functions */
/* */
/* Define the tables look&feel for you whole site. For this */
/* we have two options: OpenTable and OpenTable2 functions. */
/* Then we have CloseTable and CloseTable2 function to */
/* properly close our tables. The difference is that */
/* OpenTable has a 100% width and OpenTable2 has a width */
/* according with the table content */
/************************************************************/
function OpenTable($width="100%") {
echo "<table width="".$width."" border="0" cellspacing="0" cellpadding="0" class='bg2'><tr><td>n";
echo "<table width="100%" border="0" cellspacing="1" cellpadding="8" class='bg5'><tr><td>n";
}
function CloseTable() {
echo "</td></tr></table></td></tr></table>n";
}
/************************************************************/
/* Function themeheader() */
/* */
/* Control the header for your site. You need to define the */
/* BODY tag and in some part of the code call the blocks */
/* function for left side with: blocks(left); */
/************************************************************/
function themeheader($show_rblock) {
global $xoopsConfig, $xoopsUser, $xoopsTheme;
$link1 = "".$xoopsConfig['xoops_url']."/index.php";
$link1name = "Home";
$link2 = "".$xoopsConfig['xoops_url']."/modules/news/";
$link2name = "News";
$link3 = "".$xoopsConfig['xoops_url']."/modules/mylinks/";
$link3name = "Web Links";
$link4 = "".$xoopsConfig['xoops_url']."/modules/mydownloads";
$link4name = "Downloads";
$link5 = "".$xoopsConfig['xoops_url']."/modules/newbb";
$link5name = "Forum";
$link6 = "".$xoopsConfig['xoops_url']."/modules/polls";
$link6name = "Polls";
$link7 = "".$xoopsConfig['xoops_url']."/modules/faq/";
$link7name = "FAQ";
$link8 = "".$xoopsConfig['xoops_url']."/modules/news/submit.php";
$link8name = "Submit News";
$link1 = str_replace(""", "'", $link1);
$link1 = str_replace("&", "-ampersand-", $link1);
$link1name = str_replace(""", "'", $link1name);
$link1name = str_replace("&", "-ampersand-", $link1name);
$link2 = str_replace(""", "'", $link2);
$link2 = str_replace("&", "-ampersand-", $link2);
$link2name = str_replace(""", "'", $link2name);
$link2name = str_replace("&", "-ampersand-", $link2name);
$link3 = str_replace(""", "'", $link3);
$link3 = str_replace("&", "-ampersand-", $link3);
$link3name = str_replace(""", "'", $link3name);
$link3name = str_replace("&", "-ampersand-", $link3name);
$link4 = str_replace(""", "'", $link4);
$link4 = str_replace("&", "-ampersand-", $link4);
$link4name = str_replace(""", "'", $link4name);
$link4name = str_replace("&", "-ampersand-", $link4name);
$link5 = str_replace(""", "'", $link5);
$link5 = str_replace("&", "-ampersand-", $link5);
$link5name = str_replace(""", "'", $link5name);
$link5name = str_replace("&", "-ampersand-", $link5name);
$link6 = str_replace(""", "'", $link6);
$link6 = str_replace("&", "-ampersand-", $link6);
$link6name = str_replace(""", "'", $link6name);
$link6name = str_replace("&", "-ampersand-", $link6name);
$link7 = str_replace(""", "'", $link7);
$link7 = str_replace("&", "-ampersand-", $link7);
$link7name = str_replace(""", "'", $link7name);
$link7name = str_replace("&", "-ampersand-", $link7name);
$link8 = str_replace(""", "'", $link8);
$link8 = str_replace("&", "-ampersand-", $link8);
$link8name = str_replace(""", "'", $link8name);
$link8name = str_replace("&", "-ampersand-", $link8name);
$slogan = $xoopsConfig['slogan'];
if($xoopsUser){
$username = $xoopsUser->uname();
} else {
$username = $xoopsConfig['anonymous'];
}
echo "<body bgcolor=#333333><CENTER>n"
."<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=100% HEIGHT=125><param name=wmode value=transparent>
<PARAM NAME=movie VALUE="".$xoopsConfig['xoops_url']."/themes/HQ_Flash/sitename.swf?time=";
echo "&sitename=".$xoopsConfig['sitename']."&slogan=".stripslashes($slogan)."&link1=$link1&link1name=$link1name&link2=$link2&link2name=$link2name&link3=$link3&link3name=$link3name&link4=$link4&link4name=$link4name&link5=$link5&link5name=$link5name&link6=$link6&link6name=$link6name&link7=$link7&link7name=$link7name&link8=$link8&link8name=$link8name"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000> <EMBED src="".$xoopsConfig['xoops_url']."/themes/HQ_Flash/sitename.swf?time=";
echo "&sitename=".$xoopsConfig['sitename']."&slogan=".stripslashes($slogan)."&link1=$link1&link1name=$link1name&link2=$link2&link2name=$link2name&link3=$link3&link3name=$link3name&link4=$link4&link4name=$link4name&link5=$link5&link5name=$link5name&link6=$link6&link6name=$link6name&link7=$link7&link7name=$link7name&link8=$link8&link8name=$link8name" quality=high bgcolor=#000000 WIDTH=100% HEIGHT=125 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT></CENTER>";
OpenWaitBox();
echo "<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#666666">
<tr>
<td valign="top" bgcolor="#DDE1DE">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="285" valign="middle" align="center"></td>
<td>";
if ($xoopsConfig['banners']) {
showbanner();
}
echo "</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#CCCCCC">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="20%" bgcolor="#EFEFEF" valign="top" align="center"0>";
make_sidebar("left");
echo "</td>
<td align="center" valign="top">";
}
/************************************************************/
/* Function themefooter() */
/* */
/* Control the footer for your site. You don't need to */
/* close BODY and HTML tags at the end. In some part call */
/* the function for right blocks with: blocks(right); */
/* Also, $index variable need to be global and is used to */
/* determine if the page your're viewing is the Homepage or */
/* and internal one. */
/************************************************************/
function themefooter($show_rblock, $footer) {
echo "</td>";
if ( $show_rblock ) {
echo "<td width="20%" bgcolor="#efefef" valign="top" align="center">";
make_sidebar("right");
}
echo "</td></tr></table></td></tr><tr>
<td height="30" valign="middle" bgcolor="#DDE1DE" align="center">";
echo $footer;
echo "</td>
</tr>
</table>";
CloseWaitBox();
}
/************************************************************/
/* Function themesidebox() */
/* */
/* Control look of your blocks. Just simple. */
/************************************************************/
function themesidebox($title, $content) {
global $sepcolor, $thename, $bgcolor4, $xoopsConfig, $xoopsUser, $xoopsTheme;
$title = str_replace(""", "'", $title);
$title = str_replace("&", "-ampersand-", $title);
echo "<TABLE WIDTH="150" BORDER="0" CELLSPACING="0" CELLPADDING="4" BGCOLOR="#DFE9EB">n"
."<TR>n"
."<TD ALIGN="left" VALIGN="top">n"
."<TABLE WIDTH="150" BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#DFE9EB">n"
."<TR>n"
."<td CLASS="pn-title"><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=150 HEIGHT=50><param name=wmode value=transparent>
<PARAM NAME=movie VALUE="".$xoopsConfig['xoops_url']."/themes/HQ_Flash/blocktitle.swf?blocktitle=<p align='center'><b>$title</b></p>"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#DFE9EB> <EMBED src="".$xoopsConfig['xoops_url']."/themes/HQ_Flash/blocktitle.swf?blocktitle=<p align='center'><b>$title</b></p>" quality=high bgcolor=#DFE9EB WIDTH=150 HEIGHT=50 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT></TD>n"
."</TR>n"
."</TABLE>n"
."</TD>n"
."</TR>n"
."<TR>n"
."<TD></TD>n"
."</TR>n"
."<TR>n"
."<TD ALIGN="left" VALIGN="top" bgcolor="#DFE9EB"><hr size=1>$content<hr size=1><br></TD>n"
."</TR>n"
."</TABLE><br>n";
}
?>
En même temps j'en profite pour demander une autre question face à ce theme. Il y a longtemps que je cherche un menu flash. Nombre de vous m'avez aidé, mais je ne sais pourquoi, mais mes tentative ont échoué. Ce menu à l'air d'être intégré directement dans le fichier au lieu de faire référence à un autre fichier. Ce qui peut peut-être m'aider. J'ai de la difficulté à voir le code que je pourrais découper pour pouvoir m'en servir comme menu uniquement avec d'autres fichier. Je sais bien que je ne peux pas mettre du code php dans un fichier html. Est-ce qu'il y aurait alors une possibilité de faire en sorte que le menu apparait en haut d'un texte html par l'appel d'un fichier qui pourrait être crée spécialement pour ce menu ? J'espère ne pas vous avoir trop perdu dans ma demande. Merci à chacun
Posté le : 29/01/2008 06:16
|
Hellboy
|
|
Re: Thème HQ_flash |
|
Supporter Xoops
Inscrit: 09/01/2005 13:37
De Breizh
|
Bonjour,
Ce thème est pour les versions 1.x de Xoops, maintenant le fichier theme est en html et non en php
@++
Posté le : 29/01/2008 09:39
|
La connaissance s'accroît quand on la partage ...
|
|
Re: Thème HQ_flash |
|
Supporter Xoops
Inscrit: 24/06/2006 05:39
|
Merci... J'ai dû mal faire ma recherche le premier coup, je suis tomber sur ce lien qui explique si je comprends bien le code pour le mettre en html, mais ça ne fonctionne pas. Voici le code que j'ai entré... Citation : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head>
<body>
function searchandreplace (the_string,search_string,replace_string,occurrences,backward) { if (search_string == replace_string) { return the_string } var found = 0 if (backward == true) { for ( var pos = the_string.lastIndexOf(search_string); pos >= 0; pos = -1){ found++ var start_string = the_string.substr(0,pos) var end_string = the_string.substr(pos + search_string.length) the_string = start_string + replace_string + end_string pos = the_string.lastIndexOf(search_string,start_string.length) if (found == occurrences) { } } } else { for ( var pos = the_string.indexOf(search_string); pos >= 0; pos = -1){ found++ var start_string = the_string.substr(0,pos) var end_string = the_string.substr(pos + search_string.length) the_string = start_string + replace_string + end_string pos = the_string.indexOf(search_string,pos + replace_string.length) if (found == occurrences) { } } } return the_string } string_to_search = "-ampersand-" string_to_replace = "&" link1 = searchandreplace (link1,string_to_search,string_to_replace) link1name = searchandreplace (link1name,string_to_search,string_to_replace) link2 = searchandreplace (link2,string_to_search,string_to_replace) link2name = searchandreplace (link2name,string_to_search,string_to_replace) link3 = searchandreplace (link3,string_to_search,string_to_replace) link3name = searchandreplace (link3name,string_to_search,string_to_replace) link4 = searchandreplace (link4,string_to_search,string_to_replace) link4name = searchandreplace (link4name,string_to_search,string_to_replace) link5 = searchandreplace (link5,string_to_search,string_to_replace) link5name = searchandreplace (link5name,string_to_search,string_to_replace) link6 = searchandreplace (link6,string_to_search,string_to_replace) link6name = searchandreplace (link6name,string_to_search,string_to_replace) link7 = searchandreplace (link7,string_to_search,string_to_replace) link7name = searchandreplace (link7name,string_to_search,string_to_replace) link8 = searchandreplace (link8,string_to_search,string_to_replace) link8name = searchandreplace (link8name,string_to_search,string_to_replace) stop()
function themesidebox($title, $content) { global $sepcolor, $thename, $bgcolor4, $xoopsConfig, $xoopsUser, $xoopsTheme;
$title = str_replace("\"", "'", $title); $title = str_replace("&", "-ampersand-", $title);
<TABLE WIDTH=\"150\" BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"4\" BGCOLOR=\"#DFE9EB\">" ."<tr>" ."<td>" ."<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">" ."<tr>" ."<td CLASS=\"pn-title\"><OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/sh ... ash/swflash.cab#version=5,0,0,0\" WIDTH=150 HEIGHT=60><param name=wmode value=transparent> // <PARAM NAME=movie VALUE=\"".$xoopsConfig['xoops_url']."/themes/flash2/titre.swf?blocktitle=<p align='center'><b>$title</b></p>\"> <PARAM NAME=quality VALUE=high> // <PARAM NAME=bgcolor VALUE=#DFE9EB> <EMBED src=\"".$xoopsConfig['xoops_url']."/themes/flash2/titre.swf?blocktitle=<p align='center'><b>$title</b></p>\" quality=high bgcolor=#DFE9EB WIDTH=150 HEIGHT=40 TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/d ... od_Version=ShockwaveFlash\"></EMBED> //</OBJECT></TD>" ."</td>" ."</tr>" ."</table>" ."<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">" ."<tr>" ."<td class=\"flyoutContent\">" ."$content" ."</td>" ."</tr>" ."</table>" ."</td></tr></table>"; }
</body> </html>
je dois faire une erreur. Le code que j'ai entré est uniquement pour voir la bannière sans le texte qui s'en suit. C'est mon seul soucis. Je n'ai pas trouvé ce thème déjà monter en html, uniquement en php. Je tente alors de le mettre à la main en html. Merci pour ceux et celles qui voudraient bien me donner un petit coup de main
Posté le : 30/01/2008 05:51
|
Hellboy
|
Vous pouvez voir les sujets.
Vous ne pouvez pas débuter de nouveaux sujets.
Vous ne pouvez pas répondre aux contributions.
Vous ne pouvez pas éditer vos contributions.
Vous ne pouvez pas effacez vos contributions.
Vous ne pouvez pas ajouter de nouveaux sondages.
Vous ne pouvez pas voter en sondage.
Vous ne pouvez pas attacher des fichiers à vos contributions.
Vous ne pouvez pas poster sans approbation.
|