Demo

Probiere ClanSphere aus und teste daran herum. Demo


Antworten: 6
Seite [1]
Zoeff


Wannabe poster





Beiträge: 30
# Thema - 03.12.2007 um 21:20 Uhr
Hello there, i read something on this board on having multiple index.html files for different parts on the site. Now i think i changed it wrong but whenever i go directly to the site now, the screen turns blank :S
So that would be http://obj.rbreuker.nl

this is what ive made from it:
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
1. / 2. / ... 
<?php 

if(!empty($_GET['mod'])) {
  if(
$_GET['mod'] == 'board') {
    echo 
cs_template($cs_micro,$cs_main,$account,'index2.htm');
  } else {
    echo 
cs_template($cs_micro,$cs_main,$account,'index.htm');
  }
}  
?>


anyone an idea?

p.s. changed it back so that people could still see the page. I haved heared problems with the old index.php aswell, people not being able to visit the site.


------------------
Ich bin kein coder aber wann jemand fragen hat fur Photoshop.. bitte frag es!


Zuletzt editiert von Zoeff am 03.12.2007 um 21:22 Uhr (1x Editiert)
Inaktiv
donkeydick


Try to beat me





Beiträge: 161
# Antwort: 1 - 03.12.2007 um 21:36 Uhr
Hi m8,

for example, the board.php is nearly the same file as the index.php, it just refers to an diffrent template file.

board.php:

 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
1. / 2. / ... 
<?php
// ClanSphere 2007 - www.clansphere.net
// $Id: index.php 101 2006-07-12 09:36:29Z hajo $

@error_reporting(E_ALL);

@
ini_set('arg_separator.output','&');
@
ini_set('session.use_trans_sid','0');
@
ini_set('session.use_cookies','1');
@
ini_set('session.use_only_cookies','1');
@
ini_set('display_errors','off');
@
ini_set('magic_quotes_runtime','off');

