Author |
Message |
prekill
Worker


Joined: Oct 22, 2005
Posts: 201
|
Posted:
Thu Aug 05, 2010 11:57 am |
|
In viewtopic I keep getting the following error:
Quote: | Parse error: syntax error, unexpected T_VARIABLE in /home/****/public_html/HE/includes/bbcode.php(61) : eval()'d code on line 2 |
Code:if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
define("BBCODE_UID_LEN", 10);
// global that holds loaded-and-prepared bbcode templates, so we only have to do
// that stuff once.
$bbcode_tpl = null;
/**
* Loads bbcode templates from the bbcode.tpl file of the current template set.
* Creates an array, keys are bbcode names like "b_open" or "url", values
* are the associated template.
* Probably pukes all over the place if there's something really screwed
* with the bbcode.tpl file.
*
* Nathan Codding, Sept 26 2001.
*/
function load_bbcode_template()
{
global $template;
$tpl_filename = $template->make_filename('bbcode.tpl');
$tpl = fread(fopen($tpl_filename, 'r'), filesize($tpl_filename));
// replace \ with \\ and then ' with \'.
$tpl = str_replace('\\', '\\\\', $tpl);
$tpl = str_replace('\'', '\\\'', $tpl);
// strip newlines.
$tpl = str_replace("\n", '', $tpl);
// Turn template blocks into PHP assignment statements for the values of $bbcode_tpls..
$tpl = preg_replace('#<!-- BEGIN (.*?) -->(.*?)<!-- END (.*?) -->#', "\n" . '$bbcode_tpls[\'\\1\'] = \'\\2\';', $tpl);
$bbcode_tpls = array();
eval($tpl);
return $bbcode_tpls;
}
|
Code:
<!-- BEGIN ulist_open --><ul><!-- END ulist_open -->
<!-- BEGIN ulist_close --></ul><!-- END ulist_close -->
<!-- BEGIN olist_open --><ol type="{LIST_TYPE}"><!-- END olist_open -->
<!-- BEGIN olist_close --></ol><!-- END olist_close -->
<!-- BEGIN listitem --><li><!-- END listitem -->
<!-- BEGIN quote_username_open --></span>
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<td><span class="genmed"><b>{USERNAME} {L_WROTE}:</b></span></td>
</tr>
<tr>
<td class="quote"><!-- END quote_username_open -->
<!-- BEGIN quote_open --></span>
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<td><span class="genmed"><b>{L_QUOTE}:</b></span></td>
</tr>
<tr>
<td class="quote"><!-- END quote_open -->
<!-- BEGIN quote_close --></td>
</tr>
</table>
<span class="postbody"><!-- END quote_close -->
<!-- BEGIN code_open --></span>
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<td><span class="genmed"><b>{L_CODE}:</b></span></td>
</tr>
<tr>
<td class="code"><!-- END code_open -->
<!-- BEGIN code_close --></td>
</tr>
</table>
<span class="postbody"><!-- END code_close -->
<!-- BEGIN b_open --><span style="font-weight: bold"><!-- END b_open -->
<!-- BEGIN b_close --></span><!-- END b_close -->
<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open -->
<!-- BEGIN u_close --></span><!-- END u_close -->
<!-- BEGIN i_open --><span style="font-style: italic"><!-- END i_open -->
<!-- BEGIN i_close --></span><!-- END i_close -->
<!-- BEGIN color_open --><span style="color: {COLOR}"><!-- END color_open -->
<!-- BEGIN color_close --></span><!-- END color_close -->
<!-- BEGIN size_open --><span style="font-size: {SIZE}px; line-height: normal"><!-- END size_open -->
<!-- BEGIN size_close --></span><!-- END size_close -->
<!-- BEGIN img --><img src="{URL}" border="0" /><!-- END img -->
<!-- BEGIN url --><a href="{URL}" target="_blank" class="postlink">{DESCRIPTION}</a><!-- END url -->
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</a><!-- END email -->
<!-- BEGIN s_open --><strike><!-- END s_open -->
<!-- BEGIN s_close --></strike><!-- END s_close -->
<!-- BEGIN sup_open --><sup><!-- END sup_open -->
<!-- BEGIN sup_close --></sup><!-- END sup_close -->
<!-- BEGIN sub_open --><sub><!-- END sub_open -->
<!-- BEGIN sub_close --></sub><!-- END sub_close -->
<!-- BEGIN table_open --><table style="{TABLE}"><tr><!-- END table_open -->
<!-- BEGIN table_close --></tr></table><!-- END table_close -->
<!-- BEGIN cell_open --><td style="{CELL}"><!-- END cell_open -->
<!-- BEGIN cell_close --></td><!-- END cell_close -->
<!-- BEGIN spoil_open -->
<div align="center">
<div class="spoiltitle"><b>{L_BBCODEBOX_HIDDEN}:</b>
<input class="spoilbtn" type="button" value="{L_BBCODEBOX_VIEW}" onClick="javascript:if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = '{L_BBCODEBOX_HIDE}'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = '{L_BBCODEBOX_VIEW}'; }" onfocus="this.blur();">
</div>
<div class="spoildiv">
<div style="display: none;">
<!-- END spoil_open -->
<!-- BEGIN spoil_close --></div></div></div><span class="postbody"><!-- END spoil_close -->
<!-- BEGIN align_open --><div style="text-align:{ALIGN}"><!-- END align_open -->
<!-- BEGIN align_close --></div><!-- END align_close -->
<!-- BEGIN marq_open --><marquee direction="{MARQ}" scrolldelay="120"><!-- END marq_open -->
<!-- BEGIN marq_close --></marquee><!-- END marq_close -->
<!-- BEGIN table_open --><table style="{TABLE}"><tr><!-- END table_open -->
<!-- BEGIN table_close --></tr></table><!-- END table_close -->
<!-- BEGIN cell_open --><td style="{CELL}"><!-- END cell_open -->
<!-- BEGIN cell_close --></td><!-- END cell_close -->
<!-- BEGIN font_open --><span style="font-family:{FONT}"><!-- END font_open -->
<!-- BEGIN font_close --></span><!-- END font_close -->
<!-- BEGIN ram --><div align="center"><embed src="{URL}" align="center" width="275" height="40" type="audio/x-pn-realaudio-plugin" console="cons" controls="ControlPanel" autostart="false"></embed></div><!-- END ram -->
<!-- BEGIN flash --><!-- URL's used in the movie-->
<!-- text used in the movie-->
<!-- -->
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH={WIDTH} HEIGHT={HEIGHT}>
<PARAM NAME=movie VALUE="{URL}"><PARAM NAME=quality VALUE=high> <PARAM NAME=scale VALUE=noborder> <PARAM NAME=wmode VALUE=transparent> <PARAM NAME=bgcolor VALUE=#000000>
<EMBED src="{URL}" quality=high scale=noborder wmode=transparent bgcolor=#000000 WIDTH={WIDTH} HEIGHT={HEIGHT} TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED></OBJECT><!-- END flash -->
<!-- BEGIN GVideo -->
<object width="425" height="350">
<param name="movie" value="http://video.google.com/googleplayer.swf?docId={GVIDEOID}"></param>
<embed style="width:400px; height:326px;" id="VideoPlayback"
align="middle" type="application/x-shockwave-flash"
src="http://video.google.com/googleplayer.swf?docId={GVIDEOID}"
allowScriptAccess="sameDomain" quality="best" bgcolor="#ffffff"
scale="noScale" salign="TL" FlashVars="playerMode=embedded">
</embed>
</object><br />
<a href="http://video.google.com/googleplayer.swf?docId={GVIDEOID}" target="_blank">{GVIDEOLINK}</a><br />
<!-- END GVideo -->
<!-- BEGIN youtube -->
<object width="425" height="350">
<param name="movie" value="http://www.youtube.com/v/{YOUTUBEID}"></param>
<embed src="http://www.youtube.com/v/{YOUTUBEID}" type="application/x-shockwave-flash" width="425" height="350"></embed>
</object><br />
<a href="http://youtube.com/watch?v={YOUTUBEID}" target="_blank">{YOUTUBELINK}</a><br />
<!-- END youtube -->
<!-- BEGIN stream -->
<object id="wmp" width=300 height=70 classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0"
standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<param name="FileName" value="{URL}">
<param name="ShowControls" value="1">
<param name="ShowDisplay" value="0">
<param name="ShowStatusBar" value="1">
<param name="AutoSize" value="1">
<param name="autoplay" value="0">
<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeatured/mediaplayer/default.asp"
src="{URL}" name=MediaPlayer2 showcontrols=1 showdisplay=0 showstatusbar=1 autosize=1 autoplay=0 visible=1 animationatstart=0 transparentatstart=1 loop=0 height=70 width=300>
</embed>
</object>
<!-- END stream -->
<!-- BEGIN video -->
<div align="left"><embed src="{URL}" autoplay="false" width={WIDTH} height={HEIGHT}></embed></div>
<!-- END video -->
<!-- BEGIN web -->
<iframe width="100%" height="350" src="{URL}"></iframe>
<!-- END web -->
<!-- BEGIN hr -->
<hr noshade color='#000000' size='1'>
<!-- END hr -->
<!-- BEGIN fade_open -->
<span style="height: 1; Filter: Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, FinishX=100%)">
<!-- END fade_open -->
<!-- BEGIN fade_close -->
</span>
<!-- END fade_close -->
| it doesnt happens all the time.. sometimes the page loads just fine.. and sometimes to page loads with this error message and none of the bbcode are working.. its just showing it as code..
any idea about this issue? |
|
|
|
 |
