Posted by TheCrow on May 27, 2007 at 10:31am
| Project: | Bookmarks |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | task |
| Priority: | critical |
| Assigned: | darthclue |
| Status: | closed (fixed) |
Issue Summary
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"| Attachment | Size |
|---|---|
| bookmarks_4.patch | 2.79 KB |
Comments
#1
@TheCrow : : many thanks : : excellent : : this works perfectly for me.
#2
good :)
#3
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.
#4
Fixed: the query part that passed in the title on the quick link was broken.
#5
<?php$result = db_query("ALTER TABLE bookmarks ADD INDEX (uid);");
?>
should be
<?phpresult = db_query("ALTER TABLE {bookmarks} ADD INDEX (uid);");
?>
with braces around the table name.
Otherwise works nicely. good work.
#6
#7
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
#8
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
#9
@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:
<?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}");
}
?>
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.
#10
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.
#11
I would use a 5.x version and am going to try the patch above.
#12
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
#13
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.
#14
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
#15
subscribing, with great interest :)
#16
Improvements are welcome. Please post them to a new issue in the queue so that they'll catch my attention.
#17
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
#18
Automatically closed -- issue fixed for two weeks with no activity.