Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Plugins & Atahualpa »

[SOLVED] Strange problem with PHP Code plugin widget


  #1  
Old Oct 1, 2009, 08:36 AM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
Juggledad, any idea on this one? I had the PHP Code plugin working, and had a widget in the right sidebar to show a different real estate image each day. It was fine, but I was trying to figure out what was causing the site to be so slow, so I was deactivating plugins one by one. When I deactivated that one, I started seeing this in the right sidebar where the ad used to be:
Code:
Parse error: syntax error, unexpected $end in /usr/home/web/users/xxxxxx/html/wp27/wp-content/plugins/php-code-widget/execphp.php(38) : eval()'d code on line 20
I reactivated the plugin, and the ad is now showing up again as before, but so is this error message. I've dumped my browser cache but it is still there. Help!?
  #2  
Old Oct 1, 2009, 09:19 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
What was the php in the widget?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Oct 1, 2009, 09:21 AM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
I didn't change the code itself while messing with whether the plugin was active or not....

Code:
<?php
$totalPics="30";                    // Total photos in folder

$photoOfTheDay = Array (           // Add up to 31 photos below

   '1' => '/ads/weichert/0701Janet.jpg',     // Name of or Path to image
   '2' => '/ads/weichert/0620Rita.jpg',     // Name of or Path to image
   '3' => '/ads/weichert/0621JenMarsh.jpg',
   '4' => '/ads/weichert/0615Mary.jpg',
   '5' => '/ads/weichert/0705Jay.jpg',
   '6' => '/ads/weichert/0706Barbara.jpg',
   '7' => '/ads/weichert/0707Dottie.jpg',
   '8' => '/ads/weichert/0620Rita.jpg',
   '9' => '/ads/weichert/0621JenMarsh.jpg',
   '10' => '/ads/weichert/0615Mary.jpg',
   '11' => '/ads/weichert/0705Jay.jpg',
   '12' => '/ads/weichert/0706Barbara.jpg',
   '13' => '/ads/weichert/0707Dottie.jpg',
   '14' => '/ads/weichert/0914Dottie.jpg',
   '15' => '/ads/weichert/0915Barbara.jpg',
   '16' => '/ads/weichert/0916Jay.jpg',
   '17' => '/ads/weichert/0917Rita.jpg',
   '18' => '/ads/weichert/0918Mary.jpg',
   '19' => '/ads/weichert/0919Janet.jpg',
   '20' => '/ads/weichert/0920Jen.jpg',
   '21' => '/ads/weichert/0914Dottie.jpg',
   '22' => '/ads/weichert/0915Barbara.jpg',
   '23' => '/ads/weichert/0916Jay.jpg',
   '24' => '/ads/weichert/0917Rita.jpg',
   '25' => '/ads/weichert/0918Mary.jpg',
   '26' => '/ads/weichert/0919Janet.jpg',
   '27' => '/ads/weichert/0920Jen.jpg',
   '28' => '/ads/weichert/0914Dottie.jpg',
   '29' => '/ads/weichert/0915Barbara.jpg',
   '30' => '/ads/weichert/0916Jay.jpg',
);

