Loading ...
Sorry, an error occurred while loading the content.

Re: [oL] Re: Php help

Expand Messages
  • Ian Collins.net (Webmaster - Abby)
    Hi Ron, I suspect that our US based cousins are still nursing their new year hangovers ... no doubt we can soon look forward to the definitive solution to your
    Message 1 of 2 , Jan 1, 2003
    • 0 Attachment
      Hi Ron,

      I suspect that our US based cousins are still nursing their new year
      hangovers ... no doubt we can soon look forward to the definitive solution
      to your problem???

      Sorry my suggestion didn't work out.

      Another idea to try out is to replace all the non alphanumeric characters
      within the return overlib('~~'); statement with "character entities"

      eg:

      < for < (or -- better -- still <)
      > for > (or > )
      ? for ?
      etc. etc.

      Another solution is to try storing the text string to be used as part of the
      overlib argument as a JavaScript variable ...

      eg:
      <script language=javascript>
      message['dagblad'] = 'Het Algemeen Dagblad<br>' +
      '<?php include' +
      '"c.php?show_site=http://www.ad.nl";?> x viewed'
      </script>

      However I suspect that you are still going to find that it will not work as
      <?php include> is a server side command and javascript is a client side
      script.

      It may be that there isn't an effective way around this. Server side stuff
      is performed before the document reaches the user, whilst client side stuff
      is perfomred after the document has loaded into the user's cache. What you
      need is means of grabbing the html that results from the <?php include>
      argument and then loading it into the overlib argument all on the server
      side ... I'm not that good!





      ----- Original Message -----
      From: "Ron Hartman" <ron@...>
      To: "Ian Collins.net (Webmaster - Abby)" <overlib@yahoogroups.com>
      Sent: Tuesday, December 31, 2002 3:37 PM
      Subject: [oL] Re: Php help


      >
      >
      > Well that didn't work out however the php code does appear right in
      > the source code, but i still get an error about an undende character
      > set.
      > I guess it has to be possible ;)
      > But How ?!?
      >
      > ICnWA> Hi Ron,
      >
      > ICnWA> The single quotes for the php include statement need to be
      'escaped' thus:
      >
      > ICnWA> <a href="c.php?site=http://www.ad.nl" onMouseOver="
      > ICnWA> return overlib( 'Het Algemeen Dagblad<br><?php include
      > ICnWA> \'c.php?show_site=http://www.ad.nl\';?> x viewed',
      > ICnWA> CAPTION, 'Link Informatie' );" onMouseOut="return nd();" >Alg.
      Dagblad</a>
      >
      > ICnWA> However I'm not certain that the <?php include> will actually work
      within
      > ICnWA> the confines of the javascript ... no harm trying though ...
      >
      > ICnWA> Good luck!
      >
      > ICnWA> ----- Original Message -----
      > ICnWA> From: "Ron Hartman" <ron@...>
      > ICnWA> To: <overlib@yahoogroups.com>
      > ICnWA> Sent: Tuesday, December 31, 2002 11:05 AM
      > ICnWA> Subject: [oL] Php help
      >
      >
      > >> Hello all,
      > >>
      > >> I have a link counter on my page, and now i want to include this in my
      > >> mouseover, but i don't get it to work.
      > >>
      > >> <a href="c.php?site=http://www.ad.nl" onMouseOver="
      > >> return overlib( 'Het Algemeen Dagblad<br><?php include
      > >> 'c.php?show_site=http://www.ad.nl';?> x viewed',
      > >> CAPTION, 'Link Informatie' );" onMouseOut="return nd();" >Alg.
      Dagblad</a>
      > >> <br>
      > >>
      > >> It will give only javascript errors ... does someone know how to do
      > >> this ??
      > >>
      > >> Thnx
      > >>
      > >> Ron
      > >>
      > >>
      > >>
      > >> To unsubscribe from this group, send an email to:
      > >> overlib-unsubscribe@yahoogroups.com
      > >>
      > >> Homepage: http://www.bosrup.com/web/overlib/
      > >> Archive: http://groups.yahoo.com/group/overlib/
      > >>
      > >>
      > >> Your use of Yahoo! Groups is subject to
      http://docs.yahoo.com/info/terms/
      > >>
      > >>
      >
      >
      >
      >
      > ICnWA> To unsubscribe from this group, send an email to:
      > ICnWA> overlib-unsubscribe@yahoogroups.com
      >
      > ICnWA> Homepage: http://www.bosrup.com/web/overlib/
      > ICnWA> Archive: http://groups.yahoo.com/group/overlib/
      >
      >
      > ICnWA> Your use of Yahoo! Groups is subject to
      http://docs.yahoo.com/info/terms/
      >
      >
      >
      >
      >
      > --
      > Met vriendelijke groet,
      > Ron mailto:
      >
      > --==>[Quote : Kan bestand niet openen "C:\Program Files\The
      Bat!\tags.txt"]<==--
      >
      >
      >
      > To unsubscribe from this group, send an email to:
      > overlib-unsubscribe@yahoogroups.com
      >
      > Homepage: http://www.bosrup.com/web/overlib/
      > Archive: http://groups.yahoo.com/group/overlib/
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >
    • Ron Hartman
      Hi Ian First of all Happy New Year also for all the other people ofcourse ! And still i have no solution for the problem, althought i thought of another
      Message 2 of 2 , Jan 2, 2003
      • 0 Attachment
        Hi Ian

        First of all "Happy New Year" also for all the other people ofcourse !

        And still i have no solution for the problem, althought i thought of
        another solution, but that is more a php solution, so i guess it does
        not belong on this list ...

        But i'll give it a try :
        --------------------------------
        <?php
        $SITE_FILE = "sites.db";
        $showsite = file("$SITE_FILE");
        $check = implode($showsite, "~");

        if(ereg("http://www.test.nl", $check))
        {
        for($x = 0; $x < count($showsite); $x++)
        {
        $array = explode("|", $showsite[$x]);
        if($show_site == $array[0])
        {
        $overlib .="$array[1]";
        }
        }
        }
        else
        {
        $overlib .="0 ";
        }


        echo "<p><a href=\"c.php?site=http://www.phpfreakz.nl\" onMouseOver=\"return overlib(' is bekeken " . $overlib . " maal', CAPTION, 'Link Informatie')\" onMouseOut=\"return nd()\">Alg. Dagblad</a></p>";
        ?>

        the sites.db looks like this :
        -------------------------------
        http://www.test2.com/|20
        http://www.test3.nl|36
        http://www.test4.org/|20
        -------------------------------

        ICnWA> Hi Ron,

        ICnWA> I suspect that our US based cousins are still nursing their new year
        ICnWA> hangovers ... no doubt we can soon look forward to the definitive solution
        ICnWA> to your problem???

        ICnWA> Sorry my suggestion didn't work out.

        ICnWA> Another idea to try out is to replace all the non alphanumeric characters
        ICnWA> within the return overlib('~~'); statement with "character entities"

        ICnWA> eg:

        ICnWA> < for < (or -- better -- still <)
        > for >> (or > )
        ICnWA> ? for ?
        ICnWA> etc. etc.

        ICnWA> Another solution is to try storing the text string to be used as part of the
        ICnWA> overlib argument as a JavaScript variable ...

        ICnWA> eg:
        ICnWA> <script language=javascript>
        ICnWA> message['dagblad'] = 'Het Algemeen Dagblad<br>' +
        ICnWA> '<?php include' +
        ICnWA> '"c.php?show_site=http://www.ad.nl";?> x viewed'
        ICnWA> </script>

        ICnWA> However I suspect that you are still going to find that it will not work as
        ICnWA> <?php include> is a server side command and javascript is a client side
        ICnWA> script.

        ICnWA> It may be that there isn't an effective way around this. Server side stuff
        ICnWA> is performed before the document reaches the user, whilst client side stuff
        ICnWA> is perfomred after the document has loaded into the user's cache. What you
        ICnWA> need is means of grabbing the html that results from the <?php include>
        ICnWA> argument and then loading it into the overlib argument all on the server
        ICnWA> side ... I'm not that good!





        ICnWA> ----- Original Message -----
        ICnWA> From: "Ron Hartman" <ron@...>
        ICnWA> To: "Ian Collins.net (Webmaster - Abby)" <overlib@yahoogroups.com>
        ICnWA> Sent: Tuesday, December 31, 2002 3:37 PM
        ICnWA> Subject: [oL] Re: Php help


        >>
        >>
        >> Well that didn't work out however the php code does appear right in
        >> the source code, but i still get an error about an undende character
        >> set.
        >> I guess it has to be possible ;)
        >> But How ?!?
        >>
        >> ICnWA> Hi Ron,
        >>
        >> ICnWA> The single quotes for the php include statement need to be
        ICnWA> 'escaped' thus:
        >>
        >> ICnWA> <a href="c.php?site=http://www.ad.nl" onMouseOver="
        >> ICnWA> return overlib( 'Het Algemeen Dagblad<br><?php include
        >> ICnWA> \'c.php?show_site=http://www.ad.nl\';?> x viewed',
        >> ICnWA> CAPTION, 'Link Informatie' );" onMouseOut="return nd();" >Alg.
        ICnWA> Dagblad</a>
        >>
        >> ICnWA> However I'm not certain that the <?php include> will actually work
        ICnWA> within
        >> ICnWA> the confines of the javascript ... no harm trying though ...
        >>
        >> ICnWA> Good luck!
        >>
        >> ICnWA> ----- Original Message -----
        >> ICnWA> From: "Ron Hartman" <ron@...>
        >> ICnWA> To: <overlib@yahoogroups.com>
        >> ICnWA> Sent: Tuesday, December 31, 2002 11:05 AM
        >> ICnWA> Subject: [oL] Php help
        >>
        >>
        >> >> Hello all,
        >> >>
        >> >> I have a link counter on my page, and now i want to include this in my
        >> >> mouseover, but i don't get it to work.
        >> >>
        >> >> <a href="c.php?site=http://www.ad.nl" onMouseOver="
        >> >> return overlib( 'Het Algemeen Dagblad<br><?php include
        >> >> 'c.php?show_site=http://www.ad.nl';?> x viewed',
        >> >> CAPTION, 'Link Informatie' );" onMouseOut="return nd();" >Alg.
        ICnWA> Dagblad</a>
        >> >> <br>
        >> >>
        >> >> It will give only javascript errors ... does someone know how to do
        >> >> this ??
        >> >>
        >> >> Thnx
        >> >>
        >> >> Ron
        >> >>
        >> >>
        >> >>
        >> >> To unsubscribe from this group, send an email to:
        >> >> overlib-unsubscribe@yahoogroups.com
        >> >>
        >> >> Homepage: http://www.bosrup.com/web/overlib/
        >> >> Archive: http://groups.yahoo.com/group/overlib/
        >> >>
        >> >>
        >> >> Your use of Yahoo! Groups is subject to
        ICnWA> http://docs.yahoo.com/info/terms/
        >> >>
        >> >>
        >>
        >>
        >>
        >>
        >> ICnWA> To unsubscribe from this group, send an email to:
        >> ICnWA> overlib-unsubscribe@yahoogroups.com
        >>
        >> ICnWA> Homepage: http://www.bosrup.com/web/overlib/
        >> ICnWA> Archive: http://groups.yahoo.com/group/overlib/
        >>
        >>
        >> ICnWA> Your use of Yahoo! Groups is subject to
        ICnWA> http://docs.yahoo.com/info/terms/
        >>
        >>
        >>
        >>
        >>
        >> --
        >> Met vriendelijke groet,
        >> Ron mailto:
        >>
        >> --==>[Quote : Kan bestand niet openen "C:\Program Files\The
        ICnWA> Bat!\tags.txt"]<==--
        >>
        >>
        >>
        >> To unsubscribe from this group, send an email to:
        >> overlib-unsubscribe@yahoogroups.com
        >>
        >> Homepage: http://www.bosrup.com/web/overlib/
        >> Archive: http://groups.yahoo.com/group/overlib/
        >>
        >>
        >> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        >>
        >>




        ICnWA> To unsubscribe from this group, send an email to:
        ICnWA> overlib-unsubscribe@yahoogroups.com

        ICnWA> Homepage: http://www.bosrup.com/web/overlib/
        ICnWA> Archive: http://groups.yahoo.com/group/overlib/


        ICnWA> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/





        --
        Met vriendelijke groet,
        Ron mailto:

        --==>[Quote : Kan bestand niet openen "C:\Program Files\The Bat!\tags.txt"]<==--
      Your message has been successfully submitted and would be delivered to recipients shortly.