| Author |
Message |
medigangsta


Joined: Jul 16, 2004 Posts: 69
|
Post subject: Re: How to have 2 news side by side? Posted: Sat Apr 23, 2005 5:41 pm |
|
Right, I've nearly got a second added, but can't quite get it right, I'll post the code up to see if someone else can get it sorted, as I may not look at it again tonight.
Code:
<!-- DEFINE $LEFT_ARTICLE = false -->
<table align="center"><tr>
<!-- BEGIN newstopic -->
<td width="50%">
<a href="{newstopic.U_NEWTOPIC}"><img src="{newstopic.IMG_TOPIC}" alt="{newstopic.S_TOPIC}" border="0" align="right" /></a>
<span class="legend">{newstopic.S_TITLE}</span>
<font size="2" color="#000000">{newstopic.S_STORY}
<!-- IF newstopic.S_NOTES -->
<br /><br /><b>{newstopic.S_NOTE}</b> <i>{newstopic.S_NOTES}</i>
<!-- ENDIF -->
</font><br />
<font size="1" color="#035D8A">{newstopic.S_POSTEDBY} {newstopic.S_INFORMANT} {newstopic.S_TIME}</font>
<div align="right"><span class="storyfoot">{newstopic.S_MORELINK}</span></div>
</td>
<!-- IF $LEFT_ARTICLE -->
</tr></table><table><tr><td><!-- DEFINE $LEFT_ARTICLE = false --></td>
<!-- ELSE -->
</tr><tr>
<!-- DEFINE $LEFT_ARTICLE = true -->
<!-- ENDIF -->
<!-- END newstopic -->
</tr></table>
That gives me this:
Story 1
Story 2
Story 3 - (Blank Space)
(Blank Space) - Story 4
Story 5 - (Blank Space)
medigangsta's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 2.0.50/MySQL 4.0.18 /PHP 4.3.9/CPG 8.2b |
|
| Back to top |
|
 |
medigangsta


Joined: Jul 16, 2004 Posts: 69
|
Post subject: Re: How to have 2 news side by side? Posted: Sat Apr 23, 2005 8:28 pm |
|
The Journey Continues
In my quest to gain the following theme behaviour
Story 1
Story 2
Story 3 - Story 4
Story 5 - Story 6
I have somehow managed to come up with the complete opposite, and currently have
Story 1 - Story 2
Story 3
Story 4
Story 5
Story 6
I'll post the code up just in case someone wants this type of behviour, or if someone can help me find out where I've gone wrong. I keep thinking I'm so close to achieving my goal, then it goes wrong again 
Code:
<!-- DEFINE $LEFT_ARTICLE = false -->
<table align="center"><tr>
<!-- BEGIN newstopic -->
<td width="50%">
<a href="{newstopic.U_NEWTOPIC}"><img src="{newstopic.IMG_TOPIC}" alt="{newstopic.S_TOPIC}" border="0" align="right" /></a>
<span class="legend">{newstopic.S_TITLE}</span>
<font size="2" color="#000000">{newstopic.S_STORY}
<!-- IF newstopic.S_NOTES -->
<br /><br /><b>{newstopic.S_NOTE}</b> <i>{newstopic.S_NOTES}</i>
<!-- ENDIF -->
</font>
<font size="1" color="#035D8A">{newstopic.S_POSTEDBY} {newstopic.S_INFORMANT} {newstopic.S_TIME}</font>
<div align="right"><span class="storyfoot">{newstopic.S_MORELINK}</span></div>
</td>
<!-- IF $LEFT_ARTICLE -->
</tr></table><table><tr>
<!-- ELSE -->
<!-- DEFINE $LEFT_ARTICLE = true -->
<!-- ENDIF -->
<!-- END newstopic -->
</tr></table>
medigangsta's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 2.0.50/MySQL 4.0.18 /PHP 4.3.9/CPG 8.2b |
|
| Back to top |
|
 |
medigangsta


