Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post
Post Custom Templatepage On A PhpBB3 With Black Pearl 
 
Hi everybody,
i tried today to add a custom site to the Black Pearl Template on my phpBB3.
The Template works fine with many oder Styles (subsilver2, prosilver...) but with the black pearl styles it won't work.

I try to generate a table with data from a XML file.
Is there any difference in the way how Black Pearl generates the content from other phpBB3 styles ?

The code of the PHP File:
Code: [Download] [Hide] [Select]
<?php
/**
*
* @author Jan-Erik Siegmann jan@siegmann-digital.de - h**p://***.rechtundordnung.de.tp
*
* @package {BuffedGildendetails}
* @version 1.0
* @copyright (c) 2008 Siegmann Digital
* @license h**p://opensource.org/licenses/GPL-license.php GNU Public License
*
*/

/**
* @ignore
*/
define('IN_PHPBB', true);
// Specify the path to you phpBB3 installation directory.
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
// The common.php file is required.
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);

// specify styles and/or localisation
// in this example, we specify that we will be using the file: my_language_file.php
$user->setup();

/*
* All of your coding will be here, setting up vars, database selects, inserts, etc...
*
*/
$gilde = simplexml_load_file('h**p://***.buffed.de/public/war/xml/guild/226.xml');

define('DEBUG_EXTRA', true);
define('DEBUG', true);

$colorset =0;

  foreach ($gilde as $character) {
           if ($colorset == "1")
          {
               $bgcolor="'#444444'";
        }
         else
          {
              $bgcolor="'#666666'";
            $colorset =0;
          }
      $template->assign_block_vars('gildendetails', array(
        'NAME'        => $character["name"],
        'KARRIERE'            => $character->career[0],
        'TITLE'            => $character->title[0],
        'RANG'            => $character->rank[0],
        'BGCOLOR'        => $bgcolor,
    ));
    $colorset = $colorset+1;
 }


// Page title, this language variable should be defined in the language file you setup at the top of this page.
page_header('Gildendetails');

// Set the filename of the template you want to use for this file.
// This is the name of our template file located in /styles/<style>/templates/.
$template->set_filenames(array(
    'body' => 'gilddetails.html',
));

// Completing the script and displaying the page.
page_footer();

?>


The code of the Templatefile:
Code: [Download] [Hide] [Select]
<!-- INCLUDE overall_header.html -->
<table width="60%" border="0">

  <tr>
    <th scope="col">Name</th>
    <th scope="col">Karriere</th>
    <th scope="col">Titel</th>
    <th scope="col">Rang</th>
  </tr>
<!-- BEGIN gildendetails -->
   <tr bgcolor={gildendetails.BGCOLOR}>
    <td>{gildendetails.NAME}</td>
    <td>{gildendetails.KARRIERE}</td>
    <td>{gildendetails.TITLE}</td>
    <td>{gildendetails.RANG}</td>
   </tr>
<!-- END gildendetails -->

</table>
<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->


Sorry for my bad englisch, it's really late by now.
 



 
NescireSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron