I have seen only now that the code of upgrade from head version have been sent.
But i worked from 4.7 code for make a 5.x version and i publish my patch that can be useful.
I have tested this in local installation with Drupal 5.1.

the other files:

bookmarks.install:

<?php
function bookmarks_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $result = db_query("CREATE TABLE {bookmarks} (
                  uid int UNSIGNED NOT NULL,
                  url varchar(128) NOT NULL,
                  title varchar(128) NOT NULL
      )");
      
      $result = db_query("ALTER TABLE bookmarks ADD INDEX (uid);");
      break;
    case 'pgsql':  
        $result = db_query("CREATE TABLE {bookmarks} (
                    uid SERIAL PRIMARY KEY,
                    url VARCHAR(255) NOT NULL,
                    title VARCHAR(255) NOT NULL
        )");
      break;
  }  
}

function bookmarks_uninstall() {
  $result = db_query("DROP TABLE {bookmarks}");
}

?>

bookmarks.info:

name = "Bookmarks" 
description = "Bookmark your page"

version = "5.x-1.x-dev"

Comments

abramo’s picture

@TheCrow : : many thanks : : excellent : : this works perfectly for me.

TheCrow’s picture

good :)

alex_b’s picture

Priority: Normal » Critical
FileSize
4.33 KB

Many thanks for the patch. Tested. Works great.

What's the status quo of getting this actually in?

I improved the patch - now it adds .info and .install file automatically. DB definition files (.mysql and .pgsql) still need to be removed manually.

alex_b’s picture

Status: Patch (to be ported) » Reviewed & tested by the community
FileSize
4.5 KB

Fixed: the query part that passed in the title on the quick link was broken.

zroger’s picture

$result = db_query("ALTER TABLE bookmarks ADD INDEX (uid);");

should be

result = db_query("ALTER TABLE {bookmarks} ADD INDEX (uid);");

with braces around the table name.

Otherwise works nicely. good work.

zroger’s picture

Status: Reviewed & tested by the community » Needs review
DesignWork’s picture

Hi all,

I was working on this bookmark modul today and I did some major changes on it.

It's kind of rewrite so I will apply no patch at the moment.

What's new:
Now you can under admin/settings/bookmarks chose the node types that will have an bookmark link. This bookmark link will give you the possibility to add any node to your bookmarks on the node display even without the bookmark block. If you have allready bookmarked this node the link changes to unbookmark and you can delete it from there.

Bookmarking an node will give you an new form with an textarea for descriptions. By default it will show you the node teaser if there is one. This form will store the node type in the database as well (for better identification).

At least I changed the "My Bookmarks" page. It shows now the title as link, the node type, the description, and the operations.

TO DO: I want to have a link to the author of the node in the "My Bookmark" page and i would like to group my bookmarks and make them available to others. If somebody want´s to help on this tasks would be great.

I need some tester, so spend some time with it please :) and give me some feed back.

But anyway here comes the new Code. Pay attention it makes changes to the bookmarks tabel so be carefull.

Warm regards from Cologne.

Dirk

maulwuff’s picture

Hmm, the url seems to be not working for me. It is always empty. I tested with forum, page, story.
I use drupal 5.7

TheCrow’s picture

@alex_b: Thank's you for the big patch, can you upgrade it with the correction of Roger Lopez?

@Roger Lopez: Thank's you for your correction, waiting for the alex_b Big Patch i republish the code of bookmark.install:

function bookmarks_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $result = db_query("CREATE TABLE {bookmarks} (
                  uid int UNSIGNED NOT NULL,
                  url varchar(128) NOT NULL,
                  title varchar(128) NOT NULL
      )");
     
      $result = db_query("ALTER TABLE {bookmarks} ADD INDEX (uid);");
      break;
    case 'pgsql': 
        $result = db_query("CREATE TABLE {bookmarks} (
                    uid SERIAL PRIMARY KEY,
                    url VARCHAR(255) NOT NULL,
                    title VARCHAR(255) NOT NULL
        )");
      break;
  } 
}

function bookmarks_uninstall() {
  $result = db_query("DROP TABLE {bookmarks}");
}

The complete module is available at this address, is the version upgraded with Roger Lopez correction...

@maulwuff: I use it under Drupal 5.7 and for me seem work, explain better what is your problem/configuration thank's you.

Anonymous’s picture

Status: Needs review » Needs work

What is the level of demand for a 5.x version of this module? If it's high enough, I'll work on getting a backport of the 6.x version once I've got the import scripts working.

Mike Sances’s picture

I would use a 5.x version and am going to try the patch above.

Anonymous’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev
Assigned: Unassigned »
Status: Needs work » Postponed (maintainer needs more info)

I've created a development snapshot of the code provided by The Crow. It should appear within a few hours. Please test this and let me know if it is working or not.

Jonathan

Anonymous’s picture

Version: 5.x-1.x-dev » 5.x-1.0
Status: Postponed (maintainer needs more info) » Fixed

I'm considering this fixed with the 5.x version of the module provided by The Crow. Should there be problems with this release please open a new issue.

DesignWork’s picture

Dear darthclue,

I did some more changes on the 5.x version of the module. Fuction for sorting bookmarks in Folder, share with OG, Folder for OG, supply of forward module ect. Do you want to have my code?

I can post it here just give me a hint.

Dirk

abramo’s picture

subscribing, with great interest :)

Anonymous’s picture

Improvements are welcome. Please post them to a new issue in the queue so that they'll catch my attention.

DesignWork’s picture

Dear darthclue,

I opened a new post for the changes i did. A zip file is attached. http://drupal.org/node/286820

Warm regards from Cologne.

Dirk

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.