Joined: Jul 16, 2004 Posts: 69
|
Post subject: Re: How to have 2 news side by side? Posted: Sat Apr 23, 2005 11:28 pm |
|
Unless a member of the Dev Team can point me in the right direction, I now believe it is currently improssible to create this behaviour with Dragonfly, almost certainly not by using the code DJMaze pasted earlier as a base.
In one of my earlier posts I thought I had created the beginnings of it by having:
Story 1
Story 2 - Story 3
Story 4 - Story 5
However, it turns out this is only because there were an odd number of stories on the page, in this instance, adding a 6th story creates the following look:
Story 1
Story 2 - Story 3
Story 4 - Story 5
Story 6
So, sadly, I'm throwing in the towel. Hopefully a member of the Dev team with more of an idea behind the templating system could give some pointers as to whether or not this is possible.
I'm very happy to do the leg work on this if someone has any ideas, unfortunately I've used up all mine.
medigangsta's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 2.0.50/MySQL 4.0.18 /PHP 4.3.9/CPG 8.2b |
|
| Back to top |
|
 |
Head-e


Joined: Apr 20, 2004 Posts: 937
|
Post subject: Re: How to have 2 news side by side? Posted: Sun Apr 24, 2005 1:39 am |
|
try making a seperate file called articles2.html for a side by side format and then find a way to specify wich template is called
just an idea
Head-e please enter your server specs in your user profile! |
|
| Back to top |
|
 |
medigangsta


Joined: Jul 16, 2004 Posts: 69
|
Post subject: Re: How to have 2 news side by side? Posted: Sun Apr 24, 2005 2:09 pm |
|
Its a good idea. I tried something similar by using Phoenix's latest news block, the trick is though how to stop duplicate stories occuring.
For example, you have the 5 latest news stories at the top of your site. The next story has to be story 6, but by stating stories should start there, begins at Story 1 again. To my knowledge, there's no way of saying, for example:
<!-- Start Stories (-6) Here -->
Or something like that.
medigangsta's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 2.0.50/MySQL 4.0.18 /PHP 4.3.9/CPG 8.2b |
|
| Back to top |
|
 |
Gerald


Joined: Oct 19, 2004 Posts: 508 Location: Asheville, NC
|
Post subject: Re: How to have 2 news side by side? Posted: Sat May 07, 2005 4:01 pm |
|
So, I just wanted to ask where has all this ended up. I need to work up a theme that looks like a news paper with a 2 colum style thing going on. Any word . . . ?
_________________ Gerald Scott
Asheville, NC US
Gerald's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) . . . . . . . . .. . . . . . ( Linux 2.6.9 / 2.2.3 / 5.0.22 / 5.1.6 / 9.1.2.1 ) |
|
| Back to top |
|
 |
Gerald


Joined: Oct 19, 2004 Posts: 508 Location: Asheville, NC
|
|
| Back to top |
|
 |
stu1


Joined: Aug 27, 2005 Posts: 7 Location: Philippines
|
Post subject: Re: How to have 2 news side by side? Posted: Tue Aug 30, 2005 12:09 pm |
|
So, As I have understood this thread, the "Quad Module" doesn't work in Dragonfly. I'm not a coder. Has anyone been able to get more than 1 (2-5) central blocks horizontally in Dragonfly, yet?
stu
stu1's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Don\'t know on Virtual Host |
|
| Back to top |
|
 |
DJ Maze


Joined: Apr 19, 2004 Posts: 5668 Location: http://tinyurl.com/5z8dmv
|
Post subject: Re: How to have 2 news side by side? Posted: Tue Aug 30, 2005 1:35 pm |
|
I didn't test the following but it should work
Use the following inside the loop
PHP:
<!-- DEFINE $LEFT_ARTICLE = $LEFT_ARTICLE+1 -->
Then a little further down inside the loop use
PHP:
<!-- IF $LEFT_ARTICLE % 2 = 0 -->
What does this do?
A % is a 'mod' calculation it's like (x = x-((x / 2) * 2))
Say x = 6 then:
x / 2 = 3
x * 2 = 6
x - 6 = 0
If x = 7 then:
x / 2 = 3.5 = 3
x * 2 = 6
x - 6 = 1
That way you can use something like:
Code:
<table>
<!-- IF $LEFT_ARTICLE % 3 = 0 -->
<tr><td>message</td>
<!-- ELSEIF $LEFT_ARTICLE % 3 = 1 -->
<td><table><tr><td>message</td>
<!-- ELSEIF $LEFT_ARTICLE % 3 = 2 -->
<td>message</td></tr></table></td>
<!-- ENDIF -->
This will output:
Code:
┌─────────────┬─────────────┐
│ │ │
│ │ Article 2 │
│ │ │
│ Article 1 ├─────────────┤
│ │ │
│ │ Article 3 │
│ │ │
└─────────────┴─────────────┘
Shure it's not the best method if there are NOT 3, 6, 9, etc. articles but it gives you an idea how powerfull themeing actualy is.
DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Fedora 12 / 2.2.15 / 5.1.47 / 5.3.3 / CVS |
|
| Back to top |
|
 |
