|
|
This web page... help and hints please?
|
|
|
|
Mac Elite
Join Date: Mar 2003
Location: London/Plymouth, England
Status:
Offline
|
|
Hi guys,
I kind of help out creating this web page:
London Thames Fencing Club
and obviously I'm not the best web page coder ever. Two questions...
1:
Is there a reasonably easy way to implement a scroller that displays the latest 2-3 items on the (wordpress blog created) news page?
2:
Why does the page not scale properly in IE - the text is meant to be displayed alongside the sidebar, and does on safari and firefox, but not on IE.
Cheers
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Originally Posted by threestain
Hi guys,
I kind of help out creating this web page:
London Thames Fencing Club
and obviously I'm not the best web page coder ever. Two questions...
1:
Is there a reasonably easy way to implement a scroller that displays the latest 2-3 items on the (wordpress blog created) news page?
You would need to understand the database structure that Wordpress uses to store content, use some PHP code to grab these entries from the MySQL database, and javascript to scroll it or whatever visual stuff you wanted to do.
2:
Why does the page not scale properly in IE - the text is meant to be displayed alongside the sidebar, and does on safari and firefox, but not on IE.
Cheers
Could you provide us with a screenshot of what you mean? I'm too lazy to fire up IE....
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Mar 2003
Location: London/Plymouth, England
Status:
Offline
|
|
ah right, thanks.
so not the quick fix that I was hoping for. So php eh? Is that complicated for a bear with little brain?
ok, think I've figured out the IE problem - the images on the left (firefox, thunderbird and LTFC badge) don't scale like the rest of the page does. any way to do this easily? will look at it properly soon, but ideas would be cool.
Fitting version
Non-fitting version
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Originally Posted by threestain
ah right, thanks.
so not the quick fix that I was hoping for. So php eh? Is that complicated for a bear with little brain?
ok, think I've figured out the IE problem - the images on the left (firefox, thunderbird and LTFC badge) don't scale like the rest of the page does. any way to do this easily? will look at it properly soon, but ideas would be cool.
Fitting version
Non-fitting version
The sidebar should be set off in a div block with a:
float:left;
The text should not have a
clear:left;
(although if it did, it would affect other browsers too).
However, it just isn't worth your time worrying about Mac IE. Check it out in Windows IE. They are completely and 100% different browsers.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Aug 2004
Status:
Offline
|
|
Just a suggestion: Remove the stats counter at the bottom of your page, it is very 1990s. Look through the control panel your host supplies and you will find a stats script there, AwStats probably.
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Jan 2001
Location: Boulder, CO, USA
Status:
Offline
|
|
Originally Posted by threestain
Is there a reasonably easy way to implement a scroller that displays the latest 2-3 items on the (wordpress blog created) news page?
FWIW, you don't really have to understand WP or its database to get this to work. I managed to pull the first n news items from our WP news install for the frontpage by copying and pasting from the wp source.
Your mileage may vary, and this will probably break with a different version of WP (this is using 1.5.2), but if you want to try it ...
This goes in the page's header. Replace "news/" with a relative path to your WP install. The if statement may not be necessary, I dunno.
Code:
<?php
if (empty($feed)) {
$blog = 1;
require('news/wp-blog-header.php');
}
?>
And this goes where you want the news items to appear:
Code:
<?php
{
global $posts, $m;
$items_count = 0;
if ( have_posts() )
{
while ( have_posts() )
{
the_post();
echo "∼ <a href='";
the_permalink();
echo "' rel='bookmark'>";
the_title();
echo "</a><br>";
$items_count++;
if ( ( $items_count == 3 ) && empty($m) )
break;
}
}
}
?>
It's a hack and it's fragile, but *shrug*. Change the number in the $items_count test to change the number of items you pull.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Mar 2003
Location: London/Plymouth, England
Status:
Offline
|
|
cheers, I really appreciate that - cool, and will try and whip it in tonight.
the reason the stats counter is there is cos the service provider one is appallingly bad. looks a bit cack but at least I can work out what's going on!
[EDIT] Unfortunately I have already upgraded to WP2. It doesn't seem to work well yet, but getting there...
(
Last edited by threestain; Jan 20, 2006 at 02:55 PM.
)
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Mar 2003
Location: London/Plymouth, England
Status:
Offline
|
|
through the help of my housemate, we've got to here:
Slightly more working but still no idea...
I think it's cos its not calling the wp install properly (which is at londonthamesfencingclub.com/LTFCNews) but I'm sure...
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Mar 2003
Location: London/Plymouth, England
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Mar 2003
Location: London/Plymouth, England
Status:
Offline
|
|
Given up on the php idea, and going to use a feed aggregator instead - apparently should be less owrk overall for the server.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Mar 2003
Location: London/Plymouth, England
Status:
Offline
|
|
hmmm... does anyone know how to use a feed aggregator? the kind people at wordpress have started to ignore my annoyingness
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|