News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

adding an smf theme to my other web pages

Started by glennmckenna, November 10, 2012, 08:12:09 AM

Previous topic - Next topic

glennmckenna

Quote from: Kindred on December 30, 2012, 11:52:45 AM
no....  use the combination of what aharis and I said...

echo '<title>'. $context['page_title'] . '</title>';

you don't replace page_title with home... you use the words page_title because that is the variable.
here is what it looks like at the moment i might of miss understood what you meant but this is what I've got at the moment
<?php

$ssi_theme 
4;
 require_once(
'forum/SSI.php');
 
template_html_above();
  
template_body_above();

echo 
'<title>'$context['home'] . '</title>';  
 echo 
'
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>


<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link href="main.css" rel="stylesheet" type="text/css">

</head>

<body>
<a class="twitter-timeline"  href="https://twitter.com/aulnaynatation" data-widget-id="282847438883135488">Tweets de @aulnaynatation</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

<div class="menu-right">
<div class="menu-header" style="width: 300px"><strong>who are we</strong>
<div style="margin-bottom:10px; width: 300px;" class="menu-body">
summer swimming club affiliated<br>to the French Swimming 
Federation.<br>We have many activities some including all the 
family we welcome swimmers of all levels from<br>beginners to 
competitive including<br>non swimmers as these lessons are<br>
also provided form six years plus,<br>we are a part of the 
French National swimming school discover all the benefits, 
enjoyment, fitness, discipline, for everyone of swimming.
</div>
</div>
<div class="menu-header" style="margin-top:15px"><strong>weather<strong>
<div class="menu-body">
<center>
<div id="c_c12b608b55173f57f58a42ecbafb8113" class="alto">
<h2 style="color: #000000; margin: 0 0 3px; padding: 2px; font: bold 13px/1.2 Verdana; text-align: center;"><a href="http://www.meteorama.fr/m%C3%A9t%C3%A9o-aulnay.html" style="color: #000000; text-decoration: none;">meteo a Aulnay</a></h2></div><script type="text/javascript" src="http://www.meteorama.fr/widget/widget_loader/c12b608b55173f57f58a42ecbafb8113"></script>
</center>
</div>
</div>
</div>
<div style="margin:25px 10px" align="center">
<a target="_blank" href="http://charente-maritime.fr/CG17/jcms/j_5/accueil">
<img src="../images/CG 17.jpg" alt="charente marentime" class="logo"/></a>
<a target="_blank" href="http://www.cnds.info/">
<img src="../images/Etat CNDS.JPG" alt="cnds" class="logo"/></a>
<a target="_blank" href="http://www.cdc-aulnay.fr/">
<img src="../images/logo cdc.jpg" alt="conton de aulnay" class="logo"/></a>
<a target="_blank" href="http://www.ffnatation.fr/webffn/index.php">
<img src="../images/logo_ffn.png" alt="ffn" class="logo"/></a>
<a target="_blank" href="http://www.poitou-charentes.fr/accueil.html;jsessionid=853A0918DE3F77AA12AB64DCC193FA02">
<img src="../images/logo-rpc-espritequip.JPG" alt="" class="logo"/></a>
<a target="_blank" href="http://charentemaritime.ffnatation.fr/script/index.php">
<img src="../images/logo FFN issi.gif" alt="logo FFN charente maritime" class="logo" /></a>
<a target="_blank" href="http://poitoucharentes.ffnatation.fr/script/index.php">
<img src="../images/logo ffn poitou charente.jpg" alt="logo ffn poitou charente" class="logo" /></a>
</div>
<div aligin="center" class="copyright">Copyright © 2011-2013 US aulnay natation All Rights Reserved</div>

</body>

</html>
'
;
  
   
template_body_below();
  
template_html_below();
 
?>


and it still hasn't changed the name
but thanks for for such a fast reply

Kindred

no no no no no.....

you have missed the whole point of the template above...


<?php

$ssi_theme 
4;
 require_once(
'forum/SSI.php');

$context['home'] = 'Homepage';

 
template_html_above();
  
template_body_above();

 echo 
'
<a class="twitter-timeline"  href="https://twitter.com/aulnaynatation" data-widget-id="282847438883135488">Tweets de @aulnaynatation</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

<div class="menu-right">
<div class="menu-header" style="width: 300px"><strong>who are we</strong>
<div style="margin-bottom:10px; width: 300px;" class="menu-body">
summer swimming club affiliated<br>to the French Swimming 
Federation.<br>We have many activities some including all the 
family we welcome swimmers of all levels from<br>beginners to 
competitive including<br>non swimmers as these lessons are<br>
also provided form six years plus,<br>we are a part of the 
French National swimming school discover all the benefits, 
enjoyment, fitness, discipline, for everyone of swimming.
</div>
</div>
<div class="menu-header" style="margin-top:15px"><strong>weather<strong>
<div class="menu-body">
<center>
<div id="c_c12b608b55173f57f58a42ecbafb8113" class="alto">
<h2 style="color: #000000; margin: 0 0 3px; padding: 2px; font: bold 13px/1.2 Verdana; text-align: center;"><a href="http://www.meteorama.fr/m%C3%A9t%C3%A9o-aulnay.html" style="color: #000000; text-decoration: none;">meteo a Aulnay</a></h2></div><script type="text/javascript" src="http://www.meteorama.fr/widget/widget_loader/c12b608b55173f57f58a42ecbafb8113"></script>
</center>
</div>
</div>
</div>
<div style="margin:25px 10px" align="center">
<a target="_blank" href="http://charente-maritime.fr/CG17/jcms/j_5/accueil">
<img src="../images/CG 17.jpg" alt="charente marentime" class="logo"/></a>
<a target="_blank" href="http://www.cnds.info/">
<img src="../images/Etat CNDS.JPG" alt="cnds" class="logo"/></a>
<a target="_blank" href="http://www.cdc-aulnay.fr/">
<img src="../images/logo cdc.jpg" alt="conton de aulnay" class="logo"/></a>
<a target="_blank" href="http://www.ffnatation.fr/webffn/index.php">
<img src="../images/logo_ffn.png" alt="ffn" class="logo"/></a>
<a target="_blank" href="http://www.poitou-charentes.fr/accueil.html;jsessionid=853A0918DE3F77AA12AB64DCC193FA02">
<img src="../images/logo-rpc-espritequip.JPG" alt="" class="logo"/></a>
<a target="_blank" href="http://charentemaritime.ffnatation.fr/script/index.php">
<img src="../images/logo FFN issi.gif" alt="logo FFN charente maritime" class="logo" /></a>
<a target="_blank" href="http://poitoucharentes.ffnatation.fr/script/index.php">
<img src="../images/logo ffn poitou charente.jpg" alt="logo ffn poitou charente" class="logo" /></a>
</div>
<div aligin="center" class="copyright">Copyright © 2011-2013 US aulnay natation All Rights Reserved</div>
'
;
  
   
template_body_below();
  
template_html_below();
 
?>

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Ugh. ARGH. I thought this was well documented by now.

<?php
$ssi_theme 
4;
require_once(
'SSI.php');

$context['page_title'] = 'My page title';
template_header();
  
 echo 
'
   <hr />
   This would be the content section of the page
   <hr />
   '
;
  
template_footer();
 
?>


Do not call the normal theme templates directly.

glennmckenna

right now i eaither very stupid or i don't know what
cause when i try the way you told me to do it well it goes wrong
-it doesn't change the pages title
-the login part show up wrong
-i've got some strange signs at the top of the page too
here it is in it's current state

<?php
$ssi_theme 
4;
require_once(
'forum/SSI.php');

$context['page_title'] = 'home';
template_header();
  
 echo 
'
 <hr>



<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link href="main.css" rel="stylesheet" type="text/css">


<a class="twitter-timeline"  href="https://twitter.com/aulnaynatation" data-widget-id="282847438883135488">Tweets de @aulnaynatation</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

<div class="menu-right">
<div class="menu-header" style="width: 300px"><strong>who are we</strong>
<div style="margin-bottom:10px; width: 300px;" class="menu-body">
summer swimming club affiliated<br>to the French Swimming 
Federation.<br>We have many activities some including all the 
family we welcome swimmers of all levels from<br>beginners to 
competitive including<br>non swimmers as these lessons are<br>
also provided form six years plus,<br>we are a part of the 
French National swimming school discover all the benefits, 
enjoyment, fitness, discipline, for everyone of swimming.
</div>
</div>
<div class="menu-header" style="margin-top:15px"><strong>weather<strong>
<div class="menu-body">
<center>
<div id="c_c12b608b55173f57f58a42ecbafb8113" class="alto">
<h2 style="color: #000000; margin: 0 0 3px; padding: 2px; font: bold 13px/1.2 Verdana; text-align: center;"><a href="http://www.meteorama.fr/m%C3%A9t%C3%A9o-aulnay.html" style="color: #000000; text-decoration: none;">meteo a Aulnay</a></h2></div><script type="text/javascript" src="http://www.meteorama.fr/widget/widget_loader/c12b608b55173f57f58a42ecbafb8113"></script>
</center>
</div>
</div>
</div>
<div style="margin:25px 10px" align="center">
<a target="_blank" href="http://charente-maritime.fr/CG17/jcms/j_5/accueil">
<img src="../images/CG 17.jpg" alt="charente marentime" class="logo"/></a>
<a target="_blank" href="http://www.cnds.info/">
<img src="../images/Etat CNDS.JPG" alt="cnds" class="logo"/></a>
<a target="_blank" href="http://www.cdc-aulnay.fr/">
<img src="../images/logo cdc.jpg" alt="conton de aulnay" class="logo"/></a>
<a target="_blank" href="http://www.ffnatation.fr/webffn/index.php">
<img src="../images/logo_ffn.png" alt="ffn" class="logo"/></a>
<a target="_blank" href="http://www.poitou-charentes.fr/accueil.html;jsessionid=853A0918DE3F77AA12AB64DCC193FA02">
<img src="../images/logo-rpc-espritequip.JPG" alt="" class="logo"/></a>
<a target="_blank" href="http://charentemaritime.ffnatation.fr/script/index.php">
<img src="../images/logo FFN issi.gif" alt="logo FFN charente maritime" class="logo" /></a>
<a target="_blank" href="http://poitoucharentes.ffnatation.fr/script/index.php">
<img src="../images/logo ffn poitou charente.jpg" alt="logo ffn poitou charente" class="logo" /></a>
</div>
<div aligin="center" class="copyright">Copyright © 2011-2013 US aulnay natation All Rights Reserved</div>