beforelast


Joined: Sep 04, 2005 Posts: 315
|
Post subject: Re: How to have 2 news side by side? Posted: Sat Dec 17, 2005 11:22 pm |
|
i was wondering if i could get support on this .. "dual news".. when i have a smaller article beside a larger article the smaller arctile appears in the center of the news .. it look wierd .. how would i make it so all news appears at the top?
_________________

beforelast's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Windows XP/Apache 2.0.52/MySQL 4.0.21/PHP 5.0.2/DragonflyCMS 9.0.6.0/ Mozilla Firefox1.7x IE6 Opera 8.0 |
|
| Back to top |
|
 |
xfsunoles


Joined: Apr 30, 2004 Posts: 2502 Location: Melbourne, Florida
|
Post subject: Re: How to have 2 news side by side? Posted: Mon Dec 19, 2005 8:28 pm |
|
Even Number is 2,4,6,8,10 is Best Way to do Dual News. If you put odd number then you break math operation of the loop. we should drop odd number to make dual news better so loop can do put news side by side.
xfsunoles's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Apache/1.3.34 (Unix)/4.0.25-standard/4.4.1/CVS |
|
| Back to top |
|
 |
medigangsta


Joined: Jul 16, 2004 Posts: 69
|
Post subject: Re: How to have 2 news side by side? Posted: Sat Jan 07, 2006 8:04 pm |
|
I'm beginning to work on this again and am looking on at the development of the Pro News module with big interest.
However, although I see the logic in what DJMaze has said above, I just can't get it to work, I've tried a few different variations and nothing seems to work.
With the themeing system on DF being so vastly different to the other major CMSs available, I feel it'd be helpful if there was detailed documentation such as what DJMaze has provided above so that virtually anyone with any kind of coding knowledge could start designing different themes so that DF can move away from the standard three column design that, in my opinion, is holding it back slightly.
If someone could apply what DJMaze posted above to a working example that I cold copy and paste onto my test site and work from to try and create some different and interesting theme behaviours I'd be most grateful.
medigangsta's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 2.0.50/MySQL 4.0.18 /PHP 4.3.9/CPG 8.2b |
|
| Back to top |
|
 |
run0


Joined: Jun 28, 2004 Posts: 1559
|
Post subject: Re: How to have 2 news side by side? Posted: Sat Jan 07, 2006 8:39 pm |
|
t3los figured out how to to have dual columns if that is what you are looking for.
_________________

run0's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/1.3.33 (Unix)/4.0.22-standard/4.3.9/DF 9.x |
|
| Back to top |
|
 |
medigangsta


Joined: Jul 16, 2004 Posts: 69
|
|
| Back to top |
|
 |
jerryrp


Joined: Feb 17, 2006 Posts: 3 Location: New Port Richey, Florida
|
Post subject: Re: How to have 2 news side by side? Posted: Sat Mar 11, 2006 4:14 am |
|
I tried the code that Gerald had most recently posted and it worked in both IE7 and firefox. Trying to edit the code to blend in with my theme but not having any luck.
Any suggestions at which points I should put the additional codes.
Here is my original code. Any suggestions would be gratefull.
Code:
<!-- BEGIN newstopic -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div class="cell_wrapper">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="cell_header">
{newstopic.S_TITLE}
</td>
</tr>
<tr>
<td class="cell_content">
<a href="{newstopic.U_NEWTOPIC}">
<img style="padding-left:10px; padding-bottom:10px;"
src="{newstopic.IMG_TOPIC}"
alt="{newstopic.S_TOPIC}"
border="0"
align="right" />
</a>
{newstopic.S_STORY}
<!-- IF newstopic.S_NOTES -->
<br /><br />
<b>{newstopic.S_NOTE}</b> <i>{newstopic.S_NOTES}</i>
<!-- ENDIF -->
</td>
</tr>
<tr>
<td class="cell_info">
{newstopic.S_MORELINK} {newstopic.S_READS}
</td>
</tr>
<tr>
<td class="cell_footer">
{newstopic.S_POSTEDBY} {newstopic.S_INFORMANT} {newstopic.S_ON}
{newstopic.S_TIME}
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<!-- END newstopic -->
Thanks
Jerry
jerryrp's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) GPGNuke 9.0.6.1 |
|
| Back to top |
|
 |