hello all masters,
I want to change the default Display Full article of Content Type which is Text with image.
I know that I can create a new one and name it something like "new.tmpl", and choose it in the article creation process.
The problem is I already create a lot article and everyone of them already choose "Default" as the display full article template.
Now I wish to change the look of the articles and content, please let me know which file to modify in order to make changes to the "Default" display full artilcle template??
I have searched the whole forum but not finding anything to solve my problem.
only the following I think is what I wanted, but the author pixelpeter did not give out hints on how to do it, which file to modify...
http://phpwcms.pixelpeter.de/
http://www.phpwcms.de/forum/viewtopic.php?t=2745
hope any of you gurus will have the answer.
many thanks in advance.
KIer
how to change the dafult template...
Re: how to change the dafult template...
i think it's the file conf.template_default.inc.phpKIer wrote:hello all masters,
I want to change the default Display Full article of Content Type which is Text with image.
I know that I can create a new one and name it something like "new.tmpl", and choose it in the article creation process.
The problem is I already create a lot article and everyone of them already choose "Default" as the display full article template.
Now I wish to change the look of the articles and content, please let me know which file to modify in order to make changes to the "Default" display full artilcle template??
I have searched the whole forum but not finding anything to solve my problem.
only the following I think is what I wanted, but the author pixelpeter did not give out hints on how to do it, which file to modify...
http://phpwcms.pixelpeter.de/
http://www.phpwcms.de/forum/viewtopic.php?t=2745
hope any of you gurus will have the answer.
many thanks in advance.
KIer
located in config\phpwcms
Erich
Or do you mean this?
"/include/inc_tmpl/content/cnt1.list.inc.php"
"/include/inc_tmpl/content/cnt1.list.inc.php"
Code: Select all
<?php
/*************************************************************************************
Copyright notice
(c) 2002-2005 Oliver Georgi (oliver@phpwcms.de) // All rights reserved.
This script is part of PHPWCMS. The PHPWCMS web content management system 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.
The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html
A copy is found in the textfile GPL.txt and important notices to the license
from the author is found in LICENSE.txt distributed with these scripts.
This script 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.
This copyright notice MUST APPEAR in all copies of the script!
*************************************************************************************/
// Text with image
$cinfo[1] = cut_string($row["acontent_title"],"…", 55);
$cinfo[2] = cut_string($row["acontent_subtitle"],"…", 55);
$cinfo[3] = str_replace("\n", " ", cut_string($row["acontent_text"],"…", 150));
// 0 :1 :2 :3 :4 :5 :6 :7 :8
// dbid:filename:hash:extension:width:height:caption:position:zoom
$cinfo_image = explode(":", $row["acontent_image"]);
if(isset($cinfo_image[2]) && is_array($cinfo_image) && count($cinfo_image)) {
$thumb_image = get_cached_image(
array( "target_ext" => $cinfo_image[3],
"image_name" => $cinfo_image[2] . '.' . $cinfo_image[3],
"thumb_name" => md5($cinfo_image[2].$phpwcms["img_list_width"].$phpwcms["img_list_height"].$phpwcms["sharpen_level"])
)
);
if($thumb_image != false) {
$cinfo_image = '<img src="'.PHPWCMS_IMAGES . $thumb_image[0] .'" border="0" '.$thumb_image[3].'>';
} else {
$cinfo_image = '';
}
} else {
$cinfo_image = '';
}
$cinfo["result"] = '';
foreach($cinfo as $value) {
if($value) $cinfo["result"] .= $value."\n";
}
$cinfo["result"] = str_replace("\n", " / ", html_specialchars(trim($cinfo["result"])));
if($cinfo["result"] || $cinfo_image) { //Zeige Inhaltinfo
echo "<tr><td> </td><td class=\"v10\">";
echo "<a href=\"phpwcms.php?do=articles&p=2&s=1&aktion=2&id=".$article["article_id"]."&acid=".$row["acontent_id"]."\">";
echo $cinfo["result"];
if($cinfo["result"] && $cinfo_image) echo "<br />";
echo $cinfo_image."</a></td><td> </td></tr>";
}
?>
Here's a counterpart:
"/include/inc_front/content/cnt1.article.inc.php"
"/include/inc_front/content/cnt1.article.inc.php"
Code: Select all
<?php
/*************************************************************************************
Copyright notice
(c) 2002-2005 Oliver Georgi (oliver@phpwcms.de) // All rights reserved.
This script is part of PHPWCMS. The PHPWCMS web content management system 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.
The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html
A copy is found in the textfile GPL.txt and important notices to the license
from the author is found in LICENSE.txt distributed with these scripts.
This script 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.
This copyright notice MUST APPEAR in all copies of the script!
*************************************************************************************/
//image with text
// 0 :1 :2 :3 :4 :5 :6 :7 :8
// dbid:filename:hash:extension:width:height:caption:position:zoom
$image = ($crow["acontent_image"]) ? explode(":", $crow["acontent_image"]) : false ;
//zoom click = $image[8];
if($image) {
$image['div'] = empty($template_default["article"]["image_div"]) ? false : true;
switch($image[7]) {
//oben links
case 0:
$CNT_TMP .= $image['div'] ? imagediv($phpwcms, $image, 'topLeft') : imagetable($phpwcms, $image, "0:5:0:0", "");
$CNT_TMP .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
$CNT_TMP .= ($crow["acontent_text"]) ? div_class($crow["acontent_text"],$template_default["article"]["text_class"]) : "";
break;
//oben mitte
case 1:
$CNT_TMP .= $image['div'] ? imagediv($phpwcms, $image, 'topCenter" align="center') : imagetable($phpwcms, $image, "0:5:0:0", "center");
$CNT_TMP .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
$CNT_TMP .= ($crow["acontent_text"]) ? div_class($crow["acontent_text"],$template_default["article"]["text_class"]) : "";
break;
//oben rechts
case 2:
if($image['div']) {
$CNT_TMP .= imagediv($phpwcms, $image, 'topRight" align="right');
} else {
$CNT_TMP .= '<div align="right" style="text-align:right;margin:0;padding:0;">'.imagetable($phpwcms, $image, "0:5:0:0", "").'</div>';
}
$CNT_TMP .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
$CNT_TMP .= ($crow["acontent_text"]) ? div_class($crow["acontent_text"],$template_default["article"]["text_class"]) : "";
break;
//unten links
case 3:
$CNT_TMP .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
$CNT_TMP .= ($crow["acontent_text"]) ? div_class($crow["acontent_text"],$template_default["article"]["text_class"]) : "";
$CNT_TMP .= $image['div'] ? imagediv($phpwcms, $image, 'bottomLeft') : imagetable($phpwcms, $image, "5:0:0:0", "");
break;
//unten mitte
case 4:
$CNT_TMP .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
$CNT_TMP .= ($crow["acontent_text"]) ? div_class($crow["acontent_text"],$template_default["article"]["text_class"]) : "";
$CNT_TMP .= $image['div'] ? imagediv($phpwcms, $image, 'bottomCenter" align="center') : imagetable($phpwcms, $image, "5:0:0:0", "center");
break;
//unten rechts
case 5:
$CNT_TMP .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
$CNT_TMP .= ($crow["acontent_text"]) ? div_class($crow["acontent_text"],$template_default["article"]["text_class"]) : "";
if($image['div']) {
$CNT_TMP .= imagediv($phpwcms, $image, 'bottomRight" align="right');
} else {
$CNT_TMP .= '<div align="right" style="text-align:right;margin:0;padding:0;">'.imagetable($phpwcms, $image, "5:0:0:0", "").'</div>';
}
break;
//im Text links
case 6:
$CNT_TMP .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
$icontent = ($crow["acontent_text"]) ? "###image_replace###".div_class($crow["acontent_text"],$template_default["article"]["text_class"]) : "###image_replace###";
if($image['div']) {
$iconimg = imagediv($phpwcms, $image, 'inTextLeft" align="left');
} else {
$iconimg = imagetable($phpwcms, $image, "0:0:0:8", "left");
}
$CNT_TMP .= str_replace("###image_replace###", $iconimg, $icontent);
break;
//im Text rechts
case 7:
$CNT_TMP .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
$icontent = ($crow["acontent_text"]) ? "###image_replace###".div_class($crow["acontent_text"],$template_default["article"]["text_class"]) : "###image_replace###";
if($image['div']) {
$iconimg = imagediv($phpwcms, $image, 'inTextRight" align="right');
} else {
$iconimg = imagetable($phpwcms, $image, "0:0:10:0", "right");
}
$CNT_TMP .= str_replace("###image_replace###", $iconimg, $icontent);
break;
}
} else {
$CNT_TMP .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
if($crow["acontent_text"]) {
$CNT_TMP .= div_class($crow["acontent_text"], $template_default["article"]["text_class"]);
}
}
unset($image);
?>