fkelly
Former Moderator in Good Standing

Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY
|
Posted:
Thu Aug 05, 2010 2:48 pm |
|
Try googling 
Look at
Only registered users can see links on this board! Get registered or login!
in particular. The strange character sequence occurs in the 3rd code sequence you listed. You might try eliminating it (just that character sequence) in a reliable editor and see what happens. |
|
|
|
 |
prekill

|
Posted:
Fri Aug 06, 2010 2:03 am |
|
I dont think it has something to do with that.. this symbols apear because I open the file in none utf-8 supported... the files are all utf-8.. |
|
|
|
 |
prekill

|
Posted:
Tue Aug 10, 2010 1:35 am |
|
|
|
 |
fkelly

|
Posted:
Tue Aug 10, 2010 12:33 pm |
|
If you don't want to google  then at least do a search on it in these forums. The problem was resolved with RN2.40.01 and is mentioned in the change log. There are a number of other posts and suggestions related to  also.
I don't recall the details and I don't mean to be impatient but we can't always be going back and re-resolving or even re-researching the same problems. Search is your best friend. |
|
|
|
 |
nuken
RavenNuke(tm) Development Team

Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Tue Aug 10, 2010 5:55 pm |
|
prekill wrote: | In viewtopic I keep getting the following error:
Quote: | Parse error: syntax error, unexpected T_VARIABLE in /home/****/public_html/HE/includes/bbcode.php(61) : eval()'d code on line 2 |
|
bbcode.php should be located in modules/Forums/includes/bbcode.php. If you have not added a mod for the bbcode, I would think it may be theme related. If you have added a mod, the problem may be in there. |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
 |