$cs_micro explode(' 'microtime()); # starting parsetime
$cs_logs = array('errors' => '''sql' => '''queries' => 0'warnings' => 0'dir' => 'logs');

require(
'system/core/functions.php');

$install_link '<a href="install.php">Installation required</a>';
if(
file_exists('setup.php')) {
    require(
'setup.php');
    require(
'system/database/' $cs_db['type'] . '.php');
    
$cs_db['con'] = cs_sql_connect($cs_db);

    
$cs_main = @cs_sql_option(__FILE__,'clansphere') OR die($install_link ' or database error');

    require(
'system/output/xhtml_10.php');
    require(
'system/core/templates.php');
    require(
'system/core/content.php');
    require(
'system/core/tools.php');
    require(
'system/core/account.php');
    require(
'system/core/abcode.php');

    
cs_tasks('system/extensions'1); # load extensions
    
cs_tasks('system/runstartup'); # load startup files

    
echo cs_template($cs_micro,$cs_main,$account,'board.htm'); //<--- This is the link for ur subtemplate 
}
else {
    echo 
$install_link ' or missing setup.php';
}

?>


For example duplicate the board.php and call it donkey.php, then the donkey.php has too look like this:

 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
1. / 2. / ... 
<?php
// ClanSphere 2007 - www.clansphere.net
// $Id: index.php 101 2006-07-12 09:36:29Z hajo $

@error_reporting(E_ALL);

@
ini_set('arg_separator.output','&');
@
ini_set('session.use_trans_sid','0');
@
ini_set('session.use_cookies','1');
@
ini_set('session.use_only_cookies','1');
@
ini_set('display_errors','off');
@
ini_set('magic_quotes_runtime','off');

$cs_micro explode(' 'microtime()); # starting parsetime
$cs_logs = array('errors' => '''sql' => '''queries' => 0'warnings' => 0'dir' => 'logs');

require(
'system/core/functions.php');

$install_link '<a href="install.php">Installation required</a>';
if(
file_exists('setup.php')) {
    require(
'setup.php');
    require(
'system/database/' $cs_db['type'] . '.php');
    
$cs_db['con'] = cs_sql_connect($cs_db);

    
$cs_main = @cs_sql_option(__FILE__,'clansphere') OR die($install_link ' or database error');

    require(
'system/output/xhtml_10.php');
    require(
'system/core/templates.php');
    require(
'system/core/content.php');
    require(
'system/core/tools.php');
    require(
'system/core/account.php');
    require(
'system/core/abcode.php');

    
cs_tasks('system/extensions'1); # load extensions
    
cs_tasks('system/runstartup'); # load startup files

    
echo cs_template($cs_micro,$cs_main,$account,'donkey.htm'); //<--- This subtemplate link must have the same name as ur example.php
}
else {
    echo 
$install_link ' or missing setup.php';
}

?>


and the donkey.htm from my example should be placedn in templates/YOURTEMPLATE/donkey.htm, so the same folder as the index.htm from your template

Hope i could help you

Greetz
donkeydick


Zuletzt editiert von donkeydick am 03.12.2007 um 21:36 Uhr (1x Editiert)
Inaktiv
|
Zoeff
Thread-Ersteller


Wannabe poster





Beiträge: 30
# Antwort: 2 - 03.12.2007 um 22:02 Uhr
hey m8, tnx for you help, i couldnt figure it out the way you explained it sorry. Tnx for your help though.

I solved it now the way it was originally written but i deleted to much i guess... such a php noob

 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
1. / 2. / ... 
<?php if(!empty($_GET['mod'])) {
  if(
$_GET['mod'] == 'board') {
    echo 
cs_template($cs_micro,$cs_main,$account,'index2.htm');
  } elseif(
$_GET['mod'] == 'news') {
    echo 
cs_template($cs_micro,$cs_main,$account,'index.htm');
  } else {
    echo 
cs_template($cs_micro,$cs_main,$account,'index.htm');
  }
} else {
  echo 
cs_template($cs_micro,$cs_main,$account,'index.htm');
?>


------------------
Ich bin kein coder aber wann jemand fragen hat fur Photoshop.. bitte frag es!


Inaktiv
|
donkeydick


Try to beat me





Beiträge: 161
# Antwort: 3 - 03.12.2007 um 22:43 Uhr
Your welcome m8. Ok i try to explain you another way.

In your main cs folder, where the index.php exists there is another php file called board.php. You can duplicate this board.php. For example you want another look for your Member View, so u can call it member.php within this duplicated file u need to edit the following line:
 
1.
1. / 2. / ... 
<?php echo cs_template($cs_micro,$cs_main,$account,'board.htm'); ?>

AND CHANGE IT TO:

 
1.
1. / 2. / ... 
<?php echo cs_template($cs_micro,$cs_main,$account,'member.htm'); ?>


after that step go into your template folder and duplicate your index.htm and rename it to member.htm.
Now you have another "index" file cause its the same as the index.htm and you are now able to edit this for personal Member View.

After that step you just need to change the links from your original index.htm.

For example:
In your original index.htm your link is: index.php?mod=members
then you have to change it into: member.php?mod=members

You see the diffrence


Inaktiv
|
Zoeff
Thread-Ersteller


Wannabe poster





Beiträge: 30
# Antwort: 4 - 04.12.2007 um 00:02 Uhr
emm well i tried it the same way you explain here now. However when i did it like how your telling me now, nothing happend

You sure it is the board.php you have to duplicate and not the index php? well anyways ill check it out on wednesday then i got more time.. now its study time


------------------
Ich bin kein coder aber wann jemand fragen hat fur Photoshop.. bitte frag es!


Inaktiv
|
donkeydick


Try to beat me





Beiträge: 161
# Antwort: 5 - 04.12.2007 um 08:04 Uhr
Yes m8 im sure about that, you told me nothing happend. What do you mean ? Does the page become a white screen ?


Inaktiv
|
Zoeff
Thread-Ersteller


Wannabe poster





Beiträge: 30
# Antwort: 6 - 04.12.2007 um 16:21 Uhr
nope, for the forums i use a different div placing than for the news etc. Well the divs just dont move when i do it like you explained. Ill give it a closer look tomorrow or so, im a bit short on time today.


------------------
Ich bin kein coder aber wann jemand fragen hat fur Photoshop.. bitte frag es!


Inaktiv
|
Antworten: 6
Seite [1]


Sie müssen sich registrieren, um zu antworten.