Plugin for php vitual
Posted: 05 May 2007 07:37 AM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  77
Joined  05-10-2006

EE can’t allow <?php virtual (); ?>, because it messes up the parsing.  So I thought perhaps this could be done with a plugin.

Here’s what I need…
[1] A single EE template containing a plugin tag, which parses this: <?php virtual (”/cgi-bin/cookie.cgi”); ?>

[2] Then embed that template into all other templates sitewide, so that no matter what page the visitor enters the site, he will get the cookie.


Reading though the plugin docs, I thought I might be able to write this, but no way.  As pathetically simple as this is, it’s still way over my head.  This is what I came up with so far (laugh all you like)...

<?php

class Aa {

  
var $cookie = "";

   function
Aa () {
    
       $this
->cookie = virtual ("/cgi-bin/cookie.cgi");
   
}
   
}

?>

What am I missing?  Would love to know…

Profile
 
 
Posted: 05 May 2007 07:55 AM   [ Ignore ]   [ # 1 ]  
Grad Student
Avatar
Rank
Total Posts:  77
Joined  05-10-2006

Hmmm.  I’m not as stupid as I thought I was.  Re-read the docs, tweaked my cookie script a little, and it works perfectly.  :D

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: 64939 Total Logged-in Users: 67
Total Topics: 81912 Total Anonymous Users: 43
Total Replies: 440330 Total Guests: 265
Total Posts: 522242    
Members ( View Memberlist )