Page 2 of 2
Posted: Tue Sep 12, 2006 12:32 pm
by jayshields
What gets output if you echo $read before running addbbcode() on it?
Posted: Tue Sep 12, 2006 12:59 pm
by danharibo
the same ?
Posted: Tue Sep 12, 2006 1:35 pm
by RobertGonzalez
Are you passing it

or Smile?
Posted: Tue Sep 12, 2006 1:39 pm
by danharibo

is what im passing
Posted: Tue Sep 12, 2006 1:42 pm
by RobertGonzalez
Then what is this all about?
Code: Select all
<?php
function addbbcode($vartoproc) {
return str_replace("Smile", '<img src="./image/smile.gif">', $vartoproc);
}
?>
this function is looking for the string 'Smile' and it is trying to turn that into the image path.
Posted: Tue Sep 12, 2006 2:12 pm
by danharibo
Yeah i changed that.
Posted: Tue Sep 12, 2006 2:25 pm
by ok
First of all, you can replace
Code: Select all
$temp= $page2.'.txt';
$page2 = $temp;
with
Secondly, add
after
and post here your output!
Posted: Tue Sep 12, 2006 2:40 pm
by danharibo
oh, i think i got it

if you look close Enought you Shuold see it

Posted: Tue Sep 12, 2006 2:43 pm
by RobertGonzalez
I doubt any of us want to guess at what 'it' is. Regardless, you should post the solution so someone else may be helped by it in the future.
Posted: Tue Sep 12, 2006 3:14 pm
by danharibo
It was Simple Really, i had only put the BBcode in for the loading on a non-default page
