alternating style posts within the same style.

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

alternating style posts within the same style.

Postby thegametb » Mon Oct 10, 2005 3:04 am

This may or may not of been discussed before here, but there may be a good chance of it being done. I was wondering what would be the easiest method to manipulate a news style in Coranto with Perlcode to make it where it would "swap" different looks of news?

To paint a picture, I was thinking about something like have news on the left side with the image on the right and then the "odd" post be flip-flopped where the image would be on the left and the news on the right. I've seen this kind of done a few times with past Perlcodes I've used, but not sure how different this would be.

I was thinking about modifying the "alternatie background colors" Perlcode, but that may not be the best step to start the idea. If someone has posted something like this previously, could you please supply a link, let me know what good keywords to search the forum for, or send me in a good starting position to get this rolling by modifying a previously made Perlcode?

Thanks in advance for any help or advice given.
User avatar
thegametb
 
Posts: 109
Joined: Mon Jul 05, 2004 11:38 am

Postby bozoka45 » Mon Oct 10, 2005 3:41 am

Just use the alternating background colors, and change the alignment from "left" to "right"
User avatar
bozoka45
 
Posts: 1159
Joined: Sun Mar 23, 2003 8:38 pm
Location: New Orleans

Postby thegametb » Mon Oct 10, 2005 4:16 am

Thanks for the tip. Got it up and running correctly. Just did what you said and modify the alternate code from BG colors to TD alignments. Then did the IF statements and added Field: Switch in the first IF statement. It worked for real simple, stripped down coding, but doesn't go well with heavy coding or actual swapping cell information.

Basically I'm working with tables and I'll draw a diagram of what I want to help you guys out.

Even posts look like this:
Code: Select all
<tr>
<td>HEADER</td>
</tr>

<tr>
<td>IMG</td>
<td>TEXT</td>
</tr>

Odd posts look like this:
Code: Select all
<tr>
<td>HEADER</td>
</tr>

<tr>
<td>TEXT</td>
<td>IMG</td>
</tr>

Not sure if you were confused with what I said earlier about flip-flopping from odd to even posts style. The test done earlier was done with basic text and it worked, but it won't actual swap cells like I would like it to.

What it'll be doing is archiving a profile and having the same formatting for every post would look extremely dual. So I figured I would swap IMG/TEXT to TEXT/IMG, which should give it some balance and help liven things up. Also, it would not make it look as automated as it normally would.
Last edited by thegametb on Mon Oct 10, 2005 8:06 am, edited 1 time in total.
User avatar
thegametb
 
Posts: 109
Joined: Mon Jul 05, 2004 11:38 am

Postby bozoka45 » Mon Oct 10, 2005 7:03 am

Did you try making the swith field:

Code: Select all
<td>IMG</td>
<td>TEXT</td>


And

Code: Select all
<td>TEXT</td>
<td>IMG</td>
User avatar
bozoka45
 
Posts: 1159
Joined: Sun Mar 23, 2003 8:38 pm
Location: New Orleans

Postby thegametb » Mon Oct 10, 2005 8:05 am

Sorry, you lost me on that. Let me know if you need me to ellaborate on the problem.

If you could, give me an example?

Thanks.
User avatar
thegametb
 
Posts: 109
Joined: Mon Jul 05, 2004 11:38 am


Return to Customization

Who is online

Users browsing this forum: No registered users and 2 guests

cron