Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: RoflGuy on January 25, 2011, 02:43:08 PM

Title: PHP Error
Post by: RoflGuy on January 25, 2011, 02:43:08 PM
Hey,

I wanted to put News in my front page...

but i got this error


Parse error: syntax error, unexpected '&', expecting ']' in /home/a3103070/public_html/Sources/Load.php(2149) : eval()'d code(112) : eval()'d code on line 4
Title: Re: PHP Error
Post by: Masterd on January 25, 2011, 02:46:54 PM
Go to ACP -----> Configuration ----> General. Then enable "Disable evaluation of templates" option.
Title: Re: PHP Error
Post by: RoflGuy on January 25, 2011, 02:54:51 PM
you mean

Go to ACP -----> Configuration ---->Server settings ----> General


i enabled..

still



Parse error: syntax error, unexpected '&', expecting ']' in /home/a3103070/public_html/Themes/default/TPsubs.template.php(112) : eval()'d code on line 4
Title: Re: PHP Error
Post by: Masterd on January 25, 2011, 02:59:59 PM
You didn't enabled that. Do what I said.
Title: Re: PHP Error
Post by: RoflGuy on January 25, 2011, 03:02:18 PM
im telling i enabled it.. ,

i ticked the Disable evaluation of templates

wat am i lying on u?
Title: Re: PHP Error
Post by: Kays on January 25, 2011, 03:02:48 PM
Quote from: killerftw on January 25, 2011, 02:43:08 PM
I wanted to put News in my front page...

How did you try to put News on your front page? Could you please enlighten us with that bit of info?
Title: Re: PHP Error
Post by: RoflGuy on January 25, 2011, 03:05:44 PM
From Tinyportal , i saw Settings and Front page, i clicked on frontpage and changed a bit of it (choices of style) then this in box <span class="upperframe"><span></span></span>
<div class="roundframe">
<h3 class="titlebg"><span class="left"></span>{article_shortdate} {article_title} </h3>
<div style="padding: 0; overflow: hidden;">
{article_avatar}
<div class="article_info">
{article_category}
{article_author}
{article_date}
{article_views}
{article_rating}
{article_options}
</div>
<div class="article_padding">{article_text}</div>
{article_bookmark}
{article_boardnews}
{article_moreauthor}
{article_bookmark}
{article_morelinks}
{article_globaltags}
{article_comments}
</div>
</div>
<span class="lowerframe" style="margin-bottom: 5px;"><span></span></span>

then i saved..

Edit:

I copied this from it from Blocks in tinyportal  global $context, $settings;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings[&#039;enable_news&#039;]))
echo &#039;
<div class=&quot;tp_newsblock&quot;>&#039;, $context[&#039;random_news_line&#039;], &#039;</div>&#039;;
Title: Re: PHP Error
Post by: Kays on January 25, 2011, 03:18:34 PM
Off hand, I don't see a problem with that code. Does the error clear if you remove that code?

The best place for support on TinyPortal issues is the support site for TinyPortal.
Title: Re: PHP Error
Post by: RoflGuy on January 25, 2011, 03:22:32 PM
ye i removed the PHP code and its gone? prob cuz their isnt anything to run lol...

and i don't think its Tiny portal thing..

can you come to my website? i got chat their so if i can tell you more info or something..
http://rageofskillz.co.cc/index.php (http://rageofskillz.co.cc/index.php)
Title: Re: PHP Error
Post by: feline on January 25, 2011, 03:27:23 PM
Try this part:

global $context, $settings;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
   echo '
<div class="tp_newsblock">', $context['random_news_line'], '</div>';


Fel
Title: Re: PHP Error
Post by: RoflGuy on January 25, 2011, 03:37:03 PM
Worked , Thanks (:
Title: Re: PHP Error
Post by: Masterd on January 26, 2011, 06:06:44 AM
It's nice to hear that you solved your problem! :D