Custom Hot List
Here’s the script I’m using for that “hotlist” feature. Probably it’s best use is on something like this site - an information blog, where posts are not as time-sensitive and may need to be referenced by a user at a later date.
Here’s a quick rundown of what this does, what the requirements are to implement this script, etc.
You add links below each post. (I’m using an icon here) Users click on that link to add the post to their own personal “hot list”.
The hotlist can be displayed anywhere (even a seperate page if you don’t want to put it on your sidebar).
To remove a link from their hotlist, they just click the “remove” link below that post, and it’s gone…
Should be a fairly easy script to implement…
Requirements
-It is desiged for MT, but if you can easily swap out the MT tags, and use the ones associated with your blogging tool (if you do this, Please post a link back here so others can benefit from it as well).
-You will need to be able to run PHP on your page (and server). If you’ve never run php on your page before - do some simple tests to make sure that’s working first before you go through the process of implementing this script (and then blaming me)
Even a simple test like this:
<? echo “hello world”; ?>
-The script is free, but a link back here is greatly appreciated ![]()
Update 8/13/03 As posted here - there is a way to allow people to save their hotlist and have them sync’d when used on other machines. Basically, you’re showing the person their cookie, giving them a password. The cookie and password can only be given from the machine where the cookie resides. They can then copy this information, (email it to themselves) and install the same cookie on another machine.
Here is a page that has the code to do that.
October 30th, 2002 at 6:39 pm
Scripty Goddess received an all-new look totally done in CSS by Jenn and it looks awesome! She implemented all kinds
October 30th, 2002 at 6:48 pm
you need a remove command from the hotlist.
October 31st, 2002 at 8:38 am
To my anonymous commenter
Ok, I’ve added a “[remove link]” over there in the box now.
I didn’t add it originally in the script, because I was concerned about that box getting too cluttered…
For those of you who want to know what that code looks like on the side so you can include a remove link too, here ya go :
(PLEASE NOTE: you still need to look at the other code that’s included in the download - this won’t work by itself… use this block instead of the block that’s shown in (I think) the last step)
<?
if (file_exists($myhotlist) && $hotarray[0] != “”) {
$currentlist = file($myhotlist);
echo “<b>My Hotlist</b><br>”;
for ($r = 0; $r < count($currentlist); $r++) {
$hotone = explode(”|||”, $currentlist[$r]);
echo “»<a href=\”".trim($hotone[1]).”\” >”.stripslashes($hotone[2]).”</a><br><a href=\”/scripts/hotlist/addtohotlist.php?remove=1&entryid=”.$hotone[0].”\”>[remove link]</a><br><br>”;
}
} else {
?>
<b>My Hotlist</b><br>
To add posts here for future reference, click on the hotpepper with the “+”. Once here, you can remove posts by clicking on the hotpepper with the “x”.
<? } ?>
October 31st, 2002 at 8:50 am
I am so excited that you made this script. I never really saw it being of much use on my site, but this site in particular is exactly the reason I had hoped you would create it.
So many cool scripts and so little time to use them, then they scroll off the main page and I forget about them. Ha! Not anymore!
Awesome job Jennifer!
October 31st, 2002 at 6:42 pm
It’s a day late thanks to Naomi coming over to visit last night, but I had to point you all
October 31st, 2002 at 7:54 pm
Two questions:
1) For the remove link, would that replace the code in Step 4 of the readme.txt file? (Just wanted to be sure!)
2) In the addtohotlist.php file, should the “vote entered” text be what we’re using? I wondered if maybe you just inadvertently included something from the Vote for Favorites script.
October 31st, 2002 at 8:37 pm
Girlie - Yes on both questions.
(I’m going to change it in the download to just say “hotlist”)
I haven’t had time to update the .zip, but yeah, the “vote entered” is left over from the other script… You can change it to whatever you want.
October 31st, 2002 at 8:43 pm
Thanks Jennifer - interestingly enough, I haven’t even seen the “Vote Entered” message pop up anywhere during testing - so does that mean it doesn’t matter anyway?
October 31st, 2002 at 9:07 pm
I’ve just updated the download with everything mentioned here.
November 1st, 2002 at 8:30 pm
Thanks for the script, I just added it to my page! =)
One little thing I noticed about removing from the hotlist - the alert message doesn’t include the entry title being removed, just empty quotes. Intentional?
And I (duh!) figured out the “Vote Entered” was in the TITLE tag of the page, which is why I didn’t notice it. Heh.
November 1st, 2002 at 8:41 pm
Somewhat oversight - somewhat lazy… it’s because you probably clicked on the remove link from the sidebar… I’ll take a look at changing that link so the post name shows up…
November 1st, 2002 at 8:53 pm
Ah well, I’m all about lazy too! =)
I’m guessing because the entry is being removed, there’s no longer a value in entrytitle to be filled in. Not a big deal actually, just wanted to let you know. Still does the job mighty well!
November 1st, 2002 at 9:02 pm
Well, it was actually easier than I thought… Download’s been updated… all that I changed was changed one line and added another… that last block (the “step 4″) looks like this now:
<?
if (file_exists($myhotlist) && $hotarray[0] != “”) {
$currentlist = file($myhotlist);
echo “<b>My Hotlist</b><br>”;
for ($r = 0; $r < count($currentlist); $r++) {
$hotone = explode(”|||”, $currentlist[$r]);
$linktitle = str_replace (” “, “%20″, $hotone[2]);
echo “»<a href=\”".trim($hotone[1]).”\” >”.stripslashes($hotone[2]).”</a><br><a
href=\”/scripts/hotlist/addtohotlist.php?remove=1&entryid=”.$hotone[0].”&entrytitle=”.
$linktitle.”\”>[remove link]</a><br><br>”;
}
} else {
?>
<b>My Hotlist</b><br>
To add posts here for future reference, click on the hotpepper with the “+”. Once
here, you can remove posts by clicking on the hotpepper with the “x”.
<? } ?>
November 1st, 2002 at 9:12 pm
Beautiful! =)
November 4th, 2002 at 4:37 pm
a javascript version with tutorial can be found here:
http://pro.html.it/articoli/id_204/idcat_11/pag_1/pag.html
November 13th, 2002 at 11:56 pm
Not that this is truly needed for this site but I though I would add it anyways. The Hotlist on
January 6th, 2003 at 10:14 am
scriptygoddess
January 29th, 2003 at 5:06 am
Great script, but it doesn’t work for me yet. When I click “add to hotlist”, I go to a new page and get the JavaScript popup saying the message is being added, but on the page itself are these errors:
Warning: fopen(/www/htdocs/sindono/hostlist/hotties/.php) [function.fopen]: failed to create stream: No such file or directory in /www/htdocs/sindono/hotlist/addtohotlist.php on line 39
Warning: fwrite(): supplied argument is not a valid stream resource in /www/htdocs/sindono/hotlist/addtohotlist.php on line 40
Warning: fclose(): supplied argument is not a valid stream resource in /www/htdocs/sindono/hotlist/addtohotlist.php on line 41
you can test it on my temporary webpage:
http://www.sindono.com/weblog/index.php
Can anybody point me in the right direction? I have set the chmod stuff correctly, the paths seem fine, etc…
Best,
Arno
January 29th, 2003 at 5:14 am
oops, sorry my fault… fixed, got one path wrong…
January 29th, 2003 at 5:31 am
I am soo sorry to keep filling this thread with my comments, but I have one more thing: the script works fine, no errors or anything. I can add entries to it, also if I try to add an already added entry, I get the message that it is already on the list.
But where I put the code to display what’s on my list, I don’t see anything… Also, the hotties folder inside the hotlist folder remains empty…
What to do?
January 29th, 2003 at 9:30 am
Arno - just went to your site to see how/if it was working - and it looks like it’s working just fine. I assume you’re all set.
If not - please remember to post your code somewhere on your site so I can see it. It’s not like I can do a view source and look at your (PHP) code (it’s server side only - doesn’t display in a “view source”)… that’s why I’m asking people to copy their page, change the extension to “.txt” so I can see how they implemented the code. (see note about “If requesting help with a script, please read this first….” above “preview/post” comment buttons.)
January 29th, 2003 at 9:39 am
Jennifer,
Thanks for your response. I am all set now. Problem is I have no idea what the problem was exactly. But it works now.
About not posting code: sorry, I realised later that I hadn’t included the php code..
Well, it’s fixed now. Thanks for the quick reply though!
March 7th, 2003 at 8:47 pm
The hotlist script from Scriptygoddess allows visitors to create a list of favorite entries that they want to bookmark for future reference. You can show the hotlist on a sidebar but I’ve chosen to make a separate My Hotlist page…
March 8th, 2003 at 6:15 pm
Thanks for this great script.
I’m using Pmachine (www.pmachine.com) system on my site.
I tried to set this script for Pmachine but I couldnt do that.
Can anyone explain how can I add this script to Pmachine?
May 16th, 2003 at 4:19 pm
cool
June 3rd, 2003 at 8:08 pm
After having my hotlist disappeared twice (and I want to cry!), I finally realized this:
If you’re using the hotlist feature and you’re using Mozilla, make sure ‘Limit maximum lifetime of cookie’ is *not* checked — that’s in Preference, look for ‘Privacy & Security’ then ‘Cookies’.
June 7th, 2003 at 1:26 pm
I too was unable to get it to work with pmachine. I think my error had something to do with mistakes replacing the MT tags with pMachine tags. If anyone has done this successfully on a pMachine site, could you paste the code you used in Step 3 here as an example? Muchas gracias!
June 7th, 2003 at 9:06 pm
This is generally how it’s done in pmachine.
I used to have it on my site, but found little use in it for a personal site - it can be done very easily in pMachine though.
June 8th, 2003 at 11:12 am
Lynda, I implemented the entire thing on my site, but when you’d click to add an entry to the hotlist, it didn’t work and showed “errors on page” in the browser corner.
I meant to save the code and post it here, but I accidentally deleted it.
June 28th, 2003 at 11:43 am
I was wondering if it was possible to change the graphic that hotlist uses. I read through the script, may have skipped over it, but didn’t see any reference to an image file of any type. I’m just used to creating my own graphics, and it would be nice if it were possible to create my own graphic for it.
December 5th, 2003 at 3:30 am
I’m addicted to scripts this week — it’s a great…
December 5th, 2003 at 3:36 am
I like to keep an up-to-date listing of all the…
December 5th, 2003 at 7:19 pm
I like to keep an up-to-date listing of all the…
December 6th, 2003 at 3:09 am
ºí·Î±×ÀÇ °ï¶õÇÑ Á¡ °¡¿îµ¥ Çϳª°¡. À̸¥¹Ù ºí·Î±× Ä¡¸ÅÀÔ´Ï´Ù. (Àú¸¸ ±×·²Áöµµ. -_-a) ¾î´À ºí·Î±×¿¡¼ ÁÁÀº ¿£Æ®¸®¸¦ º¸°í´Â, ¾Æ, ÀÌ°Ç ²À ³ªÁß¿¡ Çѹø ´õ ÀоîºÁ¾ßÁö.. ÇØ³õ°í¼± µµ´ëü, ±× ±ÛÀÌ ¾îµð¿¡ ÀÖ´ÂÁö ¾ËÁö ¸øÇؼ Çì¸Å´Â °æ¿ì°¡ ¹«Ã´ ¸¹´õ±º¿ä. ±â²¯ ¸Ó¸®¸¦ …
December 18th, 2003 at 2:25 pm
I was just curious how I could do the hotlist box in a pop-up window. I do not have any room on my site for a hotlist box but would like one to pop up the minute someone adds a page to the hotlist or clicks on a “view your Hotlist” link.
Cheers.
January 16th, 2004 at 10:51 am
¿ÂÀüÇÑ ±â¾ïÀ̶ó´Â °Ô ³»°Ô ³²¾ÆÀÖ³ª ½Í´Ù. Á¾ÀÏ »ý°¢ÇÑ °ÍÀº ¿À½ºÄ« ¿ÍÀϵåÀÇ ¡®The Ballad of Reading Gaol¡¯¡®À» ¡¯·¹µù °¨¿Á…¡®À̶ó°í ÇÏÁö ¾Ê°í, ¡¯Àб⠰¨¿Á….¡®¶ó°í ¹ø¿ªÇÑ °Ô Ȳº´ÇÏ¿´´ÂÁö, ´©±¸¿´´ÂÁö, ±×°Ô ´©±¸¿´´øÁö ´ëü ¹«½¼ »ó°üÀÎÁö, °ú¿¬. MT Áßø Ä…