<hr>
   '
;
  
template_footer();
 
?>


Arantor

A link to the page would help at this stage.


Arantor

OK, so change $context['page_title'] to $context['page_title_html_safe'] in your above code, that will fix the missing title.

I don't see any strange signs at the top of the page. And what's wrong with the username/login part?

glennmckenna

to get to show up the way i want at my end i have to do it like this


<?php

$ssi_theme 
4;
 require_once(
'forum/SSI.php');
$context['page_title_html_safe'] = 'home';


 
template_html_above();
  
template_body_above();

 echo 
'


<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link href="main.css" rel="stylesheet" type="text/css">


<a class="twitter-timeline"  href="https://twitter.com/aulnaynatation" data-widget-id="282847438883135488">Tweets de @aulnaynatation</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

<div class="menu-right">
<div class="menu-header" style="width: 300px"><strong>who are we</strong>
<div style="margin-bottom:10px; width: 300px;" class="menu-body">
summer swimming club affiliated<br>to the French Swimming 
Federation.<br>We have many activities some including all the 
family we welcome swimmers of all levels from<br>beginners to 
competitive including<br>non swimmers as these lessons are<br>
also provided form six years plus,<br>we are a part of the 
French National swimming school discover all the benefits, 
enjoyment, fitness, discipline, for everyone of swimming.
</div>
</div>
<div class="menu-header" style="margin-top:15px"><strong>weather<strong>
<div class="menu-body">
<center>
<div id="c_c12b608b55173f57f58a42ecbafb8113" class="alto">
<h2 style="color: #000000; margin: 0 0 3px; padding: 2px; font: bold 13px/1.2 Verdana; text-align: center;"><a href="http://www.meteorama.fr/m%C3%A9t%C3%A9o-aulnay.html" style="color: #000000; text-decoration: none;">meteo a Aulnay</a></h2></div><script type="text/javascript" src="http://www.meteorama.fr/widget/widget_loader/c12b608b55173f57f58a42ecbafb8113"></script>
</center>
</div>
</div>
</div>
<div style="margin:25px 10px" align="center">
<a target="_blank" href="http://charente-maritime.fr/CG17/jcms/j_5/accueil">
<img src="../images/CG 17.jpg" alt="charente marentime" class="logo"/></a>
<a target="_blank" href="http://www.cnds.info/">
<img src="../images/Etat CNDS.JPG" alt="cnds" class="logo"/></a>
<a target="_blank" href="http://www.cdc-aulnay.fr/">
<img src="../images/logo cdc.jpg" alt="conton de aulnay" class="logo"/></a>
<a target="_blank" href="http://www.ffnatation.fr/webffn/index.php">
<img src="../images/logo_ffn.png" alt="ffn" class="logo"/></a>
<a target="_blank" href="http://www.poitou-charentes.fr/accueil.html;jsessionid=853A0918DE3F77AA12AB64DCC193FA02">
<img src="../images/logo-rpc-espritequip.JPG" alt="" class="logo"/></a>
<a target="_blank" href="http://charentemaritime.ffnatation.fr/script/index.php">
<img src="../images/logo FFN issi.gif" alt="logo FFN charente maritime" class="logo" /></a>
<a target="_blank" href="http://poitoucharentes.ffnatation.fr/script/index.php">
<img src="../images/logo ffn poitou charente.jpg" alt="logo ffn poitou charente" class="logo" /></a>
</div>
<div aligin="center" class="copyright">Copyright © 2011-2013 US aulnay natation All Rights Reserved</div>

'
;
  
   
template_body_below();
  
template_html_below();
 
?>


i also had to add this i did to the script


<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link href="main.css" rel="stylesheet" type="text/css">

unless there is a way to do it with the index.template.php code witch i guess there is

but on the good side thanks a million for the page tittle cause that has now changed
here is a link to the page in it's current state with the code that i've posted (in this post)

Arantor

Um, template_html_above() should be doing that (and template_header() calls that, and some other stuff anyway)

Take them out and let me see what page you get out of it.

glennmckenna

done you can see the difference straight away

Arantor

So, what's in this main.css file? Why does it need to be loaded?

Secondly, the forum is not set to use UTF-8, so it's not issuing the UTF-8 indicator that you're trying to force into the page. Easiest fix is to convert the forum to UTF-8 from the admin area (Maintenance > Database) and then you won't need to mess around trying to force the page to use two different character sets, it'll all just be UTF-8.

glennmckenna

Quote from: Arantor on December 31, 2012, 01:50:43 PM
So, what's in this main.css file? Why does it need to be loaded?

Secondly, the forum is not set to use UTF-8, so it's not issuing the UTF-8 indicator that you're trying to force into the page. Easiest fix is to convert the forum to UTF-8 from the admin area (Maintenance > Database) and then you won't need to mess around trying to force the page to use two different character sets, it'll all just be UTF-8.
here is what is in the main.css code that i made
i use it to load the copy right the who we are part and the weather part also the logos

.copyright {
font-size: 9px;
color: #FFFFFF;
text-align: center;
}

.auto-style2 {
text-align:center;
border-style: solid;
border-width: 1px;
}

.contact-adresses {
text-align:left;
border-style: solid;
border-width: 1px;

}

.menu-right {
text-align:center;
margin-left:0px;
margin-top:0px;
margin-right:0px;
width:300px;
float:right;

}
.menu-header {
font-size:20px;
text-align:center;
width:300px;
font-family:"Lucida Sans", "Lucida Sans Regular", "Lucida Grande", "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
color:#ffffff;
background-color:#333333;
-moz-border-radius: 4px 4px 4px 4px;
border-radius: 4px 4px 4px 4px;


}

.menu-body {
font-size:medium;
width:300px;
color:black;
-moz-border-radius:  0px 0px 4px 4px;
border-radius: 0px 0px 4px 4px;
background-color:#ffffff;
}
.auto-style3 {
border-width: 0px;
}
.entrainements-warning {
font-size: xx-large;
color: #FF0000;
text-decoration: underline;
text-transform: uppercase;
}
.content {
width:900px;
text-align:center;
align:center;
}
.logo{
border-width: 0px;
text-align: center;
opacity: 0.4;
filter: alpha(opacity=40); /* For IE8 and earlier */
}
.logo:hover{
border-width: 0px;
text-align:center;
opacity:1.0;
filter:alpha(opacity=100); /* For IE8 and earlier */
}

also this question may sound bit stupid but what is the difference between the forum being UTF-8 and not being UTF-8

Arantor

Quotehere is what is in the main.css code that i made
i use it to load the copy right the who we are part and the weather part also the logos

Aren't some of those also needed for the main forum?

Quotealso this question may sound bit stupid but what is the difference between the forum being UTF-8 and not being UTF-8

From your perspective, it means you have to screw around with adding that meta tag, and if you ever happen to pull accented characters from the forum into that front page, *they'll* be broken instead of the other things you already have. Just do the conversion and everything will work with that extra part.

glennmckenna

ok it has converted the database to UTF-8
but it says it overloads the servers when i go to Convert HTML-entities to UTF-8 characters

Arantor

That isn't what it says it's doing. It says it's doing it in stages to prevent overloading. Doing the entire thing in one hit would kill most servers, so it does it in parts.

glennmckenna

Quote from: Arantor on December 31, 2012, 02:25:45 PM
That isn't what it says it's doing. It says it's doing it in stages to prevent overloading. Doing the entire thing in one hit would kill most servers, so it does it in parts.
and how long ruffly should that take

Arantor

As long as it takes. Depends mostly on how many posts you have.

glennmckenna

Quote from: Arantor on December 31, 2012, 02:39:17 PM
As long as it takes. Depends mostly on how many posts you have.
i've only got 3 post and 1 topic and it's still going

Arantor


glennmckenna

Quote from: Arantor on December 31, 2012, 02:59:55 PM
Did you press the continue button?
i just did and it says it had done it successfully
should i of pressed continue?

Advertisement: