Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
any plans for this port?
Comment | File | Size | Author |
---|---|---|---|
#29 | user_titles.admin_.inc-1161918-5927644.patch | 19.91 KB | Killpill |
#28 | user_titles.admin_.inc-1161918-5927068.patch | 19.91 KB | Killpill |
#26 | user_titles.admin_.inc-1161918-5127674.patch | 19.83 KB | Killpill |
#15 | user_titles-1161918.patch | 105.83 KB | likewhoa |
#14 | user_titles.zip | 21.59 KB | graker |
Comments
Comment #1
trillex CreditAttribution: trillex commentedI second this request.
Comment #2
Miria CreditAttribution: Miria commentedI would like this very much!
Used this for 6 and loved it; was hard to let go of it when I upgraded to D7.
Comment #3
keltic CreditAttribution: keltic commentedSubscribe
Comment #4
JustMagicMaria CreditAttribution: JustMagicMaria commentedSubscribe
Comment #5
boran CreditAttribution: boran commented+1
Comment #6
ConradFlashback CreditAttribution: ConradFlashback commentedsub++
Comment #7
BeaPower CreditAttribution: BeaPower commentedsub
Comment #8
Spitfire CreditAttribution: Spitfire commented/second
Comment #9
graker CreditAttribution: graker commentedHey guys.
It seems that I ported User Titles module to D7. No contribs though, but they seem to be easy since they are all less than 1 KB of code (only 1 function in each).
Also I didn't test titles with images because I had no need in images for user titles. But the code which supports images is ported as well, so if any bugs or problems, post it here, I could possibly take a look.
The ported module is attached to this message. It has off course "dev" in its version because it should be tested by community.
Comment #10
boran CreditAttribution: boran commented@graker: I had a quick go.
Good: it installed fine. It was on a site upgraded form D7 and I could see the previously defined title.
I only used text titles, so the lack of images does not concern me.
Issues:
Userpoints method not supported?
Move the Config menu under configuration people?
When viewing my profile: Warning: Parameter 1 to user_titles_user_view() expected to be a reference, value given in module_invoke_all() (line 819 of /disk2/www/drupal-7.8/includes/module.inc).
Maybe get the sources into git?
Comment #11
graker CreditAttribution: graker commentedOn userpoints - nope, as I said, I didn't port any contribs and it is a contrib.
On moving to config menu - good point, will do it (when I get to the module again, could be couple of days).
On warning - can't reproduce it on my server, I don't see any warnings. Also I checked the code and parameter 1 to user_titles_user_view() is actually a reference.
On moving to git - it isn't really my intention to be a maintainer for the module. I actually hoped that the actual maintainer could do something with my port, or somebody else. Just wanted to share it with the community.
Comment #12
boran CreditAttribution: boran commenteda) Git: Understood.
b) I'm attaching a first port of contrib/ut_userpoints, in case it interest others.
c) View profile: Its better without the "&", since presumably one cannot change the user object:
//function user_titles_user_view(&$user) {
function user_titles_user_view($user) {
d) When saving the settings form I get:
Duplicate entry '3' for key 'PRIMARY': INSERT INTO {user_titles_roles} (rid, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1); Array ( [:db_insert_placeholder_0] => 3 [:db_insert_placeholder_1] => 0 ) in user_titles_settings_form_submit() (line 159 of /disk2/www/drupal-7.8/sites/all/modules/custom/user_titles/user_titles.admin.inc
As if there was an error in this code, but I dont see it:
$updated = db_update('user_titles_roles')
->fields(array(
'weight' => $role['weight'],
)
)
->condition('rid', $rid)
->execute();
If I complete un-install and thus wipe the ut tables and recreate, this error does not happen. But of course I'd like to preserve the existing data :-)
Comment #13
graker CreditAttribution: graker commentedc) Oh, i see now. For some reason I thought that $account should go as a reference, but now I checked with API hook_user_view description and it actually shouldn't :) Will fix this.
d) It's weird, if it points to db_update() call, then it shouldn't generate INSERT query. Gotta look through somehow, though I don't have previous installations of 6.x version of user titles to upgrade from.
Comment #14
graker CreditAttribution: graker commentedAttaching new version.
Changes:
- fixed reference (&) bug in hook_user_view() implementation;
- module settings moved to configuration->people category;
- added boran's ut_userpoints contrib module to the archive.
Couldn't fix the issue with INSERT query error on line 159. Maybe it could be easier to write some kind of migration script or use a DB save/restore when installing new module.
Comment #15
likewhoa CreditAttribution: likewhoa commentedAttached patch will apply against the 6.x-1x-dev branch from git and will install on drupal 7 but on install I encounter some notices.
& then after going to admin/config/people/user-titles this fatal error occurred
obviously this patch needs more work. I'll leave this here for now. Anyways, thanks graker for your contribution.
Comment #16
boran CreditAttribution: boran commentedEr, why apply against the 6.x-1x-dev branch?
Why not create a 7.x-1x-dev, checkin #, an change the version on this issue
... and we can work on it from there, directly pulling from git?
For the BLOCK warnings, found a fix:
http://drupal.org/node/224333#block_cache-constancts
function user_titles_block_info() {
..
//'cache' => BLOCK_CACHE_PER_USER,
'cache' => DRUPAL_CACHE_PER_USER,
...
//'cache' => BLOCK_CACHE_PER_USER,
'cache' => DRUPAL_CACHE_PER_USER,
Comment #17
likewhoa CreditAttribution: likewhoa commented@boran the maintainers need to do this new branch in order for us to pull straight from git instead of applying a difference on 6.x-1.x-dev ;) Once we get the community to test this patch and fix all bugs then we can request or a maintainer can go ahead and create this 7.x-1.x-dev branch ;)
Comment #18
gcybill CreditAttribution: gcybill commentedAre there maintainer around? -subscribe-
Comment #19
ssace CreditAttribution: ssace commentedsubscribing
Comment #20
Michelle@ssace: No need to announce to us that you are subscribing. Just click the button.
Comment #21
jramby CreditAttribution: jramby commented++
Comment #22
likewhoa CreditAttribution: likewhoa commented@maintainers I like to have commit access so I can push this D7 code into a -dev release so we can finally move forward and not have to patch from D6 version.
Comment #23
andypost@likewhoa Pleasee follow this to take over maintainership http://drupal.org/node/251466
Comment #24
andypostI think this module should join forces with http://drupal.org/project/user_badges
Comment #25
MichelleUser Titles and User Badges do two different things. Many sites only want titles, not badges. They should only merge if there is a good reason for it.
Comment #26
Killpill CreditAttribution: Killpill commentedI don't know where this went but I fixed the variable and duplicate entry error. The patch also has the constant fix mentioned below. I'm new to this, so I don't know what to do, but it seems the code works.
Notice: Undefined variable: form_values in user_titles_settings_form_submit() (line 126 of sites/all/modules/user_titles/user_titles.admin.inc).
I changed $form_values to $form_status['values']. This I am not sure on.
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2' for key 'PRIMARY': INSERT INTO {user_titles_roles} (rid, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1); Array ( [:db_insert_placeholder_0] => 2 [:db_insert_placeholder_1] => -10 ) in user_titles_settings_form_submit() (line 159 of sites/all/modules/user_titles/user_titles.admin.inc).
This was caused because the db_update would return false if there was nothing to update. I fixed this by doing this instead:
Edit: I, of course, removed a tag by mistake. New to this.
Comment #27
Killpill CreditAttribution: Killpill commentedComment #28
Killpill CreditAttribution: Killpill commentedUpdated again.
Changed a lot. Images work now. I had to add 'public://' in front of the variable_get('user_titles_image_dir', DEFAULT_IMAGE_DIR) stuff. It was creating the directory in the base path of the site before then, which was invalid.
The add title form works now. The validator code assumed the $title variable was an object. It is an array, so I fixed that.
I also added this:
The isset stops the error about $form['values']['tid'] not existing and makes sure the validation of role names and post numbers is down for new titles.
/config/people/user-titles/titles looks REALLY funky to me. It gets better as you add titles though.
I don't know how to really create a patch or anything but I uploaded my changes.
Can someone who knows what to do create a branch for 7.x and get this moving again?
Comment #29
Killpill CreditAttribution: Killpill commentedMy if statement for the validator was messed up and caused you to not be able to edit existing titles.
I feel like I'm cheating when I do "$form['tid']['#value']" but it works, it seems.
Comment #30
andypost@Killpill please provide a patch not a single file
Is there any other files?
$Id$ placeholder should be removed, git does not use it
Comment #31
Oleksa-1 CreditAttribution: Oleksa-1 commentedup
Comment #32
shane1090 CreditAttribution: shane1090 commentedJust recently came across a problem with this D7 port that is causing issues when trying to delete posts. It seems to ignore the fact that there is already an entry in the {user_titles_posts} table and try to insert a new record, causing the following error for when trying to delete a comment:
and the following when trying to delete nodes:
It seems very strange - I tried adding a watchdog command before the $updated check, and for some reason its never run. Sometimes this error occurs, and sometimes it works fine. Seems very strange!
Comment #33
svarco CreditAttribution: svarco commentedCould still no one take maintainership of the project? :-(
Comment #34
OFF CreditAttribution: OFF commentedProject is died!