$linkOfTheDay = Array (

   '1' => 'http://rosejanetdemasi.weichertagentpages.com/',     // Name of or Path to image
   '2' => 'http://ritamarsh.weichertagentpages.com/',           // Name of or Path to image
   '3' => 'http://www.larchmont-homes.com/about-jennifer-marsh.htm',
   '4' => 'http://www.larchmontmanorhomes.com/', 
   '5' => 'http://jaydollinger.weichertagentpages.com/',
   '6' => 'http://barbarabarber.weichertagentpages.com/',
   '7' => 'http://www.weichert.com/NY/Westchester/Larchmont/',
   '8' => 'http://ritamarsh.weichertagentpages.com/',
   '9' => 'http://www.larchmont-homes.com/about-jennifer-marsh.htm',
   '10' => 'http://www.larchmontmanorhomes.com/', 
   '11' => 'http://jaydollinger.weichertagentpages.com/',
   '12' => 'http://barbarabarber.weichertagentpages.com/',
   '13' => 'http://www.larchmontgazette.com/',
   '14' => 'http://www.larchmontgazette.com/', 
   '15' => 'http://barbarabarber.weichertagentpages.com/',
   '16' => 'http://jaydollinger.weichertagentpages.com/',
   '17' => 'http://ritamarsh.weichertagentpages.com/',
   '18' => 'http://www.larchmontmanorhomes.com/', 
   '19' => 'http://rosejanetdemasi.weichertagentpages.com/',
   '20' => 'http://www.larchmont-homes.com/about-jennifer-marsh.htm',
   '21' => 'http://www.larchmontgazette.com/',
   '22' => 'http://barbarabarber.weichertagentpages.com/',
   '23' => 'http://jaydollinger.weichertagentpages.com/',
   '24' => 'http://ritamarsh.weichertagentpages.com/',
   '25' => 'http://www.larchmontmanorhomes.com/', 
   '26' => 'http://rosejanetdemasi.weichertagentpages.com/',
   '27' => 'http://www.larchmont-homes.com/about-jennifer-marsh.htm',
   '28' => 'http://www.larchmontgazette.com/', 
   '29' => 'http://barbarabarber.weichertagentpages.com/',
   '30' => 'http://jaydollinger.weichertagentpages.com/',
);

//  published at: scripts.tropicalpcsolutions.com

// Place day of month in variable 'x'
//$x=date("d"); 
// A website vistor made a suggestion to change the date function to use j 
// instead of d. This causes the date to be read without leading zeros.
$x=date("j");  //Thanks for the suggestion Andrew

// If value of date exceeds the amount of photos then pick a random photo to display
if($x > $totalPics) { $x=rand(1,$totalPics); }

$ad_image = '';
$ad_image = '<a href=' . $linkOfTheDay[$x] . '><img src=' . $photoOfTheDay[$x] . '></a>';

// Display image
//echo "potd=" . $photoOfTheDay[$x] . "</ br>";
//echo "lotd=" . $linkOfTheDay[$x] . "</ br>";
//echo "x=" . $x . "</ br>";
echo "<center> " . $ad_image . " </center>" ;
?>
  #4  
Old Oct 1, 2009, 09:54 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Where is the error message showing up.

Also you have an ',' after the last photo of the day - array item 30.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Oct 1, 2009, 10:14 AM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
http://www.larchmontgazette.com
Right sidebar

Wait a minute! The problem is with another PHP code widget, the one for the obits list. Let me try removing that and redoing it.

EDIT:

Well. I deleted the cached files from WP-Cache, then dumped the Safari and Firefox caches, and reloaded. Now the problem widget is not showing up. I'll try to rebuild it now. This caching thing can cause problems!

Last edited by paulae; Oct 1, 2009 at 10:22 AM.
  #6  
Old Oct 1, 2009, 10:43 AM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
All cleared up now. Sorry for the bother!

I still think my site takes to long to load, especially for anything at all to appear as the rest of the page loads.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Very Strange Problem with List Category Post Plugin adashofsass Excerpts, Read more, Pagination 3 Aug 28, 2009 10:52 AM
Getting a strange code added to my header causing table padding howsimple Header configuration & styling 2 Aug 25, 2009 11:32 AM
[SOLVED] PHP code widget destroyed my site! paulae Sidebars & Widgets 0 Jul 13, 2009 07:07 AM
Strange behavior when editing bfa_header_config.php jacoblo Header configuration & styling 2 Mar 24, 2009 05:45 AM
Location for php code for SOCIABLE widget? strangelove Post-Kicker, -Byline & -Footer 1 Feb 18, 2009 07:04 PM


All times are GMT -6. The time now is 12:37 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.