scriptygoddess

30 Oct, 2002

Custom Hot List

Posted by: Jennifer In: Scripts

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.

Download it here

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.

36 Responses to "Custom Hot List"

1 | Anonymous

October 30th, 2002 at 6:48 pm

Avatar

you need a remove command from the hotlist.

2 | Jennifer

October 31st, 2002 at 8:38 am

Avatar

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 "&raquo;<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".
<? } ?>

3 | Promo

October 31st, 2002 at 8:50 am

Avatar

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!

4 | girlie

October 31st, 2002 at 7:54 pm

Avatar

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.

5 | Jennifer

October 31st, 2002 at 8:37 pm

Avatar

Girlie – Yes on both questions. :)

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. :) (I'm going to change it in the download to just say "hotlist")

6 | girlie

October 31st, 2002 at 8:43 pm

Avatar

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?

7 | Jennifer

October 31st, 2002 at 9:07 pm

Avatar

I've just updated the download with everything mentioned here. :)

8 | girlie

November 1st, 2002 at 8:30 pm

Avatar

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.

9 | Jennifer

November 1st, 2002 at 8:41 pm

Avatar

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…

10 | girlie

November 1st, 2002 at 8:53 pm

Avatar

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!

11 | Jennifer

November 1st, 2002 at 9:02 pm

Avatar

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".
<? } ?>

13 | dean

November 4th, 2002 at 4:37 pm

Avatar

a javascript version with tutorial can be found here:

http://pro.html.it/articoli/id_204/idcat_11/pag_1/pag.html

14 | Arno

January 29th, 2003 at 5:06 am

Avatar

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

15 | Arno

January 29th, 2003 at 5:14 am

Avatar

oops, sorry my fault… fixed, got one path wrong…

16 | Arno

January 29th, 2003 at 5:31 am

Avatar

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?

17 | Jennifer

January 29th, 2003 at 9:30 am

Avatar

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.)

18 | Arno

January 29th, 2003 at 9:39 am

Avatar

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!

19 | Math X

March 8th, 2003 at 6:15 pm

Avatar

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?

20 | xcxv

May 16th, 2003 at 4:19 pm

Avatar

cool

21 | wcoco

June 3rd, 2003 at 8:08 pm

Avatar

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'.

22 | BeerMary

June 7th, 2003 at 1:26 pm

Avatar

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!

23 | lynda

June 7th, 2003 at 9:06 pm

Avatar

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.

24 | BeerMary

June 8th, 2003 at 11:12 am

Avatar

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. :-(

25 | Larry

June 28th, 2003 at 11:43 am

Avatar

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.

26 | Eliah Holiday

December 18th, 2003 at 2:25 pm

Avatar

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.

27 | Neurotic Fishbowl

October 30th, 2002 at 6:39 pm

Avatar

A New Look for Scripty Goddess
Scripty Goddess received an all-new look totally done in CSS by Jenn and it looks awesome! She implemented all kinds

28 | Big Pink Cookie

October 31st, 2002 at 6:42 pm

Avatar

A Day Late…
It's a day late thanks to Naomi coming over to visit last night, but I had to point you all

29 | Outinfive | Playing the odds!

November 13th, 2002 at 11:56 pm

Avatar

HotList Feature!
Not that this is truly needed for this site but I though I would add it anyways. The Hotlist on

30 | RC Utility

January 6th, 2003 at 10:14 am

Avatar

Scripty Hotlist
scriptygoddess

31 | Al-Muhajabah's Movable Type Tips

March 7th, 2003 at 8:47 pm

Avatar

allow your visitors to create their own hotlist
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…

32 | Bloggie Broad

December 5th, 2003 at 3:30 am

Avatar

More New Features
I'm addicted to scripts this week — it's a great…

33 | Bloggie Broad

December 5th, 2003 at 3:36 am

Avatar

Bloggie Scripty Fun
I like to keep an up-to-date listing of all the…

34 | Bloggie Broad

December 5th, 2003 at 7:19 pm

Avatar

Bloggie Scripty Fun
I like to keep an up-to-date listing of all the…

35 | EOUIA

December 6th, 2003 at 3:09 am

Avatar

Pagemarks¸¦ ´Þ¾Ò½À´Ï´Ù.
ºí·Î±×ÀÇ °ï¶õÇÑ Á¡ °¡¿îµ¥ Çϳª°¡. À̸¥¹Ù ºí·Î±× Ä¡¸ÅÀÔ´Ï´Ù. (Àú¸¸ ±×·²Áöµµ. -_-a) ¾î´À ºí·Î±×¿¡¼­ ÁÁÀº ¿£Æ®¸®¸¦ º¸°í´Â, ¾Æ, ÀÌ°Ç ²À ³ªÁß¿¡ Çѹø ´õ ÀоîºÁ¾ßÁö.. Çسõ°í¼± µµ´ëü, ±× ±ÛÀÌ ¾îµð¿¡ ÀÖ´ÂÁö ¾ËÁö ¸øÇؼ­ Çì¸Å´Â °æ¿ì°¡ ¹«Ã´ ¸¹´õ±º¿ä. ±â²¯ ¸Ó¸®¸¦ …

36 | antimine

January 16th, 2004 at 10:51 am

Avatar

http://antimine.pe.kr/written/archives/20040117_0051.html
¿ÂÀüÇÑ ±â¾ïÀ̶ó´Â °Ô ³»°Ô ³²¾ÆÀÖ³ª ½Í´Ù. Á¾ÀÏ »ý°¢ÇÑ °ÍÀº ¿À½ºÄ« ¿ÍÀϵåÀÇ ¡®The Ballad of Reading Gaol¡¯¡®À» ¡¯·¹µù °¨¿Á…¡®À̶ó°í ÇÏÁö ¾Ê°í, ¡¯Àб⠰¨¿Á….¡®¶ó°í ¹ø¿ªÇÑ °Ô Ȳº´ÇÏ¿´´ÂÁö, ´©±¸¿´´ÂÁö, ±×°Ô ´©±¸¿´´øÁö ´ëü ¹«½¼ »ó°üÀÎÁö, °ú¿¬. MT Áßø Ä…

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements