Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2006-01-13, 03:12 AM   #1
Halfdeck
You can now put whatever you want in this space :)
 
Halfdeck's Avatar
 
Join Date: Oct 2004
Location: New Haven, CT
Posts: 985
Send a message via ICQ to Halfdeck
Quote:
Originally Posted by oast
IMO, as with rotating banners; if there is a list (or table) of links, it is beneficial to have the appearance that the links are being 'updated' rather than seeing the same ones on each visit.. even if it is the same 10 displayed in a different order each time.
I agree. For a list of links, it's not a bad idea. For some of my pages that make multiple MYSQL calls, I prefer pre-generating / caching the page for quicker page delivery.
__________________
Success is going from failure to failure without a loss of enthusiasm.
Halfdeck is offline   Reply With Quote
Old 2006-01-13, 08:04 AM   #2
oast
With $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!
 
oast's Avatar
 
Join Date: May 2004
Location: UK
Posts: 316
Quote:
Originally Posted by Halfdeck
For some of my pages that make multiple MYSQL calls, I prefer pre-generating / caching the page for quicker page delivery.
I have a couple of pre-made scripts that utilise cacheing, and have heard that it is a very good idea.

For my 'homemade' scripting purposes, I have the luxury of numerous MySQL servers, so I can seperate the tasks (i.e. ad server on one, links db on another, main content on yet another, etc).
With the speed of MySQL (2000 lines in 0.4 seconds), I don't think cacheing would make that much difference for my purposes.

Another alternative would be to include the MySQL content in an iframe, so the static sections can load independently around it.
__________________
Playboy Webmasters - The name says it all! $35 per signup or 60% revshare.
oast is offline   Reply With Quote
Old 2006-01-13, 10:35 AM   #3
dunkin
Just because I don't care doesn't mean I don't understand!
 
dunkin's Avatar
 
Join Date: Feb 2004
Posts: 92
Hey gang,
Well, I tried using the POTD php that oast provided but just couldnt get it working. I am sure I am missing something simple. Plugged in the info as oast suggested as follows:


<?php
$pics=array(array('http://www.mydomain.com/images/mypic1.jpg',''http://www.mydomain.com/images/mypic1thumb.jpg','mypic1 alt text'),
array('http://www.mydomain.com/images/mypic2.jpg','http://www.mydomain.com/images/mypic2thumb.jpg','mypic2 alt tex'),
array('http://www.mydomain.com/images/mypic3.jpg','http://www.mydomain.com/images/mypic3thumb.jpg','mypic3 alt tex'),
array('http://www.mydomain.com/images/mypic4.jpg','http://www.mydomain.com/images/mypic4thumb.jpg','mypic4 alt tex'),

);
$today=date('z');
echo "<a href=\"{$pics[$today][0]}\"><img src=\"{$pics[$today][1]}\" alt=\"{$pics[$today][2]}\" border=\"0\" /></a><br />\n";
?>


The above was saved as" potd1.php

Called it up on an index page with: <?php include("potd1.php"); ?>

I am only getting the "infamous" blank box with red X, and no alt text.

I actually only need this to show a full size pic and alt text. No need for the thumb array.
An example would be a text link "click here for picture of the day" and this would go to a page with the full size picture. I attempted to adjust the scrip to show just a full size picture and alt text but no luck with that either.

I am sure this is a fairly easy script, but I am not the best with php, still learning the basics here. I really appreciate all the help provided. I am sure I am just overlooking something simple here.

Again, thanks for the all the help.
Dunkin
dunkin is offline   Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:01 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc