| PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >> |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#19 (permalink) |
|
Surpass Fan
Comfy Contributor
Joined in Sep 2004
209 posts
Gave thanks: 0
Thanked 0 times
|
Our line numbers aren't matching up. You probably have a few blank lines that I don't. Either way, did you add the semi colon after $num = $num + 1
__________________
Pass14 www.tqwebservices.com www.autoappraisalsunlimited.com www.clevelandlayne.com Pass18 www.estateagency.com.au Some people drink deeply from the fountain of knowledge. Others just gargle. |
|
|
|
|
|
#20 (permalink) |
|
Registered User
Comfy Contributor
Joined in Aug 2004
Lives in Las Vegas
Hosted on pass11, pass12
187 posts
Gave thanks: 0
Thanked 0 times
|
Here is my current code and YES, I did add the semi colon:
PHP Code:
__________________
-- BlaZe -- ...... ......
|
|
|
|
|
|
#21 (permalink) |
|
Surpass Fan
Comfy Contributor
Joined in Sep 2004
209 posts
Gave thanks: 0
Thanked 0 times
|
Delete lines 72-75. You have the If statment in there twice and see what happens.
__________________
Pass14 www.tqwebservices.com www.autoappraisalsunlimited.com www.clevelandlayne.com Pass18 www.estateagency.com.au Some people drink deeply from the fountain of knowledge. Others just gargle. |
|
|
|
|
|
#22 (permalink) |
|
Surpass Fan
Comfy Contributor
Joined in Sep 2004
209 posts
Gave thanks: 0
Thanked 0 times
|
Once you do that, the layout will probably not be right. Change lines 72-75 to:
<?PHP if ($num == 6){ echo '</tr>'; echo '<tr>'; $num = 1; }
__________________
Pass14 www.tqwebservices.com www.autoappraisalsunlimited.com www.clevelandlayne.com Pass18 www.estateagency.com.au Some people drink deeply from the fountain of knowledge. Others just gargle. |
|
|
|
|
|
#23 (permalink) |
|
Registered User
Comfy Contributor
Joined in Aug 2004
Lives in Las Vegas
Hosted on pass11, pass12
187 posts
Gave thanks: 0
Thanked 0 times
|
Actually, I started over and went back to your first step. I realized something... you said to replace the order with . "\nORDER BY RAND" -- but actually it is suppose to be . "\nORDER BY RAND()" . That actually took care of the random order.
![]() Now, as for breaking up my thumbs, this is a whole new ball of wax. Somebody told me to add the following code to break up the thumbs and start new rows. Here's what he said: To control the breaking of images, use a simple counter like so (half of it is pseudo): Code:
$cols=10;
$c=0; //counter
<table>
loop images {
if($c%$cols==0) { echo '<tr>';}
echo '<td><img></td>';
$c++;
if($c%$cols==0) { echo '</tr>';}
}
</table>
Do you have any ideas? Here is my current script as it stands now, and the random images are occurring -- so thanks for that!! ![]() PHP Code:
__________________
-- BlaZe -- ...... ......
Last edited by blaze; October 23rd, 2004 at 1:18 PM.. |
|
|
|
|
|
#24 (permalink) |
|
Surpass Fan
Comfy Contributor
Joined in Sep 2004
209 posts
Gave thanks: 0
Thanked 0 times
|
The couter you have would work but it would just display the images, not the link. Give this a try:
PHP Code:
__________________
Pass14 www.tqwebservices.com www.autoappraisalsunlimited.com www.clevelandlayne.com Pass18 www.estateagency.com.au Some people drink deeply from the fountain of knowledge. Others just gargle. |
|
|
|
|
|
#25 (permalink) |
|
Registered User
Comfy Contributor
Joined in Aug 2004
Lives in Las Vegas
Hosted on pass11, pass12
187 posts
Gave thanks: 0
Thanked 0 times
|
I tried it, but get this error:
Parse error: parse error, unexpected '<' in /home/******/public_html/modules/mod_hp_featuredprop_wpic.php on line 78 Line error: <?php if ($direction == 'vertical') echo "<tr>"; ?><td align="center"> So I added a new line above it: ?> to get rid of the parse error. The script now works, but it still doesn't break up the thumbs nor start a new row in the table. It spans across and expands the table, hence breaking up the layout badly. The links still work too.
__________________
-- BlaZe -- ...... ......
|
|
|
|
|
|
#26 (permalink) |
|
Surpass Fan
Comfy Contributor
Joined in Sep 2004
209 posts
Gave thanks: 0
Thanked 0 times
|
Try this. If it doesn't work I'll take another look at it later as I'm on my way out with the kids. PHP Code:
|