Re: phantom <table> tags

[email protected] Tue, 2 Aug 2005 23:13:10 +0200
Newsgroups gmane.comp.cms.campsite.general
Message-ID <OF04954F3D.C3FD3F83-ONC1257051.00746BBC-C1257051.00748632@mdlf.org>
This is a multipart message in MIME format.
--=_alternative 0074862DC1257051_=
Content-Type: text/plain; charset="us-ascii"

Thanks Mugur,

I'll try something like this, and will keep you posted. I've also added 
your response to Campsite's DocMint documentation for 3.5.3. The DocMint 
site is quite nice, by the way, and other Campsite users would be well 
advised to check it out.

http://code.campware.org/manuals/campsite/2.3/index.php


doug





Mugur Rus <[email protected]>
08/02/2005 11:07 PM
Please respond to campsite-support

 
        To:     [email protected]
        cc: 
        Subject:        Re: [campsite-support] phantom <table> tags


--- [email protected] wrote:
> Actually, I'm trying to follow the manual in Section 3.5.3 "Including 
> Images in the Section Listing," where it advises:
> 
> The answer is quite simple. Create a body field in your Article Type 
that 
> will only contain the image that goes into the section listing. Let's 
say 
> we call this variable 'sectionimage'. Then all you need to add in the 
> section listing to display the image is:
> <!** print article sectionimage>
> This will then generate the HTML code as saved in the database. And in 
our 
> case that means it will create the image tag including the image. You 
> could even generate a little subtitle for the image in this field when 
> entering the article text and images.
Yes, this is an old example but it's not the only way and maybe not the 
best
way.

> What I want to do is display the article's image on the front page - not 

> its text - if the 'display on front page' checkbox is ticked. So I 
presume 
> the template language statement would include first an If statement for 
> whether the article is on the front page, but how do I tell the parser 
the 
> number of the photo, when this will be changing?
<!** list article onfrontpage is on>
    <!** if image 100>
        <img src="/cgi-bin/get_img?<!** urlparameters>">
    <!** endif>
<!** endlist>
Now, you'll have to come up with a convention like: "all images that are 
to be
displayed on the front page will have the number 100".

The image number is like a label, it's just that you can't name them with 
words
but you have to use numbers. Think of it this way: number 1 is for 
displaying
together with article short intro on the front page, number 10 is 
thumbnail for
headlines (when you display a list of article headlines in a RSS feed), 20 
and
up are for use in article body fields.

Mugur

> Mugur Rus <[email protected]>
> 08/02/2005 10:47 PM
> Please respond to campsite-support
> 
> 
>         To:     [email protected]
>         cc: 
>         Subject:        Re: [campsite-support] phantom <table> tags
> 
> 
> Don't display images from article fields, instead use template language:
> 
> <!** if image [image_nr]>
>     <img src="/cgi-bin/get_img?<!** urlparameters [image_nr]>">
> <!** endif>
> 
> See the manual for more details.
> 
> Mugur
> 
> --- [email protected] wrote:
> > Hi all,
> > 
> > I've run into what may be an undocumented feature, but wanted to ask 
> about 
> > it anyway. 
> > 
> > I'm on 2.2.2 (expecting to upgrade to 2.3.0 any minute now) and want 
to 
> > display the image from an article. The image field is called 
> > 'teaser_image'.
> > 
> > The template looks like this:
> > 
> > <!** List Article OnFrontPage Is On>
> > <!** Print Article teaser_image>
> > <!** EndList>
> > <!** endlocal>
> > 
> > The output, however, includes an entire table for the image:
> > 
> > <table border=0 cellspacing=0 cellpadding=0 align=none>
> > <tr><td align="center"><img 
src="/cgi-bin/get_img?NrArticle=2&NrImage=1" 
> 
> > alt="RDFW bunker" BORDER=0 HSPACE=5 VSPACE=5></td></tr>
> > <tr><td align="center" class="caption">RDFW bunker</td></tr>
> > </table>
> > 
> > Seeing as I'm trying to avoid tables at all costs, I want to suppress 
> all 
> > this junk. But how?
> > 
> > doug
> 
> 
> 
> 
> ____________________________________________________
> Start your day with Yahoo! - make it your home page 
> http://www.yahoo.com/r/hs 
> 
> 
> 
> 



 
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 



--=_alternative 0074862DC1257051_=
Content-Type: text/html; charset="us-ascii"


<br><font size=2 face="sans-serif">Thanks Mugur,</font>
<br>
<br><font size=2 face="sans-serif">I'll try something like this, and will keep you posted. I've also added your response to Campsite's DocMint documentation for 3.5.3. The DocMint site is quite nice, by the way, and other Campsite users would be well advised to check it out.</font>
<br>
<br><font size=2 face="sans-serif">http://code.campware.org/manuals/campsite/2.3/index.php</font>
<br>
<br>
<br><font size=2 face="sans-serif">doug</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Mugur Rus &lt;[email protected]&gt;</b></font>
<p><font size=1 face="sans-serif">08/02/2005 11:07 PM</font>
<br><font size=1 face="sans-serif">Please respond to campsite-support</font>
<br>
<td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To: &nbsp; &nbsp; &nbsp; &nbsp;[email protected]</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc: &nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject: &nbsp; &nbsp; &nbsp; &nbsp;Re: [campsite-support] phantom &lt;table&gt; tags</font></table>
<br>
<br>
<br><font size=2 face="Courier New">--- [email protected] wrote:<br>
&gt; Actually, I'm trying to follow the manual in Section 3.5.3 &quot;Including <br>
&gt; Images in the Section Listing,&quot; where it advises:<br>
&gt; <br>
&gt; The answer is quite simple. Create a body field in your Article Type that <br>
&gt; will only contain the image that goes into the section listing. Let's say <br>
&gt; we call this variable 'sectionimage'. Then all you need to add in the <br>
&gt; section listing to display the image is:<br>
&gt; &lt;!** print article sectionimage&gt;<br>
&gt; This will then generate the HTML code as saved in the database. And in our <br>
&gt; case that means it will create the image tag including the image. You <br>
&gt; could even generate a little subtitle for the image in this field when <br>
&gt; entering the article text and images.<br>
Yes, this is an old example but it's not the only way and maybe not the best<br>
way.<br>
<br>
&gt; What I want to do is display the article's image on the front page - not <br>
&gt; its text - if the 'display on front page' checkbox is ticked. So I presume <br>
&gt; the template language statement would include first an If statement for <br>
&gt; whether the article is on the front page, but how do I tell the parser the <br>
&gt; number of the photo, when this will be changing?<br>
&lt;!** list article onfrontpage is on&gt;<br>
 &nbsp; &nbsp;&lt;!** if image 100&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;img src=&quot;/cgi-bin/get_img?&lt;!** urlparameters&gt;&quot;&gt;<br>
 &nbsp; &nbsp;&lt;!** endif&gt;<br>
&lt;!** endlist&gt;<br>
Now, you'll have to come up with a convention like: &quot;all images that are to be<br>
displayed on the front page will have the number 100&quot;.<br>
<br>
The image number is like a label, it's just that you can't name them with words<br>
but you have to use numbers. Think of it this way: number 1 is for displaying<br>
together with article short intro on the front page, number 10 is thumbnail for<br>
headlines (when you display a list of article headlines in a RSS feed), 20 and<br>
up are for use in article body fields.<br>
<br>
Mugur<br>
<br>
&gt; Mugur Rus &lt;[email protected]&gt;<br>
&gt; 08/02/2005 10:47 PM<br>
&gt; Please respond to campsite-support<br>
&gt; <br>
&gt; &nbsp;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; To: &nbsp; &nbsp; [email protected]<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; cc: <br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; Subject: &nbsp; &nbsp; &nbsp; &nbsp;Re: [campsite-support] phantom &lt;table&gt; tags<br>
&gt; <br>
&gt; <br>
&gt; Don't display images from article fields, instead use template language:<br>
&gt; <br>
&gt; &lt;!** if image [image_nr]&gt;<br>
&gt; &nbsp; &nbsp; &lt;img src=&quot;/cgi-bin/get_img?&lt;!** urlparameters [image_nr]&gt;&quot;&gt;<br>
&gt; &lt;!** endif&gt;<br>
&gt; <br>
&gt; See the manual for more details.<br>
&gt; <br>
&gt; Mugur<br>
&gt; <br>
&gt; --- [email protected] wrote:<br>
&gt; &gt; Hi all,<br>
&gt; &gt; <br>
&gt; &gt; I've run into what may be an undocumented feature, but wanted to ask <br>
&gt; about <br>
&gt; &gt; it anyway. <br>
&gt; &gt; <br>
&gt; &gt; I'm on 2.2.2 (expecting to upgrade to 2.3.0 any minute now) and want to <br>
&gt; &gt; display the image from an article. The image field is called <br>
&gt; &gt; 'teaser_image'.<br>
&gt; &gt; <br>
&gt; &gt; The template looks like this:<br>
&gt; &gt; <br>
&gt; &gt; &lt;!** List Article OnFrontPage Is On&gt;<br>
&gt; &gt; &lt;!** Print Article teaser_image&gt;<br>
&gt; &gt; &lt;!** EndList&gt;<br>
&gt; &gt; &lt;!** endlocal&gt;<br>
&gt; &gt; <br>
&gt; &gt; The output, however, includes an entire table for the image:<br>
&gt; &gt; <br>
&gt; &gt; &lt;table border=0 cellspacing=0 cellpadding=0 align=none&gt;<br>
&gt; &gt; &lt;tr&gt;&lt;td align=&quot;center&quot;&gt;&lt;img src=&quot;/cgi-bin/get_img?NrArticle=2&amp;NrImage=1&quot; <br>
&gt; <br>
&gt; &gt; alt=&quot;RDFW bunker&quot; BORDER=0 HSPACE=5 VSPACE=5&gt;&lt;/td&gt;&lt;/tr&gt;<br>
&gt; &gt; &lt;tr&gt;&lt;td align=&quot;center&quot; class=&quot;caption&quot;&gt;RDFW bunker&lt;/td&gt;&lt;/tr&gt;<br>
&gt; &gt; &lt;/table&gt;<br>
&gt; &gt; <br>
&gt; &gt; Seeing as I'm trying to avoid tables at all costs, I want to suppress <br>
&gt; all <br>
&gt; &gt; this junk. But how?<br>
&gt; &gt; <br>
&gt; &gt; doug<br>
&gt; <br>
&gt; </font>
<br><font size=2 face="Courier New">&gt; <br>
&gt; &nbsp;<br>
&gt; ____________________________________________________<br>
&gt; Start your day with Yahoo! - make it your home page <br>
&gt; http://www.yahoo.com/r/hs <br>
&gt; &nbsp;<br>
&gt; <br>
&gt; <br>
&gt; <br>
<br>
<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
____________________________________________________<br>
Start your day with Yahoo! - make it your home page <br>
http://www.yahoo.com/r/hs <br>
 <br>
</font>
<br>
<br>
--=_alternative 0074862DC1257051_=--