TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 03-14-2008, 02:29 AM   #1 (permalink)
The Wanderer
 
Join Date: Mar 2008
Posts: 8
Thanks: 0
satimis is on a distinguished road
Default 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
satimis is offline  
Reply With Quote
Old 03-14-2008, 03:51 AM   #2 (permalink)
Nor
The Addict
 
Join Date: Nov 2007
Posts: 282
Thanks: 61
Nor is on a distinguished road
Default

What exactly do you mean by "create the blank column width?" Do you have a visual example?
__________________
PHP/XHTML Freelancer:
Cleanscript.com v3 - Programming starting at just $5 act now!
Nor is offline  
Reply With Quote
Old 03-14-2008, 04:29 AM   #3 (permalink)
The Wanderer
 
Join Date: Mar 2008
Posts: 8
Thanks: 0
satimis is on a distinguished road
Default

Quote:
Originally Posted by Nor View Post
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
satimis is offline  
Reply With Quote
Old 03-14-2008, 06:32 AM   #4 (permalink)
The Frequenter
Prolific Welcomer Upcoming Programmer 
 
Join Date: Sep 2007
Posts: 360
Thanks: 24
Haris is on a distinguished road
Default

Elaborate completely satimis! What are you trying to achieve?
__________________
Necessity is the mother of invention.

My blog
Haris is offline  
Reply With Quote
Old 03-14-2008, 07:04 AM   #5 (permalink)
The Wanderer
 
Join Date: Mar 2008
Posts: 8
Thanks: 0
satimis is on a distinguished road
Default

Quote:
Originally Posted by Haris View Post
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
satimis is offline  
Reply With Quote
Old 03-14-2008, 08:40 AM   #6 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

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.
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Old 03-14-2008, 10:04 AM   #7 (permalink)
The Wanderer
 
Join Date: Mar 2008
Posts: 8
Thanks: 0
satimis is on a distinguished road
Default

Quote:
Originally Posted by Orc View Post
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

Last edited by satimis : 03-14-2008 at 10:05 AM. Reason: correction
satimis is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 04:32 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design