Jump to content
TNG Community
nimebe

Permanent Bookmarks

Recommended Posts

nimebe

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

Nick

FixedP.S. I do know about the wrong link to the bookmarks from the menu.

Share this post


Link to post
Share on other sites
sbourdon

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

Nick

FixedP.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... :oops:

Thanks a lot!

Share this post


Link to post
Share on other sites
nimebe

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

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 $userid

Put 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

Share this post


Link to post
Share on other sites
cmhbob

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×