HighDots Forums  

placing Favorites links into a database for links.htmlpage creation

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss placing Favorites links into a database for links.htmlpage creation in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jezzthisisfull
 
Posts: n/a

Default placing Favorites links into a database for links.htmlpage creation - 11-18-2004 , 08:31 AM






Hi, we're using Favtool to extract IE favorites into html for links pages on a
website...there are 3,000 + links so the question is whether there may be an
easier, more effective way to do this -- say, creating a mySQL database from
the html pages favtool generates. It would then be the plan to allow future
viewers to submit links to the database from a webpage, pending their review by
the webmaster. Does anyone know an efficient workflow/tool for this task?
The idea is to create a links database which can be updated by viewers --
pending webmaster approval of the suggested links. Thus far we only have
discovered favtool.exe which is cumbersome.
http://buildtolearn.com/showthread.php?t=4193 Thanks


Reply With Quote
  #2  
Old   
Craig
 
Posts: n/a

Default Re: placing Favorites links into a database for links.html page creation - 11-18-2004 , 03:54 PM






If you wish to go the MySQL route...
your site will have to be dynamic to accommodate a submit form to the
database - for your administrator only.
And presumably another page to show the links from the database.
Or some other method of accessing the database online - phpmyadmin perhaps?

Craig


"jezzthisisfull" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hi, we're using Favtool to extract IE favorites into html for links pages
on a
website...there are 3,000 + links so the question is whether there may be
an
easier, more effective way to do this -- say, creating a mySQL database
from
the html pages favtool generates. It would then be the plan to allow
future
viewers to submit links to the database from a webpage, pending their
review by
the webmaster. Does anyone know an efficient workflow/tool for this
task?
The idea is to create a links database which can be updated by viewers --
pending webmaster approval of the suggested links. Thus far we only
have
discovered favtool.exe which is cumbersome.
http://buildtolearn.com/showthread.php?t=4193 Thanks




Reply With Quote
  #3  
Old   
jezzthisisfull
 
Posts: n/a

Default Re: placing Favorites links into a database forlinks.html page creation - 11-18-2004 , 06:24 PM



hi, thanks for replying...yes, php is the way I plan to go..but, I'm concerned
about the time needed to handcode all the links...I'm wondering if there is a
tool/application capable of placing links into a database (from IE Favorites or
from a temporary html page generated from the Favorites folder using Favtool).
--so...How do the links get into the database?? Thanks again....


Reply With Quote
  #4  
Old   
Joe Makowiec
 
Posts: n/a

Default Re: placing Favorites links into a database for links.html page creation - 11-18-2004 , 07:00 PM



On 18 Nov 2004 in macromedia.dreamweaver, jezzthisisfull wrote:

Quote:
hi, thanks for replying...yes, php is the way I plan to go..but, I'm
concerned about the time needed to handcode all the links...I'm
wondering if there is a tool/application capable of placing links
into a database (from IE Favorites or from a temporary html page
generated from the Favorites folder using Favtool). --so...How do
the links get into the database?? Thanks again....
What you need to do is to get the links into a plain text file, one per
line. Then you can do darn near anything you want to with them. What
kind of output does Favtool produce?

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php


Reply With Quote
  #5  
Old   
Gary White
 
Posts: n/a

Default Re: placing Favorites links into a database for links.html page creation - 11-18-2004 , 07:31 PM



Joe Makowiec wrote:

Quote:
What you need to do is to get the links into a plain text file, one per
line. Then you can do darn near anything you want to with them. What
kind of output does Favtool produce?

Not necessarily. Windows machine? PHP installed on the local machine?
This works for me:

<?php

// change this to your actual logon name
$username="John Doe";

$path="C:/Documents and Settings/$username/Favorites";
getFiles($path);

function getFiles($d){
if($dir=@opendir($d) or die("Failed to open directory: $d")){
while (($file = readdir($dir)) !== false) {
if(is_dir("$d/$file") && $file!="." && $file!=".."){
echo "<strong>$file</strong><br>\n";
getFiles("$d/$file");
}
if(preg_match("/.url$/",$file)){
$f=file("$d/$file");
$url=preg_replace("/BASEURL=/","",$f[1]);
$url=preg_replace("/URL=/","",$url);
$file=preg_replace("/.url$/","",$file);
echo "<a href=\"$url\">$file</a><br>\n";
}
}
closedir($dir);
}
}
?>


Gary


Reply With Quote
  #6  
Old   
jezzthisisfull
 
Posts: n/a

Default Re: placing Favorites links into a database forlinks.html page creation - 11-23-2004 , 08:44 AM



Thank you for replying Joe! I'm very excited about trying this script...I'm
installing PHP and mySQL right now...I have a few follow-up basic questions:
first, this script should be saved as a .php file and...placed where? How do I
activate it? ...will it generate a text file which is then able to be
distributed into a mySQL database or will another script be necessary for this?
Assuming I'm able to place these urls in a database, how can such a database
then be drawn upon to populate a table in an links.html page, using php? (To
answer another post's question: Favtool generates a single huge html page with
urls from different Favorite's folders ordered straight down the page in line
beneath their appropriate heading titles generated from their respective
Favorite's folder names. ) Thank you very much again!


Reply With Quote
  #7  
Old   
Gary White
 
Posts: n/a

Default Re: placing Favorites links into a database for links.html page creation - 11-23-2004 , 01:26 PM



jezzthisisfull wrote:

Quote:
Thank you for replying Joe! I'm very excited about trying this script...I'm
installing PHP and mySQL right now...I have a few follow-up basic questions:
first, this script should be saved as a .php file and...placed where? How do I
activate it? ...will it generate a text file which is then able to be
distributed into a mySQL database or will another script be necessary for this?
Assuming I'm able to place these urls in a database, how can such a database
then be drawn upon to populate a table in an links.html page, using php? (To
answer another post's question: Favtool generates a single huge html page with
urls from different Favorite's folders ordered straight down the page in line
beneath their appropriate heading titles generated from their respective
Favorite's folder names. ) Thank you very much again!

I'm not Joe. ;-)

The script I posted would be inserted between the <body> and </body>
tags of a page saved with a .php file name extension. It will generate a
dynamic page. The easiest way to get would be to simply save the
generated page from the browser.

The database stuff would take a bit more and I don't really have the
time to dig into that right now.


Gary


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.