You are not logged in.
Pages: 1
As in topic..... i see it in this way:
if there is a directory $themedirectory/theme then
in editpage must be option to chose file from this directory
Files can by named theme1.php, theme2.php....
when including content of page, see if there is variable $themefile (f.e) and including this file as theme.
This allow to manipulate the visibility avery page on site to have diffrent look. Diffrent look for blog, album, and others module...
A_Bach
Offline
Just thinking about this - you could have the template names in the theme info.php - for example
<?php
$themedir = "thistheme";
$themename = "Best Design Ever";
$theme1= "Standard Layout";
$theme2= "Double Page Split";
$theme3= "Gallery Layout";
$module_space[0] = "main";
$module_space[1] = "footer";
?>This is so theme templates could be easily identified in the CMS and would be easy to set up for theme makers.
Not sure how but if this feature was implemented it would also probably be a good idea for sub pages (gallerys and full blog posts) to maintain same template as their parent page.
Offline
i would definitely like to see this as well. a few people have asked me for sites that can have different backgrounds and such for each page and i'd love to be able to use pluck for them but haven't been able to!
Offline
i would definitely like to see this as well. a few people have asked me for sites that can have different backgrounds and such for each page and i'd love to be able to use pluck for them but haven't been able to!
I'm working on it and its almost ready. I had only one problem- but... one problem is no problem ![]()
Offline
Done.
On page: http://www.pluck.ekyo.pl/en/5.Modules.php
you can find two links. multitheming and multitheming seo. Those files are not modules but modification - see instruction inside.
For those who want to do it allone - information here:
File index.php in root directory:
find:
//Check which CSS-file we need to use (LTR or RTL)
if ((isset($direction)) && ($direction == 'rtl')) {
$cssfile = 'data/themes/'.$themepref.'/style-rtl.css';
}
else {
$cssfile = 'data/themes/'.$themepref.'/style.css';
}Replace it with:
//Check which CSS-file we need to use (LTR or RTL)
$theme_css_name = 'data/themes/'.$themepref.'/'.theme_page_name();
if ((isset($direction)) && ($direction == 'rtl')) {
if(file_exists($theme_css_name.'-rtl.css')) {
$cssfile = $theme_css_name.'-rtl.css';
}
else {
$cssfile = 'data/themes/'.$themepref.'/style-rtl.css';
}
}
else {
if(file_exists($theme_css_name.'.css')) {
$cssfile = $theme_css_name.'.css';
}
else {
$cssfile = 'data/themes/'.$themepref.'/style.css';
}
}Before:
//[THEME] FUNCTION TO INCLUDE MODULESadd:
//[THEME] FUNCTION TO SHOW THEME NAME
//---------------------------------
function theme_page_name() {
//Get needed variables
include('data/inc/variables.all.php');
include('data/inc/variables.site.php');
//Get the contents only if we are looking at a normal page
if (isset($current_page_filename)) {
//Check if page exists
if(file_exists('data/settings/pages/'.$current_page_filename)) {
include('data/settings/pages/'.$current_page_filename);
return $theme_page_name;
}
}
}Find:
//NOW, INCLUDE THE PAGE
//---------------------------------
//---------------------------------
include($themedirectory.'/theme.php');
?>replace it with:
//NOW, INCLUDE THE PAGE
//---------------------------------
//---------------------------------
$theme_page_name = $themedirectory.'/'.theme_page_name().'.php';
if(file_exists($theme_page_name)) {
include($theme_page_name);
}
else {
include($themedirectory.'/theme.php');
}
?>In data/inc/post_get.php
in part
//POST
add new variable:
$theme_name = $_POST['theme_name'];In data/inc/editpage.php
find:
//Display checkbox for the hidepage-option
echo "<input type=\"checkbox\" name=\"hidepage\" value=\"no\" $hidecheck> $lang_pagehide1<br>
</td>
</tr>
</table>
</div>"; repace it with:
//Display checkbox for the hidepage-option
echo "<input type=\"checkbox\" name=\"hidepage\" value=\"no\" $hidecheck> $lang_pagehide1<br>
</td>
</tr>
<tr>
<td>
<img src=\"data/image/options.png\" border=\"0\" alt=\"\" \>
</td>
<td>
<span class=\"kop3\">choose theme</span><br>";
//Display choose for theme name
echo "<select name=\"theme_name\">";
$files = read_dir_contents('data/themes/'.$themepref,'files');
if ($files) {
natcasesort($files);
foreach ($files as $file) {
if (preg_match('/.php/', $file)) {
$file = str_replace('.php', '', $file);
if ($file !== 'info') {
if ($file == $theme_page_name) {
echo "<option value=\"$file\" selected>$file";
}
else {
echo "<option value=\"$file\">$file";
}
}
}
}
}
echo "</select></td></tr></table>
</div>"; Thats all ![]()
Offline
excellent. i've replaced the necessary files and the dropdown for style on each page is showing up but there's no option for to choose the style i want
i just uploaded the new_theme.php into the main theme directory. am i missing anything?
Offline
excellent. i've replaced the necessary files and the dropdown for style on each page is showing up but there's no option for to choose the style i want
i just uploaded the new_theme.php into the main theme directory. am i missing anything?
main theme directory? wrong. Into your theme directory.
Instruction to use modification:
1. download file and replaced the necessary files.
2. Create new theme file and name it new_name.php - where new_name can by anything you wont (unless its info or theme - those two names are restricted).
3. You can also create new css file with the same name.
4. Your new theme file (ot both - new theme and new css file) file put in your theme directory. If you use default theme - you will put those files in data/themes/default/
5. Now - edit page page you want to. Choose new_name before save button on editpage.
6. Go to page and your page (f.ex. kop4.php) should have new look.
7. If there will be some problem - mail me, or use contact form on my page ![]()
Offline
awesome. much appreciated!
Offline
I tried this but i get the error :
Fatal error: Call to undefined function theme_page_name() in /var/www/index.php on line 363
i have made the changes and called my file new_theme.php in the directory
/var/www/data/themes/mytheme/
What did i mis ?
Last edited by pabilo (23-09-2009 21:08:34)
Offline
theme_page_name
You missed theme_page_name function in index.php ![]()
There should be this function.
Offline
i used the changed version from your site:
http://pluck.ekyo.pl/downloads/pluck_4. … rls.tar.gz
changed like u sayed in the readme file
the admin works but the frontend don't
Offline
i used the changed version from your site:
http://pluck.ekyo.pl/downloads/pluck_4. … rls.tar.gz
changed like u sayed in the readme file
the admin works but the frontend don't
This will work only if you are using also seo urls modification....
Could you post a link to site?
A_Bach
Offline
hmm problem is i don't have a web server at the moment.
i can give u screenshots if you want ?
-----
I found the switch case you made for someone else ![]()
That one works Great THNX ![]()
Last edited by pabilo (25-09-2009 00:40:42)
Offline
Can you give me that switch case too? I'm facing the same problem on my local server as well.
Offline
I found small bug in multitheming module (for 4.6.x) where when you add f.ex. album module for a page where you choose difrent theme - album page will have default theme.
So i have fixed.
New files can be found on my pluck site.
A_Bach
Offline
Pages: 1