LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-09-2003, 06:35 AM   #1
bentman78
Member
 
Registered: Mar 2003
Location: Washington DC, USA
Distribution: Redhat
Posts: 212

Rep: Reputation: 30
PHP Parse error.....PHPBB


I am useing miniBB (PHPBB but smaller, embedded into a website) and am getting this:


"Parse error: parse error, unexpected $ in /files/WEBSITES/DIGGANG/components/minibb/hack_smilies.php on line 92"

Anyone else run into this??

Here is the code to the page:

------------------------------------------------------------------------------------

<?php

/* Options */
$dirname = 'smilies';
$root_path = '';
if (isset($_POST['absolute_path']) or isset($_GET['absolute_path'])) {
return;
}

/* Code */
if ($hackSmilies) {
$smilycode="<small><a href='javascript:PopUp(\"{$live_site}/components/minibb/hack_smilies.php?p=display\",150,400,1)'><img src='{$live_site}/components/minibb/img/smilies/grin.gif' border=0 align=absmiddle></a></small>&nbsp;\n";
} else {
$smilycode='';
}

function getSmilies ($root_path) {
global $dirname, $smile, $url, $s;

if ($root_path==''http://www.mamboportal.com/component...ilies/wink.gif{
$spath='.';
} else {
$spath=$root_path.'/components/minibb';
}
$ff=fopen("$spath/img/$dirname/smdesc.php", 'r'http://www.mamboportal.com/component...ilies/wink.gif;
$cont=fread($ff, filesize("$spath/img/$dirname/smdesc.php"http://www.mamboportal.com/component...ilies/wink.gif);
fclose($ff);
$sm=explode("\n", trim($cont));

$s=0;
for ($i=1; $i<sizeof($sm); $i=$i+2) {
$smile[$s]=trim($sm[$i]);
$url[$s]=trim($sm[$i+1]);
$s++;
}

return;
}
if ($hackSmilies){
function smileThis($aPost, $aEdit, $postText) {
global $main_url, $dirname, $smile, $url, $s, $max_smilies, $absolute_path;

$diff=0;

getSmilies($absolute_path);

if ($aPost) {
for ($i=0; $i<($s-1); $i++) {
$diff = substr_count($postText, $smile[$i]) + $diff;
if ($diff<=$max_smilies){
$postText=str_replace($smile[$i], "[img]{$main_url}/img/{$dirname}/{$url[$i]}[/img]", $postText);
} else {
$postText=str_replace($smile[$i], "*", $postText);
}
}
} elseif ($aEdit) {
for ($i=0; $i<($s-1); $i++) {
$postText=str_replace("[img]{$main_url}/img/{$dirname}/{$url[$i]}[/img]", $smile[$i], $postText);
}
}
return $postText;
}
}
$aPost = ($action=='ptopic' or $action=='pthread' or $action=='editmsg2'http://www.mamboportal.com/component...ilies/wink.gif;

if($aPost and !$disbbcode) {
getSmilies($absolute_path);
if ($hackSmilies) $postText=smileThis($aPost, $aEdit, $postText);
}
elseif ($p=='display'http://www.mamboportal.com/component...ilies/wink.gif {
getSmilies($absolute_path);
include ('./setup_options.php'http://www.mamboportal.com/component...ilies/wink.gif;
include ("./skins/$skin.php"http://www.mamboportal.com/component...ilies/wink.gif;

?>

<html><head><title>MiniBB Smilies</title></head>
<body>
<table width="0%" border=<?php echo $tableParam[5]; ?> cellspacing=<?php echo $tableParam[7]; ?> cellpadding=<?php echo $tableParam[6]; ?>>

<?
for ($i=0; $i<($s-1); $i++) {
echo "<tr bgcolor=\"$tableParam[4]\"><td><a href=\"#\" onClick=\"window.opener.paste_strinL('{$smile[$i]}',0); return true;\"><img src=\"./img/{dirname}/{$url[$i]}\" border=0></a></td><td>{$smile[$i]}</td></tr>\n";
}
?>

</table>
</body></html>

<?
}
?>
------------------------------------------------------------------------------------

Any help is appreicated. I have tried looking at it over and over again. I thought it was correct. Thanks for any help.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP parse error in config.inc.php.in Confusedious Linux - Software 2 11-03-2005 05:08 AM
phpbb won't work with mysql 4.x and php 4.x Gsee Linux - Software 2 07-27-2005 09:22 AM
PHP/phpBB Malware/Scanning tool Capt_Caveman Linux - Security 1 03-27-2005 12:28 PM
PHP parse error unexpected '>' ldp Programming 2 03-04-2005 02:20 PM
php parse error wujimon Linux - Software 4 03-26-2003 02:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration