randomizer question - inserting weblog custom fields
Posted: 16 July 2004 11:59 AM   [ Ignore ]  
Lab Assistant
RankRank
Total Posts:  182
Joined  10-07-2003

I am trying to insert custom fields into the randomizer but keep receiving error the following error:

>>>>>>>
Parse error: parse error, expecting `’)’’ in /home/pmh2501/public_html/b4bsysee/plugins/pi.randomizer.php on line 56

Fatal error: Cannot instantiate non-existent class: randomizer in /home/pmh2501/public_html/b4bsysee/core/core.template.php on line 597

<<< start code that is causing this error-

  function set_one()
  { 
      $quotes = array(
                “ee {exp:weblog:entries weblog=“tagline” entry_id=‘39’} {tagline}{/exp:weblog:entries}”,
“test “,
                “Last Do, or do not.  There is no ‘try’. - Yoda”, // No comma after the last item
                );
 
 
      return $quotes[array_rand($quotes)];
  }
>>> end code >>>

I have tried it with and without the quotes.

My goal is to generate random quotes from a specific weblog.

Thanks.

Profile
 
 
Posted: 20 July 2004 06:33 PM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9853
Joined  06-19-2002

See here:

"Last Do, or do not. There is no 'try'. - Yoda", // No comma after the last item

You have a comma on the last item.  The last item in the list/array can’t have a comma.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 66463 Total Logged-in Users: 60
Total Topics: 84852 Total Anonymous Users: 13
Total Replies: 455301 Total Guests: 178
Total Posts: 540153    
Members ( View Memberlist )
Newest Members:  drivenewmediaTgunRooks TowermarkfavazzastephenhfoxysaxAtosheviboyjbcobbsOut_There