I want to modify what multipart does around an image

All new Coranto Addons, updates and patches to addons, will be released here...also, get support for addons within!

Moderators: Spunkmeyer, Dale Ray, SrNupsen, Bluetooth, Jackanape

I want to modify what multipart does around an image

Postby j1mm13 » Thu Nov 06, 2003 3:51 am

Where is the selected image put into an img tag? I want to put some other code there. Actually, I want to put the picture in a table to give space around and an area for a tag line (caption) at the bottom of the picture.

Also, how does one get to select multiple images to connect with a news article?

I am using multisubmit and custom submit pages. Perhaps I have missed something?

Thanks!
User avatar
j1mm13
 
Posts: 61
Joined: Mon Oct 20, 2003 3:40 pm
Location: Texas Hill Country

Postby j1mm13 » Thu Nov 06, 2003 5:04 am

I have edited the .txt file to make the pictures in the second article do what I want done.

http://shingleimage.httpsuites.com/demo_news/

I am looking for a way that the users (typical low TQ) can do this simply. Surely there is a way it can be done.

The bad part about editing the .txt file is that every time the news is built, it reverts to a single pic in the second article and loses the formating with tag line.

Surely the code warriors here can solve this... or am I naive?


Thanks for thinking about it!
User avatar
j1mm13
 
Posts: 61
Joined: Mon Oct 20, 2003 3:40 pm
Location: Texas Hill Country

Postby Pirate Elf » Thu Nov 06, 2003 5:49 am

I'm tired but basically what you want is done with styles

use whatever tag your style is using for the multipart image then surround it how you like:
Code: Select all
<table>
<tr>
<td>
<FilePath: [UPLOAD_FIELD]>
</tr>
</td>
</table>


Something like that will work check your styles
Nichts ist für dich
Nichts war für dich
Nichts bleibt für dich
Für immer
Pirate Elf
 
Posts: 732
Joined: Wed Jan 31, 2007 9:45 pm

Postby j1mm13 » Thu Nov 06, 2003 6:09 pm

Regarding your answer (Pirate Elf) where do I put the snippit of code?

I have not found a good reference for dealing with styles and img's. The caption attribute/property seems to remain unexplained in all that I have seen. That is why I keep looking for a code solution. :/

Can someone point me to one? For almost everything else in CSS I have found URL: http://www.w3schools.com/css/ to be the most helpful to me.

Thanx!
User avatar
j1mm13
 
Posts: 61
Joined: Mon Oct 20, 2003 3:40 pm
Location: Texas Hill Country

Postby Pirate Elf » Thu Nov 06, 2003 6:23 pm

the way your news is displayed is edited via the styles section within coranto. You can set up the style to do whatever you want. For instance show me your style and i can show you how you could implement what you want.
Nichts ist für dich
Nichts war für dich
Nichts bleibt für dich
Für immer
Pirate Elf
 
Posts: 732
Joined: Wed Jan 31, 2007 9:45 pm

Postby j1mm13 » Thu Nov 06, 2003 6:50 pm

This is the style for the demo news at URL: http://shingleimage.httpsuites.com/demo_news/

The "Bridal Show" story contains the way I want to deal with photos.
(I' m betting I'm not the only one glad I found the "edit" button...)

The code within that page for the photos is what I am trying to achieve. Doing it for one photo, as the multipart is now setup would be great. Being able to do it for more than one photo would be even better. I have not figured out how to get multipart let me set it up for a second photo.

I think I could approximate the location of a second photo by #of characters, although looking for an "x" # of <br><br>'s would be even better.

I know some of these questions have been thrown around before, but, they never seem to get answered... at least not in the public eye within the forum.

I appreciate your time and effort on this!!!


Code: Select all
<center><font class=demo_alert>&nbsp;&nbsp;&nbsp;This is not current news - This is for demonstration  purposes only&nbsp;&nbsp;&nbsp;</font></center> <br>
<font class=headline><Field: Subject></font>
<If: Field: CustomField_LeftRight ne "No picture">
  <If: Field: CustomField_photo_1>
    <IMG SRC="<FilePath: CustomField_photo_1>" ALIGN="<Field: CustomField_LeftRight>" BORDER="0">
  <If: Else: Field: CustomField_DropDownImage>
    <IMG SRC="<Field: CustomField_DropDownImage>" ALIGN="<Field: CustomField_LeftRight>" BORDER="0">
  </If>
</If>
<p align=justify><font class=dateline><Field: CustomField_where>, <Field: CustomField_state_country> - <Field: Date> - </font>
<Field: Text> </p>
<hr width=90% noshade>
&nbsp;<p>
User avatar
j1mm13
 
