Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
flintman
New Member
New Member



Joined: Jan 09, 2007
Posts: 13

PostPosted: Tue Jan 09, 2007 5:42 am Reply with quote

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 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Tue Jan 09, 2007 9:50 am Reply with quote

please change your topic title to something that addresses your problem.
 
View user's profile Send private message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Tue Jan 09, 2007 10:56 am Reply with quote

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..."); }
 
View user's profile Send private message Send e-mail
hitwalker







PostPosted: Tue Jan 09, 2007 2:53 pm Reply with quote

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

PostPosted: Tue Jan 09, 2007 3:07 pm Reply with quote

The double quotes are fine inside single quotes.

_________________
GCalendar - An Event Calendar for PHP-Nuke
Member_Map - A Google Maps Nuke Module 
View user's profile Send private message
hitwalker







PostPosted: Tue Jan 09, 2007 3:17 pm Reply with quote

yeah i missed that...
 
hitwalker







PostPosted: Tue Jan 09, 2007 3:21 pm Reply with quote

im not realy sure but i think its the html part that breaks it although it seems to be ok..
 
flintman







PostPosted: Tue Jan 09, 2007 4:28 pm Reply with quote

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







PostPosted: Tue Jan 09, 2007 4:30 pm Reply with quote

7.0 of nuke ?
 
flintman







PostPosted: Tue Jan 09, 2007 4:34 pm Reply with quote

ya
 
hitwalker







PostPosted: Tue Jan 09, 2007 4:37 pm Reply with quote

does the platinum has error reporting ?
 
flintman







PostPosted: Tue Jan 09, 2007 4:40 pm Reply with quote

I do have error reporting and not displaying anything.
 
hitwalker







PostPosted: Tue Jan 09, 2007 4:45 pm Reply with quote

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







PostPosted: Tue Jan 09, 2007 4:50 pm Reply with quote

ill give it a shot after supper ill let you know
 
hitwalker







PostPosted: Tue Jan 09, 2007 4:52 pm Reply with quote

ok ...good luck....i hope that will fix it...
 
Gremmie







PostPosted: Tue Jan 09, 2007 5:29 pm Reply with quote

I just noticed your image tags aren't closed correctly.

Try writing them like either:

<img ..... />

OR

<img ... ></img>
 
hitwalker







PostPosted: Tue Jan 09, 2007 5:58 pm Reply with quote

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







PostPosted: Tue Jan 09, 2007 6:07 pm Reply with quote

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







PostPosted: Tue Jan 09, 2007 6:08 pm Reply with quote

It maybe be useful to post a snippet of the generated HTML on and around your center block too.
 
flintman







PostPosted: Tue Jan 09, 2007 6:09 pm Reply with quote

i did close my img. thanks gremmie didn't notice. Hitwalker I went with Your suggestion still the same problem
 
hitwalker







PostPosted: Tue Jan 09, 2007 6:13 pm Reply with quote

and maybe a link to the site....
could help if we could see it...
 
flintman







PostPosted: Tue Jan 09, 2007 6:18 pm Reply with quote

Well it's on my home pc i make the sites then upload when happy with it.
 
hitwalker







PostPosted: Tue Jan 09, 2007 6:37 pm Reply with quote

another question that pops into my head...
can you try another theme....?
see if its the same...
 
flintman







PostPosted: Tue Jan 09, 2007 6:47 pm Reply with quote

same with different theme
 
Gremmie







PostPosted: Tue Jan 09, 2007 6:47 pm Reply with quote

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.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©