| Author |
Message |
flintman New Member


Joined: Jan 09, 2007 Posts: 13
|
Posted:
Tue Jan 09, 2007 5:42 am |
|
Hello all i made a center block to display some pics and a price. Now when i run this my right blocks disapper. I have checked the coding and everything looks ok. I tested this on the right and left side and everything works. But as soon as i put it in the middle i loose my right hand blocks
| Code: | <?php
if (eregi("block-4sale", $_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
$content = "";
$content .= '<table width="50%" border="0" align="center" cols="10" cellpadding="0" cellspacing="0"><tr>';
$hostname="********";
$username="****";
$password="*******";
$dbname="********";
mysql_connect($hostname,$username, $password) OR DIE ("Unable to connect to database! Please try again later.");
mysql_select_db($dbname);
$query = "SELECT * FROM pic ";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
extract ($row);
$content .= '<td align="center" valign="baseline"><a href="/np/index.php?trl='.$id.' "><img src=/np/pics/'.$location .' HEIGHT=50 Width= 75 </img><br />' . $price . '</a></td>';
while ($row = mysql_fetch_array($result))
{
extract ($row);
$content .= '<td align="center" valign="baseline"><a href="/np/index.php?trl='.$id.' "><img src=/np/pics/'.$location .' HEIGHT=50 Width= 75 </img><br />' . $price . '</a></td>';
}
$content .= '</tr><tr align="center"><td colspan="10" valign="baseline"></td></tr></table>';
?> |
Does anyone know why?? |
Last edited by flintman on Tue Jan 09, 2007 4:24 pm; edited 1 time in total |
|
|
 |
hitwalker Sells PC To Pay For Divorce

Joined: Posts: 5661
|
Posted:
Tue Jan 09, 2007 9:50 am |
|
please change your topic title to something that addresses your problem. |
|
|
|
 |
Guardian2003 Site Admin

Joined: Aug 28, 2003 Posts: 6373 Location: Vsetin, Czech Republic
|
Posted:
Tue Jan 09, 2007 10:56 am |
|
Is this for an older and unpatched version of nuke?
If it is for a fully patched nuke try replacing | Code: | if (eregi("block-4sale", $_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
|
with
| Code: | | if(!defined('NUKE_FILE') && !defined('BLOCK_FILE')) { die("You can't access this file directly..."); } |
|
|
|
|
 |
hitwalker Sells PC To Pay For Divorce

Joined: Posts: 5661
|
Posted:
Tue Jan 09, 2007 2:53 pm |
|
not to mention the double quotes trashes the place...
escape " by \" |
|
|
|
 |
Gremmie Former Moderator in Good Standing

Joined: Apr 06, 2006 Posts: 2415 Location: Iowa, USA
|
Posted:
Tue Jan 09, 2007 3:07 pm |
|
The double quotes are fine inside single quotes. |
|
|
|
 |
hitwalker Sells PC To Pay For Divorce

Joined: Posts: 5661
|
Posted:
Tue Jan 09, 2007 3:17 pm |
|
|
|
 |
hitwalker Sells PC To Pay For Divorce

Joined: Posts: 5661
|
Posted:
Tue Jan 09, 2007 3:21 pm |
|
im not realy sure but i think its the html part that breaks it although it seems to be ok.. |
|
|
|
 |
flintman New Member


Joined: Jan 09, 2007 Posts: 13
|
Posted:
Tue Jan 09, 2007 4:28 pm |
|
i tried what you suggested with no luck. It is version 7.0 im going nuts trying to figure this out thanks for the help BTW |
|
|
|
 |
hitwalker Sells PC To Pay For Divorce

Joined: Posts: 5661
|
Posted:
Tue Jan 09, 2007 4:30 pm |
|
|
|
 |
flintman New Member


Joined: Jan 09, 2007 Posts: 13
|
Posted:
Tue Jan 09, 2007 4:34 pm |
|
|
|
 |
hitwalker Sells PC To Pay For Divorce

Joined: Posts: 5661
|
Posted:
Tue Jan 09, 2007 4:37 pm |
|
does the platinum has error reporting ? |
|
|
|
 |
flintman New Member


Joined: Jan 09, 2007 Posts: 13
|
Posted:
Tue Jan 09, 2007 4:40 pm |
|
I do have error reporting and not displaying anything. |
|
|
|
 |
hitwalker Sells PC To Pay For Divorce

Joined: Posts: 5661
|
Posted:
Tue Jan 09, 2007 4:45 pm |
|
well i think im almost right on the reason..
if im wrong i apologize,but ive played a lot on my testsite and seen right sides disapear cause of the usage of quotes,double quotes...
To rule that out i would try to replace the ' with " and escape \"
you can try that with a duplicate block... |
|
|
|
 |
flintman New Member


Joined: Jan 09, 2007 Posts: 13
|
Posted:
Tue Jan 09, 2007 4:50 pm |
|
ill give it a shot after supper ill let you know |
|
|
|
 |
hitwalker Sells PC To Pay For Divorce

Joined: Posts: 5661
|
Posted:
Tue Jan 09, 2007 4:52 pm |
|
ok ...good luck....i hope that will fix it... |
|
|
|
 |
Gremmie Former Moderator in Good Standing

Joined: Apr 06, 2006 Posts: 2415 Location: Iowa, USA
|
Posted:
Tue Jan 09, 2007 5:29 pm |
|
I just noticed your image tags aren't closed correctly.
Try writing them like either:
<img ..... />
OR
<img ... ></img> |
|
|
|
 |
hitwalker Sells PC To Pay For Divorce

Joined: Posts: 5661
|
Posted:
Tue Jan 09, 2007 5:58 pm |
|
nice...lol
i didnt saw that....
but as he says that all works its even more weird.
so <img src=/np/pics/'.$location .' HEIGHT=50 Width= 75
has to be <img src=/np/pics/'.$location .' HEIGHT=50 Width=75>
as far as development goes it doesnt need a img closing tag.. |
|
|
|
 |
Gremmie Former Moderator in Good Standing

Joined: Apr 06, 2006 Posts: 2415 Location: Iowa, USA
|
Posted:
Tue Jan 09, 2007 6:07 pm |
|
Maybe his theme is messed up. I remember when I created my first center block I discovered my theme didn't have a themecenterbox() coded for it. Nuke had some code like "if !function_exists('themecenterbox')" and supplied a default implementation for that function. But of course it had the typical crazy stupid FB errors in it. You might want to look at your theme's themecenterbox() (see if you even have one). |
|
|
|
 |
Gremmie Former Moderator in Good Standing

Joined: Apr 06, 2006 Posts: 2415 Location: Iowa, USA
|
Posted:
Tue Jan 09, 2007 6:08 pm |
|
It maybe be useful to post a snippet of the generated HTML on and around your center block too. |
|
|
|
 |
flintman New Member


Joined: Jan 09, 2007 Posts: 13
|
Posted:
Tue Jan 09, 2007 6:09 pm |
|
i did close my img. thanks gremmie didn't notice. Hitwalker I went with Your suggestion still the same problem |
|
|
|
 |
hitwalker Sells PC To Pay For Divorce

Joined: Posts: 5661
|
Posted:
Tue Jan 09, 2007 6:13 pm |
|
and maybe a link to the site....
could help if we could see it... |
|
|
|
 |
flintman New Member


Joined: Jan 09, 2007 Posts: 13
|
Posted:
Tue Jan 09, 2007 6:18 pm |
|
Well it's on my home pc i make the sites then upload when happy with it. |
|
|
|
 |
hitwalker Sells PC To Pay For Divorce

Joined: Posts: 5661
|
Posted:
Tue Jan 09, 2007 6:37 pm |
|
another question that pops into my head...
can you try another theme....?
see if its the same... |
|
|
|
 |
flintman New Member


Joined: Jan 09, 2007 Posts: 13
|
Posted:
Tue Jan 09, 2007 6:47 pm |
|
same with different theme |
|
|
|
 |
Gremmie Former Moderator in Good Standing

Joined: Apr 06, 2006 Posts: 2415 Location: Iowa, USA
|
Posted:
Tue Jan 09, 2007 6:47 pm |
|
Again, it maybe be useful to post a snippet of the generated HTML on and around your center block too. Display the page, then do a "view source" in your browser. Post a chunk of code around your center block. |
|
|
|
 |
|
|
|
|