new German website for a project which supports the development of babies

spawnferkel


Hello,
thank you all for your replies and the very useful criticisim, I have change some points already...
but I don't get the second point from Rahya?!
Why do you want to change the visibility of the printversion for the login-infos?
I think it is very useful to hide this in the printversion of the page.

@ Eki
I changed some code for the printversion and the read more link in modules/wysiwyg/view.php
WebsiteBaker looks now if a block with an additional text exists in the next position. And if yes, it displays the "read more..." link and jumps to the right position.

If you want to see a live demo visit http://nifbe.de/pages/aktuelles.php and have a look to the " mehr..." link.

The following code represents my view.php:



<?php

// $Id: view.php 399 2006-12-24 07:50:44Z Ruebenwurzel $

/*

 WebsiteBaker Project <http://www.WebsiteBaker.org/>
 Copyright (C) 2004-2007, Ryan Djurovich

 WebsiteBaker is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 WebsiteBaker is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with WebsiteBaker; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*/

// How many wysiwyg sections exists
if(!isset($count_sections)){ // do it once
    
$query "SELECT COUNT(".TABLE_PREFIX."mod_wysiwyg.section_id) as count_sections 
    FROM "
.TABLE_PREFIX."mod_wysiwyg 
    LEFT JOIN sections ON "
.TABLE_PREFIX."mod_wysiwyg.section_id = ".TABLE_PREFIX."sections.section_id 
    WHERE "
.TABLE_PREFIX."mod_wysiwyg.page_id = ".PAGE_ID." AND block = 1";
    
$get_content $database->query($query);
    
$fetch_content $get_content->fetchRow();
    
$count_sections $fetch_content['count_sections'];
}

// Get content
$get_content $database->query("
SELECT content, position FROM "
.TABLE_PREFIX."mod_wysiwyg 
LEFT JOIN sections ON "
.TABLE_PREFIX."mod_wysiwyg.section_id = ".TABLE_PREFIX."sections.section_id 
WHERE "
.TABLE_PREFIX."mod_wysiwyg.section_id = '$section_id'");
$fetch_content $get_content->fetchRow();
$content = ($fetch_content['content']);
$position $fetch_content['position'];
$nextposition $position+1;


$query "
SELECT content FROM "
.TABLE_PREFIX."mod_wysiwyg 
LEFT JOIN sections ON "
.TABLE_PREFIX."mod_wysiwyg.section_id = ".TABLE_PREFIX."sections.section_id 
WHERE 1
 AND "
.TABLE_PREFIX."sections.block = 2
 AND "
.TABLE_PREFIX."sections.position = ".$nextposition."
 AND "
.TABLE_PREFIX."sections.page_id = ".PAGE_ID;
$get_content $database->query($query);
$fetch_content $get_content->fetchRow();
$content2 = ($fetch_content['content']);


$wb->preprocess($content);


if(
$content2){
    if(
$_GET["content"] == && $_GET["s"] == $section_id){    
        echo 
$content;  // return the content
        
echo '<a name="s'.$section_id.'"></a>';
        
$wb->preprocess($content2); 
        echo 
$content2;  // return the detailed Version
    
}else{
        
$read_more_link ' <a href="'.$_SERVER['PHP_SELF'].'?content=2&amp;s='.$section_id.'#s'.$section_id.'"> mehr...</a>';
        
$content trim($content);
        if(
substr($content,-4) == "</p>" ||  substr($content,-4) == "</P>"){
            
$content substr($content,0,-4); // cut of the last </p>
            
$content .= $read_more_link.'</p>'// add the read more link and the end of the paragraph
        
}else{
            
$content $content.$read_more_link// add only the read more link.
        
}
        if((
$_GET["print"] == && $_GET["s"] == $section_id) || !isset($_GET["print"])){
            echo 
$content// return the content
        
}
    }
}else{
    if((
$_GET["print"] == && $_GET["s"] == $section_id) || !isset($_GET["print"])){
        echo 
$content// return the content
    
}
}
if(!isset(
$_GET["print"])){
    echo 
'<div class="printerlink"><a href="'.$_SERVER['PHP_SELF'].'?content=2&amp;s='.$section_id.'&amp;print=1" target="_blank" title="Diesen Artikel drucken"><img src="'.TEMPLATE_DIR.'/images/NIFBE_Drucker.jpg" alt="Druckersymbol" align="right" />&nbsp;Druckversion&nbsp;</a></div>';
}
if(
$section_index $count_sections){

echo 
"<hr />";

}
?>



But if you want to use it, make sure that you activate the necessary options in your info.php and the WebsiteBaker configuration to use more than one block.

chio

Green seems to be a big trend in 2008 ;-)

Very good job, very professional.

Eki

Looks great...To my feeling the color-scheme fits the subject. The layout is clean and understandable in 10 secs. Especially like the way the "read more" link works. Any interest in sharing the code with the community?

regards,
Erik

BerndJM

Hi,

looks nice, only two little things:

- the password field should also become empty onFocus
- would recommend to give the input fields a width via css - in some Browser/OS combinations they are to wide for the layout

Regards Bernd
In theory, there is no difference between theory and practice. But, in practice, there is.

GRID8400

Our WB websites: KEY2DESIGN & KEY2PICTURE

albatros

Hi,

very fresh an clean look! I like it very much!

Best regards

Uwe
أنا لست إرهابيا. ليس لدى أي ورشة عمل القنبلة في الطابق السفلي. ليس لدى أي مرض الجمرة الخبيثة أيضا. أريد شراء لا مادة الريسين. أنا سوف ابدأ السفر إلى الولايات المتحدة الأمريكية

Rahya


Very nice  :-D Poisongreen  :wink:

There's one thing I would change... in the printversion:
- margin for images (text is to near)
and
- the login-infos etc. visibility: hidden ;-)
(means: Kennwort anfordern
https://ssl./
http://www./
http://nifbe.de/pages/text/javascript) that's at end of page...
Meine Rüstung ist die Ironie, mein Schild der Zynismus und mein Schwert der Sarkasmus...

spawnferkel

Hello,

my wb homepage: http://nifbe.de/


- simple design in xhtml and css.

- two navigations

- special programming for the printversion

- to prevent for spam all e-mail-adresses were rewritten to the following example:

alexander.franksmann<!-- @werbemailparadis.de --><script type="text/javascript">document.write('&#64;&#110;&#105;&#102;&#98;&#101;&#46;&#100;&#101;');</script><noscript><span style="visibility:hidden;">x</span>&#64;<span style="visibility:hidden;">x</span>nifbe.de</noscript></span>

but the output looks still like a normal mail adresse.

- a special programming for a "read more" link.
You can see the output in the last article on http://nifbe.de/pages/aktuelles.php