Default How to make a template-changer

Hello everybody!!!

It seems so, that may oxid-users want to use a template-changer. Look at:

Because of easter i`ll give you a possibility to do this:

1: At the end of index.php (Please adapt the source: Shopurl, quantity of templates and the names of folders(<option>basic</option>...))

PHP Code:
if ($_GET['s']==1) { echo ('<link rel="stylesheet" type="text/css" href="http://Shopurl/popupoff.css">'); } 
else { echo (
'<link rel="stylesheet" type="text/css" href="http://Shopurl/popupon.css">'); } 
<div id="popup">
<div id="close"><a href="?s=1">X</a></div>
<form action="<?php echo basename($PHP_SELF); ?>">
<select name="wert"onchange="this.form.submit()">
2. Create popupoff.css

HTML Code:
#popup {display: none;}
3. Create popupon.css

HTML Code:
#close a {
background-color: #000000;
color: #ffffff;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
width: 16px;
font-weight: bold;
position: absolute;
top: 2px;
right: 2px;
text-decoration: none;
border: 1px solid #ffffff;
text-align: center;
font-size: 14px;
#popup {
background: #990000;
width: 180px;
position: absolute;
top: 75px;
right: 60px;
border: 2px solid #d4d0c8;

a. Search:

PHP Code:
Replace with:

PHP Code:
<?php $templateex $_GET['wert'];
b. Search:

PHP Code:
$this->sTheme 'basic'
Replace with:

PHP Code:
if ( $templateex == '' ) { 
$this->sTheme 'basic';
        } else {
$this->sTheme $templateex;
5. core/oxsession.php


PHP Code:
return $sUrl
Replace with:

PHP Code:
//  return $sUrl; //ORIGINAL
$templateex $_GET['wert'];
        if ( 
$templateex == '' ) { 
        } else {
$sUrl '?wert=' $templateex;

If you think, that`s good and want to support me too, you can do this with a little donation for my social project.

PayPal: Templatechanger Offer

Greeting, thanks & HAPPY EASTER!

Reply With Quote