text w/image with "In-text, left" doesn't work

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

text w/image with "In-text, left" doesn't work

Post by macangelo »

Hi,

I have an 1.2.6 installation. I placed an image in the text (cnt-part "text w/image") but the text allways appears beneath the image. In the source code I find div-tags (which of course force a line break).

What can I do?

Thanks a lot

Macangelo
Webdesign from Düsseldorf - made with phpwcms (most of it):
http://eyelikeit.com/index.php?de_beispiele-webdesign
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

Any reason why you cannot use HTML content part and code your own layout for this instance??
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

Post by macangelo »

well, I want my client to update the page as easyly as possible...
Webdesign from Düsseldorf - made with phpwcms (most of it):
http://eyelikeit.com/index.php?de_beispiele-webdesign
jscholtysik

Post by jscholtysik »

Hi macangelo,


try this one:


http://www.phpwcms.de/forum/viewtopic.p ... t=imagediv


Joachim
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

Sorry, I forgot you are on a Mac, because FCKEditor easily handles this when using the content part :oops:
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

Post by macangelo »

Great - Thanks to both of you

everything is so easy when you know it!

Best

Macangelo
Webdesign from Düsseldorf - made with phpwcms (most of it):
http://eyelikeit.com/index.php?de_beispiele-webdesign
Ben
Posts: 558
Joined: Wed 14. Jan 2004, 08:05
Location: Atlanta
Contact:

Post by Ben »

macangelo,

I ran into this same issue with a recent upgrade to 1.2.6 where the images are in divs. Like you said, an easy fix when you change the image_div value of conf.template_default.inc.php.
KIer
Posts: 11
Joined: Fri 17. Feb 2006, 20:38

Post by KIer »

how to change the image_div value of conf.template_default.inc.php?

I've got

Code: Select all

$template_default["article"]["image_div"]            = true; 
and I have

Code: Select all

.imgDIVinTextRight {  
   float: right; 
   margin:8px 20px 5px 5px; padding:0px; 
   border:0; 
} 
.imgDIVinTextLeft { 
   float: left; 
   margin:8px 5px 5px 20px; padding:0px; 
   border:0; 
} 
.imgDIVtopLeft { 
   margin:8px 10px 5px 20px; padding:0px; 
   border:0; 
} 
.imgDIVtopCenter { 
   margin:8px -50% 5px -50%; padding:0px; 
   border:0; 
}
in my frontend.css, but when I put Text with Image, with the Image in the Text Left or Right, I still got tables not DIV, as following

Code: Select all

<div class="listEntry"><h1><a href="index.php?id=14,13,0,0,1,0">Title of Article</a></h1><p class="topText"><table width="1%" cellspacing="0" border="0" cellpadding="0" align="left" style="float:left;margin:2px 5px 3px 0;">
<tr><td class="image_td"><a href="index.php?id=14,13,0,0,1,0"><img src="content/images/d1c230793bb4b7ba42adceefb57961e5.jpg" border="0" width="108" height="101" alt="" title=""></a></td></tr>
</table>Content Line one<br />
Content Line two<br />
Content Line two<br />
Content Line two<a href="index.php?id=14,13,0,0,1,0">more…</a></p></div>
how to make the image inside DIV instead of Table, which file to modify? further more, where to change and make the more link shows something else, like a graphic or other text??

many thanks in advance
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi KIer,

DIV: You are running the V1.26 ?

There is only one switch. You have set it. Plaese clear the CMS and Browser-cache.
http://faq.phpwcms-docu.de/13_23_en.html


more: conf.template_default.inc.php
e.g.

Code: Select all

$template_default["top_readmore_link"]		= "more…";
Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
KIer
Posts: 11
Joined: Fri 17. Feb 2006, 20:38

Post by KIer »

thanks flip-flop,

I'm running V1.2.6.

did exactly as instructed and clear the cache, but the table code is still around the image.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi KIer,
have a look at my testarea: www(.)mz.ja-nek(.)de/index.php?id=29,17,0,0,1,0

It works very well for me.

Gruß Knut
Last edited by flip-flop on Fri 24. Mar 2006, 18:54, edited 1 time in total.
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

In all it's glory! :wink:
<div style="clear:both;"></div>
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tbody><tr><td valign="top" width="100%" class="contentpart"><a name="jump17"></a><h1>Article - test1 (article title)</h1><h2>Article subtitle</h2><div class="articleSummary">Hier steht der Schlatext zum Artikel<br />in zwei Zeilen</div><h3>content title</h3><h4>content subtitle</h4><div class="imgDIVinTextLeft" align="left"><div class="image_td"><a href="de_test2.phtml?hashID=eb9c463219b0e21637cf31f7ee560f77"><img src="content/images/c2426da80413da1f0b08443425cd1c34.jpg" width="150" height="216" border="0" class="image_img" alt="alt-text" title="alt-text"></a></div><p class="image_caption">caption text w/image</p></div><div class="articleText">Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text<br /><br /><img src="img/article/intlink_2.gif" width="13" height="9" border="0" vspace="0" hspace="0" alt="intlink"><a href="de_test2.phtml?hashID=eb9c463219b0e21637cf31f7ee560f77">test2</a></div>
<div style="margin:10px 0 0 0; padding:0 0 0 0; clear:both;"></div>
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi DeXXus,

<div style="clear:both;"></div>
and
<div style="margin:10px 0 0 0; padding:0 0 0 0; clear:both;"></div>

These two DIVs are generated since version 1.26???CVS using space "before and/or after".
I think by using the CP text w/image these DIVs are generated automatically sometime, if the user experiments something with this CP.

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

Yes, I "highlighted" for benefit of KIer, who had been pointed to the thread about the use of this convention. :wink:

"content.article.inc.php"
// Space before
if($crow["acontent_before"]) {
if(!empty($template_default["article"]["div_spacer"])) {
$CNT_TMP .= '<div style="margin:'.$crow["acontent_before"].'px 0 0 0; padding:0 0 0 0; clear:both;"></div>';
} else {
$CNT_TMP .= "<br>".spacer(1,$crow["acontent_before"]);
}
}

// include content part code section
include("include/inc_front/content/cnt".$crow["acontent_type"].".article.inc.php");

//check if top link should be shown
if($crow["acontent_top"]) {
if($template_default["article"]["top_sign_before"].$template_default["article"]["top_sign_after"]) {
$CNT_TMP .= $template_default["article"]["top_sign_before"];
$CNT_TMP .= '<a href="#top">'.$template_default["article"]["top_sign"].'</a>';
$CNT_TMP .= $template_default["article"]["top_sign_after"];
} else {
$CNT_TMP .= '<br><a href="#top">'.$template_default["article"]["top_sign"].'</a>';
}
}

// Space after
if($crow["acontent_after"]) {
if(!empty($template_default["article"]["div_spacer"])) {
$CNT_TMP .= '<div style="margin:0 0 '.$crow["acontent_after"].'px 0; padding:0 0 0 0; clear:both;"></div>';
} else {
$CNT_TMP .= "<br>".spacer(1,$crow["acontent_after"]);
}
}
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

That´s first class usersupport by DeXXus.
----> Like an :!: Rolls-Royce :!: for cars.

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Post Reply