TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   How to add increase column width (http://www.talkphp.com/absolute-beginners/2474-how-add-increase-column-width.html)

satimis 03-14-2008 02:29 AM

How to add increase column width
 
Hi folks,


I have following entries on a php script
Code:

.....
.....
// List of RSS URLs

$rss_left = array(

'http://www.rte.ie/rss/gaa.xml',

'http://www.freshfolder.com/rss.php'

);

$rss_right = array(

'http://www.independent.ie/sport/hurling/rss',

'http://phpbuilder.com/rss_feed.php'

);

// Create lastRSS object
....
....

I can't resolve how to incease the blank column width between left and right columns.


Please shed me somelight. TIA


B.R.
satimis

Nor 03-14-2008 03:51 AM

What exactly do you mean by "create the blank column width?" Do you have a visual example?

satimis 03-14-2008 04:29 AM

Quote:

Originally Posted by Nor (Post 12394)
What exactly do you mean by "create the blank column width?"

Both columns are scrolling on a marquee container/window w/o problem. But the left/right URLs are too close. I expect to get them a little bid apart, i.e. to increase the blank space between the left and right URLs or to add a narrow blank column between the left and right columns. Thanks


satimis

Haris 03-14-2008 06:32 AM

Elaborate completely satimis! What are you trying to achieve?

satimis 03-14-2008 07:04 AM

Quote:

Originally Posted by Haris (Post 12398)
Elaborate completely satimis! What are you trying to achieve?

OK.


I made mistake on entering the titles of my 2 postings. Now I repeat what I'm searching for as follows;


I have 2 PHP scripts for RSS feeds, one with the news displaying on single column and another on twin column. The news are scrolling on a marquee container/window/tag written on javascript (another script).


Both PHP scripts are working. I won't run them at the same time. (This is a test only)


1)
Single column PHP script
Code:

<?php
function ShowOneRSS($url) {
global $rss;
if ($rs = $rss->get($url)) {
echo '<h2><a href="'.$rs['link'].'">'.$rs['title']."</a></h2>\n";
echo $rs['description']."<br>\n";
echo "<ul>\n";
foreach ($rs['items'] as $item) {
echo '<li><a href="'.$item['link'].'" title="'.$item['description'].'">'.$item['title'].'</a></li>';
}
if ($rs['items_count'] <= 0) { echo "<li>Sorry, no items found in the RSS file :-(</li>"; }
echo "</ul>\n";
}
}
// ===
// include lastRSS
include "lastRSS.php";
// List of RSS URLs
$rss_left = array(
'http://www.rte.ie/rss/gaa.xml',
'http://www.independent.ie/sport/hurling/rss',
'http://www.freshfolder.com/rss.php'
);

// Create lastRSS object
$rss = new lastRSS;
// Set cache dir, cache interval and character encoding
$rss->cache_dir = 'cache';
$rss->cache_time = 14000; // (4hrs)
$rss->cp = '';
$rss->items_limit = 5;
// Show all rss files
echo '<table class="rss_section" cellpadding="5" border="0"><tr><td width="50%" valign="top">';
foreach ($rss_left as $url) ShowOneRSS($url);
echo '</td></tr></table>';
?>

I need adding blank lines between each sites. So they don't look as stacked on top of another site.



2)
Twin column (2 columns) PHP script
Code:

<?php

function ShowOneRSS($url) {

global $rss;

if ($rs = $rss->get($url)) {

echo '<h2><a href="'.$rs['link'].'">'.$rs['title']."</a></h2>\n";

echo $rs['description']."<br>\n";

echo "<ul>\n";

foreach ($rs['items'] as $item) {

echo '<li><a href="'.$item['link'].'" title="'.$item['description'].'">'.$item['title'].'</a></li>';

}

if ($rs['items_count'] <= 0) { echo "<li>Sorry, no items found in the RSS file :-(</li>"; }

echo "</ul>\n";

}

}

// ===

// include lastRSS

include "lastRSS.php";

// List of RSS URLs

$rss_left = array(

'http://www.rte.ie/rss/gaa.xml',

'http://www.freshfolder.com/rss.php'

);

$rss_right = array(

'http://www.independent.ie/sport/hurling/rss',

'http://phpbuilder.com/rss_feed.php'

);

// Create lastRSS object

$rss = new lastRSS;

// Set cache dir, cache interval and character encoding

$rss->cache_dir = 'cache';

$rss->cache_time = 14000; // (4hrs)

$rss->cp = '';

$rss->items_limit = 5;

// Show all rss files

echo '<table class="rss_section" cellpadding="5" border="0"><tr><td width="50%" valign="top">';

foreach ($rss_left as $url) ShowOneRSS($url);

echo '</td><td width="50%" valign="top">';

foreach ($rss_right as $url) ShowOneRSS($url);

echo '</td></tr></table>';

?>

The URLs on left and right columns are too close. I'm trying making them apart. I'm searching a solution adding a blank narrow column between them OR with some other methods.


B.R.
satimis

Orc 03-14-2008 08:40 AM

Why are there two threads, that you sir, have made about the same topic at hand?

Anyway, I don't quite understand what you're trying to achieve? Do you want some css? you could do this
Code:

span.url {
display:block;
padding:5px;
}

This makes the url break a new line, and add a spacing around it by 5 pixels around the whole thing.

satimis 03-14-2008 10:04 AM

Quote:

Originally Posted by Orc (Post 12400)
Do you want some css? you could do this
Code:

span.url {
display:block;
padding:5px;
}

This makes the url break a new line, and add a spacing around it by 5 pixels around the whole thing.

Where shall I put the above lines? On single column PHP script there are 3 urls;

'http://www.rte.ie/rss/gaa.xml',
'http://www.independent.ie/sport/hurling/rss',
'http://www.freshfolder.com/rss.php'

Shall I do it on each url? TIA


B.R.
satimis


All times are GMT. The time now is 06:24 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0