Closed (won't fix)
Project:
Content Profile
Version:
6.x-1.0-beta3
Component:
Miscellaneous
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Nov 2008 at 20:51 UTC
Updated:
19 Nov 2011 at 04:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
tostinni commentedHave a look at http://drupal.org/project/auto_nodetitle
Comment #2
drudrupapal commentedThanks :) !!!
EDIT : i don't want to abuse, but has anyone any ideao how I could hide the date of profile creation too ?
Comment #3
tostinni commentedWell this is in the theme settings "admin/build/themes/settings" there you have "dispaly post information on" and you can select your content types.
Comment #4
drudrupapal commentedThanks !
i stop abusing now :)
Comment #5
jeff h commentedI can't think of an obvious use for the node title at all in the context of content profile... does *anyone* actually use it? Would it not be nice to have this simple functionality included in this module, without having to install yet another module, just to make this one work?
In the current dev release we have a new module called content_profile_registration.module which programatically sets the node title to be the user's name, when it's created as part of registration.
Thus, I am wondering whether others would also find it useful if the module also provided a config checkbox allowing the title field to be removed when users edit this node type. For that matter, why not make the node body optional as well, since the above-mentioned module doesn't present either the title nor body during user registration.
Is this something the module maintainers will consider?
Comment #6
greenbeans commentedI like Jeff H's idea.
Comment #7
skizzo commentedChanging to Feature Request. Please change back if editable Node Title field is indeed required.
Comment #8
jeffschulerI'm not certain this issue should be marked as a duplicate, but fago responded to the same issue on #337136: improve docs to mention auto nodetitle suggesting that Automatic Nodetitles and some text in Content Profile's README constitute a satisfactory solution.
Comment #9
fagoYep, I think so.
Comment #10
cedrix commentedHi,
the solution is this:
On "/admin/content/node-type/profile/profile" select "Hide form fields" and select "title".
On registratin the users wont have to type in any obscure title.
That's just it.
Regards
Ced
Comment #11
crosputni commentedIs anyone else frustrated by this?
I have done this
It doesn't work for me. It is still in the register/edit area for non-admin users, which means they have to type some random title or the form won't allow the user to submit.
Why is the option to remove the Title field even here if it doesn't do what it says?
Comment #12
lupus78 commentedYes, it is quite confusing, why not the title is hidden if the user edits profile?
Comment #13
crystaldawn commentedThe options for hiding simply do not work for anything other than the Registration page which is what it says in the options. But what DOESNT make sense is that the fields are STILL displayed on the edit page because they are suppose to since all those options do is modify the registration page. This to me is kinda half-ass and very poor coding judgement. The options should either be completely removed, or updated to include "Edit" forms as well as "Create" forms from within the administration pages. A good real-world analogy would be this. Would you start your car with the battery but then unplug it just because the alternator runs the engine afterwards? No. You leave it plugged in even if it's not needed. Same idea here. Just because title is no longer need after the node has been created, it doesnt mean u let the user take it out or change it. So the developers knows that title is needed, creates it based on the username, which is correct, but then forgets that user's tend to be curious and will change the title just because it can be changed. This makes for VERY confusing and disorganized Content Lists when looking at the content list page with "profile" as the filter. I dont know about u, but I look at the title rather than the "author" when looking at content lists. Its a personal preference I suppose. So while it doesnt actually "hurt" anything to have it like this, it's certainly not very good practice. Just like the battery analogy. Doesnt hurt anything, but not very good practice to be running around without the battery hooked up lol.
Comment #14
crystaldawn commentedComment #15
skizzo commentedNeeds Work status applies only to issues with attached
patch. Please provide one, or reset issue status.
Comment #16
crystaldawn commentedPhhhhhhh A patch? This is so easy it shouldnt even require a patch ;) no not really but its just that I dont have time to run patch and make a patch for this but heres the block of code I used. I placed it in the module's hook_form_alter implementation. It works for me and I'd expect it to work for everyone else that has this issue as well. If you want to work this into the module and re-word the settings page to match and then create a patch, go right ahead, but I personally dont have time to do this.
Comment #17
JSCSJSCS commentedI have content profile installed and enabled. I have node autotitles set to "Automatically generate the title and hide the title field", yet the content profile generated profile page still show the title ("Profile 125") at the top of the page before all the prfile fields. I ccan;t figure it out. Any help would be appreciated.
Comment #18
aalamaki commentedYou can use form alter to hide the title and body in the content profile page. The code would go something like this,
Comment #19
fagoSee #8, #9.
Comment #20
crystaldawn commentedI think its pretty clear no one actually reads the README files anymore. I'd still consider this a bug IMHO but its your module I suppose :P good luck with that. Maybe add it as a book page. At least people will see it. If anyone is like me, the first place they look for documentation is right on the project page under "Resources" with a link called "Documentation" which is nothing more than a link back to a book page in which you could just copy/paste the contents of the Readme file. I'm going to take a guess and say that people will probably continue to open issues on this problem until something more clear is done. Either the bug is fixed or more visible documentation is provided. I doubt anyone would think "Hey I bet thats a feature, maybe its in the docs on how to use it, lets look at the Docs (the readme file or whatever)". Most people are going to think "Hmm this looks like a bug, maybe I should report it". Or better yet, just put Help Text like other modules do right on the form itself if like the autotitle module is missing or something. Like a wiseman once said, documentation that is hard to find, might as well have been never written in the first place. Also, fyi, I did actually read the ReadMe, skimmed over it, and I never saw the comments regarding the title. Readme's really dont have any "table of contents" like a book page nor any real coloration/standardization like book pages etc to make things stand out. Plain text can only go so far. After the #19 comment, I went back to the readme to see if I missed anything, and there was a short blurb about it that I missed. It wasnt very visible I guess I dont know.
In either case, I'd still consider this a bug anyways rather than forcing someone to install another module to fix a bug in your module. Granted it works, but thats like saying "Hey I duct taped it, so its good to go!". Ya, duct tape works but was it the right way to fix it? Probably NOT lol. What happens if the autotitle module has a bug in it? Then what? People come here looking for a fix only to find out its this other module that you have no control over and cannot help them until that bug is fixed. Does this sound like a good scenerio? Not really. Please rethink your Fix for this issue, its not very sound in how it was thought out. There are several ways to handle issues like this. But the current method, isnt very good. (obviously or people wouldnt still be posting in this closed thread about it, 6 as it stands right now).
1. Be lazy and just update the readme and call it done! (Not a good solution)
2. Create a book page with documentation from readme and call it done! (A little better, but still, kinda lazy)
3. Create a form element when auto node title module is missin informing them of how to hide things! (Meh, ok I suppose thats pretty good documentation, almost acceptable)
4. Set auto node title as a requirement in the info file and hope people know what its for (meh, ok I suppose, couple that with #3 and its almost as good as #5)
5. Fix the issue within the module itself and call it done (This is by far the best option, and the work is already done here in this thread anyways so why not just add it)
Comment #21
KHofmeyer commentedI am fine installing another module to handle this, to each his own. But I am not really sure how this helps in this case. I have admin's create all my node profiles. If I want the node title "auto set" I can't have it be the name of the person the profile is for. There is not a token for that. I have installed Token profile and Content Profile Token and there is still no token for this. Unless something is wrong with my install, having the title not be the users name is useless in my case. I could have the admin enter it in, but why? Defeats the purpose of all this great stuff in Drupal.
Please comment if I am doing something wrong and token should allow this?
Comment #22
held69 commentedsubscribing
Comment #23
savedario commentedsubscribing.
Comment #24
rmarino commentedyep, same case here. Auto node title doesn't help if admin creates the user profile as the token will get the admin username...
Comment #25
-Mania- commented+1. For now used #18 in a custom module but would like this seen committed to Content Profile module.
Comment #26
hjulien commentedCould someone clarify for me exactly where in hook_alter_form one puts the line of code to hide the title in the edit form?
Here's the existing code:
/**
* Implementation of hook_form_alter().
*/
function content_profile_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'node_type_form') {
$form['content_profile'] = array(
'#type' => 'fieldset',
'#title' => t('Content Profile'),
'#group' => 'additional_settings',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#weight' => 32,
);
$form['content_profile']['content_profile_use'] = array(
'#type' => 'checkbox',
'#title' => t('Use this content type as a content profile for users'),
'#default_value' => variable_get('content_profile_use_'. $form['#node_type']->type, FALSE),
);
}
elseif (isset($form['#node']) && $form['#node']->type .'_node_form' == $form_id && is_content_profile($form['#node'])) {
// Customize the redirect target and buttons of our own node forms.
if (arg(0) == 'user' && is_numeric(arg(1)) && arg(2) == 'edit' || arg(2) == 'profile') {
$form['buttons']['preview']['#access'] = FALSE;
$form['buttons']['delete']['#access'] = FALSE;
$form['#redirect'] = arg(2) == 'profile' ? 'user/'. $form['#node']->uid : $_GET['q'];
}
// Set the author value - note that this works only for admins.
if (!empty($_GET['uid']) && ($uid = intval($_GET['uid'])) && ($user = user_load($uid))) {
$form['author']['name']['#default_value'] = $user->name;
}
}
}
I want to add the line or the section from above: unset($form['title']);
I tried a couple of variations but it didn't work. Thank You!
Comment #27
ZenLax commentedSubscribe. Agree. Concur with crystaldawn on #20. Please update the module to fix.
Comment #28
modelstar commentedHi, I have the same question as HJulien #26.
Where should I place Crystal Dawn's code in the module to hide the title in the edit form?
Thanks.
Comment #29
hjulien commentedI learned that it's best to forget about using code if you don't know where to put it. There are often modules that can help you do that. Not in all cases, but many of them. I've learned a lot since I posted that comment! lol
I used the module mentioned in # 8 - automatic nodetitles and disabled the headings in my content profiles. The module provides a couple of options that are title-related. For other non-profile types, I use the module to just hide the title if it has no meaning for that content type and use a replacement pattern from the handy list the module provides. This helps me find a specific node in a search through nodes of that content type. I find that useful for development.