Anonymous,

Please Login or Register
Download Nuke Evolution Xtreme today for a CMS you can enjoy using and sharing with your friends!
[ Download Now ]
Forum Index  ·  Search  ·  Usergroups  ·  Edit your profile  ·  Members  ·  Login, Check Messages
Arcade  ·  Ranks  ·  Staff  ·  Statistics  ·  Board Rules  ·  Forum FAQ  ·  Log in

Search for at
Evolution-Xtreme Advanced Search


+  
Latest Site News   Next 5 >>  
 Forum   Author   Replies   Last Post 
File Repository 1.0.0 Released Announcements! Lonestar 0 Tue Apr 26, 2016 6:44 am
Lonestar View latest post
Image Repository Released Announcements! Lonestar 1 Mon Oct 27, 2014 7:39 pm
Lonestar View latest post
So what happened to us? Announcements! SgtLegend 0 Tue May 06, 2014 12:32 am
SgtLegend View latest post
[PROGRESS] Nuke Evolution Xtreme 2.0.9e Announcements! SgtLegend 2 Sun May 27, 2012 6:25 pm
SgtLegend View latest post
European Cookie Law Announcements! SgtLegend 0 Sat May 26, 2012 7:33 am
SgtLegend View latest post
   
Recent Topics   Next 15 >>  
 Forum   Author   Replies   Last Post 
Evo staff looking for some volunteers. Community Announcements coRpSE 20 Thu Jul 02, 2015 9:19 am
Depresjon2 View latest post
Evo Xtreme 2.0.9D Updated for PHP 5.6 General Support coRpSE 121 Thu Mar 23, 2017 3:57 pm
casterdon View latest post
[ MOD ] - Honeypot V2.2 AntiBot Module Security coRpSE 106 Tue Nov 22, 2016 11:30 am
coRpSE View latest post
Possible new Admin area layout Comments and Suggestions Lonestar 18 Wed Sep 14, 2016 11:37 am
Blackou View latest post
jQuery update General Support Lonestar 2 Wed May 11, 2016 4:49 pm
Charles64 View latest post
Deutsche Sprachdatei - german language files German DT50R 7 Thu Jan 28, 2016 7:04 am
DT50R View latest post
[FIX] Correct Cookie Settings (Invalid Session Error) Quick fixes killigan 110 Fri Mar 20, 2015 1:06 pm
Macdaddy View latest post
Looking for coRpSE? He is gone till May. General Chat coRpSE 4 Sun Mar 26, 2017 6:50 pm
coRpSE View latest post
Think I got hit with malware somehow General Support bobdude 10 Sun Mar 26, 2017 6:44 pm
coRpSE View latest post
error log Bugs Redcougarxr7 31 Tue Mar 21, 2017 8:46 pm
coRpSE View latest post
I seem to be locked out of my website Smile General Support storm 4 Sat Mar 11, 2017 12:29 pm
coRpSE View latest post
Site gone off General Support GI_ 3 Fri Mar 03, 2017 11:21 am
Lonestar View latest post
Norwegian Language Multilingual Support dogbone 0 Wed Mar 01, 2017 10:43 pm
dogbone View latest post
Arcade General Support Reaper2388 59 Sun Feb 26, 2017 7:13 pm
pholix View latest post
all blocks General Support Worfwarrior 6 Sat Feb 25, 2017 4:41 pm
coRpSE View latest post

Error while creating block

 
Post new topic    Reply to topic    printer-friendly view   Thank Post    Evolution-Xtreme Forum Index -> Blocks
View previous topic :: View next topic  
Author Message
Athlon



Gender: Gender:Male
Joined: Oct 08, 2010
Age: 65
Posts: 54
Location: Uxbridge, MA
Reputation: 6.8
usa.png


Status: Offline
PostPosted: Thu Jan 15, 2015 8:28 am Post subject: No icon Error while creating block Reply with quote

 I've  created  many  custom  blocks  for  our  site  over  the  years,  but  this  one  has  me  stumped.   I'm  trying  to  add  some  code  from  http://rssfeedreader.com/.   I  created  an  account  there  so  that  I  can  use  an  RSS  feed  on  our  home  page.   They  gave  me  the  code  to  use  to  display  the  feed.
 
 I  added  it  to  the  'content'  section  of  the  block,  as  seen  below.
 
 The  error  I  get  is  "Parse  error:  syntax  error,  unexpected  T_STRING  in  /home/warhaw5/public_html/blocks/block-Test.php  on  line  22"
 
 Here  is  the  entire  block's  code:
 
 
                                                 
Code:                
<?php
 /*=======================================================================
  Nuke-Evolution  Basic:  Enhanced  PHP-Nuke  Web  Portal  System
  =======================================================================*/
 
 if(!defined('NUKE_EVO'))  exit;
 
 //Use  this  if  you  want  something  for  only  a  registered  user
 /*if  (is_user())  {
      
 }*/
 
 //Use  this  if  you  want  something  for  only  a  admin
 /*if  (is_admin())  {
      
 }*/
 
 $content  .=  "
 
 <?php
 $olderror_reporting  =error_reporting(0);
 echo  file_get_contents("http://rssfeedreader.com/rss.php?phpout=1&key=936c567e63dabf5ab46ed2440f376fc8&from=".$_SERVER['SERVER_NAME']  );
 error_reporting($olderror_reporting);
 ?>
 
 ";
 ?>                

 
 It's  driving  me  nuts  -  it's  probably  obvious,  but  I'll  be  damned  if  I  can  find  the  error  on  line  22.