Palbin
Site Admin

Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Tue Aug 10, 2010 7:23 pm |
|
nuken, good catch. |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
 |
prekill

|
Posted:
Wed Aug 11, 2010 4:49 am |
|
I know, I updated my forums manually thats why I still have the old structure which means the include folder is still under main folder. /includes.
umm I search hours using google.. most are talking about theme related problem. but I just cant point where the problem is because it wont show up in every page load.
This error can appear in a certain page and if I refresh the page the error is gone and the page will display without the error and look like it should.
so its not a permanent error.. its comes and go.. so I have no idea what I need to change in order to fix it or what to look for.
I converted raven nuke and database to use utf-8 (may it have something to do with that?)
any ideas? |
|
|
|
 |
fkelly

|
Posted:
Wed Aug 11, 2010 7:41 am |
|
RN is going to expect bbcode.php to be in
/modules/Forums/includes/bbcode.php
that in turn is going to expect the template file to be in
/themes/yourtheme/forums/bbcode.tpl
It is not going to like it if you have  at the top of that template file. Looking back at the forum thread where you posted this it appears you may not be at RN2.40.01. What exact version and what version of Forums are you running? It's going to be difficult for us to diagnose this problem if you have files that aren't in the right places for the distribution. As IBM used to say "results may be unpredictable" and that's exactly what you are seeing. |
|
|
|
 |
Palbin

|
Posted:
Wed Aug 11, 2010 9:42 am |
|
All I can really say is the UTF-8 thin is some how the problem. When it loads the bbcode the  is being displayed on the screen before stuff is supposed to be. |
|
|
|
 |
prekill

|
Posted:
Sun Aug 22, 2010 10:15 am |
|
I dont really think you got to the bottom of this, the  symbols dont appear anywhere and the utf-8 encoding is working just fine I think.. the location of the files is not importent or contrebuting this problem in any way.
There something more to it.. I just cant put my fingure on it..
My guess it is a template related somehow.. I just dont know how to fix this..
The big quastion is why THE SAME page can load with or without this error with no special reason?
No one has incounter this error before? |
|
|
|
 |
Palbin

|
Posted:
Sun Aug 22, 2010 10:30 am |
|
|
|
 |
prekill

|
Posted:
Sun Aug 22, 2010 2:54 pm |
|
*.tpl files or php?
I will dubel check this.
But again if it was the problem it was consist? doesnt it? it wouldnt come and go? |
|
|
|
 |
|