Posts: 61
Joined: Mon Oct 20, 2003 3:40 pm
Location: Texas Hill Country

Postby Parahead » Thu Nov 06, 2003 7:54 pm

j1mm13, since your style indicates you do know how to use the Multipart-field to make an IMG-tag out of it, isn´t your question really about what already have been discussed in this thread? And if you would like a second Multipart field, it is just to create another one and include it in your submit page...

So, I just continue the thinking started in that other thread, OK... One way of inserting an IMG-tag at a specific position in your news would to use this approach. Anywhere in the textare when you submit a news, you place a [photo 1]-tag where you want the first photo to show up, you place [photo 2] where you want the second and so on...

Before this you have created that many Multipart-image fields that you want and included them into this news submit page. They *must* be named CustomField_photo_1, CustomField_photo_2 and so on...

Then, in the style that you use, place this piece of code at the very end:
Code: Select all
<PerlCode>
$newshtml =~ s/\[photo ([0-9]+)\]/<IMG SRC="\$CustomField_photo_$1">/g;
</PerlCode>


I have not taken into consideration that you may want to use an alignment-field such as your CustomField_LeftRight for each image, but this is a start, try it out...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby j1mm13 » Thu Nov 06, 2003 8:10 pm

I had some private help with the creation of fields before. I was just setting about to create more, having re-read the dialogue from the helper and looking at the relevant screens. I can handle that part after all.

I like the substitution aspect for getting photos placed in the text, but, I think the via program assignment of position is going to be best for most users.

The incorporation of style elements to get the spacing and photo tagline (caption) is of great interest to me. You may have noticed I edited my previous post to give the url again and point out the "Bridal Show" article as having the photos displayed as I wish to do under program control, that is transparent to the user.

Again, I have no words (or money at the moment) to express my gratitude to you for your help in this!!!
User avatar
j1mm13
 
Posts: 61
Joined: Mon Oct 20, 2003 3:40 pm
Location: Texas Hill Country

Postby Parahead » Thu Nov 06, 2003 8:17 pm

I would say that the best way to do this then is to create several textarea fields.

Then you place them at your submitpage such as:
Subject:
Text:
CustomField_PhotoLeftRight_1:
CustomField_Photo_1:
CustomField_TextArea_2:
CustomField_PhotoLeftRight_2:
CustomField_Photo_2:
CustomField_TextArea_3:
CustomField_PhotoLeftRight_2:
CustomField_Photo_2:

And then in your style you use the fields one after another, just the same way as above...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby j1mm13 » Fri Nov 07, 2003 12:27 am

Okay, I did all the new fields and put them in the submit page, submitted the "Bridal Show" story and pictures, feeling confident that it would work. I was wrong. Something must be badly wrong in my style, but, it looks like good html to me.

Have I stumbled over something that y'all Perl coders can get a good laugh from? I hope so! :)

This is what my style has: (note the OLD STYLE marking the beginning of the previous style to make it simple to back out of my modifications)

Code: Select all
<center><font class=demo_alert>&nbsp;&nbsp;&nbsp;This is not current news - This is for demonstration  purposes only&nbsp;&nbsp;&nbsp;</font></center> <br>

<font class=headline><Field: Subject></font>

<If: Field: CustomField_photo_1_LeftRight ne "No picture">
  <If: Field: CustomField_photo_1>
    <table width="200" border="0" align="right" cellpadding="0" cellspacing="0" vspace="3" hspace="10">
      <tr bgcolor="#FFFAFA" align="center">
        <td>
          <p align=justify><IMG SRC="<FilePath: CustomField_photo_1>" ALIGN="<Field: CustomField_LeftRight>" BORDER="0"><br>
          <font size="1" face="Verdana,Arial,Helvetica,sans-serif" size="1"><Field: CustomField_photo_1_caption> </font></p>
          <p align=right><font size="1" face="Verdana,Arial,Helvetica,sans-serif" size="1">
             <Field: CustomField_Photo_credit></font>
          </p>
        </td>
      </tr>
    </table>
  <If: Else: Field: CustomField_DropDownImage>
    <table width="200" border="0" align="right" cellpadding="0" cellspacing="0" vspace="3" hspace="10">
      <tr bgcolor="#FFFAFA" align="center">
        <td>
          <p align="justify"><IMG SRC="<Field: CustomField_DropDownImage>" ALIGN="<Field: CustomField_LeftRight>" BORDER="0"><br>
          <font size="1" face="Verdana,Arial,Helvetica,sans-serif" size="1"><Field: CustomField_photo_1_caption> </font></p>
          <p align="right"><font size="1" face="Arial,Helvetica,sans-serif"><Field: CustomField_Photo_credit> </font></p>
        </td>
      </tr>
    </table>
  </If>
