nimebe Posted December 20, 2007 Report Share Posted December 20, 2007 I've modified my Bookmarks system to use a db table instead of cookies. The main reason is that I'm often using different browsers and different computers and want to have access to my bookmarks. It's set up to be used with e107 so if you're using tngIL it should work fine. You can, of course, see it in use at http://www.flintfamilyhistory.com. It's available for download from here:http://www.flintfamilyhistory.com/download.php?view.3NickFixedP.S. I do know about the wrong link to the bookmarks from the menu. Quote Link to comment Share on other sites More sharing options...
sbourdon Posted December 22, 2007 Report Share Posted December 22, 2007 I've modified my Bookmarks system to use a db table instead of cookies. The main reason is that I'm often using different browsers and different computers and want to have access to my bookmarks. It's set up to be used with e107 so if you're using tngIL it should work fine. You can, of course, see it in use at http://www.flintfamilyhistory.com. It's available for download from here:http://www.flintfamilyhistory.com/download.php?view.3NickFixedP.S. I do know about the wrong link to the bookmarks from the menu.Excellent idea!But in the addbookmark.php file, it is indicated that $userid on line 36 must by changed to the userid for your system.What would that be for a plain installation of TNG?I've tried different things without any success... Thanks a lot! Quote Link to comment Share on other sites More sharing options...
nimebe Posted December 23, 2007 Author Report Share Posted December 23, 2007 Excellent idea!But in the addbookmark.php file, it is indicated that $userid on line 36 must by changed to the userid for your system.What would that be for a plain installation of TNG?I've tried different things without any success... Thanks a lot!I haven't tested this but something like this should work:$currentuser = $_SESSION['currentuser']; //assign the current users name to $current user$query = "SELECT userID from `tng_users` WHERE username = '$currentuser' LIMIT 1"; //query the tng_users db table for the userID of $currentuser$result = mysql_query($query) or die ("Cannot execute query: $query");//run the query$row = mysql_fetch_array($result, MYSQL_ASSOC); //assign the results to $row$userid = $row[userID];//assign the userID row to $useridPut this into add_bookmark.php in the exact place of $userid=USERID;I'll test this and add it to the file so that all the person has to do is change a variable depending on their installation type. I should be able to do this sometime the next few days.Nick Quote Link to comment Share on other sites More sharing options...
sbourdon Posted December 23, 2007 Report Share Posted December 23, 2007 Works like a charm! Thanks! ;) Quote Link to comment Share on other sites More sharing options...
cmhbob Posted April 22, 2012 Report Share Posted April 22, 2012 I know I'm bumping a five-year-old thread, but does anyone have the complete code here? Or is Post 3 all I need to do (which I doubt given that I'm on V9 now.)I'm asking because www.flintfamilyhistory.com is a dead domain now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.