how to customize autocomplete TO field in privatemsg module - drupal 6 - drupal

Using the privatemessage module, users can send messages to each other as in facebook. The page displays a form with a TO field, subject and message. The TO field is an autocomplete field by default. Upon searching for a user name, it shows a drop down with only the names. How can i customize it to show the user's profile picture also in the drop down??? I dont know where to go and make the code changes.

You may have better luck with this on Drupal StackExchange, where the co-maintainer of Privatemsg is very active. (He hasn't posted here in a year, I think.)

Related

How to programatically unhide Drupal 7 content field

On my company's Drupal 7 site, I created a field for one of our content types through the admin UI. We decided to hide it from the user until some styling changes make it through to production. Is there a was to programmatically unhide the field via an update hook? I know get at least some of the field information through the field_info_field function, but I'm not sure how if it contains the setting needed to make the field visible to the user. Any help on this would be appreciated.
I know I can unhide it through the UI once the changes hit production, but it would be nice to have an automated way of doing this.
You can hide it programmatically from it's node template with hide() function:
https://api.drupal.org/api/drupal/includes%21common.inc/function/hide/7.x
You can do that conditionally, i.e. by checking user role first.
Now, I'm not sure will this work from update hook, and I'm not even sure why you want to use that hook?!? If users are allowed to edit that content type and you actually want to hide it from edit form then check out my answer here:
Drupal 7 - Hide certain form fields of a content edit form depending on the content data
You can use https://www.drupal.org/project/field_permissions drupal module to hide and unhide fields to users of specific role.Initially during development the field can be made visible to admin role and then later on the permission can be granted to users of other roles

In drupal 7, get a taxonomy token replaced in a panelizer webform

Here's my scenario: I have a drupal 7 site. It's categorized by a taxonomy. Each taxonomy term is panelized to display its main page. For each of those pages, I want to add a webform that would allow the visitor to email the person responsible for that area. The responsible person is defined in a hidden field on the taxonomy term.
If I add custom content to the panelizer page with the token
%taxonomy_term:field-generic-email-address
the email address is displayed. However, I need to get that into the webform, and I can't get it to pull the value from the token - it just displays that exact text (I'm trying to add it to a hidden field, but I'm sticking it into the body just to see, and in either place, it shows the token text instead of replacing it with the email). Does anyone know how to do this?
You might want to check out a module called EntityForm https://drupal.org/project/entityform
It allows you to use regular Drupal fields to build a user-submittable form.
There are other ways to do this, but this method may allow you to get what you want and more.

Wordpress - How to create a fav posts feature

I want my users to be able to mark posts as favorite. I tried the wp-favorite-posts plugin, but it doesn't work. I mark posts as favorites and after refreshing the page it's all gone. Furthermore, if I put {{wp-favorite-posts}} to a page, it just shows the text.
So I want to create my own solution, but don't really know how. I have never edited the WP database, but I have plenty of PHP mySQL experience.
Can anyone please point me in the right direction ?
You can use post_meta. You can store the "favourite" aspect as a custom field attached to each post. You don't need to manually edit the database (i.e. via mySQL).
When you want to show the favourited posts, run a custom query that only shows posts with the specific custom field that you've specified.

Wordpress custom form advanced

just a quick one, are you aware of any wordpress form plugins that allow me to create a form and depending on which options they select, it will display a certain bit of information that submits to a selected email.
Im trying to achieve a web request form for clients and would like them to be able to fill out information as well as select a check box for a certain amount of questions. For example,"would you like to update your own content?"
if they check this box, i would like the form to render all the information in the form and then depending on which checkbox is selected it will give me a bit of content that is different. im trying to automate a proposal template so it writes all this content in an email so i can quickly do proposals for websites etc.
Yes, gravity forms does this. And it's very easy too.
http://www.gravityforms.com/
It is called 'conditional logic'. You enable this on a field, which will display conditional drop downs which you can choose previous 'multiple choice' questions to base your conditions on.
Think you have to pay for this plugin but you could probably find version 4 as a download somewhere to demo before you buy.
You won't be disappointed.

Drupal 7 : get user profile picture at registration

I am using Drupal 7.
I follow this link to enable profile picture of user.
Now i want to get profile picture from user at the time of registration.
How can i get this?
Any help will be appreciated.
Ideal module to do this is Reg-With-Pic
You will be given a check box at admin/config/people/accounts named "Enable user pictures on registration" and weight selection.
If you are using Content Profile module, File field would be an option.
Here is the Helper function to add default user account fields to user registration and edit form.
http://api.drupal.org/api/drupal/modules--user--user.module/function/user_account_form/7
You might also want to use the Gravatar module to take some of the pain out of what you are suggesting. It's enough trouble to set up a profile on yet another site that you might not want to force them to configure their profile at the time of registration, especially with such things as a "user picture", unless you really want to put a damper on registrations.
Depending on the type of site you are working on, the Gravatar module might be ideal. Anyone who already has a Gravatar will have it automatically set as their user picture.
http://drupal.org/project/gravatar

Resources