Back to top
View user's profile Send private message Visit poster's website
coRpSE
Xtreme Developer
Xtreme Developer
Site Admin
Site Admin
Support Team
Support Team



Gender: Gender:Male
Joined: Dec 24, 2008
Age: 36
Posts: 1350
Location: Back of your mind!!!
Reputation: 185.8
votes: 10
usa.png


Status: Offline
Web Control Panel: 11.42.0 (build 23)
PostPosted: Thu Jan 15, 2015 10:08 am Post subject: No icon Re: Error while creating block Reply with quote

 [quote="Athlon";p="43468"]I've  created  many  custom  blocks  for  our  site  over  the  years,  but  this  one  has  me  stumped.   I'm  trying  to  add  some  code  from  http://rssfeedreader.com/.   I  created  an  account  there  so  that  I  can  use  an  RSS  feed  on  our  home  page.   They  gave  me  the  code  to  use  to  display  the  feed.
 
 I  added  it  to  the  'content'  section  of  the  block,  as  seen  below.
 
 The  error  I  get  is  "Parse  error:  syntax  error,  unexpected  T_STRING  in  /home/warhaw5/public_html/blocks/block-Test.php  on  line  22"
 
 Here  is  the  entire  block's  code:
 
 
                                                 
Code:                
<?php
 /*=======================================================================
  Nuke-Evolution  Basic:  Enhanced  PHP-Nuke  Web  Portal  System
  =======================================================================*/
 
 if(!defined('NUKE_EVO'))  exit;
 
 //Use  this  if  you  want  something  for  only  a  registered  user
 /*if  (is_user())  {
      
 }*/
 
 //Use  this  if  you  want  something  for  only  a  admin
 /*if  (is_admin())  {
      
 }*/
 
 $content  .=  "
 
 <?php
 $olderror_reporting  =error_reporting(0);
 echo  file_get_contents("http://rssfeedreader.com/rss.php?phpout=1&key=936c567e63dabf5ab46ed2440f376fc8&from=".$_SERVER['SERVER_NAME']  );
 error_reporting($olderror_reporting);
 ?>
 
 ";
 ?>                

 
 It's  driving  me  nuts  -  it's  probably  obvious,  but  I'll  be  damned  if  I  can  find  the  error  on  line  22.[/quote]
 
 You're  trying  to  put  php  within  php,  at  the  same  time  have  the  php  within  the  content  which  is  like  a  echo.  
 
 Try  this:
 
                                                 
PHP:                
<?php
/*=======================================================================
 Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
 =======================================================================*/

if(!defined('NUKE_EVO')) exit;

$olderror_reporting =error_reporting(0); 
$content file_get_contents("http://rssfeedreader.com/rss.php?phpout=1&key=936c567e63dabf5ab46ed2440f376fc8&from=".$_SERVER['SERVER_NAME'] ); 
error_reporting($olderror_reporting);

?>
               

 
 Mind  you  that  this  will  only  work  if  your  server  allows  file_get_contents,  which  I  found  not  all  do  when  developing  the  Honeypot,  so  I  had  to  use  a  curl  instead  of  file_get_contents,  if  file_get_contents  was  not  allowed.
Back to top
View user's profile Send private message Visit poster's website
Athlon



Gender: Gender:Male
Joined: Oct 08, 2010
Age: 65
Posts: 54
Location: Uxbridge, MA
Reputation: 6.8
usa.png


Status: Offline
PostPosted: Thu Jan 15, 2015 10:41 am Post subject: No icon Re: Error while creating block Reply with quote

 Thanks  for  your  quick  response  Corpse.
 
 I'll  have  time  in  a  few  hours  to  try  your  suggestions.   I'll  post  back  here  when  I'm  able  to  today.
Back to top
View user's profile Send private message Visit poster's website
Sponsor
phpstorm.jpg
Athlon



Gender: Gender:Male
Joined: Oct 08, 2010
Age: 65
Posts: 54
Location: Uxbridge, MA
Reputation: 6.8
usa.png


Status: Offline
PostPosted: Thu Jan 15, 2015 10:54 am Post subject: No icon Re: Error while creating block Reply with quote

 Threw  your  code  up  to  my  server  and  it  works  like  a  charm!   Thank  you  again!!
 
 I've  taken  it  down  for  now  until  I  customize  the  look  to  match  our  site,  which  I'll  be  doing  later  today.
 
   Very Happy
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:
Post new topic  Reply to topic   printer-friendly view   Thank Post Evolution-Xtreme Forum Index ->  Blocks All times are UTC - 5 Hours
Page 1 of 1


 
Jump to:  
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 cannot attach files in this forum
You cannot download files in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
This topic is locked: you cannot edit posts or make replies. Announcement: [BETA][RELEASED] Nuke Evolution 2.0.8 0 SgtLegend 3744 Fri May 28, 2010 4:54 am
SgtLegend View latest post
No new posts Dutch Language for Xtreme V2.0 4 DFC-NightMare[NL] 3901 Wed May 01, 2013 1:18 pm
coRpSE View latest post
No new posts [Solved] Birhday mod 3.0 missing: 18 Huntergreen 11760 Mon Mar 04, 2013 7:54 pm
Teo View latest post
No new posts help upgrading to evo xtream 2.0.7 1 kirky12 3735 Thu Sep 02, 2010 10:06 am
SgtLegend View latest post
This topic is locked: you cannot edit posts or make replies. [ Poll ] Xtreme v2.0 52 Lonestar 20583 Wed Oct 14, 2009 2:51 am
SgtLegend View latest post
 




Powered by phpBB © 2001, 2006 phpBB Group
EvoXtreme Theme by SgtLegend ©
Forums ©