</If>

<p align="justify"><font class="dateline"><Field: CustomField_where>, <Field: CustomField_state_country> - <Field: Date> - </font>
<Field: Text>
<If: Field: CustomField_photo_2_LeftRight ne "No picture">
  <If: Field: CustomField_photo_2>
    <table width="200" border="0" align="right" cellpadding="0" cellspacing="0" vspace="3" hspace="10">
      <tr bgcolor="#FFFAFA" align="center">
        <td>
          <p align="justify"><IMG SRC="<FilePath: CustomField_photo_1>" ALIGN="<Field: CustomField_photo_2_LeftRight>" BORDER="0"><br>
          <font size="1" face="Verdana,Arial,Helvetica,sans-serif"><Field: CustomField_photo_2_caption> </font></p>
          <p align="right"><font size="1" face="Arial,Helvetica,sans-serif"><Field: CustomField_Photo_2_credit> </font></p>
        </td>
      </tr>
    </table>
  <If: Else: Field: CustomField_DropDownImage>
    <table width="200" border="0" align="right" cellpadding="0" cellspacing="0" vspace="3" hspace="10">
      <tr bgcolor="#FFFAFA" align="center">
        <td>
          <p align="justify"><IMG SRC="<Field: CustomField_DropDownImage>" ALIGN="<Field: CustomField_photo_2_LeftRight>" BORDER="0"><br>
          <font size="1" face="Verdana,Arial,Helvetica,sans-serif"><Field: CustomField_photo_2_caption> </font></p>
          <p align="right"><font size="1" face="Arial,Helvetica,sans-serif"><Field: CustomField_Photo_2_credit></font></p>
        </td>
      </tr>
    </table>
  </If>
</If>
</p>
<hr width="90%" noshade>
&nbsp;<p>

<hr>
Old Style<br><br>
<center><font class=demo_alert>&nbsp;&nbsp;&nbsp;This is not current news - This is for demonstration  purposes only&nbsp;&nbsp;&nbsp;</font></center> <br>
<font class=headline><Field: Subject></font>
<If: Field: CustomField_LeftRight ne "No picture">
  <If: Field: CustomField_photo_1>
    <IMG SRC="<FilePath: CustomField_photo_1>" ALIGN="<Field: CustomField_LeftRight>" BORDER="0">
  <If: Else: Field: CustomField_DropDownImage>
    <IMG SRC="<Field: CustomField_DropDownImage>" ALIGN="<Field: CustomField_LeftRight>" BORDER="0">
  </If>
</If>
<p align=justify><font class=dateline><Field: CustomField_where>, <Field: CustomField_state_country> - <Field: Date> - </font>
<Field: Text> </p>
<hr width=90% noshade>
&nbsp;<p>

Somebody hand me a drink...
User avatar
j1mm13
 
Posts: 61
Joined: Mon Oct 20, 2003 3:40 pm
Location: Texas Hill Country

Postby Parahead » Fri Nov 07, 2003 7:08 am

I havn´t looked to deep into the style, would like to take a look at real HTML-output at the same time... Do a "View Source" and show us...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby j1mm13 » Fri Nov 07, 2003 7:52 am

I spotted some name inconsistancies and I think I have them corrected.
I have also changed the style a bunch of times, so I need to get back to some point and then show the style and html.

Now I have this: " Select Photo 2 from Server (?): " appearing on my submit page.

I am guessing the (?) indicates a problem... I cannot find one. :(

Help!
User avatar
j1mm13
 
Posts: 61
Joined: Mon Oct 20, 2003 3:40 pm
Location: Texas Hill Country

Postby Parahead » Fri Nov 07, 2003 7:56 am

Is it a "Upload Field" of type Select Image?

Hav you gone in to the Edit News Field page and entered valid paths for that field?
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby j1mm13 » Fri Nov 07, 2003 6:45 pm

After a good nights sleep, I found numerous inconstancies in my naming of and calling of fields.

Some sloppy html was mixed in.

The fields were correct in type and path. I never figured out why the "?" was appearing. I deleted the fields, re-created them, rebuilt the submit page, did a full rebuild, and all was well.

Now, it does gloriously!! I can move the pictures left or right, remove one or the other, the text flows just like I wanted and you would never know a photo had been there or had never been there, as the case may be.

I will set-up a user as qweilo and a password coranto so anyone that wants to see can step in and post. The Demo News is where this is currently used.

I am not really looking for much feedback at this time, when I am I will submit it to the appropriate forum.

G'day!
User avatar
j1mm13
 
Posts: 61
Joined: Mon Oct 20, 2003 3:40 pm
Location: Texas Hill Country


Return to Addon Release and Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron