Have PF on your website!


by Greg Bernhardt
Tags: website
moose
moose is offline
#19
Nov29-05, 05:10 PM
moose's Avatar
P: 555
When I finally get around to creating my website, I'll make sure to put this on there!
-Job-
-Job- is offline
#20
Dec30-05, 05:08 PM
Sci Advisor
-Job-'s Avatar
P: 1,132
Greg, could you have a version of the script that doesn't set a cookie? Having a script set a cookie from another domain resembles tracking cookies and all, so i'm getting a privacy report in IE for my website.
Greg Bernhardt
Greg Bernhardt is offline
#21
Dec30-05, 05:46 PM
Admin
Greg Bernhardt's Avatar
P: 8,542
Quote Quote by -Job-
Greg, could you have a version of the script that doesn't set a cookie? Having a script set a cookie from another domain resembles tracking cookies and all, so i'm getting a privacy report in IE for my website.
I'm not going to alter anything for one persons personal security setting, sorry Can't you just ignore it or set it to allow cookies?
-Job-
-Job- is offline
#22
Dec30-05, 10:23 PM
Sci Advisor
-Job-'s Avatar
P: 1,132
That's not the problem, i do allow the cookies it's just that in most IE browsers there will be a little privacy icon at the bottom of the page and a popup message because a cookie was set that was from another domain.
The only problem is that visitors to my site might think i'm tracking them with cookies because of this.
For example at school in all the computers at the computer lab this happened. It's not my settings in particular.
-Job-
-Job- is offline
#23
Jan24-06, 06:00 PM
Sci Advisor
-Job-'s Avatar
P: 1,132
Actually, IE even blocks the cookie by default, so it's not even being used. It's not just my settings either, it's the default setting. Don't take it personally but i think you ought to rethink the cookie.
Greg Bernhardt
Greg Bernhardt is offline
#24
Apr25-06, 11:56 PM
Admin
Greg Bernhardt's Avatar
P: 8,542
Is this still working for everyone?
Mattara
Mattara is offline
#25
May15-06, 11:55 AM
P: 398
Here is the RSS feed from my website:

http://www.moridin.moved.in/physics/...id=11&Itemid=7

It works very well. I just love it. now I can stay PF on other sites aswell. Thank you very much for setting this up :)
-Job-
-Job- is offline
#26
Aug6-06, 02:39 PM
Sci Advisor
-Job-'s Avatar
P: 1,132
An alternative is to set the cookie from the Javascript code rather than the PHP script. The problem is that visitors come to the site and a cookie is set from a different domain (physicsforums.com). Browsers don't like this. I mean, i like having links to PF on my site, but i don't like having browsers report a tracking cookie. It just doesn't look good, visitors need to trust the site.

So please Greg, if possible, can you remove the cookie? Or, if i write a version where the javascript sets the cookie (rather than the PHP) would you make that available?
Greg Bernhardt
Greg Bernhardt is offline
#27
Sep13-06, 09:27 AM
Admin
Greg Bernhardt's Avatar
P: 8,542
Job I see what you mean. An update I am soon to do maybe handle this for you.

Anyone else using this code or linking to PF. If so, share your website :)
Greg Bernhardt
Greg Bernhardt is offline
#28
Nov1-06, 01:19 PM
Admin
Greg Bernhardt's Avatar
P: 8,542
Please add a link to PF on your websites or myspace pages, it helps! :)
makc
makc is offline
#29
Apr27-07, 03:26 AM
P: 61
For those who might use it, here's a php example of parsing their XML feed:
<?php

function getPF () {
	$threads = array ();
	$lines = @file ("http://www.physicsforums.com/external.php?type=xml");

	$t = array ();
	// this code relies on line breaks they have
	for ($i = 0; $i < count($lines); $i++) {
		if (preg_match ('/<thread id="(\d+)"/', $lines[$i], $m))
			$t ["id"] = $m [1]; else
		if (preg_match ('/<title>([^<]+)<\/title/', $lines[$i], $m))
			$t ["title"] = $m [1]; else
		if (preg_match ('/<author>([^<]+)<\/author/', $lines[$i], $m))
			$t ["author"] = $m [1]; else
		if (preg_match ('/<data>([^<]+)<\/data/', $lines[$i], $m))
			$t ["date"] = $m [1]; else
		if (preg_match ('/<time>([^<]+)<\/time/', $lines[$i], $m))
			$t ["time"] = $m [1]; else
		if (preg_match ('/<time>([^<]+)<\/time/', $lines[$i], $m))
			$t ["time"] = $m [1]; else
		if (preg_match ('/<\/thread>/', $lines[$i])) {
			// add to array
			array_push ($threads, $t); $t = array ();
		}
	}

	return $threads;
}

?>



<PRE><?php /* test output */ print_r (getPF ()); ?></PRE>
The result of this code looks like:
Array
(
    [0] => Array
        (
            [id] => 167743
            [title] => How to include an image?
            [author] => lpfr
            [date] => 04-27-2007
            [time] => 02:27 AM
        )

    [1] => Array
        (
            [id] => 167741
            [title] => simple partial fractions help (warning complex analysis :P )
            [author] => trickae
            [date] => 04-27-2007
            [time] => 01:58 AM
        )
...
You can use this array then to create content the way you want. I do not know that way, so it is not in this example :) Enjoy.
makc
makc is offline
#30
Apr29-07, 01:53 AM
P: 61
Btw, I think people would more likely use feeds filtered by username(s) on their personal sites. Can you please add this feature, in the same way as you filter by forums right now?

Thanks for your consideration.
Greg Bernhardt
Greg Bernhardt is offline
#31
Sep3-07, 05:50 PM
Admin
Greg Bernhardt's Avatar
P: 8,542
makc thanks for the code and suggestion, I will look into it!
Loren Booda
Loren Booda is offline
#32
Sep3-07, 07:49 PM
Loren Booda's Avatar
P: 3,408
My website PF promotion has been updated in one swell foop!
Greg Bernhardt
Greg Bernhardt is offline
#33
Sep13-07, 08:27 PM
Admin
Greg Bernhardt's Avatar
P: 8,542
Quote Quote by Loren Booda View Post
My website PF promotion has been updated in one swell foop!
Lookin good Loren!
hypatia
hypatia is offline
#34
Oct20-07, 06:27 PM
hypatia's Avatar
P: 1,296
The link just shows up as script on myspace. I can't seem to make it work.
Greg Bernhardt
Greg Bernhardt is offline
#35
Dec14-07, 06:28 PM
Admin
Greg Bernhardt's Avatar
P: 8,542
Quote Quote by hypatia View Post
The link just shows up as script on myspace. I can't seem to make it work.
I bet myspace doesn't allow the execution of javascript. :(
You could just add PF as a normal link. :)
Greg Bernhardt
Greg Bernhardt is offline
#36
Mar6-08, 10:17 AM
Admin
Greg Bernhardt's Avatar
P: 8,542
Bumping for a another reminder to get a link to PF on your website! :)


Register to reply

Related Discussions
Your website General Discussion 10
website bidding website General Discussion 3
Website